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

Songbird 1.1.0pre for MacOS X 10.5 (powerpc)

Just a short howto for compiling the current trunk (1.1.0pre) of songbird for powerpc-macs.

Oh my, all this only because they dropped powerpc-support..

Why, oh why?


--
Get songbird from SVN
--
%~: mkdir sbird
%~: cd sbird
%~/sbird: svn co http://publicsvn.songbirdnest.com/client/trunk
--
Get songbird macosx-i686 dependencies from SVN
--
%~/sbird/: cd trunk/dependencies
%~/sbird/trunk/dependencies: svn co http://publicsvn.songbirdnest.com/vendor-binaries/trunk/macosx-i686
--
Get songbird macosx-ppc (r10045) dependencies from SVN
--
%~/sbird/trunk/dependencies: mkdir i
%~/sbird/trunk/dependencies: cd i
%~/sbird/trunk/dependencies/i: svn co -N -r 10045 http://publicsvn.songbirdnest.com/vendor-binaries/trunk
%~/sbird/trunk/dependencies/i: cd trunk
%~/sbird/trunk/dependencies/i/trunk: svn up -r 10045 macosx-ppc
%~/sbird/trunk/dependencies/i/trunk: mv macosx-ppc ../..
%~/sbird/trunk/dependencies/i/trunk: cd ../..
%~/sbird/trunk/dependencies: rm -rf i
--
Get dependency-sources for taglib from SVN
--
%~/sbird/trunk/dependencies: mkdir vendor
%~/sbird/trunk/dependencies: cd vendor
%~/sbird/trunk/dependencies/vendor: svn co http://publicsvn.songbirdnest.com/vendor/trunk/taglib
--
Remove old macosx-ppc/taglib dependency-binaries and build new ones from source
--
%~/sbird/trunk/dependencies/vendor: cd taglib
%~/sbird/trunk/dependencies/vendor/taglib: rm -rf ../../macosx-ppc/taglib
%~/sbird/trunk/dependencies/vendor/taglib: ./songbird_taglib_make.sh
--
Get dependency-sources for gstreamer (and plugins) from SVN
--
%~/sbird/trunk/dependencies/vendor/taglib: cd ..
%~/sbird/trunk/dependencies/vendor: svn co http://publicsvn.songbirdnest.com/vendor/trunk/gstreamer
%~/sbird/trunk/dependencies/vendor: svn co http://publicsvn.songbirdnest.com/vendor/trunk/liboil
%~/sbird/trunk/dependencies/vendor: svn co http://publicsvn.songbirdnest.com/vendor/trunk/libvorbis
%~/sbird/trunk/dependencies/vendor: svn co http://publicsvn.songbirdnest.com/vendor/trunk/gst-plugins-base
%~/sbird/trunk/dependencies/vendor: svn co http://publicsvn.songbirdnest.com/vendor/trunk/gst-plugins-good
%~/sbird/trunk/dependencies/vendor: svn co http://publicsvn.songbirdnest.com/vendor/trunk/gst-plugins-bad
%~/sbird/trunk/dependencies/vendor: svn co http://publicsvn.songbirdnest.com/vendor/trunk/gst-plugins-ugly
--
Build gstreamer (and plugins) from source
--
%~/sbird/trunk/dependencies/vendor: cd gstreamer
%~/sbird/trunk/dependencies/vendor/gstreamer: rm -rf ../../macosx-ppc/gstreamer
--
HACK: sudo mkdir -p /Users/erikstaats/dev/src
HACK: sudo ln -s /Users/cerial/sources/sbird /Users/erikstaats/dev/src/songbird
HACK: mkdir ../../vendor/glib
HACK: cp -R ../../macosx-ppc/gettext/release/lib/libintl.* ../../macosx-ppc/glib/release/lib
HACK: cp -R ../../macosx-ppc/gettext/debug/lib/libintl.* ../../macosx-ppc/glib/debug/lib
--
%~/sbird/trunk/dependencies/vendor/gstreamer: ./songbird_gstreamer_make.sh
%~/sbird/trunk/dependencies/vendor/gstreamer: cd ../liboil
%~/sbird/trunk/dependencies/vendor/liboil: rm -rf ../../macosx-ppc/liboil
--
HACK: SEE dependencies/vendor/liboil/liboil/motovec.c vs. .orig-File
--
%~/sbird/trunk/dependencies/vendor/liboil: ./songbird_liboil_make.sh
%~/sbird/trunk/dependencies/vendor/gstreamer: cd ../libvorbis
%~/sbird/trunk/dependencies/vendor/libvorbis: rm -rf ../../macosx-ppc/libvorbis
--
HACK: SEE dependencies/vendor/songbird-vendor-defs.mk vs. .orig-File
HACK: mkdir -p /builds/sb-deps/build
HACK: mkdir -p /builds/sb-deps/checkout
HACK: ln -s /Users/cerial/sources/sbird/trunk/dependencies/macosx-ppc /builds/sb-deps/macosx-ppc
HACK: sudo mkdir -p /Users/roblord/_built_libogg
HACK: sudo ln -s /Users/cerial/sources/sbird/trunk/dependencies/macosx-ppc/libogg/release/include /Users/roblord/_built_libogg/include
HACK: sudo ln -s /Users/cerial/sources/sbird/trunk/dependencies/macosx-ppc/libogg/release/lib /Users/roblord/_built_libogg/lib
HACK: ln -s /Users/cerial/sources/sbird/trunk/dependencies/macosx-ppc/libvorbis/release/include/vorbis /Users/cerial/sources/sbird/trunk/dependencies/macosx-ppc/glib/release/lib/glib-2.0/include/vorbis
HACK: ln -s /Users/cerial/sources/sbird/trunk/dependencies/macosx-ppc/libvorbis/debug/include/vorbis /Users/cerial/sources/sbird/trunk/dependencies/macosx-ppc/glib/debug/lib/glib-2.0/include/vorbis
--
%~/sbird/trunk/dependencies/vendor/libvorbis: make -f Makefile.songbird
%~/sbird/trunk/dependencies/vendor/gstreamer: cd ../gst-plugins-base
%~/sbird/trunk/dependencies/vendor/gst-plugins-base: rm -rf ../../macosx-ppc/gst-plugins-base
%~/sbird/trunk/dependencies/vendor/gst-plugins-base: ./songbird_gst-plugins-base_make.sh


libtool: compile: gcc -DHAVE_CONFIG_H -I. -I. -I../.. -I../../gst-libs -I../../gst-libs -D_REENTRANT -I/Users/erikstaats/dev/src/songbird/trunk/dependencies/vendor/glib/../../macosx-ppc/glib/release/include/glib-2.0 -I/Users/erikstaats/dev/src/songbird/trunk/dependencies/vendor/glib/../../macosx-ppc/glib/release/lib/glib-2.0/include -I/Users/cerial/sources/sbird/trunk/dependencies/vendor/gstreamer/../../macosx-ppc/gstreamer/release/include/gstreamer-0.10 -Wall -I/Users/cerial/sources/sbird/trunk/dependencies/vendor/gst-plugins-base/../../macosx-ppc/libvorbis/release/include -I/Users/cerial/sources/sbird/trunk/dependencies/vendor/gst-plugins-base/../../macosx-ppc/libogg/release/include -fnested-functions -D__MACOSX__ -gstabs+ -I/Users/cerial/sources/sbird/trunk/dependencies/vendor/gst-plugins-base/../../macosx-ppc/gettext/release/include -I/Users/cerial/sources/sbird/trunk/dependencies/vendor/gst-plugins-base/../../macosx-ppc/libiconv/release/include -MT libgstvorbis_la-vorbis.lo -MD -MP -MF .deps/libgstvorbis_la-vorbis.Tpo -c vorbis.c -fno-common -DPIC -o .libs/libgstvorbis_la-vorbis.o
In file included from vorbis.c:26:
vorbisenc.h:27:26: error: vorbis/codec.h: No such file or directory


--
HACK: sudo rm -rf /Users/erikstaats
HACK: rm -rf ../../macosx-ppc/glib/release/lib/libintl.*
HACK: rm -rf ../../macosx-ppc/glib/debug/lib/libintl.*
HACK: rm -rf ../../vendor/glib
--


%~/sbird/trunk/dependencies/vendor/taglib: cd ../../..
--
!!! COPY songbird.config into trunk !!!
Clean everything and start building songbird
--
%~/sbird/trunk: make -f songbird.mk clobber
%~/sbird/trunk: make -f songbird.mk