Can it run Doom? I discovered why the answer is always yes

by Pelican Press
5 views 23 minutes read

Can it run Doom? I discovered why the answer is always yes

With its decades-long legacy, the “Can it run Doom” meme is one of the internet’s oldest and and most beloved gags. But it’s grown into far more than that. It’s a rite of passage for aspiring developers.

Take a stroll through what has become my favorite subreddit recently, r/itrunsdoom, and you’ll see the torch being valiantly carried forward to this very day. Since the It Runs Doom! Tumblr page stopped posting updates about a year ago, the Reddit community has grown to over 100,000 members that post and react to Doom being ported to just about anything. Calculators, credit card terminals — sure. But also the Nintendo Alarmo, an RS Media Robot from 2006, and a Pioneer DJ multiplayer. And that’s just from the past couple of months.

The more down the rabbit hole I fell on weird Doom ports, the more I started to wonder where the idea originated — and more importantly, why it’s even possible. Who’s absurd idea was this to begin with? To discover the story, I’d need to dig through hellish annals of 1990s internet history and speak to some of the wild-eyed hackers that keep the tradition alive today.

Get your weekly teardown of the tech behind PC gaming

Why Doom?

Our story doesn’t start in 1993 when Doom was released. It starts four years later in 1997. On December 23 that year, two days before Christmas, id Software released the source code for Doom. Mastermind John Carmack, who had written the original code himself, penned a letter to the community that still lives on the GitHub page for Doom. Yes, even today, even after a massive corporation like Zenimax has swallowed up id Software (Zenimax was then swallowed up by Microsoft), the Doom source code still exists.

“I don’t have a real good guess at how many people are going to be playing with this, but if significant projects are undertaken, it would be cool to see a level of community cooperation,” Carmack wrote in the letter. “I know that most early projects are going to be rough hacks done in isolation, but would be very pleased to see a coordinated ‘net release of an improved, backwards compatible version of Doom on multiple platforms next year.” Carmack even provided readers with a few potential project ideas.

The community started porting Doom immediately. I mean that literally. The first source port of Doom, DOSDoom, was published on the same day that the source code was released. You can still download it today. The original source code that id Software published was only for the Linux version of Doom. The DOS code wasn’t available due to a copyrighted sound library — “Wow, was that a mistake,” Carmack wrote in his letter. “I write my own sound code now.”

From there, there’s an extremely dense and complicated genealogy of Doom source ports that’s been carried on for decades. Just last year, a fork of another source port called PrBoomX showed up. Frankly, that genealogy is out of the scope of this article. Covering it alone would require an article orders of magnitude larger than this one already is. I wanted to know about the weird stuff.

Thankfully, it didn’t take long for things to get weird. The earliest oddball version of Doom I could find was for the Texas Instruments TI-82 graphing calculator, which was uploaded to ticalc.org on April 12, 1998. It’s written in Basic, so it’s less of a port and more of a shoddy clone. But even 26 years ago, there was interest in getting Doom to run on platforms it wasn’t intended for.

For the next decade or so, there isn’t much remaining on the internet showing off Doom running on these strange platforms — I mean, YouTube didn’t even go live until 2005. There were likely plenty of “rough hacks done in isolation,” as Carmack predicted, however. In 1998, several cameras with the DigitaOS operating system released, and as YouTube channel LGR showed off a few years ago, you can run Doom on those cameras. Keep DigitaOS in mind. We’ll circle back to it in the next section.

Did anyone actually get Doom running on one of these cameras in 1998? Not from what I could find, but my guess is that it’s an answer lost to time — or at least, the internet. But from the early days of the source code being released and subsequently ported to different platforms, it’s clear there was at least some experimenting happening. One of the earliest references I could find to a proper port of Doom was a Doomworld forum post from 2007, where the author links to a (now deleted) video on YouTube of the game running on a TI-83 calculator.

In October 2013, the It Runs Doom! Tumblr page went live, and after showing off some basic ports of the game, the author shared a video of Doom being played on a piano.

After scouring Tumblr, Reddit, YouTube, and just plain ol’ Google, however, there’s one video that kept showing up. It’s LGR’s video of Doom on the TI-83. Published in 2017, the video has amassed over 7 million views, and is by far the most popular source for Doom running on an unconventional device that I could find in my research. The idea that Doom can run on anything dates back to when the game was first released, and it’s been an idea that enthusiasts toyed with for years after. The modern obsession with running on Doom on a host of strange devices, however, seems to stem, at least in part, from LGR’s video on the topic.

Doom is iconic, and that no doubt is a reason behind the obsession with porting it. But there’s also a concoction of various factors within the game itself that makes it such an ideal candidate for these types of enthusiast hacking projects.

The highly portable demon slayer

DOOM running on REDSTONE COMPUTER – E1M1 in Minecraft!

Before getting into some of the more technical details of what made Doom so portable, none of that would have happened if Doom wasn’t such a certified cultural touchstone. To say Doom was insanely popular is an understatement. Valve’s founder Gabe Newell — who was working at Microsoft when Doom was released — estimated that Doom was installed on more computers than Windows in 1993. Even if that’s hyperbolic, there’s no denying that Doom was a sensation.

Just months after Doom released, in 1994, Universal Pictures purchased the rights to make a film. Newell offered to do a port of Doom to Windows for free. Intel banned Doom from being installed on work computers. In a press release announcing the game, id Software wrote, “we fully expect [Doom] to be the number one cause of decreased productivity in businesses around the world.”

John Carmack working on Quake in the id Software offices.
Shack News / id Software

“Many began to marvel at how id might make companies like Microsoft or IBM look obsolete. Id had taken the shareware phenomenon and transformed it into a recipe for addiction,” reads David Kushner’s Masters of Doom. Doom was so compelling that people just had to have the full dose. Some dubbed it ‘heroinware.’ Forbes magazine published a gushing article titled Profits from the Underground about how id, in fact, was making companies like Microsoft obsolete. ‘Privately held id Software doesn’t release financials,’ it read, ‘but from what I can flush out about the company’s profit margin, it makes Microsoft look like a second-rate cement company.’”

Popularity might have been the match that started the wildfire, but in order for Doom to run on so many different platforms, it needed three key elements. First, the source code needed to be freely available. Check. Carmack chose to take care of that step himself. After all, you could run the original Super Mario Bros on most modern electronics, but good luck finding the source code.

But here are the two points that need a bit more explaining. Source ports need to be available for just about any platform you could want, and lastly, the game needs to be written to run with extremely low software and hardware requirements, even by the standards of the late 1990s.

There are some other games that have some of these elements. But Doom, combined with its Earth-shattering popularity, hits all three. And as developer Sick.Codes explained to me, Doom became “one of the most ported games on Earth, where someone, at some time, has compiled it for even the most random architectures.”

Let me demonstrate.

Here’s a link to a version of Doom that you can play in your browser. Nothing special, right? There are dozens of ways to play Doom in your browser, but if you look at the address bar, you’ll find something interesting. That version of Doom that you can play is an SVG file. It’s a vector file — something you’d load up in Photoshop. They’re supposed to be static images, and certainly images you can’t interact with. But here is Doom running inside of an SVG that you can play in your browser.

Another important fact is that PCs weren’t the ideal platform for playing games in 1993, when 3D graphics accelerators were expensive and hard to come by, and most of these chips were instead used in arcade machines and home consoles. If id Software was going to develop a game, and especially if the company was going to distribute it as shareware as it did with Commander Keen and Wolfenstein previously, it needed to run on just about anything.

Gzalo is part of the Argentinean volunteer group Cybercirujas that takes PC parts as donations and refurbishes them. The developer was able to get Doom running on a Verifone VX620 payment terminal that they found in the trash.

“[Doom] just needs a framebuffer (area of memory that maps to the screen) to output images to, and some very basic inputs. Software wise, you just need to be able to compile C for the target architecture, which is almost always one of the first requisites needed to write programs for 32-bit processors,” developer Gzalo tells me. “For porting other newer games, you often need to have an operating system (typically something like Linux/Posix) and some way to support OpenGL, which is feasible, but requires more work.”

Gzalo went on to explain just how little Doom needed on the software front to run.

“The software from the terminal isn’t modified. I found some guy in Brazil that had worked with this terminal a decade ago and still had the development certificate and a way to sign an application, so it’s running valid signed code,” the developer told me.

Having minimal software requirements is important, but the hardware side of things is just as crucial. Unsurprisingly, Doom didn’t need a lot on the hardware front to run. The original system requirements for the game called for an 386 CPU running at at least 25MHz and 4MB of RAM. For some context, the 80386 was the first x86 32-bit processor Intel ever released, and it starting showing up in PCs in 1986 — seven years before Doom was released. Getting Doom to run on just about anything was intentional.

Carmack himself said that, at one point, there was even a version that could run without a monitor and simply save screenshots.

Pretty close. The code was extremely portable — I had a version at one point that could even run headless and just save out screenshots.

— John Carmack (@ID_AA_Carmack) March 3, 2022

The basic software and hardware requirements for Doom brings us back to DigitaOS. The operating system is written in C, and it allowed third-party apps to be developed and released for the platform. The first two cameras released with DigitaOS — the Kodak DC220 and DC260 — both came with PowerPC 800 processors. By my estimation, they used the the MPC860, which can go up to 80MHz. LGR says the chip inside the DC260, at least, reaches 66MHz.

And just like that, the requirements to run Doom have been met. We have a CPU far more capable than the 386 running at 25MHz, a touch of memory, and a platform capable of compiling code written in C. Just so we’re not getting the timeline screwed up, this was possible in 1998. There was nothing that came later that suddenly allowed Doom to run on a Kodak DC260. The building blocks were all there from the start.

This isn’t all just because Doom is some perfect program, however. It’s very flexible, and highly portable to modern devices, but a significant part of this story comes down to the fact that the source code is free for anyone to edit. In the past nearly three decades, source ports of Doom have popped up for just about every platform imaginable. If you can’t get Doom running on something with the original source code, you almost certainly can get it running with one of the many source ports.

I know you’ve been waiting — let’s talk about the SVG. Doom can run inside of a vector file because SVGs support JavaScript. As the developer of the Doom SVG says, the vector file is simply running js-dos — an open-source, JavaScript-based DOS emulator — and then using one of the various DOS source ports of Doom. And although it may seem like some form of programming wizardry, the developer refers to it as no more than “a fun use of a few hours.” That says it all.

How Doom became a minimum viable hack

Doom running on a John Deere tractor display.
Kyle Wiens / IFixIt

In 2022, Sick.Codes showed off Doom running on a John Deere tractor display. It was showcased at Def Con 2022, an annual cybersecurity and hacking conference that’s been held in Las Vegas since 1993 — ironically, the same year Doom was released. Beyond just getting Doom running, the port featured a tractor instead of guns, allowing you to literally mow down demons. It’s a fun little port, but Sick.Codes says it took months to get working. Why all of the effort?

If you’re familiar with the right to repair movement, you’ve probably already connected the dots here. John Deere equipment, created by Deere & Company, has been at the center of the right to repair movement, and not in a positive light. The corporation has had a years-long legal struggle with farmers due to its locked-down software. The equipment is nearly impossible to repair without Deere’s direct involvement. Getting Doom to run on a John Deere tractor display is more than just a fun hack. It’s a proof of concept.

“Running Doom on the John Deere flagship agricultural machinery display, that they have spent thousands of hours developing over several years, shows that I have been able to completely and fully hack the device,” Sick.Codes told me. “If I can run Doom on their flagship devices, I can do any other unauthorized modification to the device. I can brick it. I can enhance it. I can install third-party software. I can delete features, or I can install features that are supposed to cost money.”

Playing Doom on a John Deere tractor display (jailbroken/rooted) at @defcon pic.twitter.com/ih0QUTGNuS

— Sick.Codes (@sickcodes) August 14, 2022

In this case, Doom is proof of deeper, more important work. In a report from Wired that covered the story two years ago, the developer shared that they were able to access 1.5GB of logs stored in the machine due to achieving root access. These logs are only meant for certified John Deere repair technicians. With them, farmers or third-party experts can diagnose and potentially repair John Deere equipment, even without the Deere & Company’s direct involvement.

Doom requires a small number of libraries to run, namely SDL2 for graphics, so being able to run the game on a device that is not supposed to run Doom, it proves that you can run arbitrary software on the device you are working on,” Sick.Codes told me.

It’s fun to see Doom running on a tractor display, and I certainly don’t want to suck the joy out of that. But it’s important to highlight the wider context here. You can try to install other software on a device like this, but Doom is an ideal candidate for showing off this type of hack. It’s visual, it’s interactive, and it’s a program built for a very specific purpose. It also draws a lot of attention — do you think we’d see news stories about some command line interface running on a John Deere tractor display? Probably not.

Although I don’t want to downplay the amount of work that went into this — remember, this exploit took months to work out — Doom is also a relatively simple program to show off. Sick.Codes tells me that they used Chocolate Doom for the demonstration, which is a source port that’s built to run on as many different configurations of hardware and software as possible. I mean, there’s even a page of the Chocolate Doom wiki specifically devoted to how portable the source port is. If we didn’t have the original source code, and if that source code wasn’t ported so many times, we probably wouldn’t have this demonstration. It would still be possible, certainly, but who’s to say it would’ve actually happened?

Welcome to hell

Floppy discs for Doom 2.
John Romero / Ebay

Doom is one of the most influential games ever made, and a large part of that comes down to the circumstances it was created under. Highly optimized code for PC met the shareware model to make the game wildly popular, and its modding community snowballed when the source code was released in 1997. Today, we not only have one of the largest and most accessible modding platforms through Doom, but also an application that has far outlived its original purpose.

I started feeling nostalgic writing this story, and you might be feeling the same way after reading it. If you are, I’d recommend downloading GZDoom and playing around with some of the insane levels that have been created over the years — you can find the original WAD files for the first two games archived online as well. If you want to go deeper, check out the documentary on MyHouse.WAD if you haven’t already (the video has some 13 million views), or better yet, download the level for yourself.

And, if you want to stay in the spirit of putting Doom in places it isn’t supposed to be, some generous developers have documented their journeys across different devices. There’s a write-up for installing it on the Ikko Activebuds earbuds, and another for installing it on a VoIP phone. There’s also an in-depth post about porting the game to the aforementioned VX620 payment terminal.

Regardless of how you enjoy, expand, or completely change Doom, have fun in hell. Hundreds of thousands of fans and developers are waiting there for you.








Source link

#run #Doom #discovered #answer

You may also like