Chris White - Emulation & Decompilation

Sunday, May 11, 2008

JavaGear Android Port

I've started to port JavaGear to Google's Android platform. The results are good, although it runs seriously slowly in the emulator. Based on the J2ME version, it will presumably run faster on an actual device.

There will be updates to the existing mobile version of JavaGear in due course. I'm hoping to add Lightgun support for touchscreen handsets.

There's still some debugging on the Android version to be done in the meantime, and I've got to merge the Android code into the main source tree, as it's forked at the moment.



  • Hey!

    I found your site when I was looking for Java-based emulators to port to Android. I was digging through your code ready to port when I looked through your blog and saw you had already started.

    I'm probably going to try porting a GameBoy emu soon, do you have any tips/advice about porting from Java to Android? Maybe you could even write a tutorial about how your ported JavaGear to Android and what imports need to be changed and what needs to be modified (the awt stuff is probably the trickiest, right?)

    Anyway, let me know please!
    miserlou .aaattt. gmail doot com

    By Blogger Rich, at 26 August 2008 05:52  

  • Just dropped you an e-mail :)

    By Blogger yt, at 8 September 2008 16:22  

  • Hello!
    I have G1 and I ported your JavaGear to it ;)
    And I can say that on device it runs slow as it runs in emulator(
    Please, let me know about your developings!

    koshakov.stepan .att. gmail ..dott.. com

    By Blogger Stepan Korshakov, at 31 January 2009 20:34  

  • Hopefully some of the newer G1 devices will be faster :)

    By Blogger yt, at 2 February 2009 10:17  

  • Are you know about G1?
    Next year doesn't appear any device more powerful than G1...

    I can explain you why it works too slow.
    Reason is Android's realisation of switch operator it is optimised for small switch blocks, not for such big switches.
    So no one emulator works with good speed, for example JavaGear works normaly at SonyErricson k550i, witch habe 200mhz processor... so G1 have 528Mhz processor...

    By Blogger Stepan Korshakov, at 2 February 2009 10:54  

  • I know, back in the dark ages, some J2SE based emulators used an approach whereby instead of using a giant 'switch' statement they used a separate Runnable class for each opcode.

    The Java issues can be frustrating. Even with JavaGear it can run better on some underpowered handsets that are 3 years old, and not perform well on the latest Nokia N95... ;)

    The Sony phones also do some kind of precompilation of the code first time you run the app I think, which helps a lot.

    By Blogger yt, at 2 February 2009 11:01  

  • Hello again)
    I modified your program for using separate classes for each opcode, but emulator begin work slowly...

    Any ideas where i could try to optimize JavaGear?

    By Blogger Stepan Korshakov, at 12 February 2009 17:45  

  • drop me an e-mail at the address on and we can discuss further :)

    By Blogger yt, at 13 February 2009 11:47  

Post a Comment

<< Home