Didj gpSP GBA Emulator

Background
We managed to get around the Didj's memory allocation limitations and got Exophase/notaz's gpSP emulator running on the Didj. In order to give gpSP access to the RAM that it requires, we use a specially built kernel zImage which allocates the RAM normally used by the onboard 3D accelerator and the YUV layer to userspace (these features are not used by the emulator). At the time of this writing, the emulator on Didj was reasonably stable, but your mileage may vary.

Prerequisites

 * Didj set up with LightningBoot 1.4 or higher
 * DJHI or similar breakout with SD card
 * You will need to obtain a GBA BIOS (Google is your friend!). This file must be named "gba_bios.bin" in all lowercase as shown, so rename it if needed.

NOTE ''There are two commonly available BIOSes - one is the correct one used in production GBA's worldwide and the other is a prototype BIOS. The latter will not cause some games to not work correctly or crash. If you attempt to use this BIOS you will be presented with a warning before being allowed to continue. This screen will give you a checksum of the real BIOS image (see readme.txt for further information).''


 * At least one game rom.


 * Download the emulator and related libraries found in this file drop: http://drop.io/gpsp_lf1000

To prepare your Didj for gpSP
We are going to take advantage of the existing dual root filesystem scheme and use one of them - RFS0 - to run the emulator. We disable Brio on this rootfs as it will cause reboots when the modified kernel is used.

1. Change the rootfs flag:
 * 1) echo RFS0 >> /flags/rootfs

2. Reboot normally
 * 1) reboot

3. Disable Brio:
 * 1) mount -o remount, rw /
 * 2) cd /etc/rc.d
 * 3) mkdir backup
 * 4) mv *example backup
 * 5) mv *lightning backup

4. Put the emulator file, startup script, the gba_bios.bin file, the game_config.txt file, the wARM kernel module, and at least one game rom onto your Didj

5. Create this directory for the wARM kernel module:
 * 1) mkdir /lib/modules/2.6.20.1-leapfrog/kernel/drivers/warm

6. Place the warm_2.6.20.1-leapfrog.ko file into the directory you created:
 * 1) cp ./warm_2.6.20.1-leapfrog.ko /lib/modules/2.6.20.1-leapfrog/kernel/drivers/warm

11. Test that it works:


 * 1) insmod warm_2.6.20.1-leapfrog
 * 2) rmmod warm_2.6.20.1-leapfrog

12. Place the SDL file into /user/lib:


 * 1) cp libSDL-1.2.s.0.11.2 /usr/lib

13. Create a symbolic link:


 * 1) ln -s libSDL-1.2.s.0.11.2 libSDL-1.2.so.0

14. Place the zImage file onto your sd card.

15. Boot the zImage from the SD card.

16. cd to the emulator directory and launch the emulator


 * 1) ./go_emu.sh

Controls
Buttons are mapped as follows (GBA/ingame buttons can be changed in the menu):

Source Code
http://github.com/nirvous/gpsp_lf1000

The code in the source tree is LX centric - we will upload the didj patch shortly.