Running OpenMSX on OUYA

Página 2/2
1 |

Por Alex

Master (205)

imagem de Alex

10-02-2014, 22:53

@luppie: I really like this idea!

There is only one catch; when building openMSX I must map the different controller-keys to so-called SDL keyboard events, which normally match with key presses of real keyboards. However, there are several reserved events that do not map to real keyboard keys like the WORLD_93, WORLD_94 and WORLD_95 events that I have already (mis)used for firebutton 1, 2 and to open the console.

I can map the other controller keys also to these WORLD_xx events so that it won't give conflicts with real keyboard keys (in case that you for example connect a USB or Bluetooth keyboard). The 'create controller profile' option can then label these WORLD_xx keys as 'L1', 'R2', etcetera and implement the mapping like you say.

The menu should actually have a fourth option: Modify controller profile, so that you can also modify the currently loaded controller profile.

@Manuel: Could you help with making that menu and the logic and screens for the 'create controller profile' and 'modify controller profile'? You have more experience in this area. Would really be fantastic if we can bundle this into 0.10.1

Por Manuel

Ascended (19057)

imagem de Manuel

10-02-2014, 22:59

Alex: let's discuss on IRC about the details. I'm not sure yet it's possible to do it within the menu code.

Por Alex

Master (205)

imagem de Alex

15-02-2014, 19:50

@luppie: I have discussed the key remapping idea with Manuel and it turns out to be more tricky. With the existing 'bind' command of openMSX it is *not* possible to remap one key to another key. It is only possible to bind a key to a command, like 'toggle menu'. But for games you should be able to map one of the controller keys to a keyboard key (like map L1 to F1). This requires introduction of a new command (in order to be able to define the keyboard remapping) and changes in the keyboard driver of openMSX in order to process the remapping. Its possible but a significant amount of work.

However, I have meanwhile discovered that the 'device configuration' option in the SDL splash menu already allows you to set-up your own key mappings:
* Select "Change device configuration" on the SDL splash screen
* Select "Remap physical keys"
* Click the controller key that you want to remap
* Select the appropriate SDL key from the menu, like F1, ENTER or any other key code
* Repeat the above three steps for each key you want to remap

I realize that this is indeed more cumbersome because you cant save, load and exchange controller key mapping profiles. When you want to change it depending on the game, you each time have to use the above process.

But I think its already a good starting point.

I propose to set-up following default key mapping in openMSX which will be used when you have not changed anything yourself yet:
A: WORLD_93/Joystick-button-1
B: WORLD_94/Joystick-button-2
X: WORLD_95/Onscreen keyboard
Y: Menu
L1: F1
R1: F2
L2: F3
R2: F4
LThumb: F5
RThumb: F10/Console

What do you think about this default setup? Would it for example be usable with the OUYA? Based on the photo the OUYA controller seems to have less buttons.

PS: I have meanwhile connected my PS3 controller and noticed that the "select" button by default opens the menu (I guess Android maps it to the Android menu button) and that the "start" button by default opens the "Really exit openMSX?" menu (I guess that Android maps it to the android back button). Do you know if other controllers like the XBOX-360 and the OUYA have similar buttons?

Por luppie

Paladin (869)

imagem de luppie

15-02-2014, 20:46

This setup looks good, but I think there should be a menu option to map Android Hardware key's without having to type commands or using the SDL menu. From within OUYA there is no way to open the SDL menu, since there is no touchscreen there is no way to click on the SDL button.

I also think from a usability perspective that key binding options on an Android device should be accessible without using a physical mouse and/or keyboard.

Por Alex

Master (205)

imagem de Alex

15-02-2014, 22:14

@luppie: I have tried with my PS3 controller, and indeed, the "change device configuration" button does not react to the controller buttons. Its strange because after I have opened the SDL menu by tapping the screen, I can use the PS3 controller to navigate through the menu and use the "x" button to push the buttons in the menu. I'll ask Pelya (the Android SDL developer) if it is a known issue that the "change device configuration" does not react to the "x" button and if that can be fixed. It will benefit all applications (mainly games) that have been build on top of the Android SDL port.

Página 2/2
1 |