Tankstick on PiMAME

Got my Tankstick working with a bit of playing around. There are two files that are in ~pi/.advance. The first is advmenu.rc and this deals with getting the Advanced MAME Menu system working. I had to enable the auto joystick and auto mouse options in this file as the Tankstick doesn’t have an enter key. The second is the advmame.rc file that I’ll talk about below.. To get the games working I had to add the following into /etc/rc.local to enable numlock on boot-up. for tty in /dev/tty?; do /usr/bin/setleds -D +num < "$tty"; done Finally, I ended up with a powered hub just in case the Tankstick was pulling too much power and the additional USB ports allowed me to have a keyboard plugged in too. This stopped the Tankstick working and I ended up having to edit the advmame.rc file to put in some input_map lines. Here's the 1 player definitions I've made so far: input_map[p1_up] keyboard[1,8_pad] or keyboard[0,8_pad]
input_map[p1_down] keyboard[1,2_pad] or keyboard[0,2_pad]
input_map[p1_right] keyboard[1,6_pad] or keyboard[0,6_pad]
input_map[p1_left] keyboard[1,4_pad] or keyboard[0,4_pad]
input_map[p1_button1] keyboard[1,lcontrol] or keyboard[0,lcontrole]
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,3] or keyboard[0,3]
input_map[coin2] keyboard[1,4] or keyboard[0,4]
I've hedged my bets with the additional 'or' so that it should work if the keyboard isn't present, making the Tankstick keyboard[0] and I've still got to put in the player 2 mappings. The one thing that I'm trying to work out now is how to get safequit working. I can't work out how to combine keys in an input_map.


Leave a Reply