PiMAME, AdvanceMAME, and AdvanceMENU Tankstick Configuration

edit: Added dual stick configuration to advmame.rc

Hey all,

Here is a working config for the XGaming X-Arcade Tankstick!  The base of this comes from the very helpful site: http://www.raspberry.cat/20130203/pimame-i-x-arcade/

The first step is to edit /etc/rc.local and include this line before “exit 0”:

for tty in /dev/tty?; do /usr/bin/setleds -D +num < "$tty"; done

I’ve added a few more changes to the config which includes freeplay, removing the OK screen, and allowing the use of keyboard arrows keys and the numpad.

The files to edit are located in /home/pi/.advance/

For AdvanceMAME edit /home/pi/.advance/advmame.rc

For AdvanceMENU edit /home/pi/.advance/advmenu.rc

AdvanceMAME


device_video_clock 5 - 50 / 15.62 / 50 ; 5 - 50 / 15.73 / 60
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 auto
device_mouse auto
device_raw_firstkeyhack no
device_raw_mousedev[0] auto
device_raw_mousedev[1] auto
device_raw_mousedev[2] auto
device_raw_mousedev[3] auto
device_raw_mousetype[0] pnp
device_raw_mousetype[1] pnp
device_raw_mousetype[2] pnp
device_raw_mousetype[3] pnp
device_sdl_samples 512
device_sound auto
device_video auto
device_video_cursor auto
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/.advance/artwork:/usr/local/share/advance/artwork
dir_diff /home/pi/.advance/diff
dir_hi /home/pi/.advance/hi
dir_image /home/pi/.advance/image:/usr/local/share/advance/image
dir_inp /home/pi/.advance/inp
dir_memcard /home/pi/.advance/memcard
dir_nvram /home/pi/.advance/nvram
dir_rom /home/pi/.advance/rom:/home/pi/roms
dir_sample /home/pi/.advance/sample:/usr/local/share/advance/sample
dir_snap /home/pi/.advance/snap
dir_sta /home/pi/.advance/sta
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_intensity 1.5
display_interlaceeffect none
display_magnify 1
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 yes
include
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] auto
input_map[p1_trackbally] auto
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] auto
input_map[p2_trackbally] auto
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 yes
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 no
record_sound_time 15
record_video no
record_video_interleave 2
record_video_time 15
script_coin1
script_coin2
script_coin3
script_coin4
script_emulation
script_event1
script_event10
script_event11
script_event12
script_event13
script_event14
script_event2
script_event3
script_event4
script_event5
script_event6
script_event7
script_event8
script_event9
script_led1 on(kdb, 0b1); wait(!event()); off(kdb, 0b1);
script_led2 on(kdb, 0b10); wait(!event()); off(kdb, 0b10);
script_led3
script_play
script_safequit
script_start1
script_start2
script_start3
script_start4
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 yes
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] keyboard[1,8_pad] or keyboard[0,8_pad] or keyboard[0,up] or keyboard[1,up]
input_map[p1_down] keyboard[1,2_pad] or keyboard[0,2_pad] or keyboard[0,down] or keyboard[1,down]
input_map[p1_right] keyboard[1,6_pad] or keyboard[0,6_pad] or keyboard[0,right] or keyboard[1,right]
input_map[p1_left] keyboard[1,4_pad] or keyboard[0,4_pad] or keyboard[0,left] or keyboard[1,left]
input_map[p1_button1] keyboard[1,lcontrol] or keyboard[0,lcontrol]
input_map[p1_button2] keyboard[1,lalt] or keyboard[0,lalt]
input_map[p1_button3] keyboard[1,space] or keyboard[0,space]
input_map[p1_button4] keyboard[1,lshift] or keyboard[0,lshift]
input_map[p1_button5] keyboard[1,z] or keyboard[0,z]
input_map[p1_button6] keyboard[1,x] or keyboard[0,x]
input_map[p1_button7] keyboard[1,c] or keyboard[0,c]
input_map[p1_button8] keyboard[1,5] or keyboard[0,5]
input_map[start1] keyboard[1,1] or keyboard[0,1]
input_map[start2] keyboard[1,2] or keyboard[0,2]
input_map[coin1] keyboard[1,5] or keyboard[0,5]
input_map[coin2] keyboard[1,6] or keyboard[0,6]
input_map[p2_up] keyboard[1,r] or keyboard[0,r]
input_map[p2_down] keyboard[1,f] or keyboard[0,f]
input_map[p2_right] keyboard[1,g] or keyboard[0,g]
input_map[p2_left] keyboard[1,d] or keyboard[0,d]
input_map[p2_button1] keyboard[1,a] or keyboard[0,a]
input_map[p2_button2] keyboard[1,s] or keyboard[0,s]
input_map[p2_button3] keyboard[1,q] or keyboard[0,q]
input_map[p2_button4] keyboard[1,w] or keyboard[0,w]
input_map[p2_button5] keyboard[1,e] or keyboard[0,e]
input_map[p2_button6] keyboard[1,openbrace] or keyboard[0,openbrace]
input_map[p2_button7] keyboard[1,closebrace] or keyboard[0,closebrace]
input_map[p2_button8] keyboard[1,6] or keyboard[0,6]
input_map[p1_doubleleft_up] keyboard[1,8_pad] or keyboard[0,8_pad]
input_map[p1_doubleleft_down] keyboard[1,2_pad] or keyboard[0,2_pad]
input_map[p1_doubleleft_right] keyboard[1,6_pad] or keyboard[0,6_pad]
input_map[p1_doubleleft_left] keyboard[1,4_pad] or keyboard[0,4_pad]
input_map[p1_doubleright_up] keyboard[1,r] or keyboard[0,r]
input_map[p1_doubleright_down] keyboard[1,f] or keyboard[0,f]
input_map[p1_doubleright_right] keyboard[1,g] or keyboard[0,g]
input_map[p1_doubleright_left] keyboard[1,d] or keyboard[0,d]
input_map[ui_cancel] keyboard[1,1] keyboard[1,2] or keyboard[0,1] keyboard[0,2] or keyboard[0,esc] or keyboard[1,esc]

 

AdvanceMENU


config save_at_exit
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 none
device_keyboard auto
device_mouse none
device_raw_firstkeyhack no
device_raw_mousedev[0] auto
device_raw_mousedev[1] auto
device_raw_mousedev[2] auto
device_raw_mousedev[3] auto
device_raw_mousetype[0] pnp
device_raw_mousetype[1] pnp
device_raw_mousetype[2] pnp
device_raw_mousetype[3] pnp
device_sdl_samples 512
device_sound auto
device_video auto
device_video_cursor auto
device_video_doublescan yes
device_video_fastchange no
device_video_interlace yes
device_video_output auto
device_video_overlaysize auto
device_video_singlescan yes
difficulty none
display_brightness 1
display_gamma 1
display_orientation
display_restoreatexit yes
display_restoreatgame yes
display_size 1024
emulator "advmame" advmame "advmame" ""
event_alpha yes
event_assign up up or 8_pad
event_assign down down or 2_pad
event_assign left left or 4_pad
event_assign right right or 6_pad
event_assign enter enter or enter_pad
event_assign esc esc
event_assign space space
event_assign home home
event_assign end end
event_assign pgup pgup
event_assign pgdn pgdn
event_assign del del
event_assign ins insert
event_assign shutdown lcontrol esc
event_assign mode tab
event_assign help f1
event_assign group f2
event_assign type f3
event_assign exclude f4
event_assign sort f5
event_assign setgroup f9
event_assign settype f10
event_assign runclone f12
event_assign command f8
event_assign menu backquote or backslash
event_assign emulator f6
event_assign rotate 0_pad
event_assign lock scrlock
event_assign preview space
event_assign mute period_pad
event_mode fast
event_repeat 500 50
icon_space 43
idle_screensaver 60 10
idle_screensaver_preview snap
idle_start 0 0
include
input_hotkey yes
lock no
menu_base 0
menu_rel 4
merge differential
misc_exit normal
misc_quiet no
mode list
mode_skip
mouse_delta 25
preview snap
preview_default none
preview_default_cabinet none
preview_default_flyer none
preview_default_icon none
preview_default_marquee none
preview_default_snap none
preview_default_title none
preview_expand 1.15
sort parent
sound_background_begin none
sound_background_end none
sound_background_loop none
sound_background_loop_dir none
sound_background_start none
sound_background_stop none
sound_buffer 0.1
sound_foreground_begin none
sound_foreground_end none
sound_foreground_key none
sound_foreground_start none
sound_foreground_stop none
sound_latency 0.1
sound_samplerate 44100
sound_volume -3
ui_background "/home/pi/pimame_files/advmenu_background.png"
ui_bottombar yes
ui_clip single
ui_color help 000000 ffffff
ui_color help_tag 247ef0 ffffff
ui_color submenu_bar 247ef0 ffffff
ui_color submenu_item 000000 ffffff
ui_color submenu_item_select 000000 afffff
ui_color submenu_hidden 808080 ffffff
ui_color submenu_hidden_select 808080 afffff
ui_color menu_item 000000 ffffff
ui_color menu_hidden 808080 ffffff
ui_color menu_tag 247ef0 ffffff
ui_color menu_item_select 000000 afffff
ui_color menu_hidden_select 808080 afffff
ui_color menu_tag_select 247ef0 afffff
ui_color bar 000000 ffffff
ui_color bar_tag 247ef0 ffffff
ui_color bar_hidden 808080 ffffff
ui_color grid 247ef0 ffffff
ui_color backdrop 000000 808080
ui_color icon ffffff ffffff
ui_color cursor 808080 ffffff
ui_command_error Error running the command
ui_command_menu Command...
ui_console no
ui_exit none
ui_font auto
ui_fontsize auto
ui_game snap
ui_gamemsg "Loading"
ui_help none
ui_menukey yes
ui_skipbottom 0
ui_skipleft 0
ui_skipright 0
ui_skiptop 0
ui_startup "/home/pi/pimame_files/advmenu_background.png"
ui_topbar yes
ui_translucency 0.6
event_assign enter enter or enter_pad or 1
group_include ""
group_include "Bad"
group_include "Good"
group_include "Very Good"
type_include ""
type_include "Application"
type_include "Arcade"
type_include "Bet 'em Up"
type_include "Breakout"
type_include "Computer"
type_include "Console"
type_include "Fight"
type_include "Filler"
type_include "Flipper"
type_include "Gun"
type_include "Puzzle"
type_include "RPG"
type_include "Racing"
type_include "Shot 'em Up"
type_include "Sport"
emulator_include "advmame"
group ""
group "Bad"
group "Good"
group "Very Good"
type ""
type "Application"
type "Arcade"
type "Bet 'em Up"
type "Breakout"
type "Computer"
type "Console"
type "Fight"
type "Filler"
type "Flipper"
type "Gun"
type "Puzzle"
type "Racing"
type "RPG"
type "Shot 'em Up"
type "Sport"
emulator_attrib "advmame" missing exclude
emulator_attrib "advmame" clone exclude
emulator_attrib "advmame" bad exclude
emulator_attrib "advmame" vector include
emulator_attrib "advmame" vertical include
emulator_attrib "advmame" neogeo include
emulator_attrib "advmame" deco exclude
emulator_attrib "advmame" playchoice exclude
game "advmame/gridlee" "" "" 269 6 ""

I hope this works for everyone. If you have any questions, comments, or suggestion, please feel free to let me know or comment below!

-Shea

54 thoughts on “PiMAME, AdvanceMAME, and AdvanceMENU Tankstick Configuration

  1. For games that use 2 sticks for 1 player, like Crazy Climber, you need to add the following input maps:

    input_map[p1_doubleleft_up] keyboard[1,8_pad] or keyboard[0,8_pad]
    input_map[p1_doubleleft_down] keyboard[1,2_pad] or keyboard[0,2_pad]
    input_map[p1_doubleleft_right] keyboard[1,6_pad] or keyboard[0,6_pad]
    input_map[p1_doubleleft_left] keyboard[1,4_pad] or keyboard[0,4_pad]
    input_map[p1_doubleright_up] keyboard[1,r] or keyboard[0,r]
    input_map[p1_doubleright_down] keyboard[1,f] or keyboard[0,f]
    input_map[p1_doubleright_right] keyboard[1,g] or keyboard[0,g]
    input_map[p1_doubleright_left] keyboard[1,d] or keyboard[0,d]

  2. I have a vertically mounted LCD screen. Is there a way to put a marquee in the ’empty’ space at the top of MAME when it plays a game? I’ve found a few people that have looked into it, but have not seen anyone explain it working.

  3. Hi Shea,

    firstly, thanks soooo much for the distro. It really saved me allot of time and hassle with my rpi Advmame build!

    I am trying to lock down my advmenu layout and design and am having an issue with Joystick functionality in Advance Menu.

    I am using a PS3 Hori Arcade Pro 3 joystick (works extremely well btw!) cannot seem to figure out how to modify joystick button assignments. Specifically the button that QUITS to a command prompt…

    i ran advj to see the mappings (i think it maps buttons a, b & c somehow.)

    a=quit/cancel(esc)
    b=select (enter)
    c=menu

    I also want to map clones (currently set to F12 on kybd)

    can you help?

  4. Great post – thank you for the information so far. Here is an input that I use (in advmame.rc) that allows me to ‘escape’ the game from my TankStick (simultaneously pressing Player 1 and Player 2) or ESC on the keyboard :

    input_map[ui_cancel] keyboard[1,1] keyboard[1,2] or keyboard[0,esc]

    My TankStick is configured as Keyboard 1 and it is plugged into the USB hub on Keyboard 0 (you may have to alter the settings above to match your setup).

    • If you find AdvanceMenu going back to ’10 Yard Fight’ when using P1 and P2 start as ESC (listed above) when you exit AdvanceMAME, switch over to this instead :

      input_map[ui_cancel] keyboard[0,5] keyboard[0,6] or keyboard[0,esc]

      This uses the 5 and 6 keys together to escape (right most button, bottom row of each set of buttons. I found that 1 and 2 together would sometimes carry back over to AdvanceMenu and pass an extra ‘1’ keypress – with autohotkeys enabled, it would take you back to the ‘1’ games at the top.

  5. You can use custom TTFs in AdvanceMenu. Download the source for AdvanceMAME. Open the archive and copy the fonts in ‘contrib/mame/ttftonts’ to ‘/home/pi/pimame_files’. Once you select a font that you like (skia.ttf is a good one to use), edit the advmenu.rc file and edit or add the ui_font setting :

    ui_font “/home/pi/pimame_files/skia.ttf”

  6. Pretty easy to enable and use cheats as well. First, download the last cheat.dat (not the new XML ones) from here – http://cheat.retrogames.com/download/cheat126.zip

    Extract the DAT file and copy it to /home/pi/.advance (same place as your RC files). Now edit your advmame.rc file and make sure the cheat settings look like this :

    misc_cheat yes
    misc_cheatfile cheat.dat

    Once you are in the game, press TAB to bring up the menu, scroll down to Cheat and enable the cheat(s) that you want to use.

  7. The TankStick + Trackball has 2 buttons on each side (like flippers for pinball). Here is the input_map that you can add/edit in advmame.rc to do the following :

    Left side button (upper) configured to pull up the in game menu (same as Tab on the keyboard) :
    input_map[ui_configure] mouse_button[0,0] or keyboard[0,tab]
    Right side button (upper) configured to pause the game (same as P on the keyboard) :
    input_map[ui_pause] mouse_button[0,1] or keyboard[0,p]

    • Hi,

      I’ve tried that, and “pause” and “menú” options are working, but when i enter to the Game Menu, then i can’t move inside the options.

      Do you use some other input to can control that?

      (I’ve only have TankStick connected to RPi)

      • I am currently redoing my input setup. Right now I have mini wireless keyboard in the bottom USB port on the PI. I have the TankStick keyboard and mouse connected to a 2 port USB hub that is connected to the top USB port on the PI. When I reconfigured this, it messed up my keyboard[] settings. Not sure how to get a listing of current inputs and their numbers, so it was trial and error.

        Now I have these in advmame.rc for the UI section :

        input_map[ui_cancel] keyboard[0,1] keyboard[0,2] or keyboard[0,esc]
        input_map[ui_select] keyboard[0,lcontrol] or keyboard[0,enter]
        input_map[ui_configure] mouse_button[1,0] or keyboard[0,tab]
        input_map[ui_pause] mouse_button[1,1] or keyboard[0,p]
        input_map[ui_up] keyboard[0,8_pad] or keyboard[0,up]
        input_map[ui_down] keyboard[0,2_pad] or keyboard[0,down]
        input_map[ui_left] keyboard[0,4_pad] or keyboard[0,left]
        input_map[ui_right] keyboard[0,6_pad] or keyboard[0,right]

        These allow me to do everything in the menu directly from the TankStick – scroll up and down, left/right to change values and LCTRL (the 1 player fire button) to select (i.e. ENTER key). To get yours working, you may have to play around with the keyboard input number.

  8. I was profiling Advance Menu and noticed it was using almost 100% cpu. Is there a way to slow it down? It isn’t doing much. I wonder if its doing a noisy keyboard scan or something, because displaying that static screen shouldn’t take any CPU at all.

    • I had the same annoyng issue, i’ve solved it by changing “device_alsa_device default” to “device_alsa_device none”. Hope it helps.

  9. Pingback: PiMAME, AdvanceMAME, and AdvanceMENU Tankstick Configuration | Raspberry World

  10. I bought a single player usb arcade controller off of Amazon and I can get it to work in AdvMame by adding the following to Advmame.rc:

    input_map[p1_up] joystick_digital[0,hat,y,up]
    input_map[p1_down] joystick_digital[0,hat,y,down]
    input_map[p1_right] joystick_digital[0,hat,x,right]
    input_map[p1_left] joystick_digital[0,hat,x,left]
    input_map[p1_button1] joystick_button[0,4]
    input_map[p1_button2] joystick_button[0,6]
    input_map[start1] joystick_button[0,9]
    input_map[coin1] joystick_button[0,8]
    input_map[ui_cancel] joystick_button[0,11]

    It also mostly works in AdvMenu by adding “device_joystick auto” in Advmenu.rc.

    What I want to do is map events to specific buttons but I can’t find the syntax for a joystick in AdvMenu. I read through Advmenu.txt section 5.6.4 event_assign and it looks like it only calls out keyboard bindings. I want to do something like this

    event_assign enter joystick_button[0,10] or enter

    Is it even possible?

  11. By looking at InputMap’s post I added:

    input_map[ui_configure] joystick_button[0,10]
    input_map[ui_select] joystick_button[0,4]
    input_map[ui_up] joystick_digital[0,hat,y,up]
    input_map[ui_down] joystick_digital[0,hat,y,down]
    input_map[ui_left] joystick_digital[0,hat,x,left]
    input_map[ui_right] joystick_digital[0,hat,x,right]

    I now I realize I can map everything in AdvMame through the UI Config menu. I was hacking everything into Advmame.rc by reading through documentation and running advj from /usr/local/bin

  12. Hello,thanks for sharing,but when I execute command “advmame”, it occured
    advmame: error while loading shared libraries: libSDL-1.2.so.0: cannot open shared object.
    so I copyed libSDL-1.2.so.0 but it can’t work as before,Hope get some tips,many thanks!!

  13. I’ve got an X-arcade DIY kit which is just the Tankstick hw, in a cocktail cabinet. According to the X-arcade tankstick documentation the Left pinball button can be used as the coin button. I’m not sure what this button corresponds to in the advmame.rc syntax to setup the input_map for the coin.

    I need to change this line
    input_map[coin1] keyboard[1,5] or keyboard[0,5]

    but not sure what to replace it with. Anyone have any ideas?

    • Almost 4 months now so you probably already figured it out 😉 but …

      The left pinball button on the X-arcade, by default, outputs keypad 3.

  14. Sorry for my English is bad

    I got X-Arcade Dual Joystick: USB Included is old But posible to use?? how??

    i try But doenst work?

    THX

  15. Do you know what the voltage and current requirements are for the X-Arcade Dual Joystick? I am having intermittent issues with this joystick plugged directly into the RPI USB port. I wonder if I need to use a usb hub instead.

    • So, I’ve been plugging my X-Arcade straight into the RPI USB ports. I haven’t had an issue. That said, depending on your power supply, you may experience problems. It is always a good idea to use a powered hub.

      • As far as I know, the maximum output from the RPI usb port is 100mA. Any device requiring more than this amount needs an external power source. I couldn’t find the current draw on the x-arcade website. Maybe I’ll send them an email.

  16. Evidently I have some brain-dead configuration issue, but I can’t figure it out. I have three roms in the rom directory. When I start up advmenu, it displays “No game matches the type selection for advmame”. I’ve looked through the help options but can’t see why my games would be getting filtered out. Any ideas? Thanks in advance.

    • Hi,

      I have the same issue : “no game matches the group selection”
      Even though I have games in the roms folder.
      I thought it was coming from the keyboard config… but no !
      I have installed numlockx + the boot script, but it did not changed anything.

      I’m a bit helpless !

      • Fredsaule: Press F1 to see the help menu. One of the keys listed there (unfortunately I forget which one) toggles some menu display option so that you’ll eventually see all your games. After that, advmenu remembers the setting and you don’t need to do it again.

  17. I’ve followed all the instructions on this page, including editing rc.local and the advmame/advmenu configs. All the controls on the tankstick work great, except for the trackball. Any ideas on how I can diagnose what’s going on?

    Thanks in advance.

    • Well, for those having the same problem, I figured it out … edit advmame.rc and change the following as shown:

      device_mouse raw
      device_raw_mousedev[0] /dev/input/mouse0
      device_raw_mousetype[0] ps2

      Not sure why Shea didn’t have to do this, but anyway, I’m glad it’s working!

  18. When you have the following is this accounting for two keyboards?

    input_map[p1_up] keyboard[1,8_pad] or keyboard[0,8_pad] or keyboard[0,up] or keyboard[1,up]

    So you have a keyboard 0 and a keyboard 1. I’m I understanding the format correctly?

  19. I love PIMAME. I want to put this in an arcade cabinet, so I wouldn’t have to use the keyboard or mouse.
    However, on the terminal prompt when I select which emulator I want, I don’t have an “enter” button on my tank stick.
    Once I get into ADVMENU, everything is fine.

    maybe I should ask, how to configure so it boots straight into ADVMENU?

    • Michael – I also decided I wanted to boot straight into advmenu. I accomplished this by modifying /home/pi/.profile, removed the line where it launches pimame and replaced with the following:

      echo “Launching advmenu in 5 seconds, press ctrl-C to abort”
      sleep 5
      /usr/local/bin/advmenu
      echo “Shutting down in 5 seconds, press ctrl-C to abort”
      sleep 5
      sudo halt

      This provides two opportunities to escape to a shell prompt in case you want to do system maintenance or whatever.

  20. Looks great but it is still not working for me. I have made the three changes, but my tankstick still does not work in advMame. Also, the way the tank stick navigates changes based on if i have a usb keyboard in or not. Basically, in the free game provided, the TankStick will only shoot, it will not work with the joystick at all. I have PiMame 7 and i have edited the three files. Any suggestions? I would really appreciate it because I am getting frustrated lol. Thanks!

    • also, does it matter which usb port the tank stick is plugged into? does it matter whether or not a keyboard is plugged in? also, do i need to edit advmame.rc.DEFAULT? thx!!

      todd

        • I have the x-arcade solo and have the same problem. The joystick will not work in the genesis emulator, but I got it to work in mame4all by hooking up a keyboard and hitting tab, then going through mames menu to define the P1 joystick settings.
          Still, would love to use it in other emulators. The numlock led trick does turn on the numlock, but the joystick still doesn’t work in genesis.

          Just a little frustrating…. Oh, the controller config utility seemed to recognize it when setting up for genesis, just not in game.

  21. I just acquired a Raspberry Pi B+. I already had the X-Arcade tankstick.
    I have downloaded Retropie image with the Xarcade2Jstick. It is supposed to setup everything. I am connecting the tankstick and an Apple wired keyboard. Unfortunately, I cant start any game at all. Looks like the Coin 1 button is not mapped.
    For some reason the keyboard does not behave as expected. e.g. ~ maps to a some other key. Similarly, tab key does not work to bring up the menu.
    I will keep digging on the net. If anyone can point me to a solution, I will appreciate it.

  22. After switching the content of my advmame content to this one, while trying to get my tankstick to work, advance mame no longer works. Is this post still accurate. When I try to launch AdvMame it reports the roms as missing but they were working before changing this file. It looks like the pathing is messed up as it looks like it unzips the files but then can find the files it just extracted from the zip.

  23. Followed all from above. Tankstick till not working in AdvMAME. Any ideas where to start troubleshooting.

    RaspberryPie 2
    RetroPi Image (latest)

    Thanks

    Steve

    PS my first build. still total noob!

  24. Before I attempt all of this, I was wondering if it applies to the Raspberry Pi 3??? I tried to get RetroPie working with Xarcade2joystick and it just didn’t seem to work. After completing all of the steps, the TankStick wasn’t recognized.

    So now I am looking for other alternatives. Most of the things I see are from 2-3 years ago.

    Does anyone know of a currently working MAME solution that works with Raspberry Pi 3?

    Help!

  25. Before I attempt all of this, I was wondering if it applies to the Raspberry Pi 3??? I tried to get RetroPie working with Xarcade2joystick and it just didn’t seem to work. After completing all of the steps, the TankStick wasn’t recognized.

    So now I am looking for other alternatives. Most of the things I see are from 2-3 years ago.

    Does anyone know of a currently working MAME solution that works with Raspberry Pi 3 and TankStick?

    [Please disregard my earlier post]

    Help!

Leave a Reply to Dave Cancel reply

Your email address will not be published. Required fields are marked *