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: 504
  • gdkGBA v3 (experimental).zip
    340.2 KB · Views: 252
  • gdkGBA (v4).zip
    337.9 KB · Views: 331
  • gdkGBA (v5).zip
    337.9 KB · Views: 345
  • gdkGBA (v5 with experimental graphics-patches).zip
    339.1 KB · Views: 253
  • gdkGBA (v6 with experimental graphics-patches).zip
    338.9 KB · Views: 239
  • gdkGBA (v6).zip
    337.9 KB · Views: 397
  • gdkGBA (v7 with experimental graphics-patches).zip
    339.3 KB · Views: 417
  • gdkGBA (v7).zip
    338.1 KB · Views: 1,413
  • gdkGBA (v8 with experimental graphics-patches).zip
    342.1 KB · Views: 444
  • gdkGBA (v8).zip
    340.9 KB · Views: 1,049
  • gdkGBA (v8.5 with experimental graphics-patches).zip
    347.4 KB · Views: 609
  • gdkGBA (v8.6 with experimental graphics patches).zip
    347.3 KB · Views: 403
  • gdkGBA (v9).zip
    340.9 KB · Views: 2,099
  • gdkGBA (v9 with experimental graphics-patches).zip
    347.3 KB · Views: 1,188
Last edited by jakibaki,

Leonidas87

Well-Known Member
Member
Joined
Jul 15, 2014
Messages
651
Trophies
0
Location
Toronto, Ontario
Website
www.youtube.com
XP
960
Country
Canada
20180520_100823.jpg
@jakibaki are you aware that Dragon Ball Z The Legacy of Goku 1 and 2 along with Buus furi will not allow you to create a NEW game.

It MUST have to do with some implementations or key features missing to the ingame saving.

Is this something that is being looked into?

I started the same games and started a new game on android no problem at all. Exact same roms.

If this was fixed it would probably make saving and loading of saves a bit more reliable and allow for a lot more games to be played such as the ones mentioned above.
 
  • Like
Reactions: Madman55

jakibaki

Well-Known Member
OP
Member
Joined
Mar 3, 2017
Messages
296
Trophies
0
Age
26
XP
1,826
Country
Germany
View attachment 124189 @jakibaki are you aware that Dragon Ball Z The Legacy of Goku 1 and 2 along with Buus furi will not allow you to create a NEW game.

It MUST have to do with some implementations or key features missing to the ingame saving.

Is this something that is being looked into?

I started the same games and started a new game on android no problem at all. Exact same roms.

If this was fixed it would probably make saving and loading of saves a bit more reliable and allow for a lot more games to be played such as the ones mentioned above.

Thanks for the hint, I wasn't aware.
I can't promise anything though because this isn't something that I know how to fix :/ (I just ported the emulator).
 
  • Like
Reactions: Leonidas87

PRAGMA

Well-Known Member
Member
Joined
Dec 29, 2015
Messages
2,258
Trophies
1
Location
Ireland
Website
github.com
XP
5,041
Country
Ireland
Yeah ive a feeling the reason why some crashes, it could be related to saves, perhaps the emu is trying to access the SD or something to save, and cant or fails, and then panics?
 

jakibaki

Well-Known Member
OP
Member
Joined
Mar 3, 2017
Messages
296
Trophies
0
Age
26
XP
1,826
Country
Germany
Perhaps the emu is trying to access the SD or something to save, and cant or fails, and then panics?
That's really a possible cause for some crashes, thanks for the hint!
I didn't add any error-handling when opening the savegame for writing (right now the emulator just assumes that the file was opened successfully) so adding that may fix some crashes.

I'll push an update with error-handling added (and updated libnx) in a few minutes. I doubt that it's causing all of the crashes though since people have been experiencing those even before I added savegames.
 
  • Like
Reactions: Leonidas87

PRAGMA

Well-Known Member
Member
Joined
Dec 29, 2015
Messages
2,258
Trophies
1
Location
Ireland
Website
github.com
XP
5,041
Country
Ireland
That's really a possible cause for some crashes, thanks for the hint!
I didn't add any error-handling when opening the savegame for writing (right now the emulator just assumes that the file was opened successfully) so adding that may fix some crashes.

I'll push an update with error-handling added (and updated libnx) in a few minutes. I doubt that it's causing all of the crashes though since people have been experiencing those even before I added savegames.
Perhaps its not that area of code then, and perhaps its not to do with saves but something else to do with SD?
Also an updated libnx would help a ton here.
 

CaptainPumpkinhead

Member
Newcomer
Joined
May 5, 2018
Messages
7
Trophies
0
Age
25
XP
54
Country
United States
Is anyone else getting significantly more Switch crashes in docked mode than in handheld mode?
I was playing my games, and sometimes it would crash just randomly. But when I played in handheld, I had none of these problems.
I saw this issue with the GBC emulator as well.
 

JimmyK

Member
Newcomer
Joined
May 19, 2018
Messages
11
Trophies
0
Age
36
XP
80
Country
United States
That's really a possible cause for some crashes, thanks for the hint!
I didn't add any error-handling when opening the savegame for writing (right now the emulator just assumes that the file was opened successfully) so adding that may fix some crashes.

I'll push an update with error-handling added (and updated libnx) in a few minutes. I doubt that it's causing all of the crashes though since people have been experiencing those even before I added savegames.

How hard would it be to have the app create a text dump of the crash for better troubleshooting? At least for now. That way we can inspect and help with testing.
 
  • Like
Reactions: CaptainPumpkinhead

jakibaki

Well-Known Member
OP
Member
Joined
Mar 3, 2017
Messages
296
Trophies
0
Age
26
XP
1,826
Country
Germany
How hard would it be to have the app create a text dump of the crash for better troubleshooting? At least for now. That way we can inspect and help with testing.
Really hard :/ Right now the whole switch just crashes and afaik I can't do any error-handling at that point.
 

CaptainPumpkinhead

Member
Newcomer
Joined
May 5, 2018
Messages
7
Trophies
0
Age
25
XP
54
Country
United States
How hard would it be to have the app create a text dump of the crash for better troubleshooting? At least for now. That way we can inspect and help with testing.
Ooh, I'd like that. That'd be nice. Although, then we'd have to take out the SD each time to read the error dump. Maybe I can find a text reader homebrew app somewhere...
 

JimmyK

Member
Newcomer
Joined
May 19, 2018
Messages
11
Trophies
0
Age
36
XP
80
Country
United States
Really hard :/ Right now the whole switch just crashes and afaik I can't do any error-handling at that point.
Well that's a little downer. Well if you need anything just let me know. I haven't coded with c in a while mostly just bash and python lately but I can always look.
 

ownedlol

Well-Known Member
Member
Joined
May 19, 2018
Messages
121
Trophies
0
Age
25
XP
243
Country
United States
Strangely enough I can confirm that I haven't encountered a single crash in FireRed once I exited Mt. Moon, I've been farming for an Abra near route 24 and I've encountered 80+ mobs atleast, fought 5 trainers but not a single crash.

What would be causing it to crash in Mt. Moon but not on route 24?
 

PRAGMA

Well-Known Member
Member
Joined
Dec 29, 2015
Messages
2,258
Trophies
1
Location
Ireland
Website
github.com
XP
5,041
Country
Ireland
UPDATE8:
Updated libnx (again) and made a few small fixes. If you're experiencing fewer/more crashes please don't hesitate to tell me :)


Thanks again to @ShinyMK for the file-hint.
Just so you know, I literally NEVER crashed. But nice you have a new fix of something going out.

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

Just me, or is the quality a fuck ton sharper when you press home menu? Especially noticable on Pokemon. Same happens on GBC. Perhaps we can do something about that?
 
  • Like
Reactions: jakibaki

jakibaki

Well-Known Member
OP
Member
Joined
Mar 3, 2017
Messages
296
Trophies
0
Age
26
XP
1,826
Country
Germany
Just so you know, I literally NEVER crashed. But nice you have a new fix of something going out.
I used to have crashes every now and then in earlier version but now that I 'need' them I can't seem to get them :D

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

Just me, or is the quality a fuck ton sharper when you press home menu? Especially noticable on Pokemon. Same happens on GBC. Perhaps we can do something about that?
I think that's just that while it's running the display-resolution is much lower then normally (to get hardware-accelerated scaling) but when pressing the home-button you just see an updscaled "screenshot" of the low-res-picture (in the hi-res of the home-menu) which was then upscaled by the os.
 
Last edited by jakibaki,

KuraudoSutoraifu

Well-Known Member
Member
Joined
May 6, 2016
Messages
138
Trophies
0
XP
415
Country
Germany
I know I asked this before, but would it be possible to turn screen smoothing off (if it is even applied? The image is a bit blurry, that's why I think it is?)
 

PRAGMA

Well-Known Member
Member
Joined
Dec 29, 2015
Messages
2,258
Trophies
1
Location
Ireland
Website
github.com
XP
5,041
Country
Ireland
Not sure if you realized, but you havent been updating the .nro's internal version, kinda frustrating as I have both v7 and v8 and its hard to tell between the two.
 

Site & Scene News

Popular threads in this forum

General chit-chat
Help Users
    Xdqwerty @ Xdqwerty: yawn