Home | Downloads | Screenshots | Forums | Source code | RSS | Donate |
Register | Log in |
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 |
Pages:1234567···21 |
Some news... Aug 30th 2024, by Arisotura |
Uninspired title huh. Anyway, thank you all for your kind comments, it means a lot! I haven't been working much on melonDS lately, mostly been relaxing by working on another personal project. As far as melonDS is concerned, my plan is to release version 1.0 by November, ideally around the project's birthday. It is going to be 8 years old, by the way. I am amazed that it has been going this far. So here's a quick list of the things that need to be done until then: Implementing the multi-window feature. It shouldn't be very difficult, I had already coded the required support a while ago. It's mostly matter of integrating it into the UI and ensuring everything works correctly. Fixing up the JIT to work with multiple instances. Generic is the JIT expert over here, so that'll be for him to deal with. Maybe fixing up LAN, if I ever manage (and if I feel more motivated to work on it). Fixing all the issues that have cropped up during the big refactor. There's also still a bunch of code cleanup to do. We will also need a bunch of testing and QA to make sure the 1.0 release works as intended. ... read more |
23 comments (last by sumy) | Post a comment |
Netplay will be postponed Aug 17th 2024, by Arisotura |
It will not be part of melonDS 1.0. The scope of this feature means it requires more development and testing time than I would be able to do before November. You can tell I was in a really active period. I'm trying ADHD meds, again. They work, but I overestimated things, and I burnt out. The recent wifi stuff was the straw that broke the camel's back, I guess. I mean, why did I spend so long implementing the powersaving stuff, channels, etc, in the first place? That's right, I was trying to fix games that had trouble connecting. I thought I had figured it out, I had a fix that worked well for me, but then I kept getting reports that it wasn't working. I did more of the same a few days ago, once again thinking I had a decent fix, and nope. Only makes things slightly better, or doesn't make any change. This feels utterly defeating. Like nothing I do will ever fix it. It's kinda like when I make posts about my difficulties and all I get in the comments is "can you add feature X" "can you fix Y". I'm not a programming robot, you know. I'm burnt out, I guess. I want to put out melonDS 1.0, but I need a big break from melonDS. |
30 comments (last by HappyMan) | Post a comment |
Wifi: when better emulation makes things worse Aug 14th 2024, by Arisotura |
After LAN was merged, I was informed that it wasn't working as smoothly as the old season2 branch. In particular, it was harder to get a connection going in a game. I didn't quite know where to look. The LAN interface itself functions the same way as its season2 counterpart. The only thing I could think of was the improvements that we'd done to wifi emulation since season2. I fired up my other computer and gave LAN a test. I had to do a bit of setup to get both computers connected over ethernet, since wifi has too much latency. But then I observed the same thing that had been reported to me: I could sometimes get a connection going, but it had a high failure rate. To further confirm it, I even happened to get a connection failure over local multiplayer. It was just a lot less likely there. When logging the wifi traffic, I observed something peculiar: the client would send a 802.11 authentication frame and receive another authentication frame from the host, then it would send an association frame, but at that point the host had entered power saving mode. It would only leave power saving mode a lot later, and that was too late. The LAN interface does something a bit particular: due to how it functions, it may receive frames at any time, and these are added to a receive queue to be consumed where needed. To avoid clogging up that queue, frames that are more than 16 milliseconds old are considered stale and are deleted. This should normally be more than enough: when the wifi system is active, it checks for incoming frames fairly often, that is atleast every 0.5 milliseconds. I could see how this was a problem in the aforementioned case, but raising the 'stale frame' threshold as far as 500ms did not fix the problem. So I had to approach it differently, namely, by considering how things work in wifi land. The host sends beacon frames every ~200 milliseconds, to advertise its presence to potential clients. A client that wants to connect will then initiate the process by sending the host an authentication frame after receiving a beacon, and so on. The authentication+association exchange is aligned to beacon frames, and that is important. The host uses power saving mode between beacons. The basic process is as follows: send beacon frame, wait for a while to see if any clients want to connect, then enter power saving mode until next beacon. There is a timer (W_POST_BEACON) that determines how long to wait before entering power saving mode. It is typically set to 10 milliseconds or so, which is more than enough for an authentication+association exchange. ... read more |
4 comments (last by thisisaname) | Post a comment |
LAN: finally merged! Aug 10th 2024, by Arisotura |
As promised, LAN multiplayer is mostly finished, and a first version of it has been merged. This feature was already largely functional, so all that was needed was to backport it to the modern melonDS codebase and fix up the UI side of it. We can also thank Nadia who provided great help fixing up the ENet integration. You may now grab it over at Github, in the Actions tab (you will need a Github account). The way this works is the same, so I will simply copy-paste from that old post: How to get a LAN game going: 1. On the host machine: open melonDS, then System -> Multiplayer -> Host LAN game. You enter a player name and you're good to go. 2. On client machines: open melonDS, then System -> Multiplayer -> Join LAN game. Enter your player name there, then it should list any existing LAN games. If not, you can always try using the direct connect button. 3. Once all sides are connected to the LAN game, you can open a ROM on each machine and try getting a game going. Do note that you will need a good local network for this to work. Ethernet should work, but anything else may fail if the latency can get too high. In my experience, wifi has too much latency. This marks the end of season 3, and the beginning of season 4: netplay. Ironically, netplay was the original goal of season 2 -- LAN happened more or less as an experimental side project, and it happened to work out rather well, so it stuck around. So, stay tuned for the netplay adventures! Also, we are working out how to properly label melonDS builds from the CI, releases and nightlies alike. When we figure it out, I will probably add the download section for nightlies. |
13 comments (last by Eddiegames9) | Post a comment |
Updates to the downloads section Aug 9th 2024, by Arisotura |
I have been making updates to the site lately. About time. Namely, the downloads page didn't do our project justice. It was just a very plain listing of all the melonDS releases since 0.1. Technically, it was a static page that I manually updated after each release. But this is no more! Go check out the new downloads page. Now it shows just the last melonDS release. However, if you go down, there is an extra page that will list all the older releases, just like the old download page. Except it's not a static page, so new releases can be added without having to modify everything by hand. I am even thinking of adding a Github hook to post releases automatically when they are posted there, but one thing at a time. There is also another section named 'Misc. tools'. For now, there's nothing in it, but I plan to add all sorts of tools that are relevant to melonDS or DS emulation in general. For example the DSi dumper comes to mind -- there would be a stable place to get it rather than having to dig into the blog. I will probably add that in real quick. (edit- I did; after 3 years, about time) And there's a last section, that isn't finished yet: nightly builds. The idea was to provide access to builds from the Github CI without requiring users to have a Github account. I coded a Github hook and a backend for it, which downloads the builds from Github onto the server, and keeps the last 100 commits. However, this raises a few questions. We need to make sure nightly builds don't spread and cause confusion. Right now, any melonDS build just uses the same version number as the last release, which isn't ideal. We would need a way to properly identify builds to avoid confusion. ... read more |
3 comments (last by Dwight Thomas) | Post a comment |
LAN: almost done! Aug 7th 2024, by Arisotura |
Those of you who pay attention to our git repo may have noticed the recent activity in the season3 branch. The plan was to backport the LAN and netplay features to a recent branch, since the old season2 branch was way outdated. It is over one year old, and a lot of refactoring has happened since then. I figured that backporting them would be easier than trying to get season2 up to date, so that was why season3 was started. I didn't even realize season2 was that old before I checked. Shows how good my perception of time is, really. Anyway, the backporting is going smoothly so far. The LAN feature is fully ported, and it seems to be functioning. Also, JesseTG helpfully moved the network interfaces to their own module, so different frontends can reuse them. I based my work on that, and added an interface to switch between multiplayer modes (local, LAN, netplay). All that is missing is some polish on the UI side. I will take care of the biggest problems, make sure it all works smoothly, and we will merge season3 very quickly. This will enable you to test LAN multiplayer by simply grabbing our nightly builds (from Github's Actions tab; you need a Github account). After that, I will tackle netplay in what will be season4. For now, I brought in the netplay related code, but I just commented out a lot of it so melonDS would build. It is nowhere near functional for now, and there is more work with it. But on the other hand, several of the issues I had encountered during the original implementation are now solved. For example, my original idea to get multiple instances started with the exact same state was to use the savestate system. Take a snapshot of one instance's state, send it over the network to other instances, which can just apply it and be all set (or so I hope). Sounds easy enough. Except the savestate system was coded to deal with files directly. I had worked around it in a very ugly way, but the issue has since been fixed, the savestate system operates on memory chunks now. ... read more |
5 comments (last by ThiccFurLizzy) | Post a comment |
Sorry for the downtime Jul 24th 2024, by Arisotura |
For some reason we had DNS trouble affecting our kuribo64.net subdomains. Things should progressively go back to normal now. |
10 comments (last by melonJYC) | Post a comment |
Backporting LAN and netplay: we're getting started! Jul 18th 2024, by Arisotura |
Progress on this will happen in the season3 branch. For now, this branch doesn't even build, so don't get all excited about it yet :P LAN should not be too difficult to backport, as it was largely functional. Netplay will be another story. It was built around the old multi-process IPC system, and is generally obsolete, so a lot of reworking will be needed to get it functional again. I'm hoping to be able to get all that to a functional state by November. We'll see how this goes. There's also work needed to properly integrate this to the UI. I'm thinking of enforcing one melonDS instance only when using LAN or netplay, to keep things simpler. For netplay, it would pretty much be required anyway, as we will need to have instances set up in a specific way. You can tell things aren't super fast on my side, I've pretty much taken a one-month break after getting doublemelon done. I need a big break from melonDS, which I will hopefully take after 1.0 is released. |
10 comments (last by kikilxve) | Post a comment |
News of the refactor: doublemelon is merged Jun 15th 2024, by Arisotura |
Finally, time has come to merge the doublemelon branch. This was the second big step of the refactor (after refactoring the core). It is now done, so we have a good base upon which to build the features we want for melonDS 1.0. There is still a lot of work to do. Many areas of the codebase are less than ideal, there are some old bugs that linger and that we need to address, but we will get there in due time. melonDS 1.0 will be big, and we can't afford to let any stupid bugs slide. But for now, a quick list of the changes the doublemelon merger is bringing in: Some base work is laid for multi-window support. There will be more work to get it working correctly, but we do have a good base going now. This was the original intention behind the doublemelon branch, it just became a step in the refactor because it was pretty much required. The configuration system has been remade to be much more flexible. There is code in place to translate legacy config files to the new format, so you won't lose your settings. The frontend components have been properly encapsulated, which allows for proper multi-instance support. As of now, we still need to deal with a workaround in the JIT, so multi-instance will only work with the interpreter. Thank you all for your support, and stay tuned for more! |
19 comments (last by Luxion) | Post a comment |
News of the refactor: almost there! Jun 10th 2024, by Arisotura |
Basically what it says on the tin. I am working on the last big part of this refactor: the network interfaces. You might already know melonDS employs two different network interfaces: one for local multiplayer (between multiple melonDS instances) and one for outer network, which lets melonDS connect to external servers (like WFC) through libslirp or PCap. These need to be adapted to the refactor, too. Adapting the local multiplayer interface wasn't that hard. What I did was simply change the shared memory buffer to a regular memory buffer guarded by a mutex, and change the interprocess semaphores to regular semaphores. This makes the code simpler and easier to deal with. From a performance perspective, I haven't observed a huge improvement from this change, atleast under Linux. However, the gains will be apparent when we will be reimplementing netplay: managing multiple emulator instances is going to be a whole lot easier and more reliable when they are all contained within the same process. Then I moved on to the outer network interfaces. I had a bit of a debate as to whether to make them instance-specific. Because it could make sense to have them be shared across instances: these instances could be networked together rather than being isolated. It's a bit of a hypothetical scenario, but I like the possibility. It requires, among other things, sharing around data frames. So this is what I'm working on: designing a packet queue system that can broadcast packets across all emulator instances in a reliable and efficient way. Once I've tackled the network part of melonDS, the refactor will be mostly done. There will be a few bugs and misc things to iron out, and we will be good to finally merge it. There will still be a lot of stuff to fix and rework, but we will atleast be in a somewhat workable state. |
13 comments (last by Isabella) | Post a comment |
Pages:1234567···21 |