Skip to content
jvilk edited this page Jan 19, 2013 · 2 revisions

A template can be used for all systems in JSMESS. To create a new template for a new system, follow the guide below.

  1. Make a directory in ./templates. Place all of your template's files into this folder.
  2. Make an HTML file called index.html. Have it reference a JavaScript file called messloader.js that handles interfacing with MESS.
  3. Inside messloader.js, the following substrings will be replaced at compile time:
    • MESS_SRC: This will be replaced with the JavaScript file that contains MESS and the embedded game.
    • BIOS_FILES: This will be replaced with the filenames of all of the BIOS files, separated by a space. Note that this string may be empty.
    • MESS_ARGS: This will be replaced with a JavaScript array of the MESS arguments for a particular system. The array will reference a variable called gamename that should contain the filename of the game that you want to load up.

If you need any more variables for your template, let someone know (or add them to the makefile! :) ).