GameBoy Advance Emulator port - gdkGBA (works on 5.0)

With the release of vba this emulator is now officially discontinued!

Many many thanks to everyone that helped! :)



I ported the gameboy advance emulator gdkGBA (originally made by gdkchan) to the nintendo switch! (Works on all versions as far as I know)

A0pc3wc.jpg


uMoaxJb.jpg


To set up I strongly recommend putting the original gba_bios.bin in sd:/switch/gba_bios.bin!
After that put the roms into sd:/switch/roms/ and start the homebrew.

As soon as retroarch gets updated for 5.0 this will instantly become obsolete!

source (you need the sdl2-libraries from the devkit-pro pacman to build this)

Known issues:
Sound is a bit weird (it seems like sometimes the wrong instruments play)
Some games seem to crash the switch after a while. (mostly fixed in v8)
Sometimes the switch likes to crash even in games that normally run pretty stable :/ (fixed in v8 I think)
Some games have graphical glitches/don't work at all
Saving doesn't work on some games. If that happens please don't hesitate to tell me and for now you can set (buggy) savestates using plus+r and load them using plus+l.

Please update to the latest version before reporting Problems!

Game compatibility list

UPDATE:
Sound now much better now! Many thanks to @renhei for the fix!
UPDATE2:
Changed rompath from sd:/switch/roms to sd:/switch/roms/gba in order to avoid confusion with the gbc emulator. Also double joycons now work in unattached mode!
UPDATE3:
Merged gdkchans changes to the ppu. Some games that had problems with artifacts on screen (I tried harvest moon) now look much better! However this is apparently causing trouble in some games so I also attached v2.
UPDATE4:
Added proper in-gaming-saving support! The old buggy savestate-feature is now read-only (so that you can move your progress to the new save-files). I recommend removing the old .savegame-file after making sure the new, better in-game-saving works correctly in order to make sure that you don't accidentally load it :)
Many thanks to @gdkchan for fixing some underlying issues with the in-game-saves of this emulator!
Also I added support for the original gba_bios.bin:
If you want to use it (which I strongly recommend since the open-source-one that's bundled is causing trouble with some games) put it into sd:/switch/gba_bios.bin
UPDATE5:
In game saving should now actually work in most games! Many thanks to @gdkchan for explaining to me how the gba handles saves!
UPDATE6:
Recompiled everything with latest libnx. Hopefully fewer crashes now.
UPDATE7:
Savestate feature is back. Please only use if the savegames fail as it is known to sometimes cause issues!
UPDATE8:
Updated libnx (again) and made a few small fixes. If you're experiencing fewer/more crashes please don't hesitate to tell me :)
UPDATE8.5 (Experimental only):
Pushed the new graphics-fixes from @gdkchan. Please only use them if you're experiencing graphical glitches since they introduce a large slowdown in some games.
UPDATE8.6 (Experimental only):
Pushed @gdkchans new fixes+optimisations. The experimental version should now run a bit faster!
UPDATE9:
Saving should now be more reliable again (makes the save-feature work as it did in v7 again).
 

Attachments

  • gdkGBA (v2).zip
    338.9 KB · Views: 498
  • gdkGBA v3 (experimental).zip
    340.2 KB · Views: 250
  • gdkGBA (v4).zip
    337.9 KB · Views: 328
  • gdkGBA (v5).zip
    337.9 KB · Views: 341
  • gdkGBA (v5 with experimental graphics-patches).zip
    339.1 KB · Views: 249
  • gdkGBA (v6 with experimental graphics-patches).zip
    338.9 KB · Views: 237
  • gdkGBA (v6).zip
    337.9 KB · Views: 394
  • gdkGBA (v7 with experimental graphics-patches).zip
    339.3 KB · Views: 414
  • gdkGBA (v7).zip
    338.1 KB · Views: 1,410
  • gdkGBA (v8 with experimental graphics-patches).zip
    342.1 KB · Views: 440
  • gdkGBA (v8).zip
    340.9 KB · Views: 1,046
  • gdkGBA (v8.5 with experimental graphics-patches).zip
    347.4 KB · Views: 606
  • gdkGBA (v8.6 with experimental graphics patches).zip
    347.3 KB · Views: 398
  • gdkGBA (v9).zip
    340.9 KB · Views: 2,087
  • gdkGBA (v9 with experimental graphics-patches).zip
    347.3 KB · Views: 1,183
Last edited by jakibaki,

chronoss

Well-Known Member
Member
Joined
May 26, 2015
Messages
3,007
Trophies
1
XP
4,896
Country
Congo, Republic of the
Mine says: Can't find dir!

What's the problem? i inserted roms into switch dir, and then roms dir

--------------------- MERGED ---------------------------

Technically is: Failed to open dir!
patch of rom : sd:/switch/roms/gba

--------------------- MERGED ---------------------------

Put it in a "gba" folder inside of roms
This doesn't work :(
 
  • Like
Reactions: OkazakiTheOtaku

OblivionReign

Developer
Developer
Joined
Apr 23, 2016
Messages
2,544
Trophies
2
XP
7,730
Country
Japan
I ported the gameboy advance emulator gdkGBA (originally made by gdkchan) to the nintendo switch! (Works on all versions as far as I know)

A0pc3wc.jpg


uMoaxJb.jpg


Unfortunately this emulator doesn't support in-game-saving (it crashes when you attempt to save!) so I added an savestate feature:
Press Plus+R so save the current state and Plus+L to load it again.

Simply put the rom into sd:/switch/roms/ and start the homebrew.

As soon as retroarch gets updated for 5.0 this will instantly become obsolete!

source (you need the sdl2-libraries from the devkit-pro pacman to build this)

Known issues:
Sound is a bit weird (it seems like sometimes the wrong instruments play)
After loading a savestate the sound gets even more weird for a while (or until the music changes)
Some games seem to crash the switch after a while.

UPDATE:
Sound now much better now! Many thanks to @renhei for the fix!
UPDATE2:
Changed rompath from sd:/switch/roms to sd:/switch/roms/gba in order to avoid confusion with the gbc emulator. Also double joycons now work in unattached mode!
UPDATE3:
Merged gdkchans changes to the ppu. Some games that had problems with artifacts on screen (I tried harvest moon) now look much better! However this is apparently causing trouble in some games so I also attached v2.
I will just say that minish cap on gba doesnt work ita all glitched out on file select and doesnt let you start
 

OkazakiTheOtaku

no thanks, I don't want a custom title
Member
Joined
Jul 20, 2016
Messages
1,461
Trophies
1
Location
127.0.0.1
XP
3,114
Country
Japan
I'm 1000% percent sure my roms are in the right directory but I'm still getting the "Failed to open dir!" message on both emulators. I was using update 6 successfully but now I can't rollback because the download from before the directory split is gone :(
just quadruple-checked, yep they're in the right spot. Still not working. Oh well, I'll wait for an update.
 
Last edited by OkazakiTheOtaku,
  • Like
Reactions: SugoiEndeavor

jakibaki

Well-Known Member
OP
Member
Joined
Mar 3, 2017
Messages
296
Trophies
0
Age
26
XP
1,826
Country
Germany
UPDATE4:
Added proper in-gaming-saving support! The old buggy savestate-feature is now read-only (so that you can move your progress to the new save-files). I recommend removing the old .savegame-file after making sure the new, better in-game-saving works correctly in order to make sure that you don't accidentally load it :)
Many thanks to @gdkchan for fixing some underlying issues with the in-game-saves of this emulator!
Also I added support for the original gba_bios.bin:
If you want to use it (which I strongly recommend since the open-source-one that's bundled is causing trouble with some games) put it into sd:/switch/gba_bios.bin

This update doesn't have the graphics-fixes from v3 applied since they've caused trouble with some games

--------------------- MERGED ---------------------------

I'm 1000% percent sure my roms are in the right directory but I'm still getting the "Failed to open dir!" message on both emulators. I was using update 6 successfully but now I can't rollback because the download from before the directory split is gone :(
just quadruple-checked, yep they're in the right spot. Still not working. Oh well, I'll wait for an update.
Try deleting the folder and then creating it again using ftpd on your switch. For some reason sometimes the switch sometimes doesn't correctly detect folders on sdcards if they were created somewhere else.
 

gdkchan

Well-Known Member
Member
Joined
Jul 8, 2015
Messages
181
Trophies
0
Age
26
XP
425
Country
Brazil
This update doesn't have the graphics-fixes from v3 applied since they've caused trouble with some games
I think the Pokémon issue was related to save states as the other user noted (peharps because a few register aren't/wasn't being saved?). I wonder if it happens on a fresh run of the game without save state loading.
 

JJTapia19

I fight for my friends.
Member
Joined
May 31, 2015
Messages
2,171
Trophies
1
Age
32
XP
2,438
Country
Puerto Rico
Just tested the newest update and the in game saving is not working for me for some reason. I tried Zelda minish cap and Wario land 4.:unsure:
 

Twistedziefer

Well-Known Member
Member
Joined
May 18, 2018
Messages
197
Trophies
0
Age
35
Location
Los Angeles
XP
418
Country
United States
Hey thanks for the update works alot better breath of fire now works :D link to the past has a purple screen but when u save and reload it works but once you head out in the rain you cant see anything lol
 

gdkchan

Well-Known Member
Member
Joined
Jul 8, 2015
Messages
181
Trophies
0
Age
26
XP
425
Country
Brazil
Hey thanks for the update works alot better breath of fire now works :D link to the past has a purple screen but when u save and reload it works but once you head out in the rain you cant see anything lol
Hmm this game needs the ppu fixes (that were removed on the latest update), since it uses alpha blending for the rain and purple fade effect.

:( I'll look into it tomorrow if I have the time.
I took a look on the code. It seems you only saved the flash save memory. Games can actually have one of the 3 memory types for storing save data: SRAM, EEPROM or Flash. Which one it uses depends on the game, and theres no way the emulator can know the type beforehand (some emulators have options to manually set the save type). What most emulators does (including gdkGBA) is detecting the type the game uses heuristically. On gdkGBA this is stored on some bools inside arm_mem.c, if "eeprom_used" is true then the game is storing save data on the "eeprom" memory, if "flash_used" is true then it is being stored on the "flash" memory, if both are false then the game is using "sram". SRAM also has the disadvantage of being volatile, so its needs a battery to keep the save data. afaik Zelda Minish Cap uses eeprom, and wario land 4 uses sram.
 
Last edited by gdkchan,
  • Like
Reactions: Real.96

JJTapia19

I fight for my friends.
Member
Joined
May 31, 2015
Messages
2,171
Trophies
1
Age
32
XP
2,438
Country
Puerto Rico
:( I'll look into it tomorrow if I have the time.
No rush! I'll stick with v2 in the meantime playing Wario Land 4. I love that game and I wanted to play it on the switch since I got it on day one. Thanks again for making that possible. Thank you too @gdkchan for the original emulator. I can't thank you both enough. :gba:
 
Last edited by JJTapia19,

jakibaki

Well-Known Member
OP
Member
Joined
Mar 3, 2017
Messages
296
Trophies
0
Age
26
XP
1,826
Country
Germany
Hmm this game needs the ppu fixes (that were removed on the latest update), since it uses alpha blending for the rain and purple fade effect.


I took a look on the code. It seems you only saved the flash save memory. Games can actually have one of the 3 memory types for storing save data: SRAM, EEPROM or Flash. Which one it uses depends on the game, and theres no way the emulator can know the type beforehand (some emulators have options to manually set the save type). What most emulators does (including gdkGBA) is detecting the type the game uses heuristically. On gdkGBA this is stored on some bools inside arm_mem.c, if "eeprom_used" is true then the game is storing save data on the "eeprom" memory, if "flash_used" is true then it is being stored on the "flash" memory, if both are false then the game is using "sram". SRAM also has the disadvantage of being volatile, so its needs a battery to keep the save data. afaik Zelda Minish Cap uses eeprom, and wario land 4 uses sram.
Ah, alright. Thanks for the clarification!
 
Last edited by jakibaki,
  • Like
Reactions: Real.96
D

Deletedmember448668

Guest
I ported the gameboy advance emulator gdkGBA (originally made by gdkchan) to the nintendo switch! (Works on all versions as far as I know)
UPDATE4:
Added proper in-gaming-saving support! The old buggy savestate-feature is now read-only (so that you can move your progress to the new save-files). I recommend removing the old .savegame-file after making sure the new, better in-game-saving works correctly in order to make sure that you don't accidentally load it :)
Many thanks to @gdkchan for fixing some underlying issues with the in-game-saves of this emulator!

Hmm, I tried in-game save on 4 games so far, none of them work. Getting similar messages to this one? Am I doing something wrong here?:

MVIMG_20180518_201140.jpg
 

Site & Scene News

Popular threads in this forum

General chit-chat
Help Users
  • No one is chatting at the moment.
    BakerMan @ BakerMan: @salazarcosplay yeah cod's still up