Stacksmashing ports DOOM to Nintendo’s newly-released Game & Watch paving the way for further hacks
From music players to cameras to hacked game consoles, DOOM manages to find itself on everything that can remotely run it and Nintendo’s recently released Game & Watch is no exception! In this article, we’re going to look at how Stacksmashing ported it to the Game & Watch together with the challenges he faced.
The Game & Watch and its hardware
Despite the recently announced Game & Watch consoles being released on November 13th with a Super Mario Bros edition, folks are already hard at work finding out what else can be done with the device.
After all, being able to play 3 games and check the time isn’t enough for the more adventurous ones out there so Stacksmashing, together with the help of Konrad Beckmann, got to work on running 1993’s DOOM running on the device.
However, this proved not to be an easy and straightforward task as Nintendo definitely didn’t go overboard hardware-wise due to the new Game & Watch only being intended to play NES and Game & Watch titles. As a result, the device only packs in:
- An STM32H7B0 microcontroller which comes with an ARM Cortex M7 core that can run at up to 280MHz
- This comes with the ARMv7E-M architecture
- Around 1.3MB of RAM, which undoubtedly limits homebrew potential while also posing interesting challenges to be overcome by those who are more persistent
- 128KB of Flash Memory on the aforementioned microcontroller together with a 1MB Flash chip that’s slower than the former 128KB segment
Stacksmashing ports DOOM to the Game & Watch
Moving onto the actual DOOM port, Stacksmashing explains that the starting point for the port was STM32Doom which is intended for a similar microcontroller. However, STM32Doom was designed with a system having 8MB RAM and being able to load files off a FAT32-formatted USB pendrive which are luxuries not afforded by the Game & Watch meaning that Stacksmashing had to be creative to get the port working.
Starting off with storage issues, DOOM 1’s WAD is 4MB large while DOOM 2’s comes in at 14MB meaning that using the original WAD file unaltered was out of the question. As a result, Stacksmashing went ahead and made use of Minimal DOOM which together with wadptr generated a WAD weighing in at under 0.25MB despite the game not looking as pretty. After the storage issues were addressed, the amount of available RAM was another concern but by stripping some features such as sound support and changing how memory was handled (dynamic to static allocation), memory usage managed to drop within acceptable limits.
Following the implementation of Game & Watch-specific features such as support for its buttons, LCD and Custom File Handling, DOOM managed to run on the device albeit with abysmal performance. Thankfully, Konrad Beckmann managed to drastically improve how the game was running which turned the game into a somewhat playable experience which will undoubtedly inspire many more to create homebrew for the device!
You may learn more about Stacksmashing’s DOOM port by viewing the YouTube video below. Source code for the port is also available which will undoubtedly come in handy for those who want to tinker around themselves!
Game & Watch DOOM GitHub Repository: https://github.com/ghidraninja/game-and-watch-doom