SuperGNESTM
SNES Emulator for Android Phones

Archive for the ‘Development’ Category

New Core, again

Tuesday, July 14th, 2009

Sorry it’s taken so long to put out a new post as we’ve been buried in massive code. We’ve yet again had to do major changes to SuperGNES and we wanted to make sure we got it right for you. We’ve created a new CPU core from scratch in ARM assembly that is very fast and also quite accurate. This is not the same regurgitated and hacked up GP2X code that everyone else has used. We expect a 100% CPU compatibility for all games. Also we designed the new core to support the SA1 chip. The C++ CPU core just wasn’t doing enough so we had to code it in ARM assembly. However we have retained the C++ core so we can easily compile for Intel Android mini-notebooks whenever they are available. We are running our regression tests now to make sure the new CPU integrates with everything correctly. We are determined to make the perfect SNES emulator for Android.

Chipping away at the bottle necks

Thursday, June 4th, 2009

The ARM CPU (in which most mobile devices run on) is a very interesting processor to optimize for. Your typical Intel chip has few registers, tons of MHz and a fatty L2 and L3 memory cache. ARM is different. It’s RISC based, has 16 registers and has a small CPU cache (which the Linux kernel hogs :( ). The lack of cache makes you code differently. You instead need to get as much work done as possible within those 16 registers before you have to read or write to memory. This can make a big difference in speed. In C++ terms this means local variables and constants are your friends. Using the output to assembly code option on gcc has revealed how certain routines of ours are killing the memory bus. On Intel taxing the memory bus is not a problem because the L2 cache is so fast. However for ARM we’ve took the small cache to mind and refactored our code to be more memory IO efficient and that so far it has increased our performance. More FPS improvement news will follow soon.

For more optimization info check out Writing Efficient C and C Code Optimization.