hex007 / freej2me

A free J2ME emulator with libretro, awt and sdl2 frontends.
Other
487 stars 75 forks source link

Handset compatibility - configurable softkeys to support other handsets. #37

Closed stuaxo closed 6 years ago

stuaxo commented 6 years ago

Hi, I used to be a J2Me developer, so knew the hell of getting things working on different handsets.

The main thing that was different (apart from screen sizes and all sorts of bugs), was the keycodes for the softkeys.

If you can make these configurable in your emulator then it may be possible to use games for other handsets.

Nokia and Sony used the same keycodes.

Motorola were fairly consistent.

Samsung were terrible as the JVM they used could vary from handset to handset - so these seemed to change all the time.

recompileorg commented 6 years ago

I don't know that you'll be able to find an example of a game that accepts only unusual keycodes. Many games work with both the default and vendor/handset specific controls.

I'm happy to add support if you can find a game that requires the handset send it unusual keycodes. I've never encountered one.

stuaxo commented 6 years ago

It's true, pretty much all games will work with the Nokia/Sony softkeys, since as devs we always did those first. Motorola phones weren't terrible to develop on (and had consistent softkeys), but I don't know if there was anything exclusive to them.

Here is OrangePixels code to detect the phone and decide on Softkeys http://mobilegd.blogspot.com/2007/02/softkey-buttons.html

OrangePixel's blog was a good source of info back in the day.