Using Arcade Controls Via Ext-port


Joined
Dec 1, 2005
Messages
174
hi all,

my gp2x-powered mini-mini-arcade machine is nearing completion :)
I have a nice Sanwa arcade stick, and arcade-buttons, connected to the GP2X via a min-IPAC into USB on the break-out-board.

the joystick works fine in Mame :)
BUT... how in hell's name can I use the buttons???
I don't know whereabouts I can map the button presses into something that the various emulators can pickup.
I think by default, the mini-IPAC maps them to various standard dos/win mame defaults like so:
Credit-player-1 -> '1'
Start-player-1 -> '5'
fire-1 -> 'ctrl'
fire-2 -> 'alt'
fire-3 -> 'space'
fire-4 -> 'left-shift'
or some such. I think I need to remap them to 'square, 'circle', 'cross', 'triangle' etc. but.... how??
(edit: was thinking of playstation buttons there for a moment. of course I meant: A, B, X, Y)

any suggestions?
 
I think the mini-IPAC maps inputs to keyboard presses therefore you may be out of luck as far as the buttons go.

You could probably recompile Mame to accept keyboard presses as input (or ask kindly and someone might do it for you).
 
spoyser posted on Mar 2 2007 at 04:17 PM said:
I think the mini-IPAC maps inputs to keyboard presses therefore you may be out of luck as far as the buttons go.
yeah it does. I was wondering if I could re-map those keyboard presses into.... well... don't the ACTUAL gp2x buttons generate keyboard presses of some kind? if I knew what they were, maybe I could write a little C program that intercepts the mini-IPAC keyboard presses and generates a translated keypress of ... whatever the goddamn hell an actual GP2X button would generate ;) sorry, I'm getting irate with myself as i don't know how to get hold of that info. perhaps its time to dig out the ol' C compiler and do some experimenting.

spoyser posted on Mar 2 2007 at 04:17 PM said:
You could probably recompile Mame to accept keyboard presses as input (or ask kindly and someone might do it for you).
worth a shot. thx for the suggestion.
 
Last edited by a moderator:
shrubberyrobbery posted on Mar 2 2007 at 04:28 PM said:
spoyser posted on Mar 2 2007 at 04:17 PM said:
I think the mini-IPAC maps inputs to keyboard presses therefore you may be out of luck as far as the buttons go.
yeah it does. I was wondering if I could re-map those keyboard presses into.... well... don't the ACTUAL gp2x buttons generate keyboard presses of some kind?

No, a quick look at gp2x mame source code indicates they are indeed interpreted as joystick buttons rather than key presses (as you would expect)
 
Last edited by a moderator:
chunkyktr posted on Mar 2 2007 at 10:27 AM said:
how about hacking up a usb gamepad and soldering your buttons and joystick wires into it? (would make your mini-IPAC redundant though)
Yes. I actually cut down a M$ Sidewinder USB pad and put the PCB into the Right handle of a PS1 controller, then I had to wire each button (all 14), individually and cut the ground plane into 4 pieces, this would be a cakewalk in comparison.

Just cut the PCB into a small square with all necessary components, and re-wire the buttons onto the traces.

It really depends on if you are going to exclusively use the stick with the GP2X (or if you can use it as a MS Sidewinder for your PC gaming). Although I dare say it would be cheaper to use an old sidewinder for USB input than that IPAC board. Maybe you can sell it, or use it for another project.

The official sidewinder uses a button matrix (4 lines x 4 lines = up to 16 buttons), so you will need to put a diode on each button, not that hard.
 
Last edited by a moderator:
chunkyktr posted on Mar 2 2007 at 01:27 PM said:
how about hacking up a usb gamepad and soldering your buttons and joystick wires into it? (would make your mini-IPAC redundant though)

yeah, the easiest way without programming knowledge would be to remove the mini ipac and just hack your joystick/buttons to a cheapo usb joypad. Save the ipac for a full-fledged MAME cabinet ;)

good reference links:
http://www.byoac.com
http://wiki.arcadecontrols.com/wiki/Main_Page
 
Last edited by a moderator:
BobBorakovitz posted on Mar 2 2007 at 10:24 PM said:
chunkyktr posted on Mar 2 2007 at 01:27 PM said:
how about hacking up a usb gamepad and soldering your buttons and joystick wires into it? (would make your mini-IPAC redundant though)

yeah, the easiest way without programming knowledge would be to remove the mini ipac and just hack your joystick/buttons to a cheapo usb joypad. Save the ipac for a full-fledged MAME cabinet ;)

neat idea. i think I'll try this :)
should make software setup a doddle (ie. nothing to do!)

so, I'm wondering do ALL the gp2x buttons map to joystick buttons? there are 11 (including vol-up/down and the joystick-centre-push) and it would be cool to support as many of those as possible. I guess I just have to use a usb-gamepad with a LOT of buttons, like one of those 'playstation dualshock' copycats. they look pretty cheap.

yeah, the ipac will get used on some other project. it doesn't hurt to have a few spare bits around ;)

will let you all know how it works out!
 
Last edited by a moderator:
shrubberyrobbery posted on Mar 3 2007 at 12:46 PM said:
so, I'm wondering do ALL the gp2x buttons map to joystick buttons? there are 11 (including vol-up/down and the joystick-centre-push) and it would be cool to support as many of those as possible.
Yes, all GP2X buttons map to joystick buttons.

Look here for more information: http://wiki.gp2x.org/wiki/SDL_Joystick_mapping
 
Last edited by a moderator:
thanks everyone, for your suggestions.

progress so far:
I've just bought a cheapo USB gamepad with 10 buttons, and a 4-way pad. This is enough for everything except the stick-centre-press, which I can happily live without.
so i plugged it in, and checked all the button presses in 'test mode', so that I know which button corresponds to each. and I then tested it out in Mame (once I knew the button mapping) and all was ok :)

excellent so far! now I am in the middle of gutting the gamepad thing, and attaching a whole lot of wires to the innards. luckily there are some nice convenient solder-points, not too small, and so I don't need to go near the crummy little contact-patch thingy's that actually sit underneath each push-button.

so far so good :)
 
Back
Top