MAMEWorld >> Programming
View all threads Index   Flat Mode Flat  

Llaffer
MAME Fan
Reged: 05/04/11
Posts: 231
Send PM
Can we get iCade functionality in MAME please? :)
06/18/11 08:03 PM


I picked up the iCade, and it's pretty fun on the Atari games on iPad (I hope other games in the future supports it).

This would be a great controller for MAME.

The problem is, the device doesn't act like a normal joystick, so normal joystick logic won't work. The iCade syncs with a device as a bluetooth keyboard.

When you move the joystick or press a button and hold it, only a single keystroke is sent that the game is expected to detect and then react on, instead of a constant signal with joysticks.

When the joystick or button returns to default, a second keystroke is sent telling the game that the action has ended.

I have the keyboard mappings, but hoping someone who's more knowledable with the MAME code can implement.

Here are the key mappings:


Code:

Action |   key to ... 
| start | to end
========================
Up | w | e
Down | x | z
Left | a | q
Right | d | c
Btn0 | t | y
Btn1 | u | f
Btn2 | i | m
Btn3 | o | g
Btn4 | h | r
Btn5 | j | n
Btn6 | k | p
Btn7 | l | v


The buttons are arranged in 2 rows of 4, with what I call "Btn0" through "Btn3" on the top row, and "Btn4" through "Btn7" on the bottom row. Here's an image that shows what I attempted to explain:


Diagonals are counted by signaling both the UP and the LEFT on, and then both off when centered.

If you rotate the joystick, you get the following signals (I'll start up and go clockwise)

w <-- up on
d <-- right on (diagonal)
e <-- up off (right)
x <-- down on (diagonal)
c <-- right off (down)
a <-- left on (diagonal)
z <-- down off (left)
w <-- up on (diagonal)
q <-- left off (up again)
e <-- up off (joystick centered)

Hope this information helps. I'd love to see iCade functionality added to MAME

Thanks







Entire thread
Subject Posted by Posted on
* Can we get iCade functionality in MAME please? :) Llaffer 06/18/11 08:03 PM
. * Re: Can we get iCade functionality in MAME please? :) R. Belmont  06/20/11 01:45 AM
. * Re: Can we get iCade functionality in MAME please? :) Llaffer  06/20/11 02:43 AM
. * Re: Can we get iCade functionality in MAME please? :) R. Belmont  06/20/11 05:25 PM
. * Re: Can we get iCade functionality in MAME please? :) Llaffer  06/20/11 07:16 PM
. * Re: Can we get iCade functionality in MAME please? :) R. Belmont  06/20/11 09:10 PM
. * Re: Can we get iCade functionality in MAME please? :) Llaffer  06/23/11 01:54 AM
. * Re: Can we get iCade functionality in MAME please? :) R. Belmont  06/23/11 10:39 PM
. * Not terribly likely as it stands-- read within. Firehawke  07/11/11 09:48 AM
. * Re: Not terribly likely as it stands-- read within. R. Belmont  07/15/11 04:21 PM
. * Re: Not terribly likely as it stands-- read within. Firehawke  07/15/11 05:06 PM
. * Re: Not terribly likely as it stands-- read within. R. Belmont  07/15/11 07:06 PM
. * Re: Not terribly likely as it stands-- read within. Llaffer  07/16/11 06:15 PM
. * Re: Not terribly likely as it stands-- read within. R. Belmont  07/18/11 09:46 PM
. * Re: Not terribly likely as it stands-- read within. krick  11/03/11 02:06 AM
. * Re: Not terribly likely as it stands-- read within. Tingoes  09/29/11 04:44 PM
. * Re: Not terribly likely as it stands-- read within. R. Belmont  09/29/11 05:03 PM
. * Screw Apple mogli  11/02/11 10:55 PM

Extra information Permissions
Moderator:  Pi 
0 registered and 7 anonymous users are browsing this forum.
You cannot start new topics
You cannot reply to topics
HTML is enabled
UBBCode is enabled
Thread views: 13795