Difference between revisions of "Didj gpSP GBA Emulator"

From eLinux.org
Jump to: navigation, search
(Prerequisites)
(Background)
Line 2: Line 2:
 
==Background==
 
==Background==
  
We managed to get around the Didj's memory allocation limitiations 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.
+
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==
 
==Prerequisites==

Revision as of 21:09, 12 August 2010

gpSP GBA Emulator on Didj

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.

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:

# echo RFS0 >> /flags/rootfs

2. Reboot normally

# reboot

3. Disable Brio:

# mount -o remount, rw /
# cd /etc/rc.d
# mkdir backup
# mv *example backup
# 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:

# 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:

# cp ./warm_2.6.20.1-leapfrog.ko /lib/modules/2.6.20.1-leapfrog/kernel/drivers/warm

11. Test that it works:

# insmod warm_2.6.20.1-leapfrog
# rmmod warm_2.6.20.1-leapfrog

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

# cp libSDL-1.2.s.0.11.2 /usr/lib

13. Create a symbolic link:

# 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

#./go_emu.sh

Controls

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

Didj--------------------GBA
       -- IN-GAME --
A           ->          A
B           ->          B
L TRIG      ->          L TRIG
R TRIG      ->          R TRIG
PAUSE       ->          START
HINT        ->          SELECT
HOME 	    ->		quit emulator
        -- IN-MENU --
B          ->        select option
A          ->        escape (up one directory level in the
                                    file selector)
HOME       ->        config options

Source Code

http://github.com/nirvous/gpsp_lf1000

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