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: 249
  • gdkGBA (v4).zip
    337.9 KB · Views: 327
  • 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: 393
  • gdkGBA (v7 with experimental graphics-patches).zip
    339.3 KB · Views: 413
  • gdkGBA (v7).zip
    338.1 KB · Views: 1,409
  • gdkGBA (v8 with experimental graphics-patches).zip
    342.1 KB · Views: 439
  • gdkGBA (v8).zip
    340.9 KB · Views: 1,045
  • 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,085
  • gdkGBA (v9 with experimental graphics-patches).zip
    347.3 KB · Views: 1,182
Last edited by jakibaki,

Bedel

The key of the blade
Member
Joined
Oct 28, 2015
Messages
1,384
Trophies
0
XP
2,831
Country
United States
I think so. I don't own an 4.1 switch so I can't try but I don't see any reason why it wouldn't.
It does. Also, playing KH:COM, I had an error message while the opening cutscene. It just crashed so hard lmao. Gj, I like it so much.
 

Leonidas87

Well-Known Member
Member
Joined
Jul 15, 2014
Messages
651
Trophies
0
Location
Toronto, Ontario
Website
www.youtube.com
XP
960
Country
Canada
This is a great day in the community.
FINALLY THE VIRTUAL CONSOLE WE ALL DESERVE!
We now have Arcade games, Game Boy Advance games, Game Boy Color games, Sega Gamegear/Genesis/CD games all running.
All running on 4.1.0, 5.0.2 or 4.X.X and 5.X.X software version of the Nintendo Switch.
Might not be 100% but we are off to an AMAZING START.
You never know what will be next.
GBA, GBC AND SEGA CD all in the video link below:


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

Crash again with Pokémon emerald. No problem, keep it up.
Maybe it's the roms you have.

Heard someone say Leaf does not run but does for me in the video you can see
 

jakibaki

Well-Known Member
OP
Member
Joined
Mar 3, 2017
Messages
296
Trophies
0
Age
25
XP
1,816
Country
Germany
One recommendation; or at least an option for it would be nice:
Non-filtered scaling.
I personally like my pixels sharp, rather than smooth.
As easy as this may sound (and as much as I'd want it too) this is not possible without a massive amount of lag right now :(
Everything is software-rendered right now and the only thing in this app that's hardware accelerated is the scaling (by setting the switches display-resolution which also results in the blur).
What you want would need about 8 times the amount of pixels rendered in one frame since the scaling would have to be done in software.
 
  • Like
Reactions: Leonidas87

SimonMKWii

Professional Idiot
Member
Joined
Nov 18, 2017
Messages
666
Trophies
0
Location
Melbourne, Victoria
XP
2,760
Country
Australia
As easy as this may sound (and as much as I'd want it too) this is not possible without a massive amount of lag right now :(
Everything is software-rendered right now and the only thing in this app that's hardware accelerated is the scaling (by setting the switches display-resolution which also results in the blur).
What you want would need about 8 times the amount of pixels rendered in one frame since the scaling would have to be done in software.
Ah, I gotcha!
Just out of interest, would it be possible to make a super-slow test build?
I just want to see what it would look like when scaled like that to the Switch screen, massive thanks if you can do that!
 

Sonicbrawler

Well-Known Member
Member
Joined
Sep 7, 2015
Messages
205
Trophies
0
Age
27
XP
457
Country
United States
Tried a Pokemon Fire Red rom hack but it crashed on me a few mins in. Might just be the rom itself. Either way, great work!! This is perfect to hold us over till RetroArch works!

EDIT: Oh hm. Sonic Advance 2 crashed also. interesting
 
Last edited by Sonicbrawler,
  • Like
Reactions: cagycee

renhei

Well-Known Member
Newcomer
Joined
Jun 21, 2016
Messages
64
Trophies
0
XP
282
Country
United States
So, I made a little improvement to the sound. Just a quick hack, doesn't fix everything. The music sounds fine, but gets crappy for a couple seconds when moving between areas, but then goes back to normal.

@jakibaki All I did was change SND_FREQUENCY in sound.h from 32768 to 48000, based on the sampling rate SDLPoP uses.

Here's a video:



Not perfect but hey, a lot better than before. :D

As to why it slows down between scenes, that might just be because of lag from rendering everything in software, but I dunno for sure.
 
Last edited by renhei,

jakibaki

Well-Known Member
OP
Member
Joined
Mar 3, 2017
Messages
296
Trophies
0
Age
25
XP
1,816
Country
Germany
So, I made a little improvement to the sound. Just a quick hack, doesn't fix everything. The music sounds fine, but gets crappy for a couple seconds when moving between areas, but then goes back to normal.

@jakibaki All I did was change SND_FREQUENCY in sound.h from 32768 to 48000, based on the sampling rate SDLPoP uses.

Here's a video:



Not perfect but hey, a lot better than before. :D I attached the executable with this change.

As to why it slows down between scenes, that might just be because of lag from rendering everything in software, but I dunno for sure.


Thank you very much! I'll push your change to the repo and release the new version in a few minutes!

EDIT: I pushed the update :)
 
Last edited by jakibaki,

Real.96

Well-Known Member
Member
Joined
Sep 14, 2015
Messages
1,055
Trophies
0
Age
27
XP
955
Country
Italy
I ported the gameboy advance emulator gdkGBA (originally made by gdkchan) to the nintendo switch! (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!

Really, thanks you so much for this and for GBC emu <3
 

Site & Scene News

Popular threads in this forum

General chit-chat
Help Users
  • RedColoredStars @ RedColoredStars:
    fuck elvis. lol :P
  • K3Nv2 @ K3Nv2:
    My type c cable is starting to die guess I better order one from my desk
  • RedColoredStars @ RedColoredStars:
    sounds like something Ween would play
    +1
  • ZeroT21 @ ZeroT21:
    And here I thought I was the only one that buy cables in bulk
  • RedColoredStars @ RedColoredStars:
    Nope. Theres two of you! Haha
  • K3Nv2 @ K3Nv2:
    They're so cheap now why not
  • K3Nv2 @ K3Nv2:
    I like the L angle connectors which add more force to it I guess which defeats the point
  • RedColoredStars @ RedColoredStars:
    i only buy new ones when theres a new standard and I have gear that uses it. Otherwise my cables seem to last forever.
  • SylverReZ @ SylverReZ:
    @RedColoredStars, Ween made a song about waving dicks in the wind.
    +1
  • RedColoredStars @ RedColoredStars:
    L angle cables are amazing when needed.
  • RedColoredStars @ RedColoredStars:
    @SylverReZ Yup. Been a longtime fan of Ween. Not a mega-fan by any means but I'm pretty familiar with most of their tunes.
    +1
  • K3Nv2 @ K3Nv2:
    You like the wee
    +1
  • ZeroT21 @ ZeroT21:
    I like electronics that use detachable cables, that way if the cable breaks you can just swap in a new one instead of replacing the whole unit
  • SylverReZ @ SylverReZ:
    @K3Nv2, Ween-er :creep:
  • RedColoredStars @ RedColoredStars:
    they make brown music. lol
    +1
  • K3Nv2 @ K3Nv2:
    Brown note
  • ZeroT21 @ ZeroT21:
    for keyboards, headphones or controllers ,it's a must have
  • K3Nv2 @ K3Nv2:
    Don't know why mice won't get with detachable type c
  • ZeroT21 @ ZeroT21:
    most battery operated mice don't even work anymore if the internal battery dies
  • RedColoredStars @ RedColoredStars:
    the L hdmi adapters work great on my tv and receiver. so much less stress on the ports using them than regular cables. in that instance anyway.
  • K3Nv2 @ K3Nv2:
    A bigger battery could defeat the need for weighted magnets tbf
  • ZeroT21 @ ZeroT21:
    Nowadays pc mice come as light as can be, liked mine with some heft
  • K3Nv2 @ K3Nv2:
    You like holding girth
  • SylverReZ @ SylverReZ:
    @RedColoredStars, I also listen to Beck, some of their songs are fine. Only found out about them through Windows Me; you know, that one operating system nobody ever likes?
    SylverReZ @ SylverReZ: @RedColoredStars, I also listen to Beck, some of their songs are fine. Only found out about them...