ASCII by Jason Scott

Jason Scott's Weblog

The Secret Feature of EM-DOSBOX on Internet Archive —

There’s been a secret feature on the DOS-related emulated programs on the Internet Archive. It’s been there for over a half a year now. I’ll explain what it is and why I didn’t trumpet it.

Internet Archive made thousands of games available on MS-DOS last year, it got an awful lot of press, and it got an incredible amount of visitors – well into the millions. Through the year of 2015, certain games got more attention than others, and many more got a few ardent fans, but most importantly, emulated programs bounced into the general populace in ways they hadn’t before.

Emulation was and is used by many, many people, both intentionally (by running Emulators they’ve downloaded) and unintentionally (using a lot of applications and systems that have little tiny emulators in them to run certain programs with little change). But we’ve not had as many people who are shown a program that runs in a window and then told “Just use it, it’s an emulator, we’ll work out the details.” They know or they don’t know much about the emulation system beneath it, but the knowledge is heavily optional.

It’s worked in droves – as the millions hit, many of them made use of the system for however they pleased, in the same way people use books for however they please.

But along with this explosion of use came an unexpected (except in retrospect) situation – people were unhappy they would lose their saved games.

They were unhappy they would lose their saved games!

To people who know exactly what’s going on (this is a Javascript application running an emulation of a system inside of a browser window), the sadness is understandable but also laughable as a solution set. Of course you can’t save your games! They’re not some actual thing playing on your operating system. They live inside a window. You might as well be sad you can’t crane your head to one side of a video playing and see what’s behind the left border of the player window.

But we got a lot of complaints about it.

So we fixed it.

Through the work of multiple people, including John Vilk, DFJustin, bai, db48x, and other contributions, the BrowserFS extension that JSMESS/Emularity uses can maintain filesystems across sessions, in the LocalStorage API.

It’s been doing this for six months.

Complaints about saved games have dropped to zero.

Every day, dozens (occasionally hundreds) of people are playing long-term role-playing games or ongoing arcade games and shooters, saving off their games where the system provides that as an option, and they they come back later and pick up where they get off. It just works.

Want to try it out? Here’s a nice weird one. Using VEDIT, a rather obscure DOS-based text editor from 1992, made by Greenview, Data, Inc. It’s the demo version of the word processing program, but that’ll be fine enough.

If you go to the page for the program, you’ll be able to boot the emulator.

Within it, you press any key to get to the editing window, enter anything you want, and then press F10, which will give you a glorious retro drop-down text menu. From there, you can save whatever you type into a file. (Or, you can press ALT-S and ALT-Q, which is the same thing.)

You have now saved a copy of the file away on the virtual filesystem of the emulated program.

You can now close the browser window, or close the browser entirely. You can reboot. But as long as you come back to the same machine, and the same browser, the file you wrote will come back.

Why not announce it?

Well, for one thing, it’s slightly confusing. Right now it only works on our EM-DOSBOX emulations, because the way that MAME/MESS handles filesystems is notably different (although who knows, we might come up with a solution in the future).

Another is that there’s no quality check, per se. The BrowserFS plugin has plenty of testing, but this whole environment is off the wall. We’ve done as much testing as we can, from a lot of different approaches, but I don’t believe in announcing this feature as a guarantee. You might still lose your games. You might have a blocker, run in private mode, or clear out cookies using some way you don’t know. Poof goes the saved data.

But I’m mentioning it, primarily, for one reason: There are still people who think Emulation is not a solution, or think it’s not ready, or think there’s some other magical, scalable, universal solution to having people interact with this old data.


There isn’t.

And people playing endless games and programs all throughout the world for half a year, without giving one thought to the fact they’re saving their games “somewhere” and coming back to play later, is a very large army of proof.



Categorised as: computer history | Internet Archive

Comments are disabled on this post


  1. Joey Hess says:

    To kick this into the next gear, just provide a way to export the cookie as a query string in the url. Which becomes a very long url, but that’s fine, url shorteners exist. (Did I just say that? Oh well, url team also exists.)

    Then users can share links to old word processors and graphics programs with documents available to open in them. And links to particular mario levels, and …

    • Rena says:

      Now I’m imagining somehow syncing the saved state to a file on some cloud storage, and sharing it among other users. Not sure how that would handle multiple users at once though.

      Or linking to not just a game but a saved state in a game. It’s like mailing around a save file (or a document, or …) as a simple URL.

    • Brian says:

      Orteil of Cookie Clicker fame knows what’s up. offers up your save data as a Base64-encoded string or text file for sharing or saving. No need to know what it is – just that it represents your progress.

      • db48x says:

        Yes, it’s not exactly a new technique. The problem is one of scale: a file on a virtual disk, even a virtual floppy disk, can be several orders of magnitude larger than the state of a cookie-clicker game; the data on a 1-meg floppy is essentially the size of a novel when printed out as a base64-encoded string. In principle it could work, but I’m not even sure you can reliably copy and paste that much text.

        It’s something we could do, but given the UX problems it’s a sort of dead-end; implementing it doesn’t get us any closer to what we really want.

  2. MW says:

    I haven’t tried this yet, but a nice feature would be to move these files, maybe using add-on. 3 options, nothing more: list, extract, add. Like Unix MTools for disk images, there’s nothing more used so much as these commands. There is always a DOSBox using less CPU and having an option to move files between would be a nice thing.

    • John Vilk says:

      You could certainly do so with a browser extension. BrowserFS exports a full POSIX file system API that mimics Node.js’s file system API.

      • Rena says:

        Aren’t there ways now to access local filesystems via Javascript? So you could map some local storage as a “network drive”…

      • i336_ says:

        You could even use the JavaScript file-save and -load APIs to spit the data into the Downloads folder and let you drag+drop stuff back into the browser window to load it. (I’m also seeing indications that you could viably implement drag-out-of-browser-to-download too, for maximum UX epicness.)

        What’s awesome is that the resulting files would be plain old disk images. I mean… it’s DOSbox! They would actually have to make effort to use a different file format! 😀

        There are so many things you could do with this.

        – Switch to local dosbox if you wanted to, without losing your work

        – Make a downloadable distribution of the EM-DOSBOX system (“open /path/to/index.html”-style) that you could fire up more or less anywhere (most random hardware is post-2008-9 now)

        – Keep a collection of save files on a flash drive, your phone, or Dropbox

        As a sidenote, thinking about this has actually given me another idea: VM disk image sharing and optimization is pretty common in the VM/server sector… I wonder what a website would be like that combined’s idea of old apps with “user disk sharing”…

        • db48x says:

          > Make a downloadable distribution of the EM-DOSBOX system (“open /path/to/index.html”-style)
          > that you could fire up more or less anywhere (most random hardware is post-2008-9 now)

          This is a great idea; I’ll have to keep it in mind. There’s a technical hurdle (javascript can’t open file:// urls; they fail the cross-origin check for obvious reasons), but perhaps it could be done; I’ll have to experiment.

  3. Killmofasta says:

    You are GODS! Awesome!!! And Thanks Thanks Thanks for LodeRunner…

  4. db48x says:

    The real god will be whoever gets to level 254 of Pacman first, and shares their save for the rest of us to play.

  5. Bryan Uslick says:

    Hmm says cannot save file when I try to save it.

  6. […] old computer systems inside any browser. Only weeks before the Malware Museum opened, Scott announced the previously hidden DOS emulation capabilities of the Internet Archive. This is the same feature […]