Zxgp2x - Gp2x Port Of Zxgp32


Dave18

Member
Joined
Mar 16, 2003
Messages
352
Age
49
I ported my GP32 spectrum emulator across to the GP2X. I was a little disappointed with the results for the following reasons.

The GP32 could run 48K games full speed at 66Mhz, the GP2X needs 120Mhz (120 v 160 respectively for 128K games). Considering they are using exactly the same z80 core (just with some data tables moved around to comply with Linux's more stringent assembly rules) I find this rather baffling, maybe it is because the GP32 is a simpler device.

The emulator pauses for a split second every now and again, I don't think it is the code directly causing this (as again there were no issues with GP32) but I wonder if it is because I'm am using bad coding techniques under Linux.

Every now and again the emulator freezes completely, I suspect this and the point above are related but I have no idea what the specific cause is.

There are other issues I don't understand, currently the emulator runs in a while (1) {} loop, but I wanted to add the option to quit back to gmenu, but something as simple as changing it to while (quit_emu==0) {} causes the emulator to crash.

TBH, I've got to the point where I've lost interest in it a bit but I thought I may as well post it into the file archives (http://archive.gp2x.de/cgi-bin/cfiles.cgi?0,0,0,0,72,2724) and include the source in case anyone with a lot more talent for coding than me fancied fixing it. If anyone does, please try your best to refrain from pointing out what a mess my code is!

Dave
 
That is something weird. One would expect the gp2x to perform better than the gp32.
A funny thing is that the Vice code on the gp2x also used to suffer from these pauses that have somehow been remedied. Could be something gp2x specific that one needs to code around - a 'feature' of the gp2x Linux instead.
 
You probably dont use hardware acceleration, because for the same game which run at 50FPS with 67MHz on GP32 (8bit video), I've more than 55FPS with 50MHz (16bits video) on GP2X ... but I've recoded all gfx part.
 
There is no hardware acceleration, however the GP32 didn't have hardware acceleration either so it should still match it for speed.

It doesn't use SDL at all but Rlyeh's minimal lib instead, the GP32 version actually used GPH's SDK (although not for screen updating which is done in ASM).

There isn't a lot of screen updating required and the only extra overhead the GP2X has is that it updates a drawing object that is then blitted to the screen whereas the GP32 version updated the display memory directly. However I can't believe it should need an extra 54Mhz to perform one blit per frame!!
 
Back
Top