ASCII by Jason Scott

Jason Scott's Weblog

Each New Boot a Miracle —

This week, we got the emulation of MS-DOS programs (mostly) working on the Internet Archive.

Up to now, every single emulated system has been via the JSMESS project, which supports well over 600 systems and which does a hell of a bang-up job on it. The fact that one system (MESS) emulates everything from an Atari 2600 to an Apple II to a PDP-1 and so on… that’s pretty amazing stuff. And when we had well over a dozen people intensely involved in porting MESS to Javascript, it made sense to use this one emulator for everything, since once we got the work done, it just worked, for many many systems. It was good, economical effort.

There are, of course, many other emulators out there, some of them little hacks meant for one machine and some which handled multiple systems. Some of them, over the years, simply got absorbed into MAME/MESS, and others died out.

The MESS developers have biases and preferences, like anyone else, so there are systems that have gotten a ton of attention, and systems which have gotten some rough scaffolding, some proof of concept, and then little else. This isn’t to say they’re slacking off, of course – it’s just that there’s a lot of work to do in a lot of directions and they move along at the speed they’re comfortable with. Also, they’re more focused on getting it accurate and hardware compliant than fast and easy. This is, absolutely, the best long-term solution – just hacking things to “sort of work” is the province of forgotten half-functional messes that don’t function with an OS upgrade or an app change.

Also, there are cases where a system gets a burst of love from a developer and it just sings. Recently, the Apple II driver within MESS (and therefore JSMESS) got a massive boost in cleanup, rewrite, and expansion – and the result was a fast-moving (nearly 10 times increase in speed) wonderbomb that can handle graphic modes and settings that previously dropped everything. MESS continues to be the best choice in emulation, long term.

However, projects that focus, intensely, on one platform for emulation will do amazing work in support and accuracy. They’re not 100% flexible and they certainly take shortcuts here and there, but they work really well for what they are.


One such project is DOSBOX, the DOS emulation system that has been around for over 10 years, and which does one thing, the x86 architecture and specifically running of DOS-compatible programs, pretty well. It has different goals and approaches than MAME/MESS, but it a very respectable and well-run project, and we’ve all benefited from their work. Except for the fact it only does one platform instead of 600, it would behoove the JSMESS team to attempt a port of it.

Luckily, someone already did that.

Dreamlayers ported DOSBOX via Emscripten into a browser-functional emulator. He did it all by himself, and he did it very well, all things considered. His name for it is em-dosbox.

I’m just going to lay it out and say that Dreamlayers is a software engineering genius, one of those people with a gift for coding and making things work not just better, but understanding what things have to be left tied down and waiting for later improvements. Most of his em-dosbox notes are where Emscripten falls down as a compiling and conversion platform, with indications of how they can be improved. And buried in the code of his is an alien artifact that makes the generated javascript from the process run extremely fast. It’s called and let’s not go too deep into it, other than to say that if we ever figure out how to plug it into JSMESS, fireworks will result.

Now, em-dosbox is not perfect – far from it. It can freeze a browser, and it runs into problems of all sorts when running some of the oddball machinery that the DOS world produced between 1980 and (roughly) 2003.

But when it works, man, it just works. Clear as a bell, right as rain, a DOS window boots into a browser. If you go fullscreen, the mouse even works. (It works in not-fullscreen, but then you see both the desktop and the emulator cursors and your brain is sad.)

It’ll be a little while before the collection is really public, as there’s now the process of throwing thousands of DOS programs into the system, verifying they boot, making screenshots, and all the rest of that delightful curation the world hopes is waiting for them.

But it’s happening. It’s really happening.


And now more fundamentally, the personal take, and why this three year journey has been so worth it.

MS-DOS was always my main thing; I coveted the Apple II world, really got into the Amiga when it came out, danced among Ataris as I could, but for the vast majority of my “work” or whatever a teenager’s activities count as, I did it on MS-DOS.

MS-DOS was what my primary computing machine was from 1983 to 1988 – I hacked on the exact same machine, with minor improvements, all that time. I grew used to the clack of the keyboard, the arrangement of the fonts, and I never really used a windowing system on it for any time in high school. I called BBSes and online services with the internal 2400 baud modem – all the files I’d downloaded for my textfile collection, and which ended up on TEXTFILES.COM, passed through that machine.

Work under any system for long enough and you buy into its processes, whether you want to or not. And I bought in big. The grey on black text, the directory structure, the FILENAME.EXT system, the all-around aesthetic. I feel DOS systems glorify text in a way that other computers didn’t, due to IBM’s long, long history at providing the cleanest, crispest fonts for typewriters and correspondence. I was an IBM kid, after all, and my father’s acquisitions of company-made computers had me fully involved in it for years and years.

So, MS-DOS is my thing, and getting this working was my thing.

A lot of people poured themselves into the original DOSBOX and EM-DOSBOX. But two people, Daniel Brooks (freelance) and Hank Bromley (Internet Archive Dev) worked very hard for a significant amount of time to jam the EM-DOSBOX system into the Internet Archive environment, which is much more difficult than one might expect. Imagine playing a chess game by keeping the board in your head and dropping coins with move descriptions written on them down a grate and you start to get it. A lot can jam up in the pipes, and the whole thing wasn’t designed for what I’ve been making it do. They worked for days on end, bouncing iterative changes, seeing the results, and at the end, it worked.

The functionality of the MS-DOS/EM-DOSBOX emulator within the Internet Archive environment has more caveats than a gym membership, to be sure – dropping to the prompt currently freezes it. You have to tell it what exact file is the “boot” file, the one that will be executed on startup. Too big a file, and it blows out your stack. It doesn’t write out to the emscripten filesystem, causing some to blow up because they can’t write to “disk”. And the sound… well, sound continues to be an issue until the nerds-that-be fix them in the browser world.



When it works, it’s glorious. The speed is really clippy, the prompts blink like I remember, and as it plays CGA, EGA and VGA graphics out and hits the notes, I can sit back and enjoy that clean, crisp little world I spent so much of my childhood in.

And more than that…

The Arcade, while fun, is not a technologically advanced project, and the systems are beyond simple – they work or they don’t. They boot up, they play music, they take your quarters, they play a game. I knew people would love them, and they certainly provide entertainment, and they’re historically important and culturally relevant. (And the effort to accurately reflect them in the emulator is a Herculean effort, I rush to say.)

But they’re also very simple affairs, and designed to impart 3 to 10 minute experiences. You get Pac-Man in a few minutes – you understand nearly all to know about Defender in a day or two. Granted, the skills to keep past that 3-10 minute period are legion and deep, but that’s not what most people would experience anyway.

But with a computer program – especially one designed to be sold for a good amount of money, or which represents a lot of work by someone, there’s a depth in there, and an intensity of the product, that can’t be ignored. A strategy game that doesn’t care how long you take to enter the next move, or a simulator that carefully gives you dozens of knobs to twiddle or points to tweak… that’s the harbinger of the computer experience. Not to mention the applications, those tools of productivity that have permeated computers since the beginning. It’s rich and lovely, and it’s my favorite thing.

Getting the Apple II and ZX Spectrum and Atari 800 collections running at the Archive have been a pleasure, and the resulting screenshots are beauty to behold. But MS-DOS… that’s my neighborhood.

The neighborhood looks good.


The system uses a .ZIP file that contains all the files that will be used inside the emulator as the “drive”. So if you have 5 files, including some batch file and an executable, accompanied by some data files, those will all be loaded in at the emulator’s boot. It will then require a designated “start” file, one of the collection, that it will attempt to run and execute against.

Sometimes this doesn’t work. There’s a lot going on there and my sources are variant.

But sometimes, it just works.


And when it works, I see smooth as glass graphics, beautiful pixel art, and those beautiful words, and the whole thing is alive again, in the emulator’s box, infinitely reproducible, instantly referenced, ultimately preserved in a pretty useful fashion.




Folks who are the sort of folks who professionally quibble will professionally quibble, but the now-years of work I’ve been involved in this (and others have been there right with me, by the way) are utterly justified every time I run the ingestor and push a .zip file of a gathered-away program online. Within seconds, it’s a single click away from beeping, booping and playing music, or standing stoically waiting for my input, unaware of the science-fiction universe it now lives in, destined to never really die, and to stand and be counted by history.

It’s like watching a miracle with every boot.

It’s a great feeling. It’s the best I get.

Categorised as: computer history | Internet Archive | jason his own self

Comments are disabled on this post


  1. phuzz says:

    I’m still really impressed with what you’ve managed to do with the Internet Arcade, and I promise that if/when you manage to get an Amiga emulator working I will be adding metadata to everything I can (my computing history pretty much went Amiga > newer Amiga and finally to PC around 2000).
    Keep up the good work 🙂

  2. Neurosploit says:

    This is great news Jason! Can’t wait to play duke in the browser!

  3. You and your archiving efforts continue to rock, sir.

  4. Swizzle says:

    Amazing! I’ve been anxiously awaiting MS-DOS being playable on since other systems started going live.

  5. Criação says:

    Nothing short of awesome! Go Jason, go!

  6. Darkstar says:

    I wish the DOSBox developers would not focus strictly on games, and instead started emulating other (non-gaming) hardware as well (SCSI controllers for example, or proprietary add-on cards). I think DOSBox could be the *best* IBM PC emulator out there but with the current flood of different forks (dosbox-x, dosbox-daum, etc.) that’s sadly not gonna happen

  7. Arpit Roy says:

    This is brilliant !!! It’s an awesome feeling to re-live those childhood moments again. A lot of good memories associated with these games….Can’t thank you enough Jason 🙂