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: 493
  • gdkGBA v3 (experimental).zip
    340.2 KB · Views: 246
  • gdkGBA (v4).zip
    337.9 KB · Views: 325
  • gdkGBA (v5).zip
    337.9 KB · Views: 338
  • gdkGBA (v5 with experimental graphics-patches).zip
    339.1 KB · Views: 246
  • gdkGBA (v6 with experimental graphics-patches).zip
    338.9 KB · Views: 235
  • gdkGBA (v6).zip
    337.9 KB · Views: 389
  • gdkGBA (v7 with experimental graphics-patches).zip
    339.3 KB · Views: 411
  • gdkGBA (v7).zip
    338.1 KB · Views: 1,406
  • gdkGBA (v8 with experimental graphics-patches).zip
    342.1 KB · Views: 437
  • gdkGBA (v8).zip
    340.9 KB · Views: 1,042
  • gdkGBA (v8.5 with experimental graphics-patches).zip
    347.4 KB · Views: 599
  • gdkGBA (v8.6 with experimental graphics patches).zip
    347.3 KB · Views: 396
  • gdkGBA (v9).zip
    340.9 KB · Views: 2,077
  • gdkGBA (v9 with experimental graphics-patches).zip
    347.3 KB · Views: 1,177
Last edited by jakibaki,

Bedel

The key of the blade
Member
Joined
Oct 28, 2015
Messages
1,384
Trophies
0
XP
2,815
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
  • No one is chatting at the moment.
  • Veho @ Veho:
    Mkay.
  • Veho @ Veho:
    I just ordered another package from China just to spite you.
  • SylverReZ @ SylverReZ:
    Communism lol
  • SylverReZ @ SylverReZ:
    OUR products
  • The Real Jdbye @ The Real Jdbye:
    @LeoTCK actually good quality products are dying out because they can't compete with dropshipped chinese crap
    +2
  • BakerMan @ BakerMan:
    @LeoTCK is your partner the sascrotch or smth?
  • Xdqwerty @ Xdqwerty:
    Good morning
  • Xdqwerty @ Xdqwerty:
    Out of nowhere I got several scars on my forearm and part of my arm and it really itches.
  • AdRoz78 @ AdRoz78:
    Hey, I bought a modchip today and it says "New 2040plus" in the top left corner. Is this a legit chip or was I scammed?
  • Veho @ Veho:
    @AdRoz78 start a thread and post a photo of the chip.
    +2
  • Xdqwerty @ Xdqwerty:
    Yawn
  • S @ salazarcosplay:
    and good morning everyone
    +1
  • K3Nv2 @ K3Nv2:
    @BakerMan, his partner is Luke
  • Sicklyboy @ Sicklyboy:
    Sup nerds
    +1
  • Flame @ Flame:
    oh hi, Sickly
  • K3Nv2 @ K3Nv2:
    Oh hi flame
  • S @ salazarcosplay:
    @K3Nv2 what was your ps4 situation
  • S @ salazarcosplay:
    did you always have a ps4 you never updated
  • S @ salazarcosplay:
    or were you able to get new ps4 tracking it \
    as soon as the hack was announced
  • S @ salazarcosplay:
    or did you have to find a used one with the lower firm ware that was not updated
  • K3Nv2 @ K3Nv2:
    I got this ps4 at launch and never updated since 9.0
  • K3Nv2 @ K3Nv2:
    You got a good chance of buying a used one and asking the seller how often they used or even ask for a Pic of fw and telling them not to update
    K3Nv2 @ K3Nv2: You got a good chance of buying a used one and asking the seller how often they used or even ask...