Handy on the DS

I had a little time tonight, and I decided to make a pass at porting Handy to the DS. For those who don’t know, Handy is an Atari Lynx emulator. For those of you who don’t know what an Atari Lynx is, I suggest checking out the wiki (ask your parents first).

Now, as far as emulators go, Handy is pretty solid. It was last touched in 2004, as far as I can tell. It was written in 100% C++ code. And, it runs at full speed on any modern PC or Mac. But, of course, the DS isn’t really modern hardware. For this first pass, I decided to leave as much of the original code untouched as possible. Which of course meant that everything was still in C++.

Another drawback is that to keep things speedy on the porting side, that also meant using the 16-bit framebuffer mode of the GBA, *ahem* DS. I only had to make a slight modification to the Handy code to use BGR instead of RGB. Also, for those of you at home playing with the 16-bit framebuffer on the DS, you also have to set the high bit. Apparently a lot of emulators don’t care — but the hardware does. Spent quite a bit of time on that one tonight.

Anyway, the speed is actually pretty respectable all things considered. I can’t nail down a specific number, but if I had to guess, I would say it was running at about 25% of a real Lynx. I’m already thinking of some optimizations I can do to make it better — starting with changing the way the screen is handled, and then next putting an assembly CPU core in as well.

I’m not releasing any code right now — it’s would be way to premature at this point. But, I do have a couple of pics. Sorry about the craptastic quality — I had to use my DV camera and Photo Booth to capture some shots. The camera phone was just not anywhere near up to the task and the other camera’s were all missing their batteries…

Klax Title Screen

Klax In Game

I’ll hopefully have some more updates later, so check back again.


About this entry