poke: the CPU is the least of your problems.
I am afraid that the underlying OS on gp2x is totally different, and the problems I am experiencing are OS-specific.
In Rockbox you have no SetColor(N,R,G,B) to set palette,
but instead you should use pixelColor=LCD_RGBPACK(R,G,B) and put that value into the frame buffer.
fMSX has XPal[80] and BPal[16] for DOS/Unix, but I am not sure what exactly should I do with them.
Update:
Fixed, all colors are OK.
The OS which uses GP2X is... LINUX
PS: The GP2X Cradle has just relesed ^-^. I has 4 usb ports, j-tag, serial port, audio rca output and s-video output. Good for all: emulators, games, apps
Well, in the meantime I've made the very very very first quick-and-dirty version running on my Sansa E260.
The speed is indeed acceptable even before I started any optimizations.
I've mapped directional keys and space, so most of games are already playable.
I've just finished 1st level of King's Valley on it
BTW, I know for sure fMSX won't be included in rockbox distribution because of incompatible license, so if I ever will distribute the port, it will be in the source form, because rockbox api version changes all the time and requires all the plugins (as they call applications) to be recompiled.
orrrrrrrrrrrr.... port an emulator with a better fitting license? I'm not sure what they require, but I'm sure either blueMSX or openMSX will fit.
Now I've added menu for save/load state, scrolling for "viewing window", and config files support for rom/dsk startup that need setting options at startup time (for example, rom type).
The only thing I feel I will have trouble porting is sound support.
fMSX has sources for 3 implementations out of the box - for Windows, MS-DOS and Unix.
Is there anybody who can help me porting one of them to rockbox (pcm) sound api ?
No need to port Midi part, WAV(PCM) output should be enough.
I also have code examples from other emulators ported to rockbox, so ... any help ?
manuel,
fMSX was ported (except sound) to rockbox in less than a week, of which 2 days took me to set up the dev environment, and other 2 for polishing makefiles and writing functions like malloc/fread/printf/sscanf missing in rockbox. fMSX has a easy code structure separated into parts that require porting and those that don't, and it was already ported to platforms with specs similar to mine.
It also has no required libraries (and as you see, rockbox is not an easy platform to port libraries to), so my choice was obvious. I don't plan to submit the emulator to rockbox distribution because of the license incompatibility, but this is the only problem I have (and it is solvable in some way).
well, blueMSXlite also has no library deps.
manuel (and/or dvik):
"Show me the money"... er... this lite version. Was it already successfully ported to any Unix ?
All I've found about it is "alpha version on Linux" exists.
fMSX was developed on Sun, then ported to Linux and such, so it already supports different endianesses. What's about endianess (FSB/LSB) in blueMSX lite ?
It seems to kind of work under Linux, but as there's no clera manual on how to use it, I didn't come very far. Wouter got it running quite nicely it seems. But I suppose dvik can comment on it better. I dn't know if it's endian compatible yet. (openMSX is for sure, as it runs on 11 architectures... but that one uses libs indeed.)