Raspberry Pi: The Perfect Machine For Old DOS Games

DOS

There’s a treasure trove of excellent yet ancient games made for DOS that are nearly unplayable on modern computers. Awesome games like the Lucasarts SCUMM adventures, the original Civilization and SimCity, Starflight, the King’s Quest series and even Leisure Suit Larry aren’t played much today because of the near impossibilities of getting them to run on modern hardware or setting up an emulator with proper sound.

[Patrick] has been doing his best to help out classic gamers with an x86 emulator for the Raspberry Pi. It’s designed to be a very capable DOS box with 20 MB of extended memory, a 640×480 display with 256 colors, an ~20MHz 486 emulated CPU, and a Soundblaster 2.0 sound card.

There’s still a lot of work to be done, but outside of finding a 20-year-old computer, emulation on a Raspberry Pi it probably the most authentic DOS gaming experience you’ll get.

62 thoughts on “Raspberry Pi: The Perfect Machine For Old DOS Games

    1. It’s better optimized – it’ll run faster because it’s optimized for the architecture. It’s a fork of an emulator that runs quite nicely on a DS – a system most people (apart from me and of course the author) thought capable of running x86 emulation because of its relatively slow CPUs.

        1. OK, I bite. I found no sources so i diassembled it.

          0. It is *CLEARLY* not optimized for anything near RPI. To start with, it is in arm. Now…since Thumb2 was created, it has almost the same performance, but is smaller, resulting in more fitting into icache, so almost all code benefits from being thumb2. This one i snot in thumb 2… it can probably gain 5% or more from that change..

          1. It is compiled with symbols, and does not look to be built at -O3, or (the smarter if you are writing an emulator an know what icache is) -Os

          2. It is a *SIGNIFICANT* ripoff from DosBox (function DasmI386 and, thecnically, DasmLastOperandSize are verbatim copies, including names, the map table is also copied verbatim, including name, op386map1)…, Now, you may ask, why is there no source available if this is a derivative work from GPL….well, I don’y know, ask the author…

          In conclusion, I take my words back, the author clearly knows what dosbox is – he ripped it off….

          Sources please!!! GPL demands it…then we can even better inspect how “optimized” this it….

      1. Actually, yes and no – check the wikipedia page on “Turbo Button” – it says it used to either disable cache or halve the clock. I remember doing tests many years ago myself and all the machines I tried disabled cache rather than changed clocks.
        Perhaps it halved the clock on 486DX2s – those were the first x86s that had a different FSB clock and CPU clock (33MHz vs 66Mhz actually) – I still have mine but don’t remember testing the turbo button effect. I have the 486DX2-66 (and P200 and P4-2.53GHz) standing at the end of the desk as I type – but I doubt it still works :)

          1. That’s funny – I wonder why they needed a turbo button on an 8086. IIRC it existed in later processors for software that was written to get its timing from expended CPU cycles (i.e. it was known that a certain x86 instruction took exactly n clock cycles to complete), so on newer processors where the instruction took less cycles, or there were more cycles per second the software would run too fast (breaking animation, event timing in games, audio sampling, for example). This “backwards compatibility” shouldn’t really be necessary on an 8086 since, as far as I know, it was the first x86 ISA computer.
            Also, I wonder what the crystal frequency was if the clock went from 4.77 to 12 MHz. Those would be some weird divisors. Perhaps two different xtals?

      2. I was fairly sure the Turbo button on my 486 DX4-100 took the clock speed down to 8MHz, the AT standard CPU speed (I think!). Though obviously a 486 at 8MHz was a lot different than an 8086 or 286 or whichever.

        Different combinations of the Turbo button and switching on and off the cache (a little program I had) would usually find a speed the particular DOS game I was playing would be happy with. Now it’s simpler still with DOSBox.

        I don’t think the Turbo button ever had an official, standard, function. They just did some-sort of slowing down at the motherboard maker’s discretion. Wierd thing to have, really. The original purpose was so that XTs would run at the same pace as the original PC, for early programs that did naughty things to hardware, and flaky things in software.

        Cycle-counting never really took off on the PC!

  1. Yea…Uh, cool project and all, I love the idea of using a rsppi as a dedicated dos clone, but… “near impossibilities of getting them to run on modern hardware or setting up an emulator with proper sound”?

    Seriously? Download dosbox. Install it. Run your game. Done.

  2. Why do you find it “near impossible” to run old games under DOSbox? Ah the broad brush stroke of sensationalism and HaD uses. A year from now they will be psshawing the Raspi. “Remember how impossible it was to run old DOS games on Rpi? Fear not the, Meatloaf FPGA changes its pins from digital IO to analog inputs on the fly and after extracting this tarball and compiling an ISO and then using bart’s to flash it to USB and change your overall output resolution, you too can enjoy every pixel again like you have with every other device-even routers.” or some such.

    1. Whoa, cut the guy some slack! Who knows, maybe Brian tried and found his particular setup had constant sound problems with DosBox. I haven’t had that issue, but if I had a complaint about getting old games to work with emulators it would be that the directory structure is never consistent between tutorials/documentation and emulators.

      1. How unusual, it’s almost as if directory structure reflects the user’s whims and is not actually a *technical* issue. If working out the directory structure is a problem for one of the people who runs HaD, please turn in your geek badge and nerf gun…

        1. Actually, I’m referring to the directory structure of the emulator itself. If you’ve run a few, you’ll know exactly what I’m talking about, especially if you get into mame variants.

          I just said “if I had to complain about…”. It is an annoyance for anyone, hackaday staff or not. But yes, I did figure it out… repeatedly.

          1. MAME is a disaster when it comes to setting up file paths, this is true. But DOSBox is super easy for this kind of thing. It allows you to mount (that’s the actual command!) part of our host filesystem into your DOSBox filesystem. You do something like (off the top of my head):

            C:> mount ~/old_dos_games/SOPWITH d:
            C:> D:
            D:> sopwith.exe

            …and you’re off to the races. You can even put the mount commands in your ini so that you load up your old games archive on one DOS drive, utils on another, etc.

      2. HaD readers sometimes kvetch over the most insignificant things. This is not one of those times. Acting like there’s a great new invention to solve a problem that’s never been solved, when the solution is completely old hat and well known, is shoddy at best. At worst, it’s intentionally misinforming readers to create hype for the site. I assume it’s the former because the backlash to the post had to be predictable, but it’s still a bit embarrassing – or at least it should be.

      3. DOSBox sound can suck, I can confirm that, it really depends on sound engine and in the old days everybody had his own speciality. But in this case it’s really weird because he chose specifically SCUMM games as an example of something that’s “impossible” to run properly while there are ScummVM ports for every platform imaginable.

      4. Yeah, sorry Caleb. I re-read it and it does sound more like a rant than a friendly rant. I smiley face would have gained some mileage at the end of that one lol. I haven’t had that many issues with DOSbox but then again I am not running multithread fourbangers so I guess it is one of those ymmv things :)
        As per the directory structure probs, the main problem I have encountered on some devices is that it nulls to “…” or some similar array of punctuation, depending on the device, but it is always at the top of the tree. Not super confusing at setup, but the next time ya go to play after saving a 4 hour run and the quick heart attack when “directory not found” appears is never fun. Then ya back out a directory and see all of your games there and your buttocks releases its icy grip on your desk chair lol. That is something no man should have to live thru ;)

  3. I’d hardly call it authentic when the RasPi lacks a midiport/gameport to plug an old controller into. Remember those, big connector that rarely had screws on it despite every midiport/gameport having nuts to catch the screws with.

      1. the pins, and an i2c/spi adc chip. but i would just use a microcontroller for simplicity/cheapness.

        i kinda want to spin a daughter board to support old skool interfaces. ps2 keyboard/ps2 mouse/joystick/serial and also power the pi. not sure how to support all that in linux though. my linux-fu is not strong.

        1. You don’t need an ADC. The PC gameport joystick is analogue, but is read using a resistance-to-time converter. Basically, you zero a capacitor. Then set it to charge thru the joystick’s pot, of which there is one for horizontal and one for vertical. The time it takes the capacitor to reach a threshold voltage is determined by the resistance of the pot. You measure the time with the PC’s timer, and from there work out the joystick’s position. Simple!

          The Atari 2600 used the same method for it’s paddles. So did lots of old computers I bet. So you wouldn’t need an ADC, just a capacitor and a couple of digital I/O lines.

  4. we love hackaday !!! no matter how bad a single article can get … we will still love u .. but u gotta realize your readers arent quite normal , just as u. btw – in case dosbox may cause issues.. i was thinking … limited hw setup via virtual machine? not sure about sound though

  5. I never knew about DOSBox, until I read the comments, that’s why I bother reading the comments. This post was about Patrick’s work, why is their need for Brain to mention DOSBox? Probably more important things to feel butt hurt over ;)

    1. I’d imagine it’s because of this: “the near impossibilities of getting them to run on modern hardware”, when referring to old games, and it being a quite wrong, thanks to Dosbox existing.

      Brian could have said that something like “they are near impossible to run natively or without the use of DOS emulators like Dosbox on modern hardware” and then gone on to explain that [Patrick] has gone and made a dedicated emulator for the RPi as an alternative.

      In the end, it just boils down to bad wordsmithing that’s all.

  6. While I haven’t yet tested out this new DOS emulator, but I will challenge those who think DOSbox is actually functional on the Pi (with Raspbian). With the 512MB Pi overclocked to 900MHz and memory split at 320 Commander Keen and other ID games only run at half speed. All is not joyous with DOSbox, I would go as far to say it’s basically unplayable. This makes DOSbox on the Pi not all that useful for me. Any other attempts at emulation are quite welcome.

    1. That’s why I still keep my old dual Pentium Pro 200 around. Descent and Star Control :P

      It would be nice to see if the Pi could use its own 3D HW acceleration for Descent (like the old S3 Virge card) :P

      1. Ahh the S3 ViRGE… good times. Hadn’t thought about that card in years. I thought I was on top of the world when I got one of those cards and saw how smooth Descent could be. Thanks for the trip down memory lane!

  7. His credits page says “The DOSBox sources have been a great source of information. When in doubt, check how the DOSBox people have done it.” So why all the complaints about not mentioning DOSBox?

  8. Speaking of /\/\otorola, I sure would love a more portable version of Trunker.

    … and when I go looking for older computers to run older software I run into these jerk-idiots who when I ask if they have the driver disk because I don’t want vista, and I want to use the parallel port, they take a sipp of their “i’m uber than you” cool-aid and start spouting about “just saying no to legacy”.
    Anyone else know of this???
    KILL-KILL-KILL…

  9. What the article does not mention is that this is the project by Patrick Aalto. Quite a few people here should be old enough to remember LineWars and then the incredibly impressive LineWars II. You had to live it to appreciate shaded antialiased polygons in 320×400 “X-mode” on a pre-superVGA video card on a 386. Hey Patrick, that was fantastic!

  10. As far as supporting the Motorola programming software, I can’t see why not. I am about to try the same myself. I have some old GP300 radios to program up and DOS on a slow 386/486 is the only way (until now).

Leave a Reply

Please be kind and respectful to help make the comments section excellent. (Comment Policy)

This site uses Akismet to reduce spam. Learn how your comment data is processed.