Please do not post a support request without first reading and following the advice in

  • Pi Model or other hardware: 3B
    Power Supply used: Standard
    RetroPie Version Used: 4.2
    Built From: Pre made SD Image on RetroPie website and updated from source several times
    USB Devices connected: 2x USB hubs; USB trackball; 2x homemade dials.
    Controller used: 4 x USB DragonRise controllers
    Error messages received: None
    Log found in /dev/shm/runcommand.log (if relevant): NA
    Guide used: NA
    File: /opt/configs/mame-advmame/advmame-1.4 (and the 2 other advmame files)
    Emulator: advmame
    Attachment of config files: See below:
    How to replicate the problem:

    I've recently found that when using advmame that my player 2 controls are defaulting to player 1 even though I've set the controls up in TAB so that Player 2 uses an entirely different joystick.

    If I'm playing a 2 player game like Altered Beast where both players play simultaneously, it doesn't seem to be a problem. Player 1 defaults to Player 1 controls; Player 2 defaults to Player 2.

    However, if I play something like Amidar where the players play separately, then Player 1 defaults to Player 1. When it comes time to play Player 2, Player 2 defaults to Player 1 controls. If I've pressed F1 in game, then move Player 2's joystick, advmame is recognising me moving the joystick, but there is no movement on screen.

    This seems to happen with every game using advmame and only seems to have started recently (but I can't say when and I've updated several times recently). It happens with all 3 advmame emulators. I've just this morning updated advmame (3.4) from source and 0.94 and 1.4 from binary and the problem is still there.

    A copy of my advmame-1.4.rc if it is any help:

     debug_crash no
    debug_rawsound no
    debug_speedmark no
    device_alsa_device default
    device_alsa_mixer channel
    device_color_bgr15 yes
    device_color_bgr16 yes
    device_color_bgr24 yes
    device_color_bgr32 yes
    device_color_bgr8 yes
    device_color_palette8 yes
    device_color_yuy2 yes
    device_joystick auto
    device_keyboard raw
    device_mouse raw
    device_raw_mousedev[0] /dev/input/mouse0
    device_raw_mousedev[1] /dev/input/mouse1
    device_raw_mousedev[2] /dev/input/mouse2
    device_raw_mousedev[3] /dev/input/mouse3
    device_raw_mousetype[0] ps2
    device_raw_mousetype[1] ps2
    device_raw_mousetype[2] ps2
    device_raw_mousetype[3] ps2
    device_sdl_samples 512
    device_sound alsa
    device_video fb
    device_video_cursor off
    device_video_doublescan yes
    device_video_fastchange no
    device_video_interlace yes
    device_video_output auto
    device_video_overlaysize auto
    device_video_singlescan yes
    dir_artwork /home/pi/RetroPie/roms/mame-advmame/artwork
    dir_diff /home/pi/RetroPie/roms/mame-advmame/diff
    dir_hi /home/pi/RetroPie/roms/mame-advmame/hi
    dir_image /home/pi/RetroPie/roms/mame-advmame
    dir_inp /home/pi/RetroPie/roms/mame-advmame/inp
    dir_memcard /home/pi/RetroPie/roms/mame-advmame/memcard
    dir_nvram /home/pi/RetroPie/roms/mame-advmame/nvram
    dir_rom /home/pi/RetroPie/roms/mame-advmame
    dir_sample /home/pi/RetroPie/roms/mame-advmame/samples
    dir_snap /home/pi/RetroPie/roms/mame-advmame/snap
    dir_sta /home/pi/RetroPie/roms/mame-advmame/nvram
    display_adjust none
    display_antialias yes
    display_artwork_backdrop yes
    display_artwork_bezel no
    display_artwork_crop yes
    display_artwork_overlay yes
    display_aspectx 4
    display_aspecty 3
    display_beam 1
    display_brightness 1
    display_buffer no
    display_color auto
    display_expand 1
    display_flicker 0
    display_flipx no
    display_flipy no
    display_frameskip auto
    display_gamma 1
    display_height 480
    display_intensity 1.5
    display_interlaceeffect none
    display_magnify auto
    display_magnifysize 640
    display_mode auto
    display_pausebrightness 1
    display_resize fractional
    display_resizeeffect auto
    display_restore yes
    display_rgbeffect none
    display_rol no
    display_ror no
    display_scanlines no
    display_skipcolumns auto
    display_skiplines auto
    display_translucency yes
    display_vsync no
    display_width 640
    input_hotkey yes
    input_idleexit 0
    input_map[coin5] auto
    input_map[coin6] auto
    input_map[coin7] auto
    input_map[coin8] auto
    input_map[event10] auto
    input_map[event11] auto
    input_map[event12] auto
    input_map[event13] auto
    input_map[event14] auto
    input_map[event1] auto
    input_map[event2] auto
    input_map[event3] auto
    input_map[event4] auto
    input_map[event5] auto
    input_map[event6] auto
    input_map[event7] auto
    input_map[event8] auto
    input_map[event9] auto
    input_map[p1_dialx] auto
    input_map[p1_dialy] auto
    input_map[p1_lightgunx] auto
    input_map[p1_lightguny] auto
    input_map[p1_mousex] auto
    input_map[p1_mousey] auto
    input_map[p1_paddlex] auto
    input_map[p1_paddley] auto
    input_map[p1_pedalbrake] auto
    input_map[p1_pedalgas] auto
    input_map[p1_pedalother] auto
    input_map[p1_stickx] auto
    input_map[p1_sticky] auto
    input_map[p1_stickz] auto
    input_map[p1_trackballx] mouse[0,x] mouse[1,x] mouse[2,x] mouse[3,x]
    input_map[p1_trackbally] mouse[0,y] mouse[1,y] mouse[2,y] mouse[3,y]
    input_map[p2_dialx] auto
    input_map[p2_dialy] auto
    input_map[p2_lightgunx] auto
    input_map[p2_lightguny] auto
    input_map[p2_mousex] auto
    input_map[p2_mousey] auto
    input_map[p2_paddlex] auto
    input_map[p2_paddley] auto
    input_map[p2_pedalbrake] auto
    input_map[p2_pedalgas] auto
    input_map[p2_pedalother] auto
    input_map[p2_stickx] auto
    input_map[p2_sticky] auto
    input_map[p2_stickz] auto
    input_map[p2_trackballx] mouse[0,x] mouse[1,x] mouse[2,x] mouse[3,x]
    input_map[p2_trackbally] mouse[0,y] mouse[1,y] mouse[2,y] mouse[3,y]
    input_map[p3_dialx] auto
    input_map[p3_dialy] auto
    input_map[p3_lightgunx] auto
    input_map[p3_lightguny] auto
    input_map[p3_mahjong_a] auto
    input_map[p3_mahjong_b] auto
    input_map[p3_mahjong_bet] auto
    input_map[p3_mahjong_c] auto
    input_map[p3_mahjong_chance] auto
    input_map[p3_mahjong_chi] auto
    input_map[p3_mahjong_d] auto
    input_map[p3_mahjong_double_up] auto
    input_map[p3_mahjong_e] auto
    input_map[p3_mahjong_f] auto
    input_map[p3_mahjong_flip_flop] auto
    input_map[p3_mahjong_g] auto
    input_map[p3_mahjong_h] auto
    input_map[p3_mahjong_i] auto
    input_map[p3_mahjong_j] auto
    input_map[p3_mahjong_k] auto
    input_map[p3_mahjong_kan] auto
    input_map[p3_mahjong_l] auto
    input_map[p3_mahjong_m] auto
    input_map[p3_mahjong_n] auto
    input_map[p3_mahjong_pon] auto
    input_map[p3_mahjong_reach] auto
    input_map[p3_mahjong_ron] auto
    input_map[p3_mahjong_score] auto
    input_map[p3_mousex] auto
    input_map[p3_mousey] auto
    input_map[p3_paddlex] auto
    input_map[p3_paddley] auto
    input_map[p3_pedalbrake] auto
    input_map[p3_pedalgas] auto
    input_map[p3_pedalother] auto
    input_map[p3_stickx] auto
    input_map[p3_sticky] auto
    input_map[p3_stickz] auto
    input_map[p3_trackballx] auto
    input_map[p3_trackbally] auto
    input_map[p4_dialx] auto
    input_map[p4_dialy] auto
    input_map[p4_lightgunx] auto
    input_map[p4_lightguny] auto
    input_map[p4_mahjong_a] auto
    input_map[p4_mahjong_b] auto
    input_map[p4_mahjong_bet] auto
    input_map[p4_mahjong_c] auto
    input_map[p4_mahjong_chance] auto
    input_map[p4_mahjong_chi] auto
    input_map[p4_mahjong_d] auto
    input_map[p4_mahjong_double_up] auto
    input_map[p4_mahjong_e] auto
    input_map[p4_mahjong_f] auto
    input_map[p4_mahjong_flip_flop] auto
    input_map[p4_mahjong_g] auto
    input_map[p4_mahjong_h] auto
    input_map[p4_mahjong_i] auto
    input_map[p4_mahjong_j] auto
    input_map[p4_mahjong_k] auto
    input_map[p4_mahjong_kan] auto
    input_map[p4_mahjong_l] auto
    input_map[p4_mahjong_m] auto
    input_map[p4_mahjong_n] auto
    input_map[p4_mahjong_pon] auto
    input_map[p4_mahjong_reach] auto
    input_map[p4_mahjong_ron] auto
    input_map[p4_mahjong_score] auto
    input_map[p4_mousex] auto
    input_map[p4_mousey] auto
    input_map[p4_paddlex] auto
    input_map[p4_paddley] auto
    input_map[p4_pedalbrake] auto
    input_map[p4_pedalgas] auto
    input_map[p4_pedalother] auto
    input_map[p4_stickx] auto
    input_map[p4_sticky] auto
    input_map[p4_stickz] auto
    input_map[p4_trackballx] auto
    input_map[p4_trackbally] auto
    input_map[safequit] auto
    input_map[service_coin5] auto
    input_map[service_coin6] auto
    input_map[service_coin7] auto
    input_map[service_coin8] auto
    input_map[ui_toggle_ui] auto
    input_steadykey no
    lcd_server none
    lcd_speed 4
    lcd_timeout 500
    misc_bios default
    misc_cheat no
    misc_cheatfile cheat.dat
    misc_difficulty none
    misc_eventdebug no
    misc_eventfile event.dat
    misc_freeplay no
    misc_hiscorefile hiscore.dat
    misc_lang none
    misc_languagefile english.lng
    misc_mutedemo no
    misc_quiet yes
    misc_safequit yes
    misc_smp no
    misc_timetorun 0
    record_sound yes
    record_sound_time 15
    record_video yes
    record_video_interleave 2
    record_video_time 15
    script_led1 on(kdb, 0b1); wait(!event()); off(kdb, 0b1);
    script_led2 on(kdb, 0b10); wait(!event()); off(kdb, 0b10);
    script_turbo while (event()) { toggle(kdb, 0b100); delay(100); } off(kdb, 0b100);
    script_video wait(!event()); set(kdb, 0);
    sound_adjust auto
    sound_equalizer_highvolume 0
    sound_equalizer_lowvolume 0
    sound_equalizer_midvolume 0
    sound_latency 0.05
    sound_mode auto
    sound_normalize no
    sound_samplerate 44100
    sound_samples yes
    sound_volume -3
    sync_fps auto
    sync_resample auto
    sync_speed 1
    sync_startuptime auto
    sync_turbospeed 3
    ui_color[help_other] 000000 808080
    ui_color[help_p1] 000000 ffff00
    ui_color[help_p2] 000000 00ff00
    ui_color[help_p3] 000000 ff0000
    ui_color[help_p4] 000000 00ffff
    ui_color[interface] 000000 ffffff
    ui_color[select] 000000 afffff
    ui_color[tag] 247ef0 ffffff
    ui_font auto
    ui_fontsize auto
    ui_helpimage auto
    ui_translucency 0.8
    input_map[p1_up] joystick_digital[2,0,0,0]
    input_map[p1_down] joystick_digital[2,0,0,1]
    input_map[p1_left] joystick_digital[2,0,1,1]
    input_map[p1_right] joystick_digital[2,0,1,0]
    input_map[p1_doubleright_up] joystick_digital[0,0,0,0]
    input_map[p1_doubleright_down] joystick_digital[0,0,0,1]
    input_map[p1_doubleright_left] joystick_digital[0,0,1,1]
    input_map[p1_doubleright_right] joystick_digital[0,0,1,0]
    input_map[p1_doubleleft_up] joystick_digital[2,0,0,0]
    input_map[p1_doubleleft_down] joystick_digital[2,0,0,1]
    input_map[p1_doubleleft_left] joystick_digital[2,0,1,1]
    input_map[p1_doubleleft_right] joystick_digital[2,0,1,0]
    input_map[p1_button1] joystick_button[2,2]
    input_map[p1_button2] joystick_button[2,5]
    input_map[p1_button3] joystick_button[2,0]
    input_map[p1_button4] joystick_button[2,1] joystick_digital[0,0,2,1]
    input_map[p1_button5] joystick_button[6,9]
    input_map[p1_button6] joystick_button[6,1]
    input_map[p2_up] joystick_digital[0,0,0,0]
    input_map[p2_down] joystick_digital[0,0,0,1]
    input_map[p2_left] joystick_digital[0,0,1,1]
    input_map[p2_right] joystick_digital[0,0,1,0]
    input_map[p2_doubleright_up] joystick_digital[0,0,0,0]
    input_map[p2_doubleright_down] joystick_digital[0,0,0,1]
    input_map[p2_doubleleft_up] joystick_digital[2,0,0,0]
    input_map[p2_doubleleft_down] joystick_digital[2,0,0,1]
    input_map[p2_button1] joystick_button[0,1]
    input_map[p2_button2] joystick_button[0,3]
    input_map[p2_button3] joystick_button[0,5]
    input_map[p2_button4] joystick_button[0,0]
    missile/input_setting[p1_trackballx] keydelta:10,centerdelta:10,sensitivity:20,reverse:1
    input_map[p2_doubleright_left] joystick_digital[0,0,1,1]
    input_map[p2_doubleright_right] joystick_digital[0,0,1,0]
    input_map[p2_doubleleft_left] joystick_digital[2,0,1,1]
    input_map[p2_doubleleft_right] joystick_digital[2,0,1,0]
    mappy/input_map[p1_right] joystick_digital[2,0,3,0]
    mappy/input_map[p1_left] joystick_digital[2,0,3,1]
    mappy/input_map[p2_right] joystick_digital[0,0,3,0]
    mappy/input_map[p2_left] joystick_digital[0,0,3,1]
    input_map[ui_configure] joystick_button[0,11] or keyboard[0,tab]
    input_map[ui_up] joystick_digital[2,0,0,0] or keyboard[0,up]
    input_map[ui_down] joystick_digital[2,0,0,1] or keyboard[0,down]
    input_map[ui_left] joystick_digital[2,0,1,1] or keyboard[0,left]
    input_map[ui_right] joystick_digital[2,0,1,0] or keyboard[0,right]
    input_map[ui_select] keyboard[0,enter] or joystick_button[0,9]
    input_map[ui_cancel] joystick_button[0,10] or keyboard[0,esc]
    marble/input_setting[p1_trackballx] keydelta:50,centerdelta:30,sensitivity:50,reverse:0
    marble/input_setting[p1_trackbally] keydelta:50,centerdelta:30,sensitivity:50,reverse:1
    320x232x58/display_mode generate-double-x
    ambush/input_map[p1_button2] joystick_button[2,5]
    ambush/input_map[p1_button1] joystick_button[2,2]
    ambush/input_map[p1_up] joystick_digital[7,0,0,0]
    ambush/input_map[p1_down] joystick_digital[2,0,0,1]
    ambush/input_map[p1_left] joystick_digital[2,0,1,1]
    ambush/input_map[p1_right] joystick_digital[2,0,1,0]
    288x224x60/display_mode generate-double
    aliens/input_map[coin1] joystick_button[5,8]
    aliens/input_map[start1] joystick_button[5,9]
    aliens/input_map[coin2] joystick_button[4,8]
    aliens/input_map[start2] joystick_button[4,9]

    The key mapping from TAB also doesn't seem to be working properly. Map to keys, then press the key (after opening the virtual keyboard with F1) and the keys aren't mapped either. Standard keys (up, down, left, right, 1, 2, 5, and 6) are working properly though.

    I'm not using xboxdrv in this case.

    I should say that all other emulators are fine and libretro cores (eg fba, lr-mame2003) are working properly too. Thanks for any help.

  • Hello, how did you get your controller for player one mapped, I can't get my controller mapped for AdvMame libretro works like a champ, don't KNOW why it's so hard to map the advance name emulator

  • Global Moderator


    Advance MAME seems to get confused if two of the same controllers are used. It took me a while to come up with a workable solution and there might be a better way, but I ended up mapping both controllers to full keyboard input with each button having a separate key using xboxdrv. This was still a problem, because Advance MAME still got confused about what it deemed to be identical keyboards. I finally had to edit /opt/retropie/configs/mame-advmame/advmame.rc to map each key to be valid no matter what keyboard it was coming from. An example of mapping the 'B' button of my controller, which was mapped to the 'B' key of the xboxdrv virtual keyboard to player 1, button 1 of the Advance MAME config looks like:

    input_map[p1_button1] keyboard[0,b] or keyboard[1,b] or keyboard[2,b]

    Hopefully someone will have an easier alternative, but I've been using this for a while and at the very least, it works.

  • Also how do you exit a game , I would like "start+select", to exit.... Someone please come up with a script to map controller with, please

  • Global Moderator


    how did you get your controller for player one mapped... Also how do you exit a game , I would like "start+select", to exit.

    Have you tried mapping controls from the MAME menu? It can be invoked bay pressing the 'tab' key on your keyboard. The menu entry for mapping the exit function is listed as 'UI Cancel'. If you highlight that and press 'enter' the software will wait for you to press a button or button combo. In your case, you would then press the 'start' and 'select' button at the same time.

  • @mediamogul Thanks for your help and just so you know, this is now my "landscape" mode setup, rather than "portrait". I'm basically exclusively reserving lr-mame2003 for portrait mode only, and intend to use advmame (or any other emulator/core that works) for landscape mode.

    So I went into Ms Pacman via advmame, pressed TAB and I tried first by removing all joysticks inputs, and then remapping each key for players 1 and 2 to separate keys. I then changed the advmame.rc as so:

    input_map[p1_up] keyboard[0,up] or keyboard[1,up] or keyboard[2,up]
    input_map[p1_down] keyboard[0,down] or keyboard[1,down] or keyboard[2,down]
    input_map[p1_left] keyboard[0,left] or keyboard[1,left] or keyboard[2,left]
    input_map[p1_right] keyboard[0,right] or keyboard[1,right] or keyboard[2,right]
    input_map[p1_button1] keyboard[0,lcontrol] or keyboard[1,lcontrol] or keyboard[2,lcontrol]
    input_map[p1_button2] keyboard[0,lalt] or keyboard[1,lcontrol] or keyboard[2,lcontrol]
    input_map[p1_button3] keyboard[0,space] or keyboard[1,space] or keyboard[2,space]
    input_map[p1_button4] keyboard[0,lshift] or keyboard[1,lshift] or keyboard[2,lshift]
    input_map[p2_up] keyboard[0,r] or keyboard[1,r] or keyboard[2,r]
    input_map[p2_down] keyboard[0,d] or keyboard[1,d] or keyboard[2,d]
    input_map[p2_left] keyboard[0,s] or keyboard[1,s] or keyboard[2,s]
    input_map[p2_right] keyboard[0,f] or keyboard[1,f] or keyboard[2,f]
    input_map[p2_button1] keyboard[0,a] or keyboard[1,a] or keyboard[2,a]
    input_map[p2_button2] keyboard[0,s] or keyboard[1,s] or keyboard[2,s]
    input_map[p2_button3] keyboard[0,q] or keyboard[1,q] or keyboard[2,q]
    input_map[p2_button4] keyboard[0,w] or keyboard[1,w] or keyboard[2,w]

    And then I tried playing just with the keyboard. Again, player 2's movement was governed by player 1's keyboard controls.
    When I checked the advmame.rc again, it basically gave me this for each line:

    input_map[p2_up] keyboard[0,r] or keyboard[1,scan0] or keyboard[2,scan0]

    which might mean it can't find the extra virtual keyboards (?).

    I've not invoked xboxdrv at the moment as I was just trying to see whether the keyboard commands would work.

  • Global Moderator


    That's pretty squirrely. I'm not sure if any of this is specifically buggy behavior, but rather the software trying to be too smart for it's own good by adapting to what it thinks are multiple controls. I'd be most interested for @edmaul69 to weigh in on this as well. He's been testing a version that is supposed to address these issues. For me, the method I landed on above is holding strong, but it's a kludgy resolution at best.

  • @ferdnand Hi. If you are using 1 controller only, it should be reasonably easy to map the controls.

    Just make sure you've got a keyboard attached and press TAB. That will bring up a sub-menu with "Input - General" and "Input - Game". If this is the first time you've messed around with advmame, probably best to pick the second option in case you mess it up. Then with the keyboard just navigate, press "enter" and press the button on the joystick that you want to use. Same with the joystick axes.

    After mapping everything, navigate with the keyboard down to "return to game". It will automatically save the inputs you've put in to advmame.rc.

  • @mediamogul Yeah, it's a bit weird. I was even thinking of forgetting advmame and just proceeding with fba or lr-mame2010, but that would be a bit of a pity, given that I've already got the advmame romset sorted out.

  • @ferdnand said in Advmame controller problem:

    Also how do you exit a game , I would like "start+select", to exit.... Someone please come up with a script to map controller with, please

    You can simply map to button presses at once to UI Cancel. In the mame GUI, map UI Cancel, and when it is time to press the key, press BOTH start and select, then wait for it to accept. It will create a <CODE AND> entry, which is to say, it will require both keys pressed at the same time to register the function, which is what you are asking for.

  • @spud11 I had a thought about your experience with mspacman. It strikes me that unless you have the virtual DIP switch set to cocktail mode, that this game does indeed use player 1 controls for player 2. Follow me here. Imagine the actual arcade system, a stand-up cabinet with a single joystick. Where is player 2 controls? There are none. On the real game, you have to share the same joystick. Well, that may be exactly why that game is behaving the way it is.

    Now, if you enable Cocktail mode, which is for a specific kind of cabinet, with two sets of joysticks across from each other, you get the different controls for player 1 and 2 because they are actually different controls on the real system. Of course, the screen also flips.

    This same effect happens in Black Tiger as well, where the controls for player 2 don't really do anything unless running in cocktail mode.

    In the end, this might just be accurate emulation of the real hardware.

  • @caver01 Well, I've certainly learnt something new. I didn't realise the Advmame TAB setup was so sophisticated that it allowed this kind of key setup. That's really helpful. Thanks, caver01.

  • @caver01 That makes 100% sense to me. The only thing that strikes me though is why advmame would allow us to set up 2 Player controls that are different from 1 Player controls, if it's not going to allow us to use those controls. But I think you've got to the nub of the problem. I'll be posting a response to mediamogul's comments in a minute too.

  • @mediamogul I thought about this problem overnight. It strikes me that I should be able to use my existing lr-mame2003/xboxdrv setup to bypass this issue with advmame.

    xboxdrv allows me to map all 4 joysticks to the same keyboard settings for lr-mame2003. So what I've done is map Joysticks 3 and 1 to Player's 1 keyboard controls and Joysticks 2 and 4 to Player 2's keyboard controls. What this means is that it doesn't matter whether the game is in Portrait mode or in Landscape mode, I can either use Joystick 1 or Joystick 3 for Player 1 depending on the orientation; same with Player 2, using Joystick 2 or 4. I've tested this with Ms Pacman "in game" and it appears to work as it records movement with Joysticks 1 and 3 whilst playing Player 1; same with Player 2 using Joysticks 2 and 4.

    So what I'll probably do now is setup a new folder for the lr-mame2003 romset in landscape mode and remove the advmame romset for the time being. I'll post my new xboxdrv code in the "Advanced Mapping Guide" thread.

  • @spud11 I get your frustration about this. I thought the same thing with Black Tiger a while back. It is a horizontal game, and I wanted player 2 to use a second set of controls I have mounted in that orientation, but was angry when the game insisted I use player 1's joystick. Then I tried cocktail mode, which worked, but it was upsidedown for player 2.

    So, the reason it lets you set separate controls for player 2 is for when you have a cabinet setup in cocktail mode that does indeed have separate controls. It would seem that the original game hardware would have to accommodate a second set of controls with this cabinet style. Otherwise, it all plays on the same joystick which is why the player 2 config is ignored on a regular cabinet. Makes sense, just doesn't make us very happy. It is easy to forget that the emulator is simply reproducing the capabilities of the original hardware, not merely adapting the gameplay to our modern control systems.

  • @caver01 Yep, it's really quite remarkable how far emulation has come, particularly in the last 3-4 years, as we can now much more easily create the "look" of an arcade machine with the Raspberry Pi as the guts of it.

    Hopefully, the author of advmame will find a software solution to what is an issue caused by perfect hardware emulation (as you've said). In the meantime, I'll probably just use lr-mame2003 with xboxdrv. I started using that core in the first place because I found that with a 1920x1200 monitor I was able to implement "real" full screen resolution more easily, than with advmame .

    I love your build, by the way. I took note of it when you first put the screenshots up. A labour of love.

  • @spud11 Thanks!

    I wouldn't expect much to change in advancemame on this. By any account, the emulator is "working as designed" as they say. It is the game code that is ignoring player 2 controls, not mame. It simply checks the cocktail cabinet dip switch, and if it is set to upright, well there is only one joystick in the machine, so player 2 is going to share the player 1 joystick. Nothing to fix here. Not as much fun with friends, but you could use it as an opportunity to emphasize the quality of the emulation and explain how the original cabinet worked and chalk it up to "accuracy".

  • @caver01 Thanks for letting me know that - that it's unlikely to be "fixed" (not that it really needs fixing, as such, as it's just doing what it should be doing).

    By the way, given that you are using arcade joysticks, could I ask please how you have addressed the 4-way/8-way joystick problem with older games like Ms Pacman? Are your joysticks already hardware (4 way) restricted? I ask because, with mediamogul's help, I turned to xboxdrv because of its ability to software restrict my 8-way joysticks for Ms Pacman etc.

  • Global Moderator

    @spud11 said in Advmame controller problem:

    When I checked the advmame.rc again, it basically gave me this for each line:
    input_map[p2_up] keyboard[0,r] or keyboard[1,scan0] or keyboard[2,scan0]

    which might mean it can't find the extra virtual keyboards (?).

    Edit: A proper solution to this can be found at the post below.

    I noticed the same behavior today. Advance MAME/MAME can really be too smart for it's own good sometimes. It tries to set up everything automatically on every launch and ends up overwriting settings that I would prefer be set in stone.

    There may be a better way, but I took a page out of the RetroPie playbook as to how RetroArch is set up and completely restricted the software's ability to make changes to the settings. From now on, I'll be configuring all the settings manually through a text editor. What I've done is added a command to /opt/retropie/configs/all/runcommand-onstart that removes write permissions to /opt/retropie/configs/mame-advmame/advmame.rc on launch and paired it with a command in /opt/retropie/configs/all/runcommand-onend that reinstates write permissions when the software exits. For anyone interested in this madness, the examples are below.


    if [ "$2" = "advmame" ] || [ "$2" = "advmess" ]
    chmod -w /opt/retropie/configs/mame-advmame/advmame.rc
    chmod -w /opt/retropie/configs/mame-advmame/advmess.rc


    if [ "$2" = "advmame" ] || [ "$2" = "advmess" ]
    chmod +w /opt/retropie/configs/mame-advmame/advmame.rc
    chmod +w /opt/retropie/configs/mame-advmame/advmess.rc

  • @mediamogul Okay, that's interesting. Ironically, over the weekend, I decided to ditch lr-mame2003 for the landscape roms (but leaving it for the portrait mode roms) and I have, once again, reinstalled my advmame setup with its romset, with a view to trying to get the Player 2 controls separately recognised, probably with xboxdrv. It is probably a forlorn hope for me, given that the roms themselves are acting consistently with their programming, but I might as well try and see if the keyboard workaround can be made to work on my system. I'll play around with your new runcommand-onstart/runcommand-onexit commands as part of my messing around.

    One thing I was thinking of doing was, using xboxdrv, to tie all joysticks to Player 1's keyboard controls (up/down/left/right) etc, but the problem with that is that it no doubt will interfere with the 2 player simultaneous games. Having checked the forum and especially @caver01 's comments over the past 10 months, unlike the 4-way restricted games, there doesn't appear to be a comprehensive list of 2 player simultaneous games that can be "carved out".

Contributions to the project are always appreciated, so if you would like to support us with a donation you can do so here.

Hosting provided by Mythic-Beasts. See the Hosting Information page for more information.