melonDS aims at providing fast and accurate Nintendo DS emulation. While it is still a work in progress, it has a pretty solid set of features:

• Nearly complete core (CPU, video, audio, ...)
• JIT recompiler for fast emulation
• OpenGL renderer, 3D upscaling
• RTC, microphone, lid close/open
• Joystick support
• Savestates
• Various display position/sizing/rotation modes
• (WIP) Wifi: local multiplayer, online connectivity
• (WIP) DSi emulation
• DLDI
• (WIP) GBA slot add-ons
• and more are planned!







Download melonDS

If you're running into trouble: Howto/FAQ
Technical issues #2
You might have noticed the lack of Windows builds on the nightlies page.

Sorry about it. The Windows CI is broken. Our CI expert Nadia has been on it for a while, so hopefully it should be back up again... someday.


On the flip side, the little loser stopped trying to take the server down, so that's atleast one positive.
Technical issues
It appears that in the past days there have been resource usage spikes on our server. So either someone is trying to DDoS us, or the AI garbage bots are hitting our site.

I'm going to come up with a response to this, but in the meantime, there may be technical issues (like earlier, MySQL was down for some reason). Sorry about it.

Edit- we should be mostly good now. I thought it was AI slop taking us down, but it turned out to be a little moron spamming the board's search system with absurdly long queries. So yeah, problem solved.
Small DLDI fix, and maybe more
Mental health still complicated. Getting somewhat better...

I made a more personal blog, to post about other fun projects of mine (including the WiiU gamepad stuff) and other fun shit. If you're interested, it's here: https://arisotura.dreamwidth.org/


Anyway, I committed a fix to melonDS. May not seem like a lot, but after months of not touching the code at all, it's something.

Just today, I heard about a DLDI test program failing on melonDS, which piqued my interest.



I'd have thought DLDI was a solved problem, so this was interesting. What's going on there?


DLDI is a standard interface that was developed to allow clean support for different DS linkers. Since they all have different hardware interfaces and different ways to access their storage medium (CF or SD card), homebrew apps would need to embed drivers for each linker they intended to support, which would be quite a mess.

Instead, the homebrew itself only includes a DLDI stub, with a simple header and dummy functions. The linker's loader then patches the homebrew with its own DLDI driver when loading it: the DLDI stub is replaced with the linker's driver, which contains the adequate code for accessing the linker's storage medium. The driver contains some simple functions, like "initialize", "is the card inserted", "read sectors", "write sectors", etc.

melonDS implements DLDI in a similar way.

... read more
melonDS RC bugs
The RC has lasted quite long, heh...

It seems that a recurring problem with it is that multiple windows don't work with OpenGL. The issue is that it seems to be a Windows problem -- I tested it on Fedora and it works fine (although there is another weird bug related to hiDPI scaling).

If you've paid attention to the window decorations on my screenshots, you've prolly seen it -- the last Windows I've been willing to use was Windows 7, but I use Linux now...

The aforementioned OpenGL issue is likely related to context sharing, so hopefully not a complex issue. I'd just need to install recent Windows in a VM of sorts, or have someone else do the testing and fixing.

I guess that's also why I'm less motivated by melonDS these days... my brain is all about the intellectual stimulation and challenge. I guess a lot of emudevs are like me too, it's more fun to go after emulation bugs or reverse-engineer hardware :P

We'll come up with a fix, though.

We always do.
Little news...
Thank you all for the kind messages, it means a lot to me.

Things are still rough for me. On one hand, I'm dealing with old personal issues that I have never really addressed properly. On the other hand, I have been feeling very pessimistic about the state of the world and the future for years now, so that doesn't help. There's also surgery recovery playing into this, but that should hopefully get better with time. Anyway, I'm going to try a new type of therapy, since previous attempts haven't really helped.

As far as melonDS is concerned, there won't be much news from me for a while. I think I need a break from it. Sometimes it just feels good to focus on something else.

I could talk a bit more about the Wii U gamepad stuff, though. For now, I mainly post in threads at GBAtemp and nesdev, but I could make a kind of blog for it. I don't know... I intended to make a blog of that kind for it and other personal projects, but, you know, ADHD.

Anyway. The Wii U gamepad.

As you might already know, that gamepad is a nifty little tablet with its own processing power. It runs off an ARM9 CPU clocked at 108 MHz, with 4 megabytes of RAM. Okay, it's less powerful than the DSi, but there's something about running custom software on it that I like. It scratches a very particular kind of itch for me.

It's actually a little project I had started back in 2016, around the same time melonDS was born. Which resulted in some files for this project having melon-themed names too. Heh. Anyway, I was able to run some custom code on the gamepad, but couldn't do much beyond toggling the rumble motor -- the gamepad version of your typical 'blink a LED' embedded hello-world program, I guess. Lacking hardware documentation and proper means to upload and debug gamepad code, I was fumbling in the dark, and didn't get much done. I had made another attempt in 2022, but it also went nowhere.

Last year, I went for it again, but used a FPGA to replace the gamepad's SPI FLASH memory. In a more detailed post, I could go in details about how this was done and the clever tricks it uses, but long story short, this not only lets me easily upload code to the gamepad, but it also serves as a handy debug output.

This checkerboard pattern may not seem impressive, but it took a bunch of trial and error to get this to show up at all on the gamepad screen. This isn't the DS where the screens kinda Just Work(tm) and you can display basic stuff with some simple initialization. The gamepad requires you to initialize the LCD and video hardware before anything will be displayed.

... read more
Sorry.
I am completely burnt out.

Haven't touched melonDS in forever. Even with gamepad stuff, I'm slow.

My mental health is terrible.

Don't expect much news from me for a long while. As far as the proper 1.0 release is concerned... I don't know.

Sorry.
Opening the nightly builds section, finally!
As title says, the nightly builds section is finally open, and you can access it from the downloads page.

I realized there was some missing information that was good to have (like, uh, the commit messages), so I added that into the system. Hopefully I didn't break it again :P

Other than that, sorry for the lack of updates these days. Surgery recovery plus regular winter tiredness make for an... interesting combo. I'm also caught into the WiiU gamepad stuff, so melonDS isn't seeing a lot of updates lately. We definitely have a little backlog of issues that we ought to fix before a proper 1.0 release though -- we'll get there.

There's also more revamping that needs to be done to this site, like finally updating the screenshot gallery, or adding some uploader support for us.

So much to do, so little time... (and so much ADHD)


Regardless, enjoy the nightly builds. Keep in mind that these builds are bleeding-edge and experimental, so things may not be as polished as release builds, and you may run into issues.
Lil' status update
I've had surgery a couple weeks ago, as I mentioned. It went very well and I'm recovering quickly, so all is good on this front. Thank you all for your kind messages, it means a lot!

I also wanted to open up the nightly builds section, but I ran into a little issue. Basically, I made the database field for artifact IDs a regular integer, but Github's artifact IDs eventually became greater than 2147483647, which is the highest value a 32-bit signed integer can represent. Due to this, the commits since November were stored without their associated artifacts (the nightly builds).

I fixed the database structure. Now I will see if I can run a script to download the missing artifacts. Otherwise, further commits should have their artifacts downloaded correctly.

Once all that is sorted out, I will open up the nightly builds section.
melonDS 1.0 RC, there it is!
We have finally released a brand new version of melonDS: 1.0 RC.

A bit of a disclaimer about this unusual version number: due to the large number of changes since 0.9.5, this version is a Release Candidate. We have done a thorough round of testing and bugfixing, but there is always the chance that further issues went unnoticed. This release will be the occasion to catch them and fix them for the actual, proper 1.0 release.

Now, the biggest changes this release brings:


Core refactor

This is the biggest change by far. We have undertaken a large and ambitious refactor of the melonDS core, in order to make it possible to run multiple instances of the emulator within one single process.

What does this change mean for end users? It means that local multiplayer is easier to deal with, since we no longer have to deal with inter-process communication. It also means that depending on your platform, local multiplayer may be more performant now.

However, much like in 0.9.5, this multiplayer mode only works when running multiple instances on the same computer. But we have another ace up our sleeve, which we'll see next.

It's also worth noting that this refactor was partly motivated by the idea of adding netplay support. While I haven't been able to get netplay working yet, the refactor has laid a very important foundation for it. We'll get there, eventually!


LAN support

... read more
Happy birthday melonDS
melonDS is 8 years old now. Thus, here's the appropriately colored logo for this event:



We have to a point where, well... You guess it, it's been two years since the last proper release.

melonDS has become quite a large and complex project, with many moving parts. I compare an emulator project to a tree: when you're done with the trunk, it branches off in a billion directions. That's pretty much it.

We have been through a pretty big refactor of the codebase, and that comes with its lot of issues, doubts, and so on. Was the refactor a mistake? What could we do better?

One of the major selling points was the development of netplay. Unfortunately, that's not the first time I have big ideas, big ambitions, but fail to concretize them. That's ADHD for you.

In a way, I'm also afraid of netplay. It feels like a bit of a Pandora box. I mean, it has potential for being a very cool feature, but also for being an endless source of issues. Dealing with the wifi connection issues for so long has given me a glimpse of it already. As a matter of fact, solving interesting problems is something I'm good at, but user support is not. I've had a bit of a similar experience at my last job, too.

Regardless, I still consider melonDS to be a great success.

I might try netplay later if I feel like it, but for now, I'm burnt out on that stuff.

... read more