Hi,
I bought a GP2X and got it 3 weeks ago (I'm travelling frequently by train these days so I have to do something ).
I've been using GNU/Linux for 4 years and I like coding.
I checked the available emulators and tried many of them (NES, MegaDrive...) when I saw the psx4gp2x PSX emulator.
I'm able to run Wip3out, but not at full speed (and I can't overclock to more than 250) so I tried to see how to improve it. But the source code of psx4gp2x is not available.
So I planned to port an open source emulator to the GP2X, the first thing is the choice of the emulator, but the only one available was Pcsx because every other one I looked at were closed-source (ePSXe? pSX?).
But this is only the core of the emulator, plugins are needed too, I took P.E.Op.S. SoftGPU as a GPU plugin (well, OpenGL isn't really available on the GP2X ) and cdriso (again, there is no CDrom drive on the GP2X).
From there I had to do many things : compile with the GP2X cross compiler, remove all x86 asm, reorganize of the source code to clean it and create a new build system, remove the plugin system and build plugins directly into the executable (they have to be in the correct license to do this, but the two plugins are compatible), remove every configuration utility and many configuration files, add SDL support to the gpu plugin, add a SDL pad plugin, add a sound plugin and check 2/3 more things.
SDL support is available in the GPU plugin, so it's really a good thing. I cleaned everything and built a good Makefile (I like doing this ). I created the SDL pad plugin and was able to test it on my computer. I created an empty SPU (sound) plugin.
And yes, I'm able to build it for the GP2X, the HLE is not working so it needs a real BIOS but, it runs!
It's (very) slow, I wasn't able to use the buttons to do anything, I should try to see what's wrong.
(I have a GP2X-F200 so I should buy the cradle to debug easily)
To those wanting to try it, here is an howto:
First download it, it's available as a bzr directory :
CODE
$ bzr clone http://tuxxx.zapto.org/bzr/pcs2x/
But since I think that many people don't want to use bzr, an archive is available here :
http://tuxxx.zapto.org/pub/pcs2x/ , named "pcs2x-v??.tar.bz2".
Ok now go to this directory and follow the following steps:
1) build it, first you may test it natively on your computer, the build command is something like this:
CODE
$ make CC=gcc-3.4.6 MYCFLAGS=-DPC
(currently it doesn't build with gcc 4, -DPC is used to tell the pad plugin to use the keyboard input)
The build command for the GP2X binary is:
CODE
$ make CC=arm-gp2x-linux-gcc TARGET=pcs2x.gpe
2) copy the file(s) to a directory (the x86 binary is useful here because you will be able to use it to test the settings)
3) copy the BIOS
The name of the BIOS must be "scph1001.bin".
CODE
$ cp path/to/scph1001.bin .
3) create the "fonts" folder and copy the font in it
I used the DejaVuMonoSans.ttf font since it's easily available on the net:
CODE
$ mkdir fonts
$ cp path/to/DejaVuMonoSans.ttf fonts/
4) create the cfg directory
CODE
$ mkdir cfg
5) create cfg/cdriso.cfg
QUOTE
IsoFile = path/to/your/rom.img
6) create cfg/gpuPeopsSoftX.cfg
QUOTE
ResX = 320
ResY = 240
NoStretch = 0
UseDither = 0
FullScreen = 0
ShowFPS = 1
ScanLines = 1
UseFrameLimit = 0
UseFrameSkip = 1
FPSDetection = 1
FrameRate = 30.0
CfgFixes = 0
UseFixes = 0
Now you should be able to run ./pcs2x, the BIOS should start and the game too.
The PC controls are :
Up/Down/Left/Right
Start : Enter
Space : Select
R : Triagle
G : Circle
V : Cross
D : Squaree
Ok now that it's working, just copy everything on the SD, start your GP2X and run pcs2x.gpe!
For those which don't want to do those steps, an archive named "pcs2x-v??-bin.tar.bz2" is available on http://tuxxx.zapto.org/pub/pcs2x/ , you only have to modify cfg/cdriso.cfg and add the BIOS file
I don't know if someday it'll be playable (now it's something like 1 frame every 4 seconds ^^), but I'm already happy : it works!
I would really appreciate comments .
I bought a GP2X and got it 3 weeks ago (I'm travelling frequently by train these days so I have to do something ).
I've been using GNU/Linux for 4 years and I like coding.
I checked the available emulators and tried many of them (NES, MegaDrive...) when I saw the psx4gp2x PSX emulator.
I'm able to run Wip3out, but not at full speed (and I can't overclock to more than 250) so I tried to see how to improve it. But the source code of psx4gp2x is not available.
So I planned to port an open source emulator to the GP2X, the first thing is the choice of the emulator, but the only one available was Pcsx because every other one I looked at were closed-source (ePSXe? pSX?).
But this is only the core of the emulator, plugins are needed too, I took P.E.Op.S. SoftGPU as a GPU plugin (well, OpenGL isn't really available on the GP2X ) and cdriso (again, there is no CDrom drive on the GP2X).
From there I had to do many things : compile with the GP2X cross compiler, remove all x86 asm, reorganize of the source code to clean it and create a new build system, remove the plugin system and build plugins directly into the executable (they have to be in the correct license to do this, but the two plugins are compatible), remove every configuration utility and many configuration files, add SDL support to the gpu plugin, add a SDL pad plugin, add a sound plugin and check 2/3 more things.
SDL support is available in the GPU plugin, so it's really a good thing. I cleaned everything and built a good Makefile (I like doing this ). I created the SDL pad plugin and was able to test it on my computer. I created an empty SPU (sound) plugin.
And yes, I'm able to build it for the GP2X, the HLE is not working so it needs a real BIOS but, it runs!
It's (very) slow, I wasn't able to use the buttons to do anything, I should try to see what's wrong.
(I have a GP2X-F200 so I should buy the cradle to debug easily)
To those wanting to try it, here is an howto:
First download it, it's available as a bzr directory :
CODE
$ bzr clone http://tuxxx.zapto.org/bzr/pcs2x/
But since I think that many people don't want to use bzr, an archive is available here :
http://tuxxx.zapto.org/pub/pcs2x/ , named "pcs2x-v??.tar.bz2".
Ok now go to this directory and follow the following steps:
1) build it, first you may test it natively on your computer, the build command is something like this:
CODE
$ make CC=gcc-3.4.6 MYCFLAGS=-DPC
(currently it doesn't build with gcc 4, -DPC is used to tell the pad plugin to use the keyboard input)
The build command for the GP2X binary is:
CODE
$ make CC=arm-gp2x-linux-gcc TARGET=pcs2x.gpe
2) copy the file(s) to a directory (the x86 binary is useful here because you will be able to use it to test the settings)
3) copy the BIOS
The name of the BIOS must be "scph1001.bin".
CODE
$ cp path/to/scph1001.bin .
3) create the "fonts" folder and copy the font in it
I used the DejaVuMonoSans.ttf font since it's easily available on the net:
CODE
$ mkdir fonts
$ cp path/to/DejaVuMonoSans.ttf fonts/
4) create the cfg directory
CODE
$ mkdir cfg
5) create cfg/cdriso.cfg
QUOTE
IsoFile = path/to/your/rom.img
6) create cfg/gpuPeopsSoftX.cfg
QUOTE
ResX = 320
ResY = 240
NoStretch = 0
UseDither = 0
FullScreen = 0
ShowFPS = 1
ScanLines = 1
UseFrameLimit = 0
UseFrameSkip = 1
FPSDetection = 1
FrameRate = 30.0
CfgFixes = 0
UseFixes = 0
Now you should be able to run ./pcs2x, the BIOS should start and the game too.
The PC controls are :
Up/Down/Left/Right
Start : Enter
Space : Select
R : Triagle
G : Circle
V : Cross
D : Squaree
Ok now that it's working, just copy everything on the SD, start your GP2X and run pcs2x.gpe!
For those which don't want to do those steps, an archive named "pcs2x-v??-bin.tar.bz2" is available on http://tuxxx.zapto.org/pub/pcs2x/ , you only have to modify cfg/cdriso.cfg and add the BIOS file
I don't know if someday it'll be playable (now it's something like 1 frame every 4 seconds ^^), but I'm already happy : it works!
I would really appreciate comments .