Update: Hacker brings Flappy Bird to Dreamcast’s VMU
It's not so much about the game, but about the hack
[Update] I’ve just been reminded that this isn’t the first time that Flappy Bird has come to the VMU. Just over a year ago, we reported that ‘guacasaurus_mex’ managed to bring his own version of the game to the VMU.
But that doesn’t detract from what Dmitry has achieved here – from what I’ve understand, the previous Flappy Bird VMU was coded specifically for the VMU. But what Dmitry has done is hack the VMU to be able to emulate a modern CPU – making it a lot easier to program for; which (in theory) should really open up the VMU scene for future ports.
[Original post] The console that never dies, has a unique memory card that also never dies, it seems – as a hacker called Dmitry Grinberg has managed to bring the wildly successful and addictive mobile game, Flappy Bird, to the Dreamcast’s VMU.
While Flappy Bird was pulled from the AppStore several years ago and the game itself is surrounded in controversy, with claims that it was a rip off of Piou Piou vs Catctus (a game that came out two years before), it’s hard not to deny how addictive it was for many mobile gamers, considering it was bringing the developer $50,000 a day(!).
Of course plenty of copycats have arisen since then, so gamers have plenty of choice out there to get their ‘Flappy‘ fix – but for SEGA fans and people who like quirky ports, this is quite an impressive feat – especially when you read what it took to port the game to the VMU.
As I’m not a hacker, here’s a comprehensive breakdown of what it took Dmitry to make the hack, from the website Hackaday:
Then he started reverse engineering the ROM that comes with the SDK, which was only trivially obfuscated. Along the way, he wrote his own IDA plugin for the chip. Discovery of two ROP gadgets allowed him to dump the ROM to flash, where it could be easily read out. Those of you in the VMU community will appreciate the first-ever ROM dump.
On to doing something useful with the device! [Dmitry]’s definition of useful is to have it emulate a modern CPU so that it’s a lot easier to program for. Of course, nobody writes an emulator for modern hardware directly on obsolete hardware — you emulate the obsolete hardware on your laptop to get a debug environment first. So [Dmitry] ported the emulator for the VMU’s CPU that he found in MAME from C++ to C (for reasons that we understand) and customized it for the VMU’s hardware.
Within the emulated VMU, [Dmitry] then wrote the ARM Cortex emulator that it would soon run. But what ARM Cortex to emulate? The Cortex-M0 would have been good enough, but it lacked some instructions that [Dmitry] liked, so he ended up writing an emulator of the not-available-in-silicon Cortex-M23, which had the features he wanted. Load up the Cortex emulator in the VMU, and you can write games for it in C. [Dmitry] provides two demos, naturally: a Mandlebrot set grapher, and Flappy Bird.
Got all that? Good.
As you can see, the hack isn’t that playable, as it runs incredibly slow on the Dreamcast’s little memory card and looks like the controls are pretty unresponsive, but it’s still pretty cool.
For anyone who wants to play the game or any budding hackers out there, Dmitry has a link to the download, plus a complete overview what it took to port the game on his website.
[Source: Hackaday, via Gizmodo]