New melonDS feature: GBA connectivity
Hi everyone, I'm a new contributor to melonDS, Chagall on IRC and rzumer on GitHub. Being a fan of the melonDS project, I wanted to contribute something to it, and my most wanted missing feature being GBA connectivity, I spent a few weeks on and off implementing it.

This feature is mostly used in DS games to grant bonuses to players who own specific GBA titles. For example, inserting a GBA Ace Attorney game and launching the DS version will unlock all cases in the remake. Some games go further and read/write save data from/to the GBA cartridge (as in Pokémon games), or in one case polls its I/O port (Lunar Knights/Boktai DS).

All these features are now integrated in the master branch of the melonDS git repository. As far as I'm aware, this makes melonDS the first emulator to support solar sensor emulation in Lunar Knights. The video below demonstrates using the Solar Sensor item in Boktai DS with Bokura no Taiyou in the GBA slot.



Of course, you can also send your pocket monsters from GBA to DS, as demonstrated in this video:



As on real hardware, the GBA save file is modified during migration as the Pokémon are moved to the DS game:



Thanks to endrift of mGBA for the solar sensor emulation code that I used as a primary reference, and to DeSmuME authors for the GBA cartridge Flash save read/write logic that helped a lot with supporting the Pokémon games. Martin Korth's GBATEK document was also a great general reference.

For those curious to try this new feature as soon as possible, another bit of news is the addition of continuous integration to the melonDS git repository, which generates binaries for Windows and Linux from the master branch. If you have a GitHub account, head over to the Workflows page, select the newest build for your platform, and download the artifact shown on the page. We don't have a way to provide the latest build to users who are not logged into GitHub yet, but the latest build for Windows at this time is available here.

To load a GBA title, either drag and drop a .gba file over melonDS, use the "Open ROM..." menu and select the "GBA ROM" file type, or, if you happen to use the command-line interface, add the path to the GBA ROM file as an extra argument following that of the DS one. Note that if the DS is on while a GBA cartridge is inserted, it will usually not be recognized in-game (as on real hardware). Either load the GBA cartridge before booting the system, or reset afterwards.

Solar sensor level is bound by default to the left (4) and right (6) keypad arrow keys, but can be rebound in the settings. Note that it is only active while a valid Boktai cartridge is inserted.

I hope everyone enjoys this new feature. melonDS is moving forwards at a good pace, so it's a great time to get involved if you are interested in improving DS emulation.
Arisotura says:
Jan 28th 2020
noticing a trend among melonDS contributors to have multiple different usernames

other than that, your local Melon Chocolatier approves of this post
They says:
Jan 29th 2020
Good news, waiting for a release. Can i ask to add one little thing, a list of recent roms.
Wifall says:
Jan 29th 2020
The link leading to workflow is broken.
Chagall says:
Jan 29th 2020
Wifall: unfortunately workflows only seem to be visible to logged in users. <a href="https://github.com/Arisotura/melonDS/suites/425220245/artifacts/1402265">Here</a> is a link to the latest master build. We'll see if we can make artifacts more easily available to people without GitHub accounts in the future.
Peduls says:
Jan 29th 2020
Here's hoping the next update has an interface for editing firmware settings and MAC address! Then I can finally dump DeSmuME for good!
fintyogive says:
Jan 29th 2020
it just keeps getting better and better :P once cheat support id added bye bye desmume. keep up the fantastic work girls and guys!
Sorer says:
Jan 29th 2020
there is a python script here to get the latest artifact URL from GitHub Actions if you are interested:
https://github.com/JayFoxRox/GitHub-artifact-URL
Maybe it could be implemented.
Bed says:
Jan 29th 2020
That is so cool! Will real hardware work too?
Arisotura says:
Jan 29th 2020
forgot to tell you Chagall, HTML doesn't work in comments. you can use regular BBCode tho.
AsPika2219 says:
Jan 29th 2020
Thanks for adding GBA slot! 😊
A dragon says:
Jan 30th 2020
So what does this mean for the rumble cartridge?
anon says:
Jan 30th 2020
How does impact the emulation accuracy?
anon says:
Jan 30th 2020
Is dual-slot mode in Pokémon DPPt supported? Note that I'm not asking about Pal Park.
NM64 says:
Jan 31st 2020
I'm totally late on this, and this is about an older blogpost, but I just wanted to point out that the DS officially supported expanding the RAM via the GBA slot as this was used by the Opera Browser - it not only came with a normal DS game card, but a 4MB ram expansion in the form of a GBA cart.

Also there were several GBA-slot homebrew devices that included 32MB of RAM (such as the M3 Perfect Lite).
MelonMan says:
Jan 31st 2020
Does this mean that MelonDS is also a GBA emulator?
Post a comment
Name:
DO NOT TOUCH