Bluetooth keyboard and iCade controllers not working (build date Nov 8, 2015)

[QUOTE=i415206;31089]I solved it. Finally. Everything works, except I can’t get PSX games to recognize the analog sticks, but i can bind them for whatever reason.
Yippie![/QUOTE] Most PSX games only had digital controls, the dual shock with analog launched late into the life of the original Playstation so that’s probably why you can’t get games to recognise them.

Still struggling to get retroarch to recognize my NES30. It has the same key mapping as the SNES30. I tried installing CFA but didn’t have any luck. I have tried the Bluetooth keyboard mode and the iCade mode. I’m able to use Provenance emulator with the controller without any issues (but I’d prefer retroarch).

I too am still unable to get retroarch to respond to my controller for mapping (Steel Series) Others have had success so perhaps I am not doing something correctly. My IOS appears to recognize and respond to the controller but I cant get retroarch to see it…it once did work so I am not giving up hope!

It definitely works in the latest build as I’ve been using mine every day since the update went live :slight_smile:

Are you sure you’re using the latest build from the Cydia Repo? The build I’m using is labeled as 1.2.2 and dated as 29/11/2015 09.43.41 (although that date and time part may relate to when I installed it rather than when it was uploaded and went live?

It’s one of the nightly builds anyway on their Repo and the Steel Series Stratus definitely works, although it was a little fiddly to configure.

Definitely don’t give up :slight_smile:

I’m having the exact same issue - NES30 controller can successfully connect to the iPhone but RetroArch doesn’t respond to key presses.

Specs: iPhone 6 (iOS 9.0.2, Pangu jailbreak 1.2) RetroArch (1.2.2.2015.12.05.05.45.40) 8BitDo NES30 gamepad (Firmware 2.63)

RetroArch config: Small keyboard enable - Off Keyboard gamepad mapping enable - On Keyboard gamepad mapping type - SNES30 8bitdo

I’ve tried:

  • Connecting the NES30 under both iCade and keyboard modes
  • Switching between the iPega, 8Bitty, and SNES30 mapping types on RetroArch
  • Toggling keyboard gamepad enable on and off
  • Running with and without BTStack installed

Attempting to bind keys will cause the window to popup but nothing happens when pressing anything on the NES30, and the window just times out. Having BTStack either installed or not makes no difference. Meanwhile, the NES30 works fine in other apps under both iCade mode (tested on Activision Anthology) and keyboard mode (tested on Notes). It seems the issue is specific to RetroArch and not iOS itself.

ControllersForAll works with a Dual Shock 3 controller, but it’s not ideal as it requires a separate tweak and the Start and Select buttons can’t be mapped.

Confirm that icade mode controller mapping is NOT working. I’m using phonejoy in icade mode, it works perfect with ppsspp and Snes9x EX, but retroarch does not recognize controller key pressing in mapping mode. Only way play retroarch with physical controller is mfi/controllers for all (which is not supported my phonejoy, sadly)

[QUOTE=i415206;31089]I solved it. Finally.

search the iOS Xcode project for “btstack” and you’ll get 4 results. the first two relate to the custom compiler flags for Apple LLVM 7.0 in the retroarch project. If you delete the reefernce to -DHAVE_BTSTACK for both debug and release, bluetooth will work for non-jailbroken devices. Everything works, except I can’t get PSX games to recognize the analog sticks, but i can bind them for whatever reason. Other than that, all controller buttons work. So, in a way, i was right that it is btstack’s fault and it is looking for jailbroken devices having btstack installed.

Yippie![/QUOTE]

I tried to do the same and removed the BTstack references in the compiler flags but it did nothing. My Impulse controller is still not working. I know it’s connected correctly because I can use it as an iCade pad for other apps. I tried with both the 8-bitty and iPega profiles. Any ideas about something I could have missed?

[Edit] I also tried with an 8-Bitty since it was in the preconfigured profiles and still no response when I try to map the buttons.

[Edit2] My iPhone is not jailbroken and I built RetroArch from today’s Github. Maybe the source changed since you posted your solution.

Just a quick update, I tried using a standard Bluetooth keyboard and RetroArch doesn’t respond to the keys at all, exactly like with iCade. Since iCade controllers essentially function as re-mapped keyboards, it looks like the code for keyboard support is broken somewhere.

is there something we can do to help the developers figure this bug out?

Hello all,

I dont want to be a bearer of even worse news, but this seems to go derper than retroarch. I had a couple of emulators installed on my non-jailbromen iphone, and since updating to 9.02 my ipega no longer works with any of them. In fact, when mapped as a keyboard, it’s not even overiding the software keyboard in messages.

[QUOTE=Fatnick;32533]Hello all,

I dont want to be a bearer of even worse news, but this seems to go derper than retroarch. I had a couple of emulators installed on my non-jailbromen iphone, and since updating to 9.02 my ipega no longer works with any of them. In fact, when mapped as a keyboard, it’s not even overiding the software keyboard in messages.[/QUOTE]

It looks like iOS 9 might have changed something about how non-MFi Bluetooth controllers work. NES30 still works in App Store games (but not RetroArch) under iCade mode and key presses register when under keyboard mode, but according to other users’ reports iPega doesn’t work at all. These inconsistencies may be caused by how different manufacturers program their controller mappings, and RetroArch seems to be affected on the side. :frowning:

Having just acquired a 8bitdo SFC30 controller, i wanted to get this to work with RetroArch on my nonjailbroken iPhone 6 Plus running iOS 9.2.

I looked into the Xcode project and after some poking around, I think the reason has to do with how the keyboard is being read. It looks like a private (?) method ([UIApplication _keyCommandForEvent] is being overridden in the UIApplication class and my guess is that iOS 9 doesn’t allow keyboard input to be read like that anymore.

If you’re starting out on the Xcode project here’s some useful tips:

/core/griffin/griffin.c is your entry point to understand things. All the source files are brought in via #include statements using C compiler flags that determine what gets included based on device, etc.

Cmd-click into the source files to look at them. Why they’re not part of the project, I dunno but i’m not gonna bother changing the project to do that. You can also cmd-shift-O to look into the source files by name too.

You can place breakpoints in the included files, but you might need to follow the instructions here:

…and I have a fix! :slight_smile:

Turns out iOS 9 has a different (private) method to read keyboard input, and i was able to just use the new method with the existing logic intact (copied!).

I made a pull request:

I also fixed the 8bitdo SNES30/SFC30 iCade mappings as one of them was off :slight_smile:

If @twinaphex approves the fix, you should see it in a nightly pretty soon!

@harakari2 PR looks good. I’m sure he’ll merge it soon. That’s exactly the sort of thing we need a dedicated OSX/iOS dev(s) to handle. Apple constantly changes things like that for little or no apparent reason, so it’s a real bear trying to keep up. :slight_smile:

I can confirm that the most recent build fixes the issue of my NES30 controller not working. Thanks @harakari2 and all the devs for fixing this!

Glad I can help! I’d love to contribute more, i’m just starting to feel my way around the code. Anything in the cores, though, is way beyond me (yet) :slight_smile:

No worries! We appreciate any and all help you care to throw our way :slight_smile:

We’re all hobbyist volunteers, and we each have our areas of expertise. We each just pitch in whatever we can whenever we can.