Difference between revisions of "Application:Gnuboy"
Dudestatus (talk | contribs) (→Run:: This edit makes the games look better by filling in the previously apparent scanlines with pixels from the game.) |
Dudestatus (talk | contribs) (→Notes) |
||
(51 intermediate revisions by the same user not shown) | |||
Line 1: | Line 1: | ||
+ | NOTE: To successfully follow these instructions, you should know a bit of Linux. If you're uncomfortable with Linux, alternative instructions are available [[NES_and_GameBoy_Emulators|here]]. | ||
+ | |||
+ | Playability in this emulator is excellent. Gameboy and Gameboy Color games run at full speed. | ||
=== Setup: === | === Setup: === | ||
+ | |||
1. Setup [[Debian|Debian]]. | 1. Setup [[Debian|Debian]]. | ||
2. Setup [[DirectFB|DirectFB]]. | 2. Setup [[DirectFB|DirectFB]]. | ||
+ | |||
+ | Some program specific notes about the directfbrc config file: | ||
+ | |||
+ | <pre><nowiki> | ||
+ | mode=320x480 | ||
+ | primary-layer=00 | ||
+ | pixelformat=RGB16 #This needs to be changed from ARGB to RGB16 for accurate gameboy color emulation. | ||
+ | no-vt | ||
+ | no-cursor | ||
+ | bg-color=00000000 | ||
+ | hardware | ||
+ | </nowiki></pre> | ||
3. Run, outside the chroot: | 3. Run, outside the chroot: | ||
Line 19: | Line 35: | ||
export SDL_NOMOUSE=1 | export SDL_NOMOUSE=1 | ||
sdlgnuboy --scale=2 --density=2 --bind q quit --bind u +up --bind h +left --bind k +right --bind j +down YOURROMFILE.GB | sdlgnuboy --scale=2 --density=2 --bind q quit --bind u +up --bind h +left --bind k +right --bind j +down YOURROMFILE.GB | ||
+ | </source> | ||
+ | |||
+ | === Launching Gnuboy from within Webos === | ||
+ | |||
+ | The emulator can be launched from the Mojo Webos [[Application:Terminal|Terminal]] app, which can be downloaded from [[Preware|Preware]]. The emulator even works with Luna on, meaning you can launch it from the Webos Terminal, and receive calls even when playing a game. To exit games when playing like this, press the orange button or the Gnuboy quit button to return to normal Webos function. | ||
+ | |||
+ | However, with Luna on, the Webos GUI functions will turn off the screen and go into sleep mode after a period of time, which causes the emulator to crash. This period of time is defined in the Webos 'Screen & Lock' application under 'Turn Off After'. A workaround is to either tap the screen periodically before the screen turns off, use the functionality in the Webos app [http://www.precentral.net/homebrew-apps/nodoze NoDoze], or use the "More Standby Times" patch that can also be applied using [[Preware|Preware]] (original patch notes [[Patch_webOS_Changing_the_"Turn_off_after_X"_time| available here]]). | ||
+ | |||
+ | === Scripts for quick launch === | ||
+ | make a script to launch debian, and call it debian.sh. | ||
+ | <source lang="text"> | ||
+ | mount -o loop /media/internal/debsmall.img /media/cf | ||
+ | mount --bind /dev /media/cf/dev | ||
+ | mount -t devpts none /media/cf/dev/pts | ||
+ | mount -t proc none /media/cf/proc | ||
+ | /usr/sbin/chroot /media/cf #Just that easy! | ||
+ | </source> | ||
+ | then do the command: | ||
+ | <source lang="text"> | ||
+ | chmod 755 ./debian.sh | ||
+ | </source> | ||
+ | |||
+ | then make a script to run the gameboy emulator. call it gameboy.sh | ||
+ | <source lang="text"> | ||
+ | export ROM=$1 | ||
+ | export SDL_VIDEODRIVER="directfb" | ||
+ | export SDL_NOMOUSE=1 | ||
+ | sdlgnuboy --scale=2 --density=2 --bind q quit --bind u +up --bind h +left --bind k +right --bind j +down $ROM | ||
+ | </source> | ||
+ | do command: | ||
+ | <source lang="text"> | ||
+ | chmod 755 ./gameboy.sh | ||
+ | </source> | ||
+ | |||
+ | and now you can run gameboy games with two lines. | ||
+ | |||
+ | 1. go to debian script directory | ||
+ | <source lang="text"> | ||
+ | ./debian.sh | ||
+ | </source> | ||
+ | 2. go to gameboy script directory, with roms in that directory | ||
+ | <source lang="text"> | ||
+ | ./gameboy.sh YOURROMFILE.GBC | ||
</source> | </source> | ||
Line 24: | Line 83: | ||
* You will have to unzip your gameboy rom in order to work with gnuboy | * You will have to unzip your gameboy rom in order to work with gnuboy | ||
+ | * Mappings for the gameboy start and select buttons are not specified in the program launch parameters, but the defaults are enter for start and space for select. | ||
+ | * If sound is not working for you, try installing the package 'libsdl1.2debian-all' in your debian chroot. To disable sound in the emu, add --sound=0 as a launch parameter. | ||
+ | * If you have problems installing the 'gnuboy-sdl' package, run "apt-get update". | ||
+ | * If you have trouble using your Pre as a USB drive after mounting debian, you can still use SSH and a SFTP program such as WinSCP to and drag and drop files onto your Pre. To set up SSH see [[Next_steps]]. In this case, USB drive functionality is returned by turning off your Pre with the remove battery/turn off option, and then turning the Pre back on. | ||
+ | * If you notice poor performance on the pre, do a full shutdown and power back on. | ||
+ | * To experiment with different gnuboy settings, see the gnuboy [http://www.sourcefiles.org/Emulators/Videogames/gnuboy-1.0.3.tar.gz.shtml readme]. | ||
+ | * Might seem obvious, but gnuboy will crash if you misspell your ROM name. Recommended you rename your ROM files to something simpler. | ||
+ | * A quick hack to fix the yellow half screen on the bottom is to set the terminal colors to a red background with white text in preferences, and scroll down at initial game startup. Another hack is to try adding " 2>debug" to the last line of the launcher script, and to refrain from doing anything to prompt a Luna redraw, such as touching the screen, receiving notifications/calls etc. In the second case, putting the phone in airplane mode can be helpful. | ||
=== Video === | === Video === | ||
[http://www.viddler.com/explore/MrPalmaser/videos/1/ Video] on Viddler | [http://www.viddler.com/explore/MrPalmaser/videos/1/ Video] on Viddler | ||
+ | |||
+ | [http://www.youtube.com/watch?v=XtFEf6a0ZWQ Video] on Youtube | ||
[[Category:Games|Gnuboy]] | [[Category:Games|Gnuboy]] |
Latest revision as of 13:10, 7 December 2009
NOTE: To successfully follow these instructions, you should know a bit of Linux. If you're uncomfortable with Linux, alternative instructions are available here.
Playability in this emulator is excellent. Gameboy and Gameboy Color games run at full speed.
Setup:
1. Setup Debian.
2. Setup DirectFB.
Some program specific notes about the directfbrc config file:
mode=320x480 primary-layer=00 pixelformat=RGB16 #This needs to be changed from ARGB to RGB16 for accurate gameboy color emulation. no-vt no-cursor bg-color=00000000 hardware
3. Run, outside the chroot:
<source lang="text">/sbin/initctl stop LunaSysMgr #NOTE: THIS WILL KILL THE GUI</source> 4. Run, inside the debian chroot: <source lang="text"> apt-get install -y gnuboy-sdl </source>
Run:
Get into the Debian chroot: <source lang="text"> export SDL_VIDEODRIVER="directfb" export SDL_NOMOUSE=1 sdlgnuboy --scale=2 --density=2 --bind q quit --bind u +up --bind h +left --bind k +right --bind j +down YOURROMFILE.GB </source>
Launching Gnuboy from within Webos
The emulator can be launched from the Mojo Webos Terminal app, which can be downloaded from Preware. The emulator even works with Luna on, meaning you can launch it from the Webos Terminal, and receive calls even when playing a game. To exit games when playing like this, press the orange button or the Gnuboy quit button to return to normal Webos function.
However, with Luna on, the Webos GUI functions will turn off the screen and go into sleep mode after a period of time, which causes the emulator to crash. This period of time is defined in the Webos 'Screen & Lock' application under 'Turn Off After'. A workaround is to either tap the screen periodically before the screen turns off, use the functionality in the Webos app NoDoze, or use the "More Standby Times" patch that can also be applied using Preware (original patch notes available here).
Scripts for quick launch
make a script to launch debian, and call it debian.sh. <source lang="text"> mount -o loop /media/internal/debsmall.img /media/cf mount --bind /dev /media/cf/dev mount -t devpts none /media/cf/dev/pts mount -t proc none /media/cf/proc /usr/sbin/chroot /media/cf #Just that easy! </source> then do the command: <source lang="text"> chmod 755 ./debian.sh </source>
then make a script to run the gameboy emulator. call it gameboy.sh <source lang="text"> export ROM=$1 export SDL_VIDEODRIVER="directfb" export SDL_NOMOUSE=1 sdlgnuboy --scale=2 --density=2 --bind q quit --bind u +up --bind h +left --bind k +right --bind j +down $ROM </source> do command: <source lang="text"> chmod 755 ./gameboy.sh </source>
and now you can run gameboy games with two lines.
1. go to debian script directory <source lang="text"> ./debian.sh </source> 2. go to gameboy script directory, with roms in that directory <source lang="text"> ./gameboy.sh YOURROMFILE.GBC </source>
Notes
- You will have to unzip your gameboy rom in order to work with gnuboy
- Mappings for the gameboy start and select buttons are not specified in the program launch parameters, but the defaults are enter for start and space for select.
- If sound is not working for you, try installing the package 'libsdl1.2debian-all' in your debian chroot. To disable sound in the emu, add --sound=0 as a launch parameter.
- If you have problems installing the 'gnuboy-sdl' package, run "apt-get update".
- If you have trouble using your Pre as a USB drive after mounting debian, you can still use SSH and a SFTP program such as WinSCP to and drag and drop files onto your Pre. To set up SSH see Next_steps. In this case, USB drive functionality is returned by turning off your Pre with the remove battery/turn off option, and then turning the Pre back on.
- If you notice poor performance on the pre, do a full shutdown and power back on.
- To experiment with different gnuboy settings, see the gnuboy readme.
- Might seem obvious, but gnuboy will crash if you misspell your ROM name. Recommended you rename your ROM files to something simpler.
- A quick hack to fix the yellow half screen on the bottom is to set the terminal colors to a red background with white text in preferences, and scroll down at initial game startup. Another hack is to try adding " 2>debug" to the last line of the launcher script, and to refrain from doing anything to prompt a Luna redraw, such as touching the screen, receiving notifications/calls etc. In the second case, putting the phone in airplane mode can be helpful.
Video
Video on Viddler
Video on Youtube