Sunday, July 19, 2026
HomeIoTGraham Sanderson's Chocolate Doom Port Brings the Basic 1993 Shooter to the...

Graham Sanderson’s Chocolate Doom Port Brings the Basic 1993 Shooter to the Raspberry Pi Pico

[ad_1]

Raspberry Pi engineer Graham Sanderson has achieved what at first look would appear unattainable: working Id Software program’s traditional Doom on the Raspberry Pi Pico, a microcontroller with no native video output and simply 264kB of RAM.

“Will it run Doom” is taken into account a problem to {hardware} hackers throughout the land, who’ve made the 1993 first-person shooter playable on GPS receivers, thermostats, oscilloscopes, and potato-powered graphing calculators — form of, anyway.

Getting it working on a Raspberry Pi Pico’s RP2040 microcontroller, although appeared a step too far: Whereas its dual-core Arm Cortex-M0+ CPU packs a punch nicely above its weight, significantly as compared with the desktop processors of the period, having simply 264kB of RAM places it nicely beneath the 4MB normally required.

Doom, however not as you recognize it: This port’s working on an RP2040. (📹: Graham Sanderson)

“The RP2040 is definitely not the tightest platform Doom has ever been ported to — though at <$1 it’s most likely one of many most cost-effective — so I wished to set my self a extra aggressive set of objectives,” Sanderson explains of the venture. “Every thing ought to match the unique recreation expertise. It ought to really feel like the unique recreation. It ought to run on a Raspberry Pi Pico. The RP2040 ought to output on to VGA (16 coloration pins for RGB565 together with HSync/VSync) together with stereo sound.”

All advised, that is fairly a set of challenges: The WAD file — “The place’s All of the Knowledge” — bundled with the shareware launch of Doom is 4MB, already too massive to suit on the Raspberry Pi Pico’s 2MB flash chip — even earlier than the sport code was included. There is not any video output or audio output on the Raspberry Pi Pico, both, solvable by means of the usage of programmable enter/output (PIO) state machines.

Transferring to an RP2040 board with bigger flash unlocks help for Doom II. (📹: Graham Sanderson)

“Desirous to help the unique demos means every thing has to match precisely with the unique recreation,” Sanderson provides, “because the demos are merely a sequence of enter occasions, and the slightest calculation or habits distinction could cause ‘desync’ ending up, for instance, with the participant working into, and capturing at, partitions.”

Regardless of these challenges, Sanderson’s venture was successful: The RP2040 Doom port, which relies on the open supply Chocolate Doom engine, is able to working the unique Doom WAD on a Raspberry Pi Pico; shifting to an RP2040-based board with 8MB of flash unlocks help for the Final Doom stage pack and the sequel Doom II.

That is not all, although: Sanderson’s port additionally consists of nine-channel OPL2 music and eight-channel stereo sound, help for a USB keyboard as an enter system, a playable framerate of 30 frames per second or greater, and — in an impressed addition — help for four-player networked deathmatches performed over an I2C community.

“Doom may seem to be a frivolous utility, however it demonstrates simply how highly effective RP2040 may be within the arms of an skilled consumer,” Raspberry Pi’s Eben Upton says of the venture on the corporate weblog.

“It gives loads of reminiscence and integer compute efficiency; versatile I/O, used right here to drive a VGA monitor and interface to a USB keyboard; and, critically, the flexibility to concurrently drive each aspect of the chip laborious with out tripping over your self.”

With a Pico costing $4 and an RP2040 out there for as little as $0.75, this might be the most cost effective Doom machine but. (📹: Raspberry Pi)

An in depth technical write-up is offered on Sanderson’s web site, whereas the supply code and compilation directions may be discovered on GitHub beneath the reciprocal GNU Common Public License.

These keen to present it a go, nevertheless, may have to choose their Raspberry Pi Pico from a winner within the silicon lottery: The venture runs the RP2040 at 270MHz, an out-of-spec overclock, which requires a flash chip able to working at 135MHz — one thing not each board can handle.

[ad_2]

RELATED ARTICLES

LEAVE A REPLY

Please enter your comment!
Please enter your name here

Most Popular

Recent Comments