Drak posted on Mar 23 2006 at 05:03 AM said:
btw whats with your genesis emu reesy? It doesnt seem to like madplay and I only get like 5fps. While with the snes emu I get 30 at like 266mhz with sound off hehe. I dont understand the stuff behind all this as all I can code is a simple pong game hah.
Its probably because I still have a sound thread updating the /dev/psg device even when the emulator is not rendering sound. My sound thread current doubles as my frame timer, so it madplay is using dev/psg as well it will bugger up the timing in the emulator. I'll change this at some point but its not high on my list of priorities.
DaveC: The reason why the GP2X version is slower than the GP32 version ( relatively speaking anyway ) is because the GP2X version is missing the ARM ASM tile rendering written by Yoyo. We can't use the code he produced because it is optimised for the back to front frame buffer on the GP32.
The rendering code makes a lot of use of stm and ldm opcodes, these can load data into multiple registers all from 1 opcode or can save data from mulitple registers to memory all from 1 opcode. This dramatically reduces the amount of memory bandwidth used by the rendering routines, which makes them much faster.
The rendering routines need to be re-written for the GP2X frame buffer, this is something I'm going to do, as assember is what I enjoy most
. In fact I'll probably get started now and leave 8bit mode for later.