All posts by CeRiAl

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…)

How to compile ScummVM with latest MinGW32CE and SDL

So, obviously you came here to give your CPU(s) and HDD(s) something to do for the next few hours (and don’t forget all the gigabytes for all the sources) 🙂

Prerequisites

In the following I assume you have created a directory in your homedir where all of the sources will be located. If not, do the following:

mkdir ~/wmports && cd ~/wmports

Additionally, you should download some scripts and put them into your path to make “configure” and “make” easier with the MinGW32CE toolchain.

mkdir scripts && cd scripts
wget http://pocketinsanity.org/patches/scripts/cross-configure-mingw32ce.sh
wget http://pocketinsanity.org/patches/scripts/cross-make-mingw32ce.sh
chmod +x *.sh && export PATH=$PATH:~/wmports/scripts
cd..

The parts with light-blue background have to be executed as your normal user, where the parts with light-red background have to be executed as root (invoked with “su”, NOT “su -“ to prevent switching to the root homedir and environment)

Please note:

  • For compiling under Cygwin, you NEED to omit all lines with “su” or “exit”
  • This may have to be “sudo bash” in some OSes or distros which do not allow root login by default (Mac OSX or Ubuntu for example).

Continue reading How to compile ScummVM with latest MinGW32CE and SDL