[SOLVED] PiMAME Menu Navigation with X-Arcade TankStick
  • 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

    Go here for a list of AdvMenu key character key names;
    http://rpm.pbone.net/index.php3/stat/45/idpl/11079359/numer/1/nazwa/advmenu
    Search for string "The available key names are"
  • This is awesome. Could you put this up on github as a pull request?
  • I am not too sure how to do this. I can't figure out how to add the modified file....
  • Moved into solved category as the main question has been solved :)
  • @thex
    What can't you figure out how to do exactly?

    --
    Conno123009

Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!