Port of MAME 0.139 for libretro, originally sourced from https://github.com/mamedev/mame/releases/download/mame0139/mame0139s.zip
The OSD code is highly inspired by other MAME ports :
mame2010 requires that the following directories exist, and will create them if they are missing.
libretro system subfolders:
cheat.zip
cheats file - not currently workinglibretro saves subfolders
RETRO_DEVICE_ID_JOYPAD_START MAME: KEY_START
RETRO_DEVICE_ID_JOYPAD_SELECT MAME: KEY_COIN
RETRO_DEVICE_ID_JOYPAD_A MAME: KEY_BUTTON_1
RETRO_DEVICE_ID_JOYPAD_B MAME: KEY_BUTTON_2
RETRO_DEVICE_ID_JOYPAD_X MAME: KEY_BUTTON_3
RETRO_DEVICE_ID_JOYPAD_Y MAME: KEY_BUTTON_4
RETRO_DEVICE_ID_JOYPAD_L MAME: KEY_BUTTON_5
RETRO_DEVICE_ID_JOYPAD_R MAME: KEY_BUTTON_6
RETRO_DEVICE_ID_JOYPAD_L2 MAME: KEY_BUTTON_7
RETRO_DEVICE_ID_JOYPAD_UP MAME: KEY_JOYSTICK_U
RETRO_DEVICE_ID_JOYPAD_DOWN MAME: KEY_JOYSTICK_D
RETRO_DEVICE_ID_JOYPAD_LEFT MAME: KEY_JOYSTICK_L
RETRO_DEVICE_ID_JOYPAD_RIGHT MAME: KEY_JOYSTICK_R
RETRO_DEVICE_ID_JOYPAD_R2 Turbo Button
RETRO_DEVICE_ID_JOYPAD_START MAME: KEY_START
RETRO_DEVICE_ID_JOYPAD_SELECT MAME: KEY_COIN
RETRO_DEVICE_ID_JOYPAD_A MAME: KEY_BUTTON_1
RETRO_DEVICE_ID_JOYPAD_B MAME: KEY_BUTTON_2
RETRO_DEVICE_ID_JOYPAD_X MAME: KEY_BUTTON_3
RETRO_DEVICE_ID_JOYPAD_UP MAME: KEY_JOYSTICK_U
RETRO_DEVICE_ID_JOYPAD_DOWN MAME: KEY_JOYSTICK_D
RETRO_DEVICE_ID_JOYPAD_LEFT MAME: KEY_JOYSTICK_L
RETRO_DEVICE_ID_JOYPAD_RIGHT MAME: KEY_JOYSTICK_R
RETRO_DEVICE_ID_JOYPAD_R2 Turbo Button
Note: these controls are only operational for Player 1
RETRO_DEVICE_ID_JOYPAD_L3 Test/Service Mode
RETRO_DEVICE_ID_JOYPAD_R3 Enter MAME UI
RETRO_DEVICE_ID_JOYPAD_A MAME: IPT_UI_SELECT (Make selections in the MAME GUI)