Hail To The King, Baby: Reverse Engineering Duke

If you’re a fan of DOS games from the 1990s, you’ve almost certainly used DOSBox to replay them on a modern computer. It allows you to run software in a virtual environment that replicates an era-appropriate computer. That’s great for historical accuracy, but doesn’t do you much good if you’re trying to leverage modern computing power to breathe some new life into those classic titles. For that, you need to dig in a little deeper.

For the last two and a half years, [Nikolai Wuttke] has been doing exactly that for 1993’s Duke Nukem II. The end result is RigelEngine, an open source drop-in replacement for the original game binary that not only runs on a modern Windows, Linux, or Mac OS machine, but manages to improve on the original in a number of ways. An accomplishment made even more impressive once you learn that the original source code for the game has been lost to time, and that he had to do everything blind.

In a blog post chronicling his progress so far, [Nikolai] explains the arduous process he used to make sure his re-implementation was as accurate as possible to the original game. He spent untold hours studying the original game’s disassembled code in Ida Pro, handwriting out pages of notes and pseudocode as he tried to understand what was happening behind the scenes. Once a particular enemy or element of the game was implemented in RigelEngine, he’d record the gameplay from his version and compare it to the original frame by frame so he could fine tune the experience.

So what’s the end result of more than two years of work and over 25K lines of code? Thanks to the incredible advancements in computing power since the game’s release nearly 30 years ago, [Nikolai] has managed to remove the need for loading screens. His engine is also capable of displaying an unlimited number of particle effects on the screen at once, and multiple sound effects can now be played simultaneously. In the future he’s looking to implement smooth character movement (in the original game, movement was in 8 pixel increments) and adaptive volume for sound effects based on their distance from Duke. Ultimately, RigelEngine should be able to replace the original graphics with new high resolution textures once some issues with the rendering buffer gets sorted out.

It’s hard to overstate how important some of these classic games are to those who grew up playing them. With John Romero still releasing DLC for the original DOOM and hackers disassembling nearly 40 year old games to fix bugs, it doesn’t seem like they’re in any danger of being forgotten.

Continue reading “Hail To The King, Baby: Reverse Engineering Duke”

The Immersive Flight Simulator From 1989

The history of PC gaming showers games such a Wolfenstein 3D and Doom with the honor of having the most advanced graphics of the day. Often overlooked is Microsoft Flight Simulator and earlier, pre-Microsoft versions from subLOGIC, including the 1977 Apple II version. [Wayne Piekarski] was playing around with MS Flight Simulator 4 recently, and wanted it to be a bit more like his modern flight sim based on X-Plane 11. That meant multiple monitors, and the results are amazing.

The video and networking capabilities for MS Flight Sim 4, while very impressive for the late 80s, are still very limited. In 1989, computers only supported a single display, and while FS4 had the ability to network machines together for dogfighting, there was no way to set the camera viewpoint to the remote aircraft.

The solution to this problem came in the form of memory dumps. Since [Wayne] is running FS4 in DOSBox, he’s able to read the memory of one instance of the game, and write those memory locations to another instance of the game. There were only 18 bytes of memory in the instance of DOSBox that included heading, altitude, roll, and pitch information for the simulated aircraft. [Wayne] is sending this data to other instances of FS4 — effectively mirroring the game on another machine — and changing the camera view to look out the left and right windows. He displayed those views on additional monitors, and was done.

The results are exactly what you would expect. [Wayne] is now taking off from Meigs Field and buzzing the ten or twelve buildings in downtown Chicago with a panoramic 180° view. Check out the videos of that in action below.

Continue reading “The Immersive Flight Simulator From 1989”

A DOS Education In Your Browser

In the 1970s and 1980s, a lot of us learned to program using good old-fashioned BASIC on machines ranging from Altairs, Commodores, Apple IIs, and the like. Sometime in the 80’s the IBM PC running MSDOS because the de facto standard, but it was still easy enough to launch BASIC and write a simple little program. Of course, there were other programs, some serious like C compilers, some semi-serious like flight simulators, and some pure fun like Wolfenstein 3D.

If you read Hackaday, you’ve probably noticed that a lot of people emulate old computers–including old MSDOS PCs–using a variety of techniques, including Raspberry PI boards running DOSBox or another emulator. Honestly, though, that’s a lot of effort just to run some old software, right? You can load up DOS emulators on your desktop too. That’s a little easier, but you still have to find software. But if you are as lazy as we are, you might want to check out the MSDOS collection at archive.org.

Continue reading “A DOS Education In Your Browser”

Raspberry Pi Turns A Novelty Radio Into A Real Computer

picomp

[Strider19] remembers the 90’s, and a great little novelty radio he had back then. Shaped like a computer, the radio was a typical AM/FM affair, with the monitor serving as a speaker. His original radio was long gone, but [Strider19] was able to find a replacement on everyone’s favorite auction site. With the replacement radio in hand, he set his plan in motion: Turning it into an epic Raspberry Pi Case.

The Raspberry Pi fit great, but [Strider19’s] 3.5″ composite monitor didn’t quite make it. Following in [Ben Heck’s] footsteps, [Strider19] cut the LCD’s control PCB down to fit the case. A piece of clear polycarbonate protects the fragile LCD from poking fingers. The monitor’s button board, two USB ports, and an external composite input mounted nicely inside the former battery compartment at the rear of the CRT. There’s even enough room back there to hide a USB WiFi adapter.

The Raspi itself fit perfectly into the base of the radio, along with a DC to DC converter, USB hub, real-time clock module, and a whole bunch of wires used to extend the connectors.

The final result is awesome! Thanks to a request on [Strider19’s] Reddit thread, we have pictures of Doom running on a (former) radio.  Even Windows 3.1 runs under DosBox, though it took a bit of tweaking to get the display settings just right. Now [Strider19] just needs to figure out how to turn that tiny keyboard into a working model. We think some old school cell phone keyboard hacking may be in order!

 

DOSbox On Zipit

poolrad (Custom)

Who out there has a Zipit? Great, now out of the five of you, who really wants to run Dos on it? Well, for the one or two of you left reading, now you can. The directions can be found here. [Hunter] has worked out a way to get DosBox running on his Zipit. At 315 mhz his old DOS games, like AD&D shown above, are running quite snappily. You can download everything you need to get up and running from the site. If DOS isn’t your thing, you may want to check out the Linux how to as well.

[thanks Harold]