Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add support for other iCade-like controllers (Submit your info here) #4

Open
lmmenge opened this issue Aug 28, 2013 · 33 comments
Open
Assignees

Comments

@lmmenge
Copy link
Owner

lmmenge commented Aug 28, 2013

Many iCade-like controllers (controllers that connect to iOS devices as if they were bluetooth keyboards) have different key maps for their buttons. Take for instance the iCade 8-Bitty: it's different enough from the original iCade that some games are nearly unplayable on this controller.

So in order to add support to various iCade-like controllers, I need your help: if you have an iCade-like controller that is not currently supported by MeSNEmu and you want it supported, please follow these instructions and support for it will be added ASAP:

  • Pair your bluetooth controller with an iOS device;
  • Make sure your device's keyboard layout is set to US (QWERTY);
  • Open Notes;
  • Enter the following button sequence matching, as best as you can, the SNES button layout: Up, Right, Down, Left, Select, Start, Y, B, X, A, L, R;
  • Copy the text generated (there should be 24 letters) and comment it here along with the controller make and model.

The button sequence you press is very important, since some controllers don't have the exact same layout as a SNES controller. Please try to match it as closely as possible for the best gameplay experience. Below is a picture of a SNES controller. The L and R buttons are on the shoulders of the controller:
snes-controller

@ghost ghost assigned lmmenge Aug 28, 2013
@infernoten
Copy link

The following text string is from a SteelSeries Free gamepad: wedcxzaqoglvythrufjnimkp

I verified it is correct by replacing a previous controller's setOnStateString and offStateString in LMBTControllerView.m with the appropriate on and off character from the above string and testing it out.

@lmmenge
Copy link
Owner Author

lmmenge commented Dec 3, 2013

Hello infernoten! Thanks for submitting. Just confirming the string that will be added to master (since you mentioned you did this before):
[self LMBT_setOnStateString:"wdxaolyhujik" offStateString:"eczqgvtrfnmp"];

That looks like a really nice gamepad, too! Comfy?

@infernoten
Copy link

That matches what I inserted.

For a small controller, the Free is surprisingly comfy. The shoulder buttons have a really audible click to them, though.

@lmmenge
Copy link
Owner Author

lmmenge commented Dec 3, 2013

SteelSeries Free support pushed to master.

@eltonsalmeida
Copy link

The following text string is from a 8bitdo FC30 gamepad: wedcxzaqtufimkpoglvhrjnu

How I fix de buttons position?

@lmmenge
Copy link
Owner Author

lmmenge commented Jan 29, 2014

8Bitdo FC30 support pushed to master.

@guidoscheffler
Copy link

The 8Bitdo FC30 strings currently in the code didn't work for me; I had to change it to the following:

[self LMBT_setOnStateString:"wdxazuikolhj"
             offStateString:"ecyqtfmpgvrn"];

@lmmenge
Copy link
Owner Author

lmmenge commented Feb 25, 2014

@eltonsalmeida @guidoscheffler what kind of keyboard layout and language are you guys using? Could this difference be due to keyboard layout mismatches?

@guidoscheffler
Copy link

My system language is English; for keyboard layouts I usually switch between English and German.
The keyboard layout seems to indeed be the problem; depending on what I set the layout to before connecting the 8Bitdo FC30, the strings are:

  • English: wedcxzaqytufimkpoglvhrjn
  • German: wedcxyaqztufimkpoglvhrjn

Either way, there definitely is an error in @eltonsalmeida's string, because it contains two "u"s. It seems that he turned off the controller by holding down start at the end, which resulted in the second u, and somehow didn't record push select correctly, which would explain the missing z/y at position 9 when comparing it to my strings.

@lmmenge
Copy link
Owner Author

lmmenge commented Feb 26, 2014

@guidoscheffler you are correct. I've just pushed to master your English 8Bitdo FC30 string. Thank you for correcting this.

@wiegerthefarmer
Copy link

I've built a customer snes controller using the guide from adafruit. (https://learn.adafruit.com/snes-ez-key-bluefruit-game-pad/overview) The controller works great, and I can re-map the buttons to any keys I want. However, it doesn't send the off keys, only on. Any thoughts on how I can make SiOS work with that?

@lmmenge
Copy link
Owner Author

lmmenge commented Oct 13, 2014

@wiegerthefarmer You need the down/up events separately for the current architecture (both the iOS front-end and the SNES9X back-end use that paradigm). Otherwise, how do we know when you're still holding the button down? How do we know when you have released it?

@wiegerthefarmer
Copy link

Yah, that makes sense. On further investigation the adafruit ez-key sends
the same key with a keyUp event when its released. I know that this isn't
how iCade operates. I'll see if I can write something for SiOS to handle
this event structure.

It may end up using private members, but I have a apple dev account, so I can build it myself....
http://stackoverflow.com/questions/18747759/ios-7-hardware-keyboard-events
http://nacho4d-nacho4d.blogspot.ca/2012/01/catching-keyboard-events-in-ios.html

Looks like it might be possible using public apis...
http://blog.swilliams.me/words/2013/09/19/handling-keyboard-events-with-modifier-keys-in-ios-7/

One last thing.... can get keyups
https://developer.apple.com/library/ios/documentation/GraphicsAnimation/Conceptual/CodeExplainedAdventure/ControllingtheCharacters/ControllingtheCharacters.html

Time to see if I can get it going!

On 13 October 2014 09:09, Lucas Menge notifications@github.com wrote:

@wiegerthefarmer https://github.com/wiegerthefarmer You need the
down/up events separately for the current architecture (both the iOS
front-end and the SNES9X back-end use that paradigm). Otherwise, how do we
know when you're still holding the button down? How do we know when you
have released it?


Reply to this email directly or view it on GitHub
#4 (comment).

@wiegerthefarmer
Copy link

This worked! https://gist.github.com/steventroughtonsmith/7515380
-(UIKeyCommand *)_keyCommandForEvent:(UIEvent *)event // UIPhysicalKeyboardEvent
{
NSLog(@"keyCommandForEvent: %@\n
type = %i\n
keycode = %@\n
keydown = %@\n\n",
event.debugDescription,
event.type,
[event valueForKey:@"_keyCode"],
[event valueForKey:@"_isKeyDown"]);

return  [UIKeyCommand keyCommandWithInput:nil modifierFlags:nil action:@selector(processKeyInput:)];

}

Put that code in iCadeReaderView.m, and you get very clear keyup and keydown events. :)

@lmmenge
Copy link
Owner Author

lmmenge commented Oct 15, 2014

@wiegerthefarmer Hmm. I'm not sure I like this approach. Since you built your own controller, can't you make it work like an iCade controller? Button down is sending one letter, button up is sending another letter? With your approach, we'd have to use private APIs and add another special case in the front-end just for this controller. I'd rather keep the codebase as clean as possible.

@wiegerthefarmer
Copy link

I can try. The big issue is that the Adafruit EZ-key sends the standard
keydown keyup events, and isn't compatible with iCade. I could probably
add an arduino in the controller....

On 14 October 2014 23:00, Lucas Menge notifications@github.com wrote:

@wiegerthefarmer https://github.com/wiegerthefarmer Hmm. I'm not sure I
like this approach. Since you built your own controller, can't you make it
work like an iCade controller? Button down is sending one letter, button up
is sending another letter? With your approach, we'd have to use private
APIs and add another special case in the front-end just for this
controller. I'd rather keep the codebase as clean as possible.


Reply to this email directly or view it on GitHub
#4 (comment).

@DerekT07
Copy link

DerekT07 commented Dec 7, 2014

Here's the string I got for 8bitdo's NES30 controller. Slightly different from the FC30:

wedcxzaqlvogythrjnufkpim

I appreciate the work out into supporting it!

@lmmenge
Copy link
Owner Author

lmmenge commented Dec 10, 2014

@DerekT07 done in 1.4.5.

@no2sc2
Copy link

no2sc2 commented Jan 1, 2015

I know the 8bitdo NES30 key map is given but here is my strings. They said the native mode for the 8bitdo NES30 is mode 2. I had problem using mode 2 on my iPhone 6. It wouldn't response for some reason even after chosen the correct controller in the app settings. I had to boot up on mode 3 for it to work. Here are my strings for the 8bitdo nes30.

8bitdo NES30 Mode 2 (as player one "Start+B" boot)
cfdenoijhgkm

8Bitdo NES30 Mode 2 (as player two "Start+B+R" boot)
The strings here was as it was set up. The up directional button made the cursor go up, the right directional button made the cursor goes right, down directional button made the cursor go down, left directional button made the cursor go left. Select button was a space and the start button brought the cursor down to the next line. The letter buttons yield as it was, "YBXALR".

8Bitdo NES30 Mode 3 (as single player "Start+A" boot)
wedcxzaqlvogythrjnufkpim

I did these strings on my iPhone 6. I did not boot the 8Bitdo nes30 on any other modes because it was only designated for iOS on mode 2 and mode 3 only.

@lmmenge
Copy link
Owner Author

lmmenge commented Jan 3, 2015

@no2sc2 MeSNEmu supports the NES30 in Mode 3 as of version 1.4.5 (DerekT07's Mode 3 string matches yours).

@no2sc2
Copy link

no2sc2 commented Jan 3, 2015

Yes Lucas. I spoke to you about 2 player mode not working. I did a string test anyways so you can get an idea of the keys on mode 2. Maybe it'll help in future updates!

@acowinthecrowd
Copy link

I have an ipega controller (http://www.amazon.com/Generic-Bluetooth-Controller-Wireless-Joystick/dp/B00AR9JEQU)

Its layout is different than a typical SNES controller, an and xy are switched. I have two strings for you.

This is hitting the x button on the controller as y, since the SNES has a y where the ipega has an x, etc
wedcxzaqjnufythrimkp

This is the key sequence if I follow the instructions exactly, hitting the x where it shows on the controller.
wedcxzaqythrjnufimkp

I hope that makes sense but if not, let me know.

@lmmenge
Copy link
Owner Author

lmmenge commented Jan 12, 2015

@acowinthecrowd just to be clear: if you ignore the letters written on your controller and just press the buttons that are in the same positions (spacially) as the real SNES controller, is this the resulting string? wedcxzaqjnufythrimkp

@acowinthecrowd
Copy link

That's correct, sorry to make it sound so confusing =)

@Gohlan
Copy link

Gohlan commented Jan 13, 2015

Hi, the following text is for a snakebyte controller: wedcxzaqlvogythrjnufimkp

@lmmenge
Copy link
Owner Author

lmmenge commented Jan 14, 2015

@lmmenge
Copy link
Owner Author

lmmenge commented Jan 14, 2015

@acowinthecrowd I just noticed your strings are missing 4 letters. Could you confirm which keys you either don't have or your controller typing while you press?

@Gohlan
Copy link

Gohlan commented Jan 14, 2015

Hello,

Yes it is.

Emmanuel Lévy | +33 6 3378 6556 | Envoyé à partir de mon Windows Phone


De : Lucas Mengemailto:notifications@github.com
Envoyé : ‎14/‎01/‎2015 20:56
À : lmmenge/MeSNEmumailto:MeSNEmu@noreply.github.com
Cc : Gohlanmailto:emmanuel.levy@live.fr
Objet : Re: [MeSNEmu] Add support for other iCade-like controllers (Submit your info here) (#4)

@Gohlan is that for this controller? http://www.snakebyte-europe.com/en/container-produkte/products/android/idroidcon/


Reply to this email directly or view it on GitHub:
#4 (comment)

@naldin
Copy link

naldin commented Mar 14, 2015

Text string for iPega PG-9025: wedcxzaqoglvjnufythrimkp
http://www.dx.com/p/ipega-pg-9025-multimedia-bluetooth-controller-black-256612

@lmmenge
Copy link
Owner Author

lmmenge commented Mar 14, 2015

Pushed IPEGA PG-9025. Thanks @naldin !
Pushed Snakebyte idroid:con. Thanks @Gohlan !

@naldin
Copy link

naldin commented Mar 14, 2015

Thanks @Immenge . Do you know when this will be update in http://builds.io?

@lmmenge
Copy link
Owner Author

lmmenge commented Mar 14, 2015

@naldin no idea. I don't own/maintain that site. Maybe you should ask its owner directly?

@naldin
Copy link

naldin commented Mar 14, 2015

Ok @lmmenge I will, thank you again ;)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

10 participants