Some things I need to say about EM-DOSBox and archive.org

I’m trying to clear some things up regarding the EM-DOSBox port which recently had a big media coverage all over the internet through 2400 DOS-Games that have been added to the Internet Archive (archive.org):

In April/May 2013 I decided to start with a new private side-project.
I had previously used Emscripten (https://github.com/kripken/emscripten) for some smaller ports and decided that it was time to try something bigger, something that would push the limits of “compiled” JavaScript in the browser.

As I am quite into emulation of old machines (as you probably know 😉 ) I decided to give an EMscripten-DOSBox port a try…

I searched the internet from start to end to see if something like this had been done before, and only found one quite promising project called “JsDOSBox” (http://sourceforge.net/projects/jsdosbox/). After I checked the sources, I realized that though it works quite good, it maybe wasn’t the optimal way to port DOSBox to JavaScript:
JsDOSBox is based on JDOSBox (http://jdosbox.sourceforge.net/cms/), which itself is a Java-port of the original DOSBox (http://www.dosbox.com/).

So I started to play a bit around to get DOSBox compiled with Emscripten – and after some patches/hacks here and there in the code (mostly related to the fact that Emscripten simulates a SDL2.0 environment, but DOSBox relies on SDL1.2), it finally compiled.
I didn’t run correctly in the browser, though (the browsers only “hung” when I tried to run the product).

So, because of the usual lack of free time, I pushed this patchy/hacky port to my own Git-repository (https://git.cryptopath.org/cerial/dosbox). I intentionally didn’t make this project private, because I knew that it might come in handy for someone who has more free time to finish this port.
This was on May 18, 2013.

Fast-forward to Jan 03, 2014:
I received an email from “dreamlayers” in which he described how he found my initial port via google, and that he got it to run successfully on Firefox and Chrome with some additional patches he made. He was very friendly, also explained what he did, and thanked me for doing the initial work with porting DOSBox. We mailed a bit and talked about other problems he found and how he fixed them. On Jan 06, 2014, his port was available on github in his repo (https://github.com/dreamlayers/em-dosbox). As I still didn’t had much time to continue the work on the emulator, I didn’t check the sources to see if I was credited correctly for the initial work (but I presumed that this would be the case).

Fast-forward to 2015:
All of the internet is reporting about the release of 2500 DOS-era games, which are directly playable in the browser.
First thought: oh nice, someone managed to finish dreamlayers and my work to finally get it to run nicely and user-friendly!
I was quite happy that it turned out so nice, and that people all over the world are using it happily.
Then I looked into the code and did not see even a single line of credits or thanks for my initial work, which made me quite sad and unhappy 🙁

Summary:
Of course I don’t want to take the whole credit of doing the work (because dreamlayers also did much of the work to make it usable).
But: I was really surprised that I didn’t see any credit on archive.org for the work of “dreamlayers” (Boris Gjenero) or mine (Ismail Khatib)…
I think credit should be due, because this isn’t “just another port of an emulator”, but because it’s something which most people thought wasn’t even possible with today’s browser technology; it’s quite a milestone in running compiled JavaScript in the browser at this level.

I hope that dreamlayers (Boris Gjenero), archive.org (Jason Scott) and me can work this out nicely for all of us, because I think that the work should really be credited correctly to Boris and myself (we both aren’t mentioned at all on the archive.org page…)

3 thoughts on “Some things I need to say about EM-DOSBox and archive.org

  1. I started with your port, but once I got a DOS program working, I decided to re-do things in a cleaner way. This commit on your server contains all of your work. It maps to two commits on em-dosbox-0.74: “Disable SDL CD and CD image support on Emscripten.” and “Compile error fixes”. Very little is exactly like your commit. Generally I accomplished similar things in a different way. For example, take a look at how CD function bodies were commented out and replaced with “return false” in the your commit. I used a different method, removing most CD functions and using “#ifdef EMSCRIPTEN”. I didn’t credit you because my changes were substantially different and a result of my own additional investigation into what’s the best way to make DOSBox work with Emscripten.

  2. Boris, thank you for taking your time to comment on this post!

    Yes, I know that my single commit (which really wasn’t much more than a hack to get things working initially) wasn’t clean or nice (it was far from clean: no #IFDEFs, only comments to remove and change stuff which block compiliation).
    To be fair, I just pushed this to my repo to save the work I had done in case my development machine crashes – that’s why my code looks like it looks now. 😉

    I also appreciate that you have indeed re-implemented the changes fresh and clean – the state of my repo was never in shape for a release, I admit that of course!
    You have also added a lot of other changes to optimize the port for Emscripten, like changing the big switch-block, etc., etc. – very nice work, thank you for that!

    That said, I’m still a bit sad, because as you said in your comment: “I started with your port, but once I got a DOS program working, I decided to re-do things in a cleaner way.” – I see that none of my changes were taken 1:1 to your port – but nontheless you took it as a starting point to get things working.
    I think the CD function bodies aren’t such a good example, because functionality-wise they are quite the same: hacky-removal of the bodies with an added “return false” isn’t really much different to #IFDEFs, It’s more like refactoring the code to make it cleaner and nice…

    Still, if I had been in your position, I would have credited the original “inspiration” – it isn’t that you have started from zero…
    Just a single line like “thanks to X for his hacky and buggy initial work” – because I think that this would be just fair – even if your work would qualify as a new “clean-room” implementation.
    In fact, you did exactly that in your email you sent me in Jan 2014:
    cite: “I just thought you might be interested. Thanks for doing the initial work with porting DOSBox.” cite-end – I really thought a single line like this would appear somewhere in the readme or somewhere else – that is the thing that made me a bit sad 🙁

    Again, thank you Boris, for finishing/re-implementing the port in a clean and usable way – if you wouldn’t have finished it, it would still rot in my repo 😉

  3. Yeah, I agree that it would have been nice to credit that inspiration. It just never occurred to me. When making commits I was focusing on technical issues, not credits. Also, I never felt I had an obligation to credit you considering how I re-implemented things differently. Plus, the GPL does not give such an obligation.

    If you had simply asked me nicely I would have been happy to add something in README.md. The way you handled this (complaining to Jason Scott at archive.org asking for crediting, complaining on Slashdot and not even contacting me) is not very nice. I actually just wrote a Credits section for README.md earlier today but then deleted it because this whole thing makes me unhappy.

Leave a Reply

Your email address will not be published. Required fields are marked *