Emulador Gameboy Advance-GPSPy
Contingut
Gameboy Advance - GPSPy
Introducció
Instal.lació
GpSP - Nintendo Gameboy Advance
GpSP - A ‘Beginners Guide’ to Compiling and Using:
DPR has ported Notaz's GpSP (Original Source Code by Exophase). All criteria considered it is currently the best emulator for the system on the Raspberry Pi.
Download Link - https://www.dropbox.com/s/2x9tz60v06h15u9/gpsp.tar.gz
wget https://dl.dropbox.com/u/24838026/gpsp-ffa573f.tar.gz
$ cd gpsp-ffa573f/
rm gui.c
wget https://dl.dropbox.com/u/24838026/gui.c
cd raspberrypi
make -i
...
/opt/vc/include/interface/vmcs_host/vcgencmd.h:33:27: fatal error: vchost_config.h: No such file or directory
sudo joe /opt/vc/include/interface/vmcs_host/vcgencmd.h #include "interface/vmcs_host/linux/vchost_config.h"
Ara ja podem compilar, però trigarà bastanta estona. It will take approximately 45 minutes to compile the Source Code (depending on your 'Overclock' setting).
Les instruccions que s'executen en la compilació són: (això és important per si vull recompilar una part del codi)
gcc -DARM_ARCH -DRPI_BUILD -Wall -Ofast -mfpu=vfp -mfloat-abi=hard -march=armv6j -fgnu89-inline -I/opt/vc/include -I/opt/vc/include/interface/vcos/pthreads -I/opt/vc/include/interface/vmcs_host/linux -I/usr/include/SDL -D_GNU_SOURCE=1 -D_REENTRANT -c -o rpi.o rpi.c gcc -DARM_ARCH -DRPI_BUILD -Wall -Ofast -mfpu=vfp -mfloat-abi=hard -march=armv6j -fgnu89-inline -I/opt/vc/include -I/opt/vc/include/interface/vcos/pthreads -I/opt/vc/include/interface/vmcs_host/linux -I/usr/include/SDL -D_GNU_SOURCE=1 -D_REENTRANT -c -o main.o ../main.c gcc -DARM_ARCH -DRPI_BUILD -Wall -Ofast -mfpu=vfp -mfloat-abi=hard -march=armv6j -fgnu89-inline -I/opt/vc/include -I/opt/vc/include/interface/vcos/pthreads -I/opt/vc/include/interface/vmcs_host/linux -I/usr/include/SDL -D_GNU_SOURCE=1 -D_REENTRANT -Wno-unused-variable -Wno-unused-label -c -o cpu.o ../cpu.c gcc -DARM_ARCH -DRPI_BUILD -Wall -Ofast -mfpu=vfp -mfloat-abi=hard -march=armv6j -fgnu89-inline -I/opt/vc/include -I/opt/vc/include/interface/vcos/pthreads -I/opt/vc/include/interface/vmcs_host/linux -I/usr/include/SDL -D_GNU_SOURCE=1 -D_REENTRANT -c -o memory.o ../memory.c gcc -DARM_ARCH -DRPI_BUILD -Wall -Ofast -mfpu=vfp -mfloat-abi=hard -march=armv6j -fgnu89-inline -I/opt/vc/include -I/opt/vc/include/interface/vcos/pthreads -I/opt/vc/include/interface/vmcs_host/linux -I/usr/include/SDL -D_GNU_SOURCE=1 -D_REENTRANT -c -o video.o ../video.c gcc -DARM_ARCH -DRPI_BUILD -Wall -Ofast -mfpu=vfp -mfloat-abi=hard -march=armv6j -fgnu89-inline -I/opt/vc/include -I/opt/vc/include/interface/vcos/pthreads -I/opt/vc/include/interface/vmcs_host/linux -I/usr/include/SDL -D_GNU_SOURCE=1 -D_REENTRANT -c -o input.o ../input.c gcc -DARM_ARCH -DRPI_BUILD -Wall -Ofast -mfpu=vfp -mfloat-abi=hard -march=armv6j -fgnu89-inline -I/opt/vc/include -I/opt/vc/include/interface/vcos/pthreads -I/opt/vc/include/interface/vmcs_host/linux -I/usr/include/SDL -D_GNU_SOURCE=1 -D_REENTRANT -c -o sound.o ../sound.c gcc -DARM_ARCH -DRPI_BUILD -Wall -Ofast -mfpu=vfp -mfloat-abi=hard -march=armv6j -fgnu89-inline -I/opt/vc/include -I/opt/vc/include/interface/vcos/pthreads -I/opt/vc/include/interface/vmcs_host/linux -I/usr/include/SDL -D_GNU_SOURCE=1 -D_REENTRANT -c -o gui.o ../gui.c gcc -DARM_ARCH -DRPI_BUILD -Wall -Ofast -mfpu=vfp -mfloat-abi=hard -march=armv6j -fgnu89-inline -I/opt/vc/include -I/opt/vc/include/interface/vcos/pthreads -I/opt/vc/include/interface/vmcs_host/linux -I/usr/include/SDL -D_GNU_SOURCE=1 -D_REENTRANT -c -o cheats.o ../cheats.c gcc -DARM_ARCH -DRPI_BUILD -Wall -Ofast -mfpu=vfp -mfloat-abi=hard -march=armv6j -fgnu89-inline -I/opt/vc/include -I/opt/vc/include/interface/vcos/pthreads -I/opt/vc/include/interface/vmcs_host/linux -I/usr/include/SDL -D_GNU_SOURCE=1 -D_REENTRANT -c -o zip.o ../zip.c gcc -DARM_ARCH -DRPI_BUILD -Wall -Ofast -mfpu=vfp -mfloat-abi=hard -march=armv6j -fgnu89-inline -I/opt/vc/include -I/opt/vc/include/interface/vcos/pthreads -I/opt/vc/include/interface/vmcs_host/linux -I/usr/include/SDL -D_GNU_SOURCE=1 -D_REENTRANT -c -o arm_stub.o ../arm/arm_stub.S gcc -DARM_ARCH -DRPI_BUILD -Wall -Ofast -mfpu=vfp -mfloat-abi=hard -march=armv6j -fgnu89-inline -I/opt/vc/include -I/opt/vc/include/interface/vcos/pthreads -I/opt/vc/include/interface/vmcs_host/linux -I/usr/include/SDL -D_GNU_SOURCE=1 -D_REENTRANT -c -o warm.o ../arm/warm.c gcc -DARM_ARCH -DRPI_BUILD -Wall -Ofast -mfpu=vfp -mfloat-abi=hard -march=armv6j -fgnu89-inline -I/opt/vc/include -I/opt/vc/include/interface/vcos/pthreads -I/opt/vc/include/interface/vmcs_host/linux -I/usr/include/SDL -D_GNU_SOURCE=1 -D_REENTRANT -Wno-unused-variable -Wno-unused-label -c -o cpu_threaded.o ../cpu_threaded.c gcc -DARM_ARCH -DRPI_BUILD -Wall -Ofast -mfpu=vfp -mfloat-abi=hard -march=armv6j -fgnu89-inline -I/opt/vc/include -I/opt/vc/include/interface/vcos/pthreads -I/opt/vc/include/interface/vmcs_host/linux -I/usr/include/SDL -D_GNU_SOURCE=1 -D_REENTRANT -c -o gles_video.o gles_video.c gcc -DARM_ARCH -DRPI_BUILD -Wall -Ofast -mfpu=vfp -mfloat-abi=hard -march=armv6j -fgnu89-inline -I/opt/vc/include -I/opt/vc/include/interface/vcos/pthreads -I/opt/vc/include/interface/vmcs_host/linux -I/usr/include/SDL -D_GNU_SOURCE=1 -D_REENTRANT -c -o video_blend.o ../arm/video_blend.S gcc rpi.o main.o cpu.o memory.o video.o input.o sound.o gui.o cheats.o zip.o arm_stub.o warm.o cpu_threaded.o gles_video.o video_blend.o -ldl -lpthread -lz -L/opt/vc/lib/ -lGLESv2 -lEGL -lopenmaxil -lbcm_host -lvcos -lvchiq_arm -lrt -L/usr/lib/arm-linux-gnueabihf -lSDL -o gpsp
Additional Steps:
1. The gba emulator needs to hava a gba bios file due to the lack of HLE Emulation. I can not provide you a link to this file as it is illegal to distribute it. Google "gba_bios.bin download" to find it, or rip it from your game boy. However, the file must then be placed in the same directory as the executable.
wget http://www.emuparadise.me/biosfiles/gba_bios.bin scp gba_bios.bin pi@192.168.1.35:/home/pi/gpsp-ffa573f/raspberrypi
2. Same thing goes for roms. Google it! Roms can be placed anywhere.
Dins de la carpeta d'instal.lació creem el directori on ficarem les roms.
~/gpsp-ffa573f/raspberrypi $ mkdir roms $ cd /home/joan/MAME/ROMs/roms_GBA/ $ scp 1986_-_Pokemon_Emerald.gba pi@192.168.1.35:/home/pi/gpsp-ffa573f/raspberrypi/roms
3. To run gpSP, simply go to the directory it is in and enter:
Code: Select all
./gpsp
./gpsp roms/Space_Invaders.gba
to run it.
Les roms que funcionen són les de:
Default controlls are:
KEYBOARD
---------
Up Up Arrow
Down Down Arrow
Left Left Arrow
Right Right Arrow
A Z
B X
Start Enter
Select Backspace
L A
R S
Exit Esc
Menu F10
GAMEPAD
-------
Up XAsix -
Down XAsix +
Left YAsix -
Right YAsix +
A Button 1
B Button 2
Start Button 3
Select Button 4
L Button 5
R Button 6
Per canviar els controls:
CD into the gpSP directory in your terminal and then just run ./gpsp It will launch a GUI that allows you to configure the controller.
A input.c trobem:
u32 key_map(SDLKey key_sym)
{
switch(key_sym)
{
case SDLK_a:
return BUTTON_L;
case SDLK_s:
return BUTTON_R;
case SDLK_DOWN:
return BUTTON_DOWN;
case SDLK_UP:
return BUTTON_UP;
case SDLK_LEFT:
return BUTTON_LEFT;
case SDLK_RIGHT:
return BUTTON_RIGHT;
case SDLK_RETURN:
return BUTTON_START;
case SDLK_BACKSPACE:
return BUTTON_SELECT;
case SDLK_x:
return BUTTON_B;
case SDLK_z:
return BUTTON_A;
default:
return BUTTON_NONE;
}
Suposo que n'hi ha prou en canviar aquestes línies i recompilar. Realment jo no he trobat el menú per configurar els controls que sembla ser que existeix.
El tema és que sí que hi ha un fitxer de configuració, però és binari, i és millor configurar tots els controls des del menú gràfic:
... It appears that gpsp is not run via libretro thus its not configured like the rest of RetroArch. My solution was to run gpsp from command line with no arguments (sudo ./~/RetroPie/emulators/gpsp/raspberrypi/gpsp ) and configure my buttons through the onscreen menu there. This generated a gpsp.cfg file (binary).
El problema està en què s'hauria de canviar les tecles per cada ROM, i això és molta feina. Per tant, és important trobar la manera de canviar les tecles per totes les ROMs, com s'explica en el següent apartat.
Canvi de tecles. Integració amb la minibartop de 7 botons
La tecla ESC permet sortir del menu, sortir del joc, i sortir del programa. En la minibartop la tecla ESC està associada al 0. El codi s'ha de canviar de la següent manera:
input.c
línia 645
case SDL_KEYDOWN:
{
switch(event.key.keysym.sym)
{
case SDLK_ESCAPE:
gui_action = CURSOR_EXIT;
break;
case SDLK_0:
gui_action = CURSOR_EXIT;
break;
...
línia 715
case SDL_KEYDOWN:
{
if(event.key.keysym.sym == SDLK_ESCAPE)
{
quit();
}
if(event.key.keysym.sym == SDLK_0)
{
quit();
}
línia 842
case SDL_KEYDOWN:
if ((event.key.keysym.sym == SDLK_ESCAPE) || (event.key.keysym.sym == SDLK_0)) {
action = BUTTON_B;
} else {
action = key_map(event.key.keysym.sym);
}
break;
línia 919:
case SDL_KEYDOWN:
{
if(event.key.keysym.sym == SDLK_ESCAPE)
{
quit();
}
if(event.key.keysym.sym == SDLK_0)
{
quit();
}
Amb F10 es canvia la configuració de cada joc. Però per fer-ho per tots ells el fitxer que s'ha de modificar és el rpi.c.
Configuració original:
raspberry/rpi.c
//Default setting of keyboard
u32 keyboard_config_map[PLAT_KEY_COUNT] =
{
SDLK_UP, // Up
SDLK_DOWN, // Down
SDLK_LEFT, // Left
SDLK_RIGHT, // Right
SDLK_z, // Button A
SDLK_x, // Button B
SDLK_a, // Button L
SDLK_s, // Button R
SDLK_RETURN, // Button Select
SDLK_BACKSPACE // Button Start
};
Configuració modificada per a la minibartop de 7 tecles:
//Default setting of keyboard
u32 keyboard_config_map[PLAT_KEY_COUNT] =
{
SDLK_UP, // Up
SDLK_DOWN, // Down
SDLK_LEFT, // Left
SDLK_RIGHT, // Right
SDLK_3, // Button A
SDLK_4, // Button B
SDLK_5, // Button L
SDLK_6, // Button R
SDLK_2, // Button Select
SDLK_1 // Button Start
};
I per tant quan hagi de fer modificacions en la configuració per defecte del teclat només hauré de fer:
gcc -DARM_ARCH -DRPI_BUILD -Wall -Ofast -mfpu=vfp -mfloat-abi=hard -march=armv6j -fgnu89-inline -I/opt/vc/include -I/opt/vc/include/interface/vcos/pthreads -I/opt/vc/include/interface/vmcs_host/linux -I/usr/include/SDL -D_GNU_SOURCE=1 -D_REENTRANT -c -o rpi.o rpi.c gcc -DARM_ARCH -DRPI_BUILD -Wall -Ofast -mfpu=vfp -mfloat-abi=hard -march=armv6j -fgnu89-inline -I/opt/vc/include -I/opt/vc/include/interface/vcos/pthreads -I/opt/vc/include/interface/vmcs_host/linux -I/usr/include/SDL -D_GNU_SOURCE=1 -D_REENTRANT -c -o input.o ../input.c gcc rpi.o main.o cpu.o memory.o video.o input.o sound.o gui.o cheats.o zip.o arm_stub.o warm.o cpu_threaded.o gles_video.o video_blend.o -ldl -lpthread -lz -L/opt/vc/lib/ -lGLESv2 -lEGL -lopenmaxil -lbcm_host -lvcos -lvchiq_arm -lrt -L/usr/lib/arm-linux-gnueabihf -lSDL -o gpsp
Configuració
ROMs
Game Boy Advance (GBA):
- http://www.freeroms.com/gba.htm
- http://www.doperoms.com/toproms.php?system=gameboy%20advance%20gba
- http://romhustler.net/roms/gba/page:1/sort:Rom.downloads/direction:desc
- categories: http://www.emuparadise.me/Nintendo_Gameboy_Advance_ROMs/Genre/31
- screenshots: http://www.neoseeker.com/Games/screenshots/GBA/m/
Les millors ROMs
- http://www.freeroms.com/gba_roms_highest_rated.htm
- http://doperoms.com/toproms.php?system=gameboy%20advance%20gba
1. Pokemon - Emerald Version (UE).zip 2. Pokemon - Fire Red Version (U).zip 3. Pokemon - Leaf Green Version (E).zip 4. Super Mario Advance 4 - Super Mario Bros. 3 (U) (v1.0).zip 5. Pokemon - Ruby Version (U).zip 6. Pokemon - Sapphire Version (U).zip 7. Pocket Monsters - Emerald (J).zip 8. Yu-Gi-Oh! GX - Duel Academy (U).zip 9. Pocket Monsters - Fire Red (J).zip 10. Super Mario Advance 2 - Super Mario World (E) (M4).zip 11. Legend of Zelda, The - A Link to the Past & Four Swords (E) (M5).zip 12. Legend of Zelda, The - The Minish Cap (E) (M5).zip 13. 2 Games in 1 - Dragon Ball Z - The Legacy of Goku I & II (U).zip 14. Kirby - Nightmare in Dream Land (E) (M5).zip 15. Crash Bandicoot - The Huge Adventure (U).zip 16. WarioWare - Twisted! (U).zip 17. Mario Kart - Super Circuit (E).zip 18. Naruto - Konoha Senki (J).zip 19. Grand Theft Auto Advance (E) (M5).zip 20. Digimon - Battle Spirit 2 (E) (M5).zip 21. Need for Speed - Most Wanted (UE) (M4).zip 22. Yu-Gi-Oh! Duel Monsters GX - Mezase Duel King (J).zip 23. Pokemon - Edicion Esmeralda (S).zip 24. Yu-Gi-Oh! - The Sacred Cards (E) (M5).zip 25. Harvest Moon - Friends of Mineral Town (U).zip 26. Pokemon - Version Rubis (F) (v1.1).zip 27. Dragon Ball Z - Supersonic Warriors (E) (M5).zip 28. Kingdom Hearts - Chain of Memories (J).zip 29. Mario & Luigi - Superstar Saga (E) (M5).zip 30. Metal Slug Advance (E).zip 31. Bleach Advance - Kurenai ni Somaru Soul Society (J).zip 32. One Piece Dragon Dream (J).zip 33. Mortal Kombat - Deadly Alliance (E) (M5).zip 34. Donkey Kong Country (E) (M5).zip 35. Pokemon - Version Rouge Feu (F).zip 36. Dragon Ball Z - Buu's Fury (U).zip 37. Kirby & the Amazing Mirror (E) (M5).zip 38. Sonic Advance 3 (U) (M6).zip 39. Yu-Gi-Oh! - Ultimate Masters Edition - World Championship Tournament 2006 (E) (M6).zip 40. Super Mario Advance 3 - Yoshi's Island (U).zip 41. Final Fantasy Tactics Advance (E) (M5).zip 42. Beyblade G-Revolution (U).zip 43. Pocket Monsters - Leaf Green (J).zip 44. Super Mario Advance 4 (J).zip 45. Kingdom Hearts - Chain of Memories (E) (M5).zip 46. Naruto - Ninja Council (U).zip 47. Dragon Ball Z - Supersonic Warriors (U).zip 49. Pokemon - Fire Red Version (E).zip 50. Classic NES Series - Super Mario Bros. (UE).zip 51. Classic NES Series - Legend of Zelda (UE).zip 52. Fire Emblem (UA).zip 53. Pokemon - Version Emeraude (F).zip 54. 007 - Everything or Nothing (J).zip 55. Need for Speed Underground 2 (UE) (M4).zip 56. Yu-Gi-Oh! - The Eternal Duelist Soul (U) [b].zip 57. Golden Sun (UE).zip 58. 2 Games in 1 - Spider-Man + Spider-Man 2 (E) (M3+M5).zip 59. Mario Kart Advance (J).zip 60. Megaman Zero (UE).zip 61. Medabots - Metabee Version (U).zip 62. Fire Emblem - The Sacred Stones (E) (M5).zip 63. Mario Party Advance (E) (M5).zip 64. Zelda no Densetsu - Fushigi no Boushi (J).zip 65. Metroid Fusion (E) (M5).zip 66. One Piece (U).zip 67. Wario Land 4 (UE).zip 68. Hoshi no Kirby - Kagami no Daimeikyuu (J) (v1.1).zip 69. Pokemon - Leaf Green Version (U).zip 70. Pokemon - Versione Smeraldo (I).zip 71. Megaman Battle Network 6 Cybeast Gregar (U).zip 72. FIFA 06 (UE) (M6).zip 73. Sims 2, The (UE) (M6).zip 74. Pocket Monsters - Fushigi no Dungeon Aka no Kyuujotai (J).zip 75. Advance Wars 2 - Black Hole Rising (E) (M5).zip 76. Pocket Monsters - Ruby (J).zip 77. Final Fantasy IV Advance (J).zip 78. Final Fantasy I & II - Dawn of Souls (E) (M5).zip 79. Dragon Quest Monsters - Caravan Heart (J).zip 80. Dragon Ball Z - The Legacy of Goku II (U).zip 81. Megaman Zero 4 (E).zip 82. Pokemon - Sapphire Version (E) (v1.1).zip 83. Mother 3 (J).zip 84. Crash Bandicoot Advance (J).zip 85. Final Fantasy IV Advance (E) (M5).zip 86. Mario Kart - Super Circuit (U).zip 87. Dragon Ball GT - Transformation (U).zip 88. Metroid - Zero Mission (E) (M5).zip 89. Pokemon - Versione Rosso Fuoco (I).zip 90. Pokemon - Edicion Rojo Fuego (S).zip 91. Yu-Gi-Oh! Worldwide Edition - Stairway to the Destined Duel (U) (M6).zip 92. Donkey Kong Country 3 (E) (M5).zip 93. Castlevania - Circle of the Moon (U).zip 94. Mario Tennis - Power Tour (UA) (M5).zip 95. Golden Sun - The Lost Age (UE).zip 96. Battle Network Rockman EXE 3 (J).zip 97. GameShark GBA (U) (v1.0) (Unl).zip 98. 2 Games in 1 - Yu-Gi-Oh! - Reshef of Destruction + Yu-Gi-Oh! - The Sacred Cards (U).zip 99. Sims, The - Bustin' Out (UE) (M6).zip 100. Pokemon Pinball - Ruby & Sapphire (U).zip Altres que poso: Mario Pinball Land Muppet Pinball MayhemMuppet Pinball Mayhem 1 Hardcore Pinball Pac-Man Pinball Advance Pinball Challenge Deluxe Pinball Of The Dead, The Pinball Tycoon Sonic Pinball Party Classic Nes Series - Bomberman Classic NES Series - Castlevania Classic Nes Series - Donkey Kong Classic NES Series - Dr. Mario Classic Nes Series - Excitebike Classic Nes Series - Ice Climber Classic NES Series - Metroid Classic Nes Series - Pac-Man Classic Nes Series - Xevious Classic NES Series - Zelda II - The Adventure Of Link Casper Dead To Rights Rugrats - Travesuras En El Castillo Super Puzzle Fighter II Turbo Chessmaster Calciobit Catwoman Hikaru No Go 2 Klonoa 2 - Dream Champ Tournament Wolfenstein 3d Game Boy Wars Advance 1+2 Samurai Deeper Kyo Backyard Football 2006 Dancing Sword - Senkou Megaman Battle Network 2 Lego Island - Xtreme Stunts Gunstar Super Heroes Megaman Battle Network 6 Cybeast Falzar Pink Panther - Pinkadelic Pursuit Tennis Masters Series 2003 Mobile Suit Gundam Seed - Battle Assault Hello Kitty - Happy Party Pals Lunar Legend Spyro 2 - Season Of Flame Sword Of Mana Lord Of The Rings, The - The Fellowship Of The Ring Dora The Explorer - Dora's World Adventure! Super Mario Advance Metal Slug Advance Sonic Advance
Els de Classic Nes Series no funcionen.
Molts dels jocs són textuals i els trobo avorrits. Es necessiten jocs amb acció. Per tant, s'ha de repassar aquests dos videos i extreure jocs interessants: The best 143 games (GBA):
Un cop tinc les roms executo convertir_roms_gba.sh. Les roms (format gba) es poden renombrar, o sigui que renombro manualment els caràcters especials que m'hagin quedat, etc.
Jocs
Finding Nemo
Cheats:
- Level 1 Password: IH5I - Level 2 Password: 2G5I - Level 3 Password: BGNI - Level 4 Password: MHPI - Level 5 Password: L2PI - Level 6 Password: 4XPI - Level 7 Password: 3N6J - Level 8 Password: MP3K - Level 9 Password: L67K - Level 10 Password: 45ZK - Level 11 Password: 3NGH - Level 12 Password: 4PHC
creat per Joan Quintana Compte, febrer 2015