A ROM surprise

Two years ago, this post appeared on Reddit:

Satoru Okada, the guy who worked on the first game boy handhelds, shared a prototype Japanese rom which they used to test the game boy advance.

Tested by me on mgba and vba m, sadly the menus are written in Japanese so I don’t understand a thing.

I didn’t miss the opportunity, I immediately downloaded and put it aside, even if the name contained spelling errors (Bokojou Tengokou instead of Bokujou Tengoku). These things, you know, don’t last long, then the links start disappearing. In fact, aside from the fact that Zippyshare for some reason blocks all European users, that link is already dead.

I’m surprised, a 256 Mbit ROM (8 times larger than average) dating back 20 years???

Months pass and Bokojou Tengokou (Proto) (Japan).gba stands there “gathering dust” on the disc.

Until today, found it again, tried it and… the result left me really amazed, I didn’t think the GameBoy Advance could do things like that, I imagined it much more crude.

The ROM is available on Archive.org at the address: https://archive.org/details/BokojouTengokouProto or directly from here:

PS2: after 20 years one exploit is found, to run pirated games without modification.

Running pirated games on PS2 has always been possible, but it has never been within everyone’s reach.

With FreeMcBoot you can take advantage of a bug in the memory card management (fixed in the last slim PS2 production batch) to load games from USB or on hard disk (on PS2 “fat” first version). But you have to have a memory card created in a special way and at the time it was not easy. (At least: you paid a lot of money for the installation “service”)

Or with swap disks or action replay, but even so it’s not as easy as putting a disk in the drive.

Then there is modification via modchip. The chip alone costs very little (5 euro) but soldering 20 solder on the tiny pads of the motherboard is absolutely not within everyone’s reach. And so, a 5 euro chip with 100 euro of labor…

But now there is FreeDVDBoot: CTurt has found a way to run burned games without modification.

Creating a video DVD in a special way, you can insert an exploit in the DVD menu that allows foreign code to be executed.

So, the PS2 starts playing the DVD video (which works with homemade discs), then the menu contains “malicious” code that runs something else, homebrew, emulators, or even a commercial game.

As seen in the video, “Sony Computer Entertainment” is written at startup, but not “PlayStation 2” – because it is loaded as if it were a DVD movie

Like the exploit used 20 years ago on the Sega Dreamcast: the copied game pretended to be a MIL-CD (music format used only in Japan and only used by 4-5 albums in total), then played the full game.

There are currently no tools released to make the operation easy: the game must be set in a specific way with a special launcher, it doesn’t work with just any copy. For the launcher there is no source code but only the explanation of the operation: the programmer (who if I understand correctly works for Microsoft) doesn’t want to have anything to do with piracy and would like his work to be used only for homebrew.

I’m sure there will be someone else who will complete the work: ESR (the program used to load the burned games “disguised” as DVD movies) was published over 10 years ago, the only difference is that it was necessary to load it via FreeMcBoot (the “special” memory card), now you can load it more easily.

How to merge many mp4 videos with FFMPEG in a few seconds

I got a video, splitted into lots of files, each only 5 minutes long. I had only two options: either I wasted 30 minutes manually inserting them into a windowed program, or I wasted 2 hours figuring out a command line solution.

Obviously I chose the second option, so in the future the conversion will be more immediate, just follow this post 😉

First of all you have to create a text file that contains the list of files to convert.We have the computer do it. Assuming that all the files to be merged are all located in the same directory and are *.mp4 files, you have to type:

find *.mp4 | sed 's:\ :\ :g'| sed 's/^/file /' > list.txt

This creates a text file called list.txt which contains the file name (preceded by the keyword file).

Then, you pass the list of files to join to FFMPEG, with the command:

ffmpeg -safe 0 -f concat -i list.txt -c copy video-merge.mp4


What to do if a LibreOffice file is extremely slow

A colleague has a problem with a LibreOffice Calc file: it was extremely slow to open. It took just 10 minutes to open and then the computer is paralyzed. I tried to convert it to Excel, but even opening it with Microsoft Excel was extremely slow.

I tried to use the power of the cloud, putting it on Google Drive and then opening it with Google Sheets. Nothing to do, it freezes the browser!

I then saved the ODS (OpenDocument Sheets) file as FODS. The OpenOffice/Libreoffice files in fact, are zipped XML files.

A FODS file is simply the same ODS file, only not being compressed, you can open it with a text editor to understand what’s going on.

From here you can already see that something is not right. Compressed occupies 0.16 MB, not compressed 7 MB? Compression is not magic, to become so small, it means that the file contains lots of repetition.

In fact, here’s the problem. For some reason, there are hundreds of thousands of tiny, invisible text boxes in the file!

Unfortunately, however, it is not a contiguous block. There are hundreds of blocks scattered among “good” content to keep, select and remove them by hand is an operation that takes days!

Here comes xmlstarlet.

You download the Windows (or Linux) version and study the syntax with

xmlstarlet el yourfile.fods

and a very long list with the file structure will appear. As we saw in the text file, we have to get rid of this structure:


and we do it with:

xmlstarlet ed -d "office:document/office:body/office:spreadsheet/table:table-row/table:table-cell/draw:custom-shape" yourfile.fods > fixed.fods

Done! Now the file opens in very few seconds, again! You can save it again as ODS.

Looking for a DVD player? I’ll build it with Linux, it’s very easy!

A friend wants an easy way to entertain his son or show him some DVDs. He is 2-3 years old so expectations are low. According to him the best option is to buy this portable DVD player with NES emulation support.

What? That screen is so bad! This to your kid eyes! I’m on it! I have an unused IBM ThinkPad in the basement, I’ll convert it into a Linux-based children’s video player/console in no time! Piece of cake!

First of all, I clean up after years of use: ew. The used masks are great and take away all the accumulated dirt with a few passes.

Then I update the BIOS to the latest version. The new bootlogo that appears at power up is aesthetically uglier, before there was the “vintage” Intel Pentium logo, now it’s modern.

The logo that appeared before (on the left) was very retro and I liked it better.

Well, anyway to see from the changelog a lot of things have changed so I leave it alone. I should have taken some pictures to document it.

Time to choose the operating system. Ten years ago I put Windows 7 but with a Windows XP skin because without Aero support it was aesthetically horrendous. But it was already a problem at the time: it refused to install because the PAE instructions were missing. To install it was quite complex. I absolutely don’t remember which processor it has. I bought it in 2009 in Japan, used, already 5 years old. I remember “Pentium 1.4 Ghz” of maybe 1.6. So it’s probably a Pentium M “Banias”, because the next ones have a numerical name. It doesn’t have 64-bit support. Ubuntu no longer exists at 32 bits. Oops!

Debian still has a 32 bit distribution! I take a 32 gb USB stick and flash on it the offline debian installation dvd, 4 gb. It won’t start. After 30 minutes or so, what if 32gb is too big? It’s too big. At the time, a 32 GB pendrive was pure science fiction. I flash the CD version of Debian in an old 1GB pen.

But you need the Internet to install properly. This computer does not have Wi-Fi. I have to get an Ethernet cable and connect it directly to the router.

In the meantime I try to see the status of the battery. According to Windows it is 255% charged, a sign that something is wrong (I should have taken a picture…). The battery of the internal clock is already gone and will have to be replaced, who knows the status of main one. I want to measure how long it lasts. I load the Debian setup, unplug it and start the stopwatch. Incredibly, it lasts over 40 minutes… and my phone memory is full! I stop the recording, I’ll try later on to see how long the gameplay lasts.

After finding the Ethernet cable, it’s time to start the installation. I’m really curious to see how the games above will run. At the time I bought this computer based solely on one parameter: price. I had assumed that this was a Pentium 4 Mobile, instead it is a “Pentium M”. The Pentium M, we read on Wikipedia, is not a low-power version of Pentium 4, but an evolution of Pentium 3, almost a Pentium 2. I’m a little demoralized. I thought I had a bomb, but I have a wreck. At this point I don’t even know if he’s got a DVD player instead of a CD! Anyway, it’s extremely quiet. Doubtful. Isn’t the fan probably broken?

The fan’s broken. Now it doesn’t turn on anymore, it says “Fan error” when it turns on. But it only takes a couple of knocks to start it up again. I’ll have to take it all apart and clean it up.

I do the basic installation, without including anything, just command-line tools. Once finished, I login, and type the first command:

sudo apt install xorg mednafen retroarch

I’m being offered an avalanche of packages, the installation will be long.

I type startx and then retroarch

The sadness. Just the user interface of Retroarch runs at 5 FPS, really in slow motion…

I’ll try installing Firefox and VLC to see how YouTube goes:

sudo apt install firefox-esr vlc

After a startx and then firefox the result is that even at 360p it’s too slow.

The audio is not installed, the guides are not clear and contradict each other. I go with a (definitely not correct)

sudo apt install pulseaudio alsa-tools alsa-utils alsaplayer-text alsaplayer-daemon alsaplayer-oss

After a reboot (faster to figure out how to restart the pulseaudio or alsa server) the audio works!

I’ll try a DVD, it looks like I have a DVD reader, thank goodness! Pirated DVDs work, but original ones don’t. You have to load the css libraries to read them.

While I’m trying to find out how to remove copy protection from the DVDs I’ve regularly purchased, I install Dosbox, SCUMMVM, Gcompris (great opensource preschool game).

I can’t install libcss, the library to read the original DVDs. I give up, anyway the child who will use this system will not be given them (for fear that it will ruin them, being too young)

I enable automatic login on the basis of this guide.

sudo nano /etc/systemd/logind.conf

change #NAutoVTs=6 to NAutoVTs=1, then:

sudo systemctl edit [email protected]

(which creates a file in /etc/systemd/system/[email protected]/ called override.conf )

Then you paste this:

ExecStart=-/sbin/agetty --autologin root --noclear %I 38400 linux

enable and restart:

systemctl enable [email protected]

I install thunar (a kind of “file explorer”) to have the possibility to manage files with a graphical interface

sudo apt install thunar

Retroarch is so slow even with the rgui interface (the raw, DOS-style one) that it is totally unusable. It’s time to download some milestones of emulation.

sudo apt install zsnes pcsxr gngb nestopia

PCSX can’t decently emulate even Ridge Racer, even at the lowest resolution.

Mednafen sees the joypad inside Mednaffe (the configuration utility) and allows you to assign buttons, but then during the game it doesn’t see it. And then it doesn’t support Super Game Boy emulation.

Nestopia emulates Super Mario Bros. in slow motion as well.

GNgb works fine…. after losing half an hour for configuration exclusively via command line, it has glitches that make many games unplayable.

ZSNES works perfectly! Exactly as I remembered when 20 years ago I used it on a PC much less powerful than this one. Even in full screen and with filters!

Regarding video playback.

VLC is choppy with any kind of video, whether it’s a HD h264 or a 20-year-old crappy quality DiVX.

Mplayer (a version abandoned years ago) instead can play any video, even HD and h264, very smoothly.

So, I think this is the cause: the updated versions of emulators and media players use too many resources, I need obsolete versions to use this PC. Stuff like Visual Boy Advance, Bleem, Media Player Classic 6.4.

For Windows these ancient versions are easily found, for Linux it’s too hard. I lost an afternoon for nothing: it’s time to format everything and put Windows XP. I will then find a way to make it childproof

In the meantime, however, my friend is leaning more and more towards the 65 euro DVD player, there you just have to put the disc and press play…. but it’s less versatile! 😉

Linux and OpenVPN, how to save the password

I recently purchased a VPN subscription from Fastest VPN, with the purpose of using it on Linux, via SSH, command line only. They don’t offer anything special about Linux and the command line, they just use OpenVPN.

How it works: simply install OpenVPN (for example with sudo apt install openvpn), then download the configuration files (for example, these are the files for Fastest VPN) and just write sudo openvpn nomeserver.ovpn to connect.

But there is a big problem: each time you have to write the password by hand! Intolerable, especially with a complex password. Luckily there is a shortcut.

You can create a file with credentials. In a directory accessible only to you, create a file called login.conf and enter, on two lines, username and password, like this:


At this point we modify the *.ovpn files of the configuration. For example, open Luxembourg-UDP.ovpn and see the auth-user-pass entry. We replace it with auth-user-pass login.conf, so when we load the configuration with openvpn, our credentials are auto-filled. Now though, here are 50 files, one for each server. Do we open the files one by one and edit them by hand? No way! sed was invented on purpose.

Just write it down:

sed -i 's/auth-user-pass/auth-user-pass login.conf/g' *.ovpn

and automatically all lines with auth-user-pass will be changed with auth-user-pass login.conf. So, when we download the updated server configurations, they will continue to work perfectly!

How does the Nintendo DS know when you change the time?

Summer time is back in effect from today, so I changed the time on the few devices that can’t adjust on their own via the Internet.

This includes the Nintendo DS, and seeing it sitting there on the shelf gathering dust reminded me of an episode that happened years ago: Pokémon Diamond could tell when you changed the time, even if the cartridge wasn’t inserted and there was no Internet connection! But how did he do that?

The solution they found is very simple: the internal clock remains at the same time, set in the factory, and when you set the time it is not actually changed, but simply the system takes note to add the difference. For example, “add 34599 seconds to the system time”.

So, games with time rewards like Pokémon or Animal Crossing just need to write somewhere in save file the difference between the “fake” and the “real” time: if it only changes by one second, it means that the user has changed it!

If you have a 3DS you can hack the system to always use the real date. After enabling homebrew (a bit complicated and laborious, if interested ask in the forum or in the comments, I leave here this guide), you can run ctr-no-timeoffset to set the difference between the two clocks to zero, and then set the internal time to the “correct” one via GodMode9.

Visualize the spread of viruses and bacteria

I found two very useful videos to visualize the spread of viruses and bacteria.

The first one, produced by Bauhaus-Universität Weimar, shows the airflow that is moved when coughing, and what is the difference between coughing in the hand, elbow, or in a mask, normal or surgical. There’s a big difference!

The other is from Mark Rober, again, a Youtuber who, if you read my other posts, I suggested many times. In the video he scatters a dust, visible only with an ultraviolet lamp, on the hands of three children, during a lesson at a primary school. At the end of the lesson he shows the spread of “bacteria” (actually only this harmless powder), and how it spreads with handshakes!