Retrode Forum

General Category => General Discussion => Topic started by: gadgetoid on 31/Jan/2012 06:48:13 PM

Title: iCade Protocol Support
Post by: gadgetoid on 31/Jan/2012 06:48:13 PM
Today I decided to hook the Retrode up to my (Jailbroken) iPad 2, via the USB adaptor in the Camera Connection Kit.

The results were a mixture of the expected and unexpected. First and foremost; it works! Really well, in fact. It's a fraction slow to load the ROM, but it shows up in /private/var/mnt/mount1 with no troubles at all.

I used Robert Broglia's MD.EMU to run Sonic 2 straight from the Retrode, and added the following key config line to my RETRODE.CFG to get as close-as-possible to a working iCade setup:

[kbL] 0e 0d 1c 0b 1a 1b 04 07 0f 0c 18 12

The trouble is, the iCade uses pairs of simulated key-presses. One to signify that a button has been pressed, and then one to signify that it has been released.

These are as follows:

D-Pad:
UP: W/E
DOWN: X/Z
LEFT: A/Q
RIGHT: D/C

Buttons:
1: Y/T
2: U/F
3: I/M
4: O/G
5: H/R
6: J/N
7: K/P
8: L/V

Obviously I can only map the first half of these in the config file, so I get bizarre results in game such as Sonic attempting to run both backwards and forward simultaneously... you've never seen Sonic move so slowly!

I think it's totally worth including iCade support, if it's at all possible. Simply because it's another feather in the Retrode's cap, and there are a lot of Apps out there that already support this "protocol," no matter how messy it might be.

It'd allow Retrode 2 owners to hook up the Retrode, and a gamepad to their iPad 2 and game away! You don't even need a USB hub; the Retrode 2 connects directly to the iPad!

It should also work on non-jailbroken devices, interacting with iCade-supporting Apps form the App Store, too.


Official tech doc for the iCade: http://www.thinkgeek.com/files/iCADE/iCade_Dev_Resource_v1_3.pdf
Title: Re: iCade Protocol Support
Post by: Matthias_H on 31/Jan/2012 08:53:27 PM
I can give it a try; Thursday or so. Though the concept of having different codes for key press and release is pretty horrible and not at all compatible with the USB keyboard protocol.
Title: Re: iCade Protocol Support
Post by: gadgetoid on 31/Jan/2012 09:21:25 PM
Thanks for giving it a punt. It's much appreciated... I'd like to say I'm sure I'm not the only one who would use it, but I honestly haven't got a clue!

And, yes, I appreciate the abject horror of the iCade "Protocol"... which is why I always put "Protocol" in quotes. But it's something we're pretty much stuck with on iOS now. With no official HID gamepad support, folks have turned to hacks like this to get it up and running.

I imagine Robert could be coaxed into adding some normal keybinding support to his emulators; but there would still be a spate of regular iOS Apps which would could benefit.

Also, there is now an App ( BluTrol ) which can take iCade input and map it to screen presses.

As terrible as it may be, it's not a bad "protocol" to support.

Cheers!


Title: Re: iCade Protocol Support
Post by: Matthias_H on 31/Jan/2012 09:38:36 PM
Just so I get this right: assuming, you hit and release button 1. Would key [T] remain down until the next press of button 1, or until any other button/stick event, or only for a certain short time?
Title: Re: iCade Protocol Support
Post by: gadgetoid on 31/Jan/2012 10:47:26 PM
As far as I know, it's just a quick and simple key press to indicate that the button has been released. It's a curious thing, indeed, but I believe it's a workaround for the way iOS handles keyboards.
Title: Re: iCade Protocol Support
Post by: Matthias_H on 01/Feb/2012 06:11:27 AM
You've got mail :)
Title: Re: iCade Protocol Support
Post by: gadgetoid on 01/Feb/2012 09:05:54 AM
You, sir, are a genius. It works perfectly in both emulators like MD.emu ( with perfect 1:1 controller mapping after reconfiguring in the settings ) and in regular iOS games with iCade support, like MoS Speedrun and SuperMegaWorm.

I've got to say, it's a pretty awesome Megadrive setup, and is entirely portable because everything is powered by the iPad with no USB hubs or nonsense like that.

I will have to try with an iPad 1 to see if the same is true of that.

Video coming as soon as I have a spare moment!
Title: Re: iCade Protocol Support
Post by: gadgetoid on 01/Feb/2012 07:33:32 PM
Just shot my video, hopefully it doesn't come out awful. Haven't done one for a while, and I've got a hell of a cold at the moment!

Update: Not perfect, but it shows that it works: http://youtu.be/mBOfWFfMEPM
Title: Re: iCade Protocol Support
Post by: aaale on 02/Feb/2012 11:08:27 AM
Do direct srm savefiles on the retrode work? I don't remember where snes9x EX and MD.EMU save their .srm.
Title: Re: iCade Protocol Support
Post by: gadgetoid on 02/Feb/2012 11:28:22 AM
That's a good question, one to which I don't currently know the answer. I believe the .srm is saved to the same folder as the ROM. Which would mean it would at least attempt to save it.
Title: Re: iCade Protocol Support
Post by: aaale on 02/Feb/2012 09:00:41 PM
Nevermind i've just bought a camera connection kit and i'm going into test mode in a while.  8)

I'll let you know.
Title: Re: iCade Protocol Support
Post by: gadgetoid on 06/Feb/2012 11:47:04 AM
This looks promising: http://www.usbfever.com/index_eproduct_view.php?products_id=2591

It might, in theory, allow you to charge the iPad whilst using the Retrode.

It might even allow charging, Retrode and HDMI to work together in perfect harmony.

Emphasis on the "might" though!
Title: Re: iCade Protocol Support
Post by: Matthias_H on 06/Feb/2012 04:09:04 PM
72 dollars??? And I'm receiving complaints about the pricing of my incredibly awesome Retrode :-)
Title: Re: iCade Protocol Support
Post by: Muzer on 06/Feb/2012 05:44:11 PM
I'm sure those Apple iProduct users are quite happy to spend far more money than something is worth ;)
Title: Re: iCade Protocol Support
Post by: JonY on 10/Feb/2012 05:51:44 PM
Add another mark to the 'working on a non-jailbroken iPad' column!

Cracking feature addition to an already awesome device.