[SOLVED] GPIO buttons with NES emulator
  • I setup an arcade with all buttons using GPIO. I have the controls working in PISNES and Stella exactly the way I want. However the advmame emulator for NES does not work at all.. There is no where to configure inputs.(at least I can find) I have tried retroarch and have the joystick working but it won't recognize my mapped buttons. I am using retrogame by adafruit to map my gpio pins to keys. Is there another NES emulator that I can get to work on this thing.. I have found a couple but I need them to have a gui to select the games. There is no keyboard hooked up to this thing. Please let me know if anyone has this working.

    thanks

    Bill
  • Having same problem for advancemame, but works for mame4all and few other emulators.

    I am using Adafruit Retrogame software for my GPIO controls.
  • ok someone HAS to have this working right??
  • I figured out this morning. It appear to be that you have to unplug all USB interface attached to PI, I suppose. Then your GPIO control will work on Advancemame.

    It worked for me for menu but haven't tried any games yet but I think it should.
  • hmmm I have nothing in the usb ports.. I only have the gpio pins in use.
  • can anyone confirm that they personally have any NES emulator working using GPIO?
  • I do. I have been running the adafruit retrogame as well.
  • what emulator are you using?
  • The stock advmess for NES. I also use advmame, fba, and mame4all with no problems. Here is the input mapping for my advmess.rc file.


    input_map[p1_up] keyboard[1,scan0] or keyboard[0,8_pad] or keyboard[0,up] or keyboard[1,scan0]
    input_map[p1_down] keyboard[1,scan0] or keyboard[0,2_pad] or keyboard[0,down] or keyboard[1,scan0]
    input_map[p1_right] keyboard[1,scan0] or keyboard[0,6_pad] or keyboard[0,right] or keyboard[1,scan0]
    input_map[p1_left] keyboard[1,scan0] or keyboard[0,4_pad] or keyboard[0,left] or keyboard[1,scan0]
    input_map[p1_button1] keyboard[1,scan0] or keyboard[0,enter]
    input_map[p1_button2] keyboard[1,scan0] or keyboard[0,space]
    input_map[p1_button3] keyboard[1,scan0] or keyboard[0,rcontrol]
    input_map[p1_button4] keyboard[1,scan0] or keyboard[0,rshift]
    input_map[p1_button5] keyboard[1,scan0] or keyboard[0,enter] keyboard[0,space]
    input_map[p1_button6] keyboard[1,scan0] or keyboard[0,rcontrol] keyboard[0,rshift]
    input_map[p1_button7] keyboard[1,scan0] or keyboard[0,enter] keyboard[0,rcontrol]
    input_map[p1_button8] keyboard[1,scan0] or keyboard[0,space] keyboard[0,rshift]
    input_map[p1_select] keyboard[1,scan0] or keyboard[0,enter] keyboard[0,1]
    input_map[p1_start] keyboard[1,scan0] or keyboard[0,1]

    input_map[start1] keyboard[1,scan0] or keyboard[0,1]
    input_map[start2] keyboard[1,scan0] or keyboard[0,2]
    input_map[coin1] keyboard[1,scan0] or keyboard[0,1]
    input_map[coin2] keyboard[1,scan0] or keyboard[0,2]

    input_map[p2_up] keyboard[1,scan0] or keyboard[0,w]
    input_map[p2_down] keyboard[1,scan0] or keyboard[0,s]
    input_map[p2_right] keyboard[1,scan0] or keyboard[0,d]
    input_map[p2_left] keyboard[1,scan0] or keyboard[0,a]
    input_map[p2_button1] keyboard[1,scan0] or keyboard[0,r]
    input_map[p2_button2] keyboard[1,scan0] or keyboard[0,t]
    input_map[p2_button3] keyboard[1,scan0] or keyboard[0,y]
    input_map[p2_button4] keyboard[1,scan0] or keyboard[0,u]
    input_map[p2_button5] keyboard[1,scan0] or keyboard[0,r] keyboard[0,t]
    input_map[p2_button6] keyboard[1,scan0] or keyboard[0,y] keyboard[0,u]
    input_map[p2_button7] keyboard[1,scan0] or keyboard[0,r] keyboard[0,y]
    input_map[p2_button8] keyboard[1,scan0] or keyboard[0,t] keyboard[0,u]
    input_map[p2_select] keyboard[1,scan0] or keyboard[0,r] keyboard[0,2]
    input_map[p2_start] keyboard[1,scan0] or keyboard[0,2]

    input_map[p1_doubleleft_up] keyboard[1,scan0] or keyboard[0,8_pad]
    input_map[p1_doubleleft_down] keyboard[1,scan0] or keyboard[0,2_pad]
    input_map[p1_doubleleft_right] keyboard[1,scan0] or keyboard[0,6_pad]
    input_map[p1_doubleleft_left] keyboard[1,scan0] or keyboard[0,4_pad]
    input_map[p1_doubleright_up] keyboard[1,scan0] or keyboard[0,r]
    input_map[p1_doubleright_down] keyboard[1,scan0] or keyboard[0,f]
    input_map[p1_doubleright_right] keyboard[1,scan0] or keyboard[0,g]
    input_map[p1_doubleright_left] keyboard[1,scan0] or keyboard[0,d]
    input_map[ui_cancel] keyboard[1,scan0] keyboard[1,scan0] or keyboard[0,1] keyboard[0,2] or keyboard[1,esc] or keyboard[1,scan0]
  • Thanks for the file.. I still have nothing when I go into advmess for NES. I have my joystick buttons configured as the up down left right arrow keys. From your file that should work for me. Its like the second admess launches it disables my retrogame??? anyone have any ideas?
  • GOT IT!.. sorry forgot we had a keyboard plugged in.. unplugged and your config works perfect!! thanks
  • haha. Glad you got it! Marking as solved.

Howdy, Stranger!

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