Jun 28 2008

MAMEWah Tutorial 1

zorro @ 8:49 pm

How to Use Relative Paths in MAMEWah 1.62b13

I’ve used the Super Nintendo as a basis for this explanation but by retaining the same naming standard different systems can be easily added.

Here is a directory snapshot of a MAMEWah setup. A carefully set up directory structure can make MAMEWah a relatively easy system to maintain.

The emulators directory. Store all executables and roms here.


The MAMEWah configuration files directory. Both general MAMEWah and emulator-specific configurations are here.


There are three primary types of files you need to edit to configure MAMEWah.

  • mamewah.ini
  • mamewah.cfg
  • emulator specific configuration files e.g. 09supernintendo.ini


Contains your global settings such as the emulator_root_path which needs to be manually set to the parent directory. In my case this is:


From now on if you use the variable “emurootpath”, MAMEWah will read it as “f:\mamewah162b13\emu”

Almost everything else in the mamewah.ini can be configured from inside the program.


This file contains all of the key settings for MAMEWah and is where you can set some of the buttons to easily move around the front-end such as Next Emulator and Random Game.


This is where all the magic takes place. When you tell MAMEWah to run a particular game on a particular emulator, you are essentially just passing it a command line.

For example (and assuming you have your directory structure like mine), to run Super Punch Out on ZSNES you would type the command line:

f:\mamewah162b13\emu\09supernintendo\zsnes\zsnesw.exe “f:\mamewah162b13\emu\09supernintendo\roms\PUNCHOUT.zip”

Of course, most people would change to the target directory first, like this:

Using variable paths, the emulator config file (09supernintendo.ini) represents this command line like this:

[emurootpath]\[emuname]\zsnes\zsnesw.exe “[rompath]\[name].[romext]”

Where [emurootpath] = f:\mamewah162b13\emu (as set by mamewah.ini)

[emuname] = 09supernintendo (name of the config directory for the emulator chosen)

This variable is very useful and is the reason why the emulator directories are named exactly the same as the config directories.

[rompath] = [emurootpath]\[emuname]\roms (as set in the emulator config file)

If you extrapolate this pathname out, you get:

[rompath] = f:\mamewah162b13\emu\09supernintendo\roms

[name] = PUNCHOUT (or the game title selected via the MAMEWah selection screen)

[romext] = .zip (as set in the emulator config file)

Now all that’s required is a bit of discipline. Images always go in the emulator directory as snap, titles and flyers. Roms are always in the parent emulator directory rather than under the emulator itself, so that multiple emulators for the same format can easily access the same set of roms. Finally, the actual directory for the emulator can be anything you like since it is manually set in the emulator_commandline variable.

To create a new emulator configuration file:

  • create a new config directory for the emulator e.g. 26colecovision.
  • copy the 09supernintendo.ini file to the new directory and rename it 26colecovision.ini
  • Change the following values:
    • emulator_title
    • emulator_commandline
    • [emurootpath]\[emuname]\snes.nms (optional)

And you’ve got it!

###09supernintendo.ini (mamewah v1.62)###
emulator_title Nintendo SNES
### List Generation Settings ###
rom_path [emurootpath]\[emuname]\roms
rom_extension zip
nms_file [emurootpath]\[emuname]\snes.nms
list_generation_method rom_folder
### Execution Settings ###
pre_emulator_app_commandlines [emurootpath]\cpv2\cpv2.exe
emulator_commandline [emurootpath]\[emuname]\zsnes\zsnesw.exe
general_app_commandlines [emurootpath]\cpv2\cpv2.exe
### Artwork Settings ###
artwork_image_paths [emurootpath]\[emuname]\snap;[emurootpath]\[emuname]\titles;
movie_preview_path [emurootpath]\[emuname]\previews
movie_artwork_no 1
enable_fuzzy_search 0
history_dat_file auto
history_dat_artwork_no 2
### Screen-Saver Settings ###
enable_music_in_screensaver 1
select_random_game 0
saver_type movie
movie_path [emurootpath]\[emuname]\previews
movie_fullscreen 1
quit_delay 0
### Additional Settings ###
description_display [description]{scroll}
### Settings used by MAMEWAH ###
current_list 0

Leave a Reply