Chris White - Emulation & Decompilation

Tuesday, March 24, 2009

FlashGear

Now it runs pretty well:
http://www.javagear.co.uk/flashgear

Basically I missed a few Flash related things as I was working too late. I knew the code wasn't that bad! :)

Monday, March 23, 2009

JavaGear Actionscript/Flash Port

I quickly ported JavaGear to Actionscript 3 the other week to see how fast it would run. The actual port was really quick - took just over a day to get it up and running.

It seems that Actionscript is a pretty sluggish language for emulation purposes. The main bottleneck in the code is the Z80 emulation. The rendering and flash specific stuff is not really an issue.

Using a hacked version of Sonic, with some patched speed enhancements (replacing some of the idle cpu loops with halt instructions), it's just about playable. But I'd be lying if I said I wasn't disappointed with the overall performance.

I did a lot of profiling, but so far haven't made any breakthroughs. The core code is pretty fast anyway. I tried an alternate Z80 emulator from a Flash Spectrum emulator, and this was slower than my own.

Edit: give it a spin here
Be warned it's slow, so save any important work in case it stalls your PC ;)

DroidGear

Due to my own laziness at porting JavaGear to Google Android, I'm pleased to say Stephan has taken it upon himself to start a port. The code can be found here

A video can be found here

Looks like something's up with the frameskipping code from the video - I don't think the emulator is skipping frames at all. The interface and auto screen flipping looks cool though.