Skip to content

How to build and test JSMESS 0.151

Jason Scott edited this page Apr 17, 2014 · 6 revisions

THIS ENTRY IS NOW DEPRECATED - WE NOW BUILD WITH 0.153.

JSMESS is now synched to the post-0.151 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, as well as nm. See Prerequisites and Dependencies for 0.151 if you haven't successfully compiled JSMESS before. 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)
  • Compile MESS and generate necessary helper files (can take tens of minutes)
  • For the platform(s) you are going to test, copy BIOS and game files into the bios and games directories (you can find MESS 0.151 BIOS ROM files on archive.org, games are elsewhere)
  • Generate a set of platform makefiles
  • Build that platform
  • Test that platform
git clone https://github.com/jsmess/jsmess.git
cd jsmess
git submodule update --init --recursive
./third_party/emscripten/emcc
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 helpers directory.

Copy your BIOS files into bios and your game files into games. Then:

cd helpers
./startmake.sh PLATFORM

where 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:

cd ..
make SYSTEM=PLATFORM GAME=FILENAME test

where PLATFORM is the name of the system, and FILENAME is the filename of the game to test with (game files go in games).

Then, go to localhost:8000 and it should show up. Report successes and failures in IRC, please.


For better performance

The bleeding edge version of emscripten often has bugfixes, and improved speed, and improved audio support. (But, there's a chance it will break JSMESS completely.) See the instructions below to update emscripten to incoming.

Updated versions of MESS can break more seriously: systems could break, compatibility or speed could get worse as emulations get rewritten, etc. You'll generally only want to update if there's something mentioned in the changelogs that you're specifically interested in.


If you need to update MAME to the latest code, you can:

cd third_party/mame
git checkout master
git pull

To update to a specific checkin, follow those commands with:

git checkout COMMIT_HASH

where COMMIT_HASH is the git commit hash of the GitHub mirror checkin you want to update to.

Note that depending on the extent of changes to MESS, you may also need to re-generate the dependency files:

cd helpers
./genhelpers.sh

And even re-create your system-specific makefiles:

cd helpers
./startmake.sh PLATFORM -d

If you need to update emscripten to the latest master:

cd third_party/emscripten
git checkout master
git pull
./emcc

If you need to update emscripten to the latest incoming:

cd third_party/emscripten
git checkout incoming
git pull
./emcc