PICADE controls not working in advmame
  • Hi,
    I have a PICADE and I can use the controls to navigate pimame menus and control mame4all, but when I navigate to advmenu or neogeo only the keyboard will work. The picade controls simply replicate keyboard keys so I'm not sure what is wrong, when I exit advmenu or neogeo the picade controls work again.

    Also if I come out of pimame and boot the desktop (startx) then run advmenu the picade controller works.

    Any ideas?
    Simon.
  • If you're using GPIO for your controls then:

    Plug off all USB devices attached to Raspberry Pi then it should work.
  • The PICADE is a USB Human Interface Device it 'looks' like a keyboard and sends the same commands as a keyboard but the 'keys' are mapped in the hardware to specific key codes. so the joystick emulates pressing the arrow keys, etc.

    The picade keys work on the pimame menu, but not the advmenu menu, they work on the pimame command line and work on advmenu if launched from the command line from the desktop, but they don't work if advmenu is launched from the command line of pimame.
  • That's really really weird. I don't have a PICADE to test with, but I'll look into it.
  • If it helps here are the hardwired key assignments with PICADE

    START '1' K49
    COIN '5' K53
    RETURN 'return' K13
    ESC 'escape' K27
    UP 'up arrow' K273
    down 'down arrow' K274
    left 'left arrow' K276
    Right 'right arrow' K275
    PEW(top) 'L CTRL' K306
    BOMB 'L Alt' K308
    WARP 'space' K32
    PEW (bottom) 'L Shift' K304
    LAZOR 'z' K122
    ROUND HOUSE KICK 'x' K120

    using any of these keys outside of ADVMAME work ok even on CLI, ADVMAME works from desktop.
  • I have been investigating this a little more by running 'advmenu -log' from the command line if I 'exit to command line'.
    > advmenu -log

    I have a log entry that reads..

    keyb:event: keyb_event_init(id:-1, disable_special:0)
    event: open device /dev/input/event0
    event: driver:1.0.1
    event: device vendor:0x16d0 product:0x08c0 version:0x0101 bus:0x0003 (usb)
    event: name:"Unknown USB IO Board "
    event: EV_0x0: 0x0 0x1 0x2 0x4 0x14
    event: EV_KEY: KEY_ESC KEY_1 KEY_2 KEY_3 KEY_4 KEY_5 KEY_6 KEY_7 KEY_8 KEY_9 KEY_0 KEY_MINUS KEY_EQUAL KEY_BACKSPACE KEY_TAB KEY_Q KEY_W KEY_E KEY_R KEY_T KEY_Y KEY_U KEY_I KEY_O KEY_P KEY_LEFTBRACE KEY_RIGHTBRACE KEY_ENTER KEY_LEFTCTRL KEY_A KEY_S KEY_D KEY_F KEY_G KEY_H KEY_J KEY_K KEY_L KEY_SEMICOLON KEY_APOSTROPHE KEY_GRAVE KEY_LEFTSHIFT KEY_BACKSLASH KEY_Z KEY_X KEY_C KEY_V KEY_B KEY_N KEY_M KEY_COMMA KEY_DOT KEY_SLASH KEY_RIGHTSHIFT KEY_KPASTERISK KEY_LEFTALT KEY_SPACE KEY_CAPSLOCK KEY_F1 KEY_F2 KEY_F3 KEY_F4 KEY_F5 KEY_F6 KEY_F7 KEY_F8 KEY_F9 KEY_F10 KEY_NUMLOCK KEY_SCROLLLOCK KEY_KP7 KEY_KP8 KEY_KP9 KEY_KPMINUS KEY_KP4 KEY_KP5 KEY_KP6 KEY_KPPLUS KEY_KP1 KEY_KP2 KEY_KP3 KEY_KP0 KEY_KPDOT KEY_102ND KEY_F11 KEY_F12 KEY_KPENTER KEY_RIGHTCTRL KEY_KPSLASH KEY_SYSRQ KEY_RIGHTALT KEY_HOME KEY_UP KEY_PAGEUP KEY_LEFT KEY_RIGHT KEY_END KEY_DOWN KEY_PAGEDOWN KEY_INSERT KEY_DELETE KEY_PAUSE KEY_LEFTMETA KEY_RIGHTMETA KEY_COMPOSE BTN_LEFT BTN_RIGHT BTN_MIDDLE
    event: EV_REL: REL_X REL_Y REL_WHEEL
    event: EV_MSC: 0x4
    event: error in ioctl(EVIOCGBIT(EV_REP,1))

    I don't get these events logged if I run from the desktop command line and the picade controls work great - any ideas what I need to do to fix?

  • ah I think i might be getting somewhere... in the advmenu log there is an entry for event0 (see previous comment) that says

    keyb:event: not a keyboard on device /dev/input/event0

    I dont get this error if i run from desktop. Any ideas?


  • Ok, I don't know why, but all of a sudden the controls have started working - I haven't changed anything as far as I am aware but now they work - very weird!
  • ok i eventually figured it out, as long as I don't have a keyboard connected the picade controller works in advancemenu in pimame, if i run advancemenu from the desktop then having the keyboard connected isn't a problem - - no great shakes as i don't intend to have the keyboard conneceted once I have everything setup
  • how to do i change the keymapping for picade setup?

Howdy, Stranger!

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