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: 500
  • 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: 441
  • gdkGBA (v8).zip
    340.9 KB · Views: 1,047
  • gdkGBA (v8.5 with experimental graphics-patches).zip
    347.4 KB · Views: 607
  • gdkGBA (v8.6 with experimental graphics patches).zip
    347.3 KB · Views: 399
  • gdkGBA (v9).zip
    340.9 KB · Views: 2,090
  • gdkGBA (v9 with experimental graphics-patches).zip
    347.3 KB · Views: 1,185
Last edited by jakibaki,

fune

New Member
Newbie
Joined
May 18, 2018
Messages
1
Trophies
0
Age
33
XP
58
Country
United States
Am i missing somthing? I have put the gdkGBA.nro in the /switch folder and the roms in the switch/roms/gba folder but when i launch homebrew channel i have no apps?

Hey I had the same problem. Took me a whole night to figure it out. Did you use a Mac to create those folders and move those files? Try doing the same thing in Windows (virtual machines are also fine). It seems like homebrew doesn't recognize folders created by macOS. Weird.
 

gdkchan

Well-Known Member
Member
Joined
Jul 8, 2015
Messages
181
Trophies
0
Age
26
XP
425
Country
Brazil
What a neat proof of concept! I got it to work with Fire Red, although after the tutorial normal battles slow down a LOT, so I can't really play this on here. The Minish Cap both (U) and (J) just kind of hang at the select menu, Super Mario Advance 4 just sort of hangs at the beginning, Harvest Moon FOMT has so much garbage on the screen constantly that I can't play it, same goes for Metroid Zero Mission, and the GBA port of Link to the Past just fills the screen with purple, making everything invisible.

Too bad I can't play any of the GBA games I like on this, but keep it up, I bet you can figure out how to get some of these working eventually. Your GBC port is really great!

Quick thing: I bet at least two of these are due to the limitation of not being able to save, would it be possible to completely eliminate that call in the code so it simply does nothing instead of crashing?
Metroid Zero Mission problem is due to the lack of alpha blending support. Harvest Moon problem is caused by the window not being implemented. I started a WIP implementation of both features on this branch: https://github.com/gdkchan/gdkGBA/tree/ppu. (If the port author wants to give it a try, idk how fast it would run on the switch, it may need some optimizations).

Zelda A Link to the Past complains about not being able to create the save. The other games seems to have problems with saves aswell. I will try to implement the remaining save memory types (flash and sram iirc) tomorrow.
 

jakibaki

Well-Known Member
OP
Member
Joined
Mar 3, 2017
Messages
296
Trophies
0
Age
26
XP
1,826
Country
Germany
Metroid Zero Mission problem is due to the lack of alpha blending support. Harvest Moon problem is caused by the window not being implemented. I started a WIP implementation of both features on this branch: https://github.com/gdkchan/gdkGBA/tree/ppu. (If the port author wants to give it a try, idk how fast it would run on the switch, it may need some optimizations).

Zelda A Link to the Past complains about not being able to create the save. The other games seems to have problems with saves aswell. I will try to implement the remaining save memory types (flash and sram iirc) tomorrow.
Many thanks for your work! :)

Harvest moon looks a whole lot better now and performance doesn't seem to be affected as far as I could tell!

I released an update containing your changes.
 
Last edited by jakibaki,
  • Like
Reactions: hippy dave

bluedart

Well-Known Member
Member
Joined
Nov 13, 2016
Messages
270
Trophies
0
XP
2,221
Country
United States
Hey, just tested out the newest build, and it does seem to function more properly than the last one. I got to test the LTTP port, and it seemed to run properly for the few minutes I was willing to put in. The other game I was able to test before I got a weird error that said I have to restart was zero mission. Both of these games actually got into the gameplay, which is not something that happened before. Unfortunately they were both going at 50% speed at best, and about 2 minutes in to zero mission I got the aforementioned error and I'm no longer willing to run the RCM exploit and try this again.

Clearly GBA emulation is something without our grasp for the time being; I'll just wait. Thanks for all your work and keep it up! Seriously, that GBC port is awesome!
 
D

Deletedmember448668

Guest
Unfortunately not having any luck with this emulator yet. Tried 5 games and a few minutes in always get a Switch error message and crash. I'm on 5.0.2
 

Giodude

GBAtemp's official rock
Member
Joined
May 17, 2015
Messages
5,094
Trophies
1
Age
23
Location
New York
XP
2,761
Country
United States
Does it work when switching from docked to handheld on the fly? Also on a side note is the issue where cfw constantly crashes the console fixed yet? Really want this for mother 3 on the go.
 
  • Like
Reactions: H1B1Esquire

Leonidas87

Well-Known Member
Member
Joined
Jul 15, 2014
Messages
651
Trophies
0
Location
Toronto, Ontario
Website
www.youtube.com
XP
960
Country
Canada
Does it work when switching from docked to handheld on the fly? Also on a side note is the issue where cfw constantly crashes the console fixed yet? Really want this for mother 3 on the go.
Docked can cause a crash needing a restart once onc in a will.

CFW Does not constantly crash the Switch it is the apps that are not optimized for 4.0.0 through 5.0.2

Just in a week we have had a lot of progress. I've barely had a crashing issue
 

Giodude

GBAtemp's official rock
Member
Joined
May 17, 2015
Messages
5,094
Trophies
1
Age
23
Location
New York
XP
2,761
Country
United States
Docked can cause a crash needing a restart once onc in a will.

CFW Does not constantly crash the Switch it is the apps that are not optimized for 4.0.0 through 5.0.2

Just in a week we have had a lot of progress. I've barely had a crashing issue
By crashing I mean how putting the console into sleep mode often puts the console directly into rcm mode.
 

Leonidas87

Well-Known Member
Member
Joined
Jul 15, 2014
Messages
651
Trophies
0
Location
Toronto, Ontario
Website
www.youtube.com
XP
960
Country
Canada
By crashing I mean how putting the console into sleep mode often puts the console directly into rcm mode.
Putting it to sleep is still a big yes.

You have to hold the power button for 10 to 15 seconds.

Hit the power button again it reboots.

Then you have to rcm mode and send payload back into cfw.

If you want to go back to normal use just reboot.

Bug may be fixed soon hopefully.

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

@jakibaki I'm trying to do something for quickly for the Emulator.

Nothing crazy just a nice little addition.

Again it's nothing crazy lol brb
 
  • Like
Reactions: Giodude

Leonidas87

Well-Known Member
Member
Joined
Jul 15, 2014
Messages
651
Trophies
0
Location
Toronto, Ontario
Website
www.youtube.com
XP
960
Country
Canada
20180518_101004.jpg
@jakibaki Let me know what you think.

I can send you a link to the .nor file with the changes so you can add it to the main build

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

20180518_101004.jpg
@jakibaki Let me know what you think.

I can send you a link to the .nor file with the changes so you can add it to the main build

GBC version on its way

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

20180518_101004.jpg
@jakibaki Let me know what you think.

I can send you a link to the .nor file with the changes so you can add it to the main build

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



GBC version on its way

Figured it adds that final touch to the emulator and makes it easier to find in the Homebrew menue
 

GoldenSun3DS

Well-Known Member
Member
Joined
Apr 27, 2013
Messages
272
Trophies
0
Age
29
XP
495
Country
United States
Why don't you port them?

I can't do better so I shouldn't judge? Do you care about how good your doctor is just because "I can't do better"?

But I wasn't even bashing the port. Just asking why they chose that emulator to port instead of a better one. Why do you get so defensive at the slightest criticism?

That'd be like me asking why you chose that cheese for your pizza and then you flipping out and saying "well why don't you make the pizza?!"
 
  • Like
Reactions: Samus20XX

Leonidas87

Well-Known Member
Member
Joined
Jul 15, 2014
Messages
651
Trophies
0
Location
Toronto, Ontario
Website
www.youtube.com
XP
960
Country
Canada
View attachment 123929 @jakibaki Let me know what you think.

I can send you a link to the .nor file with the changes so you can add it to the main build

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



GBC version on its way

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



Figured it adds that final touch to the emulator and makes it easier to find in the Homebrew menue

Oh shit I messed up haha need to fix that lmfao
 

Leonidas87

Well-Known Member
Member
Joined
Jul 15, 2014
Messages
651
Trophies
0
Location
Toronto, Ontario
Website
www.youtube.com
XP
960
Country
Canada

Am I able to update the OP with these?

Or are you only able to upload them for GBC and GBA?

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

Looks nice :) Feel free to submit a pull request and I'll merge it.

I've never done that before but I would be more then willing to learn how.

@jakibaki sent you a PM
 
Last edited by Leonidas87,

Site & Scene News

Popular threads in this forum

General chit-chat
Help Users
  • No one is chatting at the moment.
    Sonic Angel Knight @ Sonic Angel Knight: :ninja: