I have finally figured out how to modify the PiMAME Menu so that it can be navigated with only the TankStick. I also edited the advmenu-****.rc files to use the left control key to ext AdvMenu.
1. Removed the number keys as a menu item selection - since number keys are used in the TS joystick 2. Added Player 1 key to select the menu item 3. Added the TS Joystick controls to move up and down the list.
PiMAME Menu Modification /home/pi/pimame_files/menu.py
Look for the "#Gets user input comment" Changes to menu occur after this line - identified with "#TS Mod"
x = screen.getch() # Gets user input if x == ord('\n'): # Enter Key x = ord('c') elif x == ord('1'): # TS Mod - 1 Key (Player 1 Key on TankStick) x = ord('c') # TS Mod
# What is user input? # TS Mod - Commented following two lines to remove number key position of menu - Using "1" key as menu select above # if x >= ord('1') and x <= ord(str(optioncount+1)):<br /># pos = x - ord('0') - 1 # convert keypress back to a number, then subtract 1 to get index if x == 258: # down arrow # TS Mod - replace elif with if if pos < optioncount: pos += 1 else: pos = 0 elif x == ord('2'): # NumPad down arrow #TS Mod if pos < optioncount: pos += 1 else: pos = 0 elif x == 259: # up arrow if pos > 0: pos += -1 else: pos = optioncount elif x == ord('8'): # NumPad up arrow #TS Mod if pos > 0: pos += -1 else: pos = optioncount elif x != ord('\n'): curses.flash()
AdvMenu Menu Modification - Leave AdvMenu with another key (not escape) This mod will need to be done for all advmenu-****.rc files /home/pi/.advance/advmenu-*****.rc Find the line without quotes "event_assign esc esc"
To not use the esc key, replace the second esc. event_assign esc lcontrol To add another key, add "or" with the name of the key. event_assign esc esc or lcontrol