|Home | Downloads | Screenshots | Forums | Source code | RSS|
|< Sorry.plaaaaans >|
melonDS status, and plans for the future
Jun 2nd 2018, by Arisotura
I figured I would write this, to give you an idea of melonDS's current status, what has been done and what remains to do.
To reply to the comments on the previous post: melonDS is already open-source, and it has always been. You will find the source code on Github. You can do whatever you want with it, as long as you are respecting the GPL.
So, here's a quick list of how things are and what needs to be done, from the top of my head. Searching the codebase for TODO/FIXME/HACK will find all the items.
All the instructions supported by the ARM7 and ARM9 are implemented.
ARM9-only instructions are enforced, altough this may be incomplete. It's unclear how some of them behave on the ARM7: some throw undefined instruction exceptions, but some seem to do nothing or behave like another instruction.
Cycle counting is rather crude and likely to be wrong for the more complex ARM9. Speaking of, the MPU and cache still have to be implemented (hopefully without killing performance). The first would allow emulating some game/homebrew crashes that happen on hardware, the second would be a requirement for reasonably accurate timings.
All DMA types are implemented, with reasonably accurate timings and operation. Running DMA and ARM9 simultaneously (possible under specific conditions) isn't implemented.
Timers might need checking/rework?
Memory map is accurate, including things like overlapping VRAM banks.
ROM/SPI transfers are emulated with proper delays, and should function like their hardware counterparts, minus some uncovered details (see all-caps printf() calls).
ARM9-side div/sqrt are emulated with delays.
All features are implemented. Even the rarely used 'main memory display FIFO'.
OBJ mosaic may be wrong, especially with rotated/scaled sprites.
DISPCNT latching is missing. Other registers may be latched, that hasn't been researched much yet.
VRAM access timings aren't implemented.
Most features are implemented.
The geometry engine is emulated mostly accurately. Polygon/vertex limits are enforced. Culling and clipping haven't been researched closely and may produce results different from hardware.
GXFIFO overflow isn't implemented properly (should incur penalty for ARM9 and presumably ARM7).
Misc things like effects of invalid operations (incomplete polygons etc) may not be implemented.
The rendering engine is emulated with much more accuracy than needed for your average game. Much research went into figuring out how the rasterizer works. melonDS is not pixel-perfect but close. Pointless besides for passing aging cart tests.
Antialiasing over shadow pixels is glitched.
The scanline cache is not emulated (requires figuring out rasterizer timings, including VRAM access and all).
Capture addition and source selection are missing (have yet to find something that uses them).
Other than that, the mixer is complete and emulated with sample accuracy.
Memory access timing isn't emulated, however buffering mechanisms (FIFO) are implemented.
Much of wifi still has to be researched.
The current implementation allows some form of local multiplayer (and connecting to the internet with proper support), but communication errors aren't properly reported, which results in bad things. So far my attempts at fixing that only made things worse.
Wifi is subpar compared to the rest of the emulator :P
With that in mind, where do we go next?
I'm not sure about attempting to continue the JIT. Considering I went for accuracy, preserving it at a reasonable level with a JIT is going to prove tricky, even moreso when you're emulating two simultaneous CPUs and a bunch of extra hardware. Make it too accurate and the synchronization overhead negates any speed benefits from the JIT, but going too far in the other direction will inevitably break games.
DSi emulation is another of the possible avenues. There's not a lot of DSiware to play, and even less cartridge games, but regardless, there are things to be done there.
Or I might go and emulate something entirely new for me? N64? Dreamcast? Xbox?
|12 comments have been posted.|
|< Sorry.plaaaaans >|