MAMEWAH v1.62+ INI System

This is how the ini system works:  MAMEWAH uses three main types of ini config files; mamewah.ini (main/global settings), emuname.ini (emulator-specific settings), and emuname-?.ini (list-specific settings, where ? is the list no.).  In addition, gamename.ini files can also be used for game-specific configuration, if required - for example to use an alternative emulator to run a specific game.



Settings Overview:

mamewah.ini is auto-generated/updated when you run MAMEWAH, and resides in \mamewah. This file contains all general/global settings:

### mamewah.ini (mamewah v1.62) ###

### (Global) Screen-Saver Options ###
delay                       5			(seconds)
slide_duration              3			(seconds)

### Audio Settings ###
enable_sounds               1			(0=no, 1=yes)
sound_volume                100			(0-100%)
music_path                  			(music folder, eg c:\music)
enable_music                1			(0=no, 1=yes)
music_volume                100			(0-100%)

### Movie Settings ###
intro_movie_file            			(movie filename, eg c:\movies\intro.mpg)
exit_movie_file             			(movie filename, eg c:\movies\exit.mpg)
keep_movie_preview_aspect   game_aspect		(no / video_aspect / game_aspect)
delay_before_movie_preview  2			(seconds)
music_movie_mix             mute_movies		(mute_movies / merge / pause_music)
movie_volume                100			(0-100%)

### Misc Settings ###
emulator_root_path                        	(path, eg c:\emulators - used with auto_setup_emulators 1)
auto_setup_emulators        0			(0=no, 1=yes)
theme                                   	(theme name, optional)
wrap_list                   0			(0=no, 1=yes)
remember_current_game       1			(0=no, 1=yes)
keep_image_aspect           1			(0=no, 1=yes)
refresh_images              0			(0=no, 1=yes)
delay_before_history_dat    2			(seconds)
safe_mode                   0			(0=no, 1=yes)
show_cursor                 0			(0=no, 1=yes)
keyboard_led_states         -,-,-		(x,x,x where x=: -=leave, 0=off, 1=on, eg 1,1,1)
lcd_com_port                1			(lcd display serial [com] port no.)
lcd_settings                              	(lcd settings - see below)
exit_action                 choice		(choice / windows / run_app / reboot / shutdown)
maxlogsize                  100000		(maximum mamewah.log size, in bytes)

### External Application Settings ###
startup_app_commandlines    			(applications to be launched on MAMEWAH startup*)
exit_app_commandlines				(applications to be launched on MAMEWAH exit*)
exit_and_run_app_commandlines                   (applications to be launched on MAMEWAH exit, when using exit_action run_app*)

### Settings used by MAMEWAH ###
current_group	            			(current group - ignore, generated by MAMEWAH)
current_emulator            mame		(current emulator - ignore, generated by MAMEWAH)
locked                      0			(menu lock state - ignore, generated by MAMEWAH)


lcd_settings should be as follows:

baud rate (110/300/600/1200/2400/9600/14400/19200/28800/38400/56000/128000/256000), parity ([e]ven, [o]dd, [n]one, [m]ark, [s]pace), data bits (4-8), stop bits (1, 1.5, 2)

eg: 9600,n,8,1



------------------------------------------------------------------------



To generate emuname.ini, simply place a suitably named folder within the \mamewah\config folder (eg \mamewah\config\mame) - when run, MAMEWAH will automatically create \mamewah\config\emuname\emuname.ini. This file contains all emulator-specific settings:

### emuname.ini (mamewah v1.62) ###

emulator_title                            			(title of your choice, eg M.A.M.E.)

### List Generation Settings ###
rom_path                                  auto			(rom folder, eg c:\mame\roms)
rom_extension                             auto			(file extension)
dat_file                                  auto			(dat filename, eg c:\mame\mame.dat)
nms_file                                  auto			(nms filename, eg c:\mame\mame.nms)
catver_ini_file                           auto			(catver.ini filename, eg c:\mame\catver.ini)
list_generation_method                    auto			(rom_folder / dat_file / rom_folder_vs_dat_file / rom_folder_vs_listinfo / verifysets_vs_listinfo / listxml / rom_folder_vs_listxml / verifysets_vs_listxml)

### Execution Settings ###
pre_emulator_app_commandlines             			(applications to be automatically launched prior to emulator*)
emulator_commandline                      auto			(emulator*)
post_emulator_app_commandlines            			(applications to be automatically launched after emulator*)
general_app_commandlines					(applications to be run using shortcuts or menu selection*)

### Artwork Settings ###
artwork_image_paths                       auto			(image file folders, eg c:\mame\snap;c:\mame\titles)
movie_preview_path                        auto			(movie preview folder, eg c:\mame\previews)
movie_artwork_no                          1			(1-10)
enable_fuzzy_search                       0			(0=no, 1=yes)
history_dat_file                          auto			(history.dat filename, eg c:\mame\history.dat)
history_dat_artwork_no                    2			(1-10)

### Screen-Saver Settings ###
enable_music_in_screensaver 		  1			(0=no, 1=yes)
select_random_game			  0			(0=no, 1=yes)
saver_type                                slideshow		(blank_screen / slideshow / movie / run_game / saver_commandline / power_saving / shutdown)
movie_path                                			(movie folder, eg c:\movies - saver_type movie only)
movie_fullscreen                          1			(0=no, 1=yes, saver_type movie only)
quit_delay				  0			(seconds - saver_type run_game only)
saver_commandline                     				(commandline for screensaver or application, saver_type saver_commandline only*)

### Additional Settings ###
music_path                                			(music folder, eg c:\music)
lcd_display_file_path                     			(lcd file folder, eg c:\lcd)
description_display                       [description]{scroll}	(customise what is to be displayed in 'Game Description' label - see 'Place-Holder and Flag Usage' below)

### Settings used by MAMEWAH ###
current_list                              0			(current games list - ignore, generated by MAMEWAH)



------------------------------------------------------------------------



The required list-specific ini file (emuname-0.ini) will be automatically generated when MAMEWAH is run, with default settings as long as you have your emuname folder setup (see above). For additional, optional games lists, you should place suitably named ini files in the \mamewah\config\emuname folder - eg mame-1.ini, mame-2.ini etc.

### emuname-1.ini (mamewah v1.62) ###

list_title                                			(title of your choice, eg Joystick Games)

### Games List Settings ###
cycle_list                                1			(0=no, 1=yes)
list_type                                 normal		(normal / most_played / longest_played)
display_clone_info                        0			(0=no, 1=yes)
max_favorites                             0			(0=no limit, >0=limit)

### Execution Settings ###
pre_emulator_app_commandlines             			(applications to be automatically launched prior to emulator*)
emulator_commandline                      			(emulator*)
post_emulator_app_commandlines            			(applications to be automatically launched after emulator*)

### Settings used by MAMEWAH ###
current_game                              1			(current game - ignore, generated by MAMEWAH)


NOTE: emuname-0.ini does not have the list_type, display_clone_info or max_favorites settings, as these properties for the main list are fixed.



------------------------------------------------------------------------



gamename.ini files work slightly differently.  You should place an empty suitably named (ie romname.ini) text file within the \mamewah\config\emuname\game folder. When you run MAMEWAH, and *RUN THE GAME*, this file will be populated.  Once this is done you can adjust the contents of this file as you wish, and copy it for use with other games:

### gamename.ini (mamewah v1.62) ###

### Execution Settings ###
pre_emulator_app_commandlines             				(applications to be automatically launched prior to emulator*)
emulator_commandline                      				(emulator*)
post_emulator_app_commandlines            				(applications to be automatically launched after emulator*)



------------------------------------------------------------------------



Place-Holder and Flag Usage (* _commandline's

Any setting involving '_commandline's should be filled in very similarly to how you would run the emulator from a commandline.  However, you need to replace key parts with place-holders, so MAMEWAH can use the commandline dynamically.  For example, here is how you could run MAME from a commandline (assuming MAME resides in c:\mame):

c:\mame\mame.exe puckman

For use in MAMEWAH, this should be entered as:

c:\mame\mame.exe [name]


Another example for Fusion:

c:\fusion\fusion.exe "c:\fusion\roms\sonic the hedgehog.zip" -fullscreen

In MAMEWAH, the emulator_commandline would be:

c:\fusion\fusion.exe "[rompath]\[name].[romext]" -fullscreen


Note that while you might not always specify the full path to your emulator from a commandline, this is required in MAMEWAH.


The following list shows the place-holders that can be used:

System Related:

[emurootpath] 	- path set in emulator_root_path (mamewah.ini)
[emuexepath]	- deduced from emulator_commandline
[emuexename]	- filename excluding path & extension, deduced from emulator_commandline
[emuname]	- current emulator name (as per by emuname.ini name)
[rompath]  	- path set in rom_path (emuname.ini)
[romext]  	- extension set in rom_extension (emuname.ini)

Game Related (available info dependent on list_generation_status):

[description]  	- full game name
[name]  	- romname
[year]  	- year made
[manufacturer]  - manufacturer
[cloneof] 	- parent romname
[romof]  	- bios/parent romname
[screen]  	- screen type
[orientation]  	- screen orientation
[input]  	- input type
[status]  	- driver status
[color] 	- color status
[sound]  	- sound status
[category] 	- game category/genre

Note that if '-clone [cloneof]' is present in the commandline_format, and the selected game is not a clone, then '-clone [cloneof]' will be ignored.


In order to alter the manor in which the emulator is launched, the following flags can also be used:

{8.3string} 		- can be used to convert 'string' to a short (8.3) filename (note that quotes if applicable must be used outside of the {}'s)
{dosbox} 		- displays any dos window used while launching emulator/app
{nodosbox} 		- hides any dos window used while launching emulator/app
{autodosbox} 		- automatically displays/hides any dos window while launching emulator/app (this should be used for M.A.M.E. only!)
{safelaunch} 		- 'safe launches' the emulator/app, use this if the emulator/app is not launching properly from MAMEWAH
{nosafelaunch}  	- launches the emulator/app in a preferred manor to {nosafelaunch}, but does not work with all emulators/apps
{wait}			- tells MAMEWAH not to continue execution until the emulator/app is quit
{nowait}		- tells MAMEWAH to continue execution while the emulator/app is launched (ie app will run at the same time)
{autoquit}		- terminates any app launched using the pre_emulator_app_commandlines option, straight after the emulator has quit (must be used in conjunction with {nowait}!)
{noautoquit}		- leaves any app launched using the pre_emulator_app_commandlines option, running indefinately (must be used in conjunction with {nowait}!)
{quitafter?}		- terminates any emulator/app after ? seconds (must be used in conjunction with {wait}!)
{normal}		- launches the emulator/app using a normal sized window
{min}			- launches the emulator/app in minimised state (where possible)
{max}			- launches the emulator/app in maximised state (where possible)
{music}	 		- allows music playback to continue while emulator/app is running
{nomusic} 		- pauses music playback while the emulator/app is running
{cursor} 		- makes the default cursor visible while the emulator/app is running
{nocursor} 		- hides the cursor while the emulator/app is running
{cursor filename} 	- makes the cursor specified by 'filename' visible while the emulator/app is running

{noscroll}		- used to prevent scrolling info in on-screen labels (only used in 'Game Description' currently).
{scroll}		- used to scroll info in on-screen labels (only used in 'Game Description' currently).

Note: 	If no 'dosbox' flag is set then '{dosbox}' is assumed
	If no 'safelaunch' flag is set then '{safelaunch}' is assumed
	If no 'wait' flag is set then {wait} is assumed
	If no 'autoquit' flag is set then {noautoquit} is assumed
	If no 'windowstate' flag is used then {normal} is assumed
	If no 'music' flag is set then '{nomusic}' is assumed
	If no 'cursor' flag is set then '{nocursor}' is assumed
	If no 'scroll' flag is set then '{noscroll}' is assumed

Flags in {curley brackets} are not used in the actual commandline sent to the emulator.


Note that in mamewah.log, where a game has been launched something like the following will appear:

21/05/2008 10:33:03 Commandline run: c:\mame\mame.exe 1942 {flags=209}

The '{flags=x}' part refers to the sum of number values attributed to (some of) the flags. Here are the values:

{nodosbox} = 1
{dosbox} = 2
{autodosbox} = 4
{nosafelaunch} = 8
{safelaunch} = 16
{nowait} = 32
{wait} = 64
{normal} = 128
{min} = 256
{max} = 512

This might be useful when troubleshooting. For the above example, you can determine the flags used:

209 = 1 + 16 + 64 + 128, so flags used are:

{nodosbox}
{safelaunch}
{wait}
{normal}