How to build and test JSMESS 0.153
Clone this wiki locally
JSMESS is now synched to the post-0.153 builds of MESS.
Like emscripten, the MAME GitHub mirror is a submodule of JSMESS, and can be updated independently.
JSMESS requires all the normal emscripten prerequisites (Python 2.7.3+, Node.js 0.8+, Java if you want to run the Closure compiler), as well as
nm can be found in the
binutils package in Debian/Ubuntu.
To build and test JSMESS, you will run the commands below to:
- Clone JSMESS (~100MB)
- Download emscripten and MAME (~100MB and ~300MB, usually pinned to versions of each known to work)
- Emscripten now uses a fastcomp engine and as of April 2014 needs additional steps to work with CLANG. These steps below come from this document: https://kripken.github.io/emscripten-site/docs/building_from_source/LLVM-Backend.html
- Compile MESS and generate necessary helper files.
- For the platform(s) you are going to test, copy BIOS and game files into the
gamesdirectories (you can find MESS BIOS ROM files on archive.org, games are elsewhere)
- Generate a set of platform makefiles
- Build that platform
- Test that platform
Time: Most of these processes are fast, but the compilation of CLANG and MAME will take tens of minutes. Ultimately, these fastcomp steps will not be necessary once CLANG updates.
RAM: A recent attempt to compile JSMESS on a 2GB RAM VM failed. Consider having at least 4GB RAM available.
git clone https://github.com/jsmess/jsmess.git cd jsmess git submodule update --init --recursive cd third_party/emscripten git checkout incoming cd .. git clone https://github.com/kripken/emscripten-fastcomp cd emscripten-fastcomp git checkout incoming cd tools git clone https://github.com/kripken/emscripten-fastcomp-clang clang cd clang git checkout incoming cd ../.. mkdir build cd build ../configure --enable-optimized --disable-assertions --enable-targets=host,js make -j 4 ../../emscripten/emcc
Because you made a very unusual LLVM setup doing this, you then need to go into the
~/.emscripten file and edit the
LLVM_ROOT variable to wherever
jsmess/third_party/emscripten-fastcomp/build/Release/bin/ is. Then, continue.
cd ../../../helpers/ ./genhelpers.sh
This will kick off a full MESS build and generate necessary helper files. You do have to run the helper scripts from inside the
If you also intend to compile MAME systems, you will also need to do:
cd ../mamehelpers/ ./genhelpers.sh
Copy your BIOS files into
bios and your game files into
games. Then, from either
helpers (for MESS systems) or
mamehelpers (for MAME systems):
PLATFORM is the name of the system you want to make. It needs to be a valid MESS system name. For names, see the "name", "parent" and "sourcefile" columns here: http://www.progettoemma.net/mess/sysset.php/
This will generate files suitable for creating a JSMESS version, but you can also use them as normal MESS tiny.mak files, and go into
third_party/mame and run
make TARGET=mess SUBTARGET=PLATFORM (again, replacing
PLATFORM with the system name) to build a native, tiny MESS version for that platform.
Finally (for MESS systems):
cd .. make SYSTEM=PLATFORM GAME=FILENAME test
PLATFORM is the name of the system, and
FILENAME is the filename of the game to test with (game files go in
Then, browse the resulting build directory to try it out. Report successes and failures in IRC, please.
Some MESS systems, and all MAME systems, do not require pre-loading a game to test with, as their BIOS contains all their software. In those cases, leave out the