DOOM Comes To The RP2040

To the point of being a joke, it seems like DOOM is adapted to run on everything these days. So it was only natural that we would see it ported to the RP2040 by [Graham Sanderson], the tiny chip powering the Raspberry Pi Pico.

You might be thinking, what’s different about this port? There have been 55 articles about DOOM here on Hackaday, showing it running on everything from web checkboxes to desk phones. The RP2040 has 256 K of RAM, two decently clocked processor cores, and 2 MB of flash, so it’s not the most constrained platform ever to have DOOM run it. But [Graham] also set some very lofty goals: all nine levels needed to be playable, faithful graphics and music, multiplayer, and it would output to VGA directly. It should play just like the original. DOOM has a demo that is stored as a sequence of input events. They form excellent regression tests as if the character gets stuck or doesn’t make it to the end; then you’re not accurate according to the original code.

There are two big problems right out the gate. First, a single level is larger than the 2 MB storage that the RP2040 has. And to drive the 320×200 display, you either need to spend a lot of your CPU budget racing the beam or allocate a vast amount of RAM to framebuffers, making level decompression much harder.

A default compression scheme wouldn’t cut it because it needed a high compression ratio and random access since decompressing into RAM wasn’t an option. However, carefully optimizing and compressing the different data structures yielded great results. Save game files are given a similar treatment to ensure they fit into the remaining flash after all the levels (34k).

The result is fantastic, and it supports DOOM, Ultimate DOOM, and DOOM II. The write-up goes into far more detail than we could here; enjoy the read. If you decide to make a day trip to the depths of Hell on your own Pi Pico, be sure to let us know in the comments.

Continue reading DOOM Comes To The RP2040″

Hacking Game Port Peripherals To Work With Modern PCs

gameport_hack

[Atiti] has a bad habit of hanging on to old things. Some people call this sort of behavior “hoarding”, but around here we understand his affliction. It turns out that in his collection of old computer peripherals, he located a Thrustmaster Formula 1 racing wheel he used back in the day. Analog racing wheels can cost a pretty penny nowadays, depending on what you buy, so he decided to see if he could hack this outdated controller to work with his new PC.

You see, the problem with this wheel is that it utilized a “game port” connecter to interface with the computer. If you don’t remember the game port, go dig up an old PCI sound card and take a look on the back. That 15-pin connector? That’s a game port. Microsoft discontinued support for the game port once Vista was released, so [Atti] had to figure out how in the world he would get it to work on his new PC.

His solution was an Arduino, which is used to read the analog signals output by the wheel. Those signals are processed and sent to a parallel port joystick emulator, enabling him to use the wheel with any game supporting a standard joystick.

Obviously he could have just gone out to the store and bought a USB wheel, but where’s the fun in that?

Stay tuned for a video demo of his refreshed wheel in action.

Continue reading “Hacking Game Port Peripherals To Work With Modern PCs”