# ipodmame.ini
#
#   2006, Scott Lawrence, etc.
#
# This file has a few functions:
#    It is a good starting point for your own mame configuration
#    It has a decent set of working parameters
#    It describes the format, and how things are defined

# okay, before you come complaining to me that .ini files are obsolete, let
# me explain to you why I went with an .ini file format for this file...
#   1. I had a seasoned, stable parser I had written for my "turaco" project
#   2. The source was relatively small and easy to add into the ipodmame project
#   3. an XML format would be optimal, but it would require a parsing library
#   4. I wanted to keep this as hand-editable as possible
#
#  I apologize for going with something as outdated as .ini, 
#  but it works, is solid, and was simple to drop in.

#
# in the below items, things whose section names are "non-arbitrary" cannot
# be named something else.  Otherwise, they can be named whatever you like.
#
# Section names should be alphanumeric only.  No punctuation or white space.
#
# Keys and Values are case sensitive


# input
#
#  Valid left-side parameters are:
#	MENU	the 'menu' button was clicked.
#	PREV	the '|<<' button was clicked.
#	NEXT	the '>>|' button was clicked.
#	PLAY	the '>||' button was clicked.
#	ACTION	the center button was clicked.
#	HOLD	the hold switch was flipped on then off.
#
#  Valid right-side parameters are:
#	p1_up		player 1 joystick up
#	p1_down		player 1 joystick down
#	p1_left		player 1 joystick left
#	p1_right	player 1 joystick right
#	p1_fire		player 1 fire button 1
#	p1_fire_2	player 1 fire button 2
#	p2_up		player 2 joystick up
#	p2_down		player 2 joystick down
#	p2_left		player 2 joystick left
#	p2_right	player 2 joystick right
#	p2_fire		player 2 fire button 1
#	p2_fire_2	player 2 fire button 2
#	coin1		player 1 coin
#	coin2		player 2 coin
#	start1		player 1 start
#	start2		player 2 start
#
#	frameskip	cycle through frameskip settings
#	fps		toggle FPS display
#	reset_emu	reset the game emulation
#	quit		exit from ipodmame
#
#	default_input	switch back to the default input
#	green_input	switch to the green input bank
#	red_input	switch to the red input bank

# input-upright - arbitrary name, referred to below
[input-upright]
MENU = p1_up
PREV = p1_left
NEXT = p1_right
PLAY = p1_down
ACTION = p1_fire
HOLD = green_input

# input-rotated - arbitrary name, referred to below
[input-rotated]
MENU = p1_left
PREV = p1_down
NEXT = p1_up
PLAY = p1_right
ACTION = p1_fire
HOLD = green_input

# this section name itself is non-arbitrary
#  if there is a "green_input" in one of the above, the input changes to this
[input-green]
MENU = start2
PREV = coin1
NEXT = coin2
PLAY = start1
ACTION = default_input
HOLD = red_input

# this section name itself is non-arbitrary
#  if there is a "red_input" in one of the above, the input changes to this
[input-red]
MENU = quit
PREV = default_input
NEXT = default_input
PLAY = reset_emu
ACTION = default_input
HOLD = green_input

# this is for the blue input bank, not used
MENU = default_input
PREV = default_input
NEXT = default_input
PLAY = default_input
ACTION = default_input
HOLD = default_input

# this section name itself is non-arbitrary
#   this defines how the keys map for the desktop
[input-desktop-mapping]
MENU = _UP
PREV = _LEFT
NEXT = _RIGHT
PLAY = _DOWN
ACTION = _SPACE
HOLD = _H


# screenmodes
#
#  these all have arbitrary key names, but are referred to below
#    
#  Valid right-side parameters are:
#	ROT90		rotate the graphics 90 degrees clockwise
#	HALF		half-size the graphics, every other pixel and row kept
#	SLOW		specify the C routine (if applicable)
#	FAST		specify the optimized ASM routine (if applicable)
[screenmodes]
nano_vert = ROT90 HALF SLOW
5g_vert = ROT90 FAST
photo_vert = FAST
desktop = ROT90 HALF SLOW


# this section name itself is non-arbitrary
#
#  screensize can be one of:  NANO PHOTO COLOR 5G 
[desktop]
screenmode = nano_vert	# screen image data scaling and rotation
screensize = PHOTO	# screen resolution definition
default_input = input-upright
frameskip = 0;


# now a few special sections...

# default
#  this is the 'default setup', if no other parameters are given.
#
#  Valid left-side parameters are:
#	driver		mame driver name
#	screenmode	specifies an item in [screenmodes] above
#			- this is ignored for desktop use.
#	input		specifies the input scheme above
#	frameskip	specifies a starting frameskip value
#	input_mechanism	selects using the inputs defined in this or internal
[default]
driver = pengo2u
screenmode = nano_vert
default_input = input-rotated
frameskip = 2
# input_mechansim can be one of:
#	INIFILE 	use the above layout
#	INTERNAL	use the hardcoded internal layout
input_mechanism = INTERNAL

# there are also a few sections that get loaded after 'default' is parsed,
# which are specific to the game drivers.  For example;
# if the user runs "mame", it will:
#	parse [default]
#	determine the game name, default is 'pacman'
#	parse [pacman], if found
#
# if the user runs "mame mspacmab", it will:
#	parse [default]
#	use the specified game name, "mspacmab", overriding the "driver" above
#	parse [mspacmab], if found
#
[mspacmab]
driver = mspacmab
screenmode = nano_vert
default_input = input-rotated
