JIT beta builds and introducing myself
After all so much time has passed, it's finally time to do a release of JIT beta builds!

As Arisotura has stated in her last post, there's now another head working on melonDS. I'm Generic on IRC and RSDuck on Github.

For some reason I started messing with DeSmuME a bit more than a year ago, trying to write a JIT recompiler targetting ARM64, to improve performance on the Switch. After many struggles something working came to be, but it missed it's original goal of being fast for several reasons (see the link if you're interested).

After recovering from the disappointment I put my hopes into melonDS, but since it lacked any JIT compiler (besides the abandoned attempt by Arisotura herself) I wanted to start with a x64 recompiler. Skip forward a bit and the JIT started take on form. After taking everything apart and putting things more cleanly back together around the beginning of last summer things only got better, with most instructions being recompiled and the opening of the pull request on Github, which later got merged.

At this time the ARM64 backend was started this time avoiding my previous mistakes. With autumn it reached a similar level of completion as the x64 backend while both backends received some optimisations. Until this point we were catching up to DeSmuME but at this point started to surpass it. Here is where I want to thank all developers of open source emlulators whose dynarec I was eable to look into and especially the developers of the JIT of Dolphin. We're not only using their code emitter but they also gave me some great advice on IRC!

With some further optimisations of the 2D GPU emulation using ARM NEON instructions, most 2D games already run at fullspeed on the Switch, while most 3D games run at fullspeed with overclocking. The ARM64 JIT and the GPU optimisations are currently located in my own fork and are distributed by me in binary form on Gbatemp in an admittedly chaotic way.

I am very grateful to Arisotura for creating the emulator in the first place, as well as trusting in me and my work. For the future the already mentioned GPU optimisations are my current focus. I'm currently rewriting the old ARM NEON optimisations to be more clean and adding some additional ones which hopefully increase the performance a bit more. The logical step following would be a NEON 3D GPU backend. I have some more plans lying around, e.g. there is still one major JIT optimisation we're missing out on (fastmem).

So but now enough storytelling, here are the builds:

Note:

These builds are my JIT branch (generic_jit) merged with master into a separate branch.

The JIT recompiler has to be enabled in Settings -> Emulation. The default maximum block size is 10, this is a very conservative number, as I don't know of any game which breaks with high maximum block size. If you experience any bugs which can't be reproduced with JIT disabled, please try lowering the maximum block size and disabling one or both of the options Literal Optimisations and Branch Optimisations and let me know. Though there already has been some testing through people building from source themselves and the semiofficial Switch builds, both uncovered some bugs.

melonDS 0.8.3 JIT beta for x64 Windows
melonDS 0.8.3 JIT beta for x64 Linux
Bogdanoffs says:
Dec 9th 2019
> Why people hate Desmume so much
Its the PCSX2 of DS emulators, its essentially a buggy JIT with a shitload of compat hacks and settings strapped to it. Its a pain, but it is the only one that could do full speed. (at the time)
Think of Dolphin as the antithesis of PCSX2. It is so good nothing compares to it, and dolphin development has mostly moved to hardware accuracy, QOL, and enhancements. Because it is just that good.
This makes melonDS the antithesis of Desmume, the destined savior of DS emulation.
radiant says:
Dec 9th 2019
> Why people hate Desmume so much
Obstruction, and various developer drama that led to putting on ice various important aspects such as multiplayer (one reason why melonDS was even started), online preservation, finishing the JIT, DSi... That development philosophy doesn't seem to have subsidized despite Desmume attempts to catch up, and any major code refactoring is out of the question, making it an evolutionary dead end.

Now in the sake of objectivity,
What other emulators do better than melonDS atm:
Desmume: More mature UI, GBA/DS connectivity (still not done), Cheat engine, debuggers, Lua scripting ... but those were never worked on really after 2010, besides adding variables for free cam accessible to the lua scripter (dolphin offers this feature as a separate user friendly setting)
no$gba: DSi emulation ... but camera isn't supported (will crash game) and base DS emulation state limits how useful this is
ideas: Slide Adventure MagKid emulation, via a JP plugin ... that no longer works, and the emulator is crap.

Things are looking good overall for melonDS and emulation in general.
Arnie says:
Dec 9th 2019
There are a multitude of reasons, but the main reasons stem from the main dev basically sharting on PokeFans, refusing to debug anything relating to those games, basically calling them all retards along the way. Also the whole situation with the DS WiFi connection and them outright refusing to support it after EOL. Funnily enough IIRC that was why MelonDS was started by Arisotura (then known as Staplebuffer)
Arisotura says:
Dec 9th 2019
Generic: the 'big endian' bit in that TODO list refers to running melonDS on platforms like a Wii or a Wii U, which are big-endian. atm there is a lot of code in melonDS that isn't endian-safe. making it endian-safe wouldn't be that hard, it'd just be matter of making sure you caught all the spots, ie testing and testing and more testing.


also, I don't think saying Dolphin is 'the antithesis of PCSX2' is fair. it's like comparing apples and oranges. the PS2 is known to be a shitshow to emulate, the Gamecube not so much. as much as certain things can be said about PCSX2 and its development philosophy, you can't pit it against Dolphin, or anything that isn't another PS2 emulator.
MelonMan says:
Dec 9th 2019
The JIT is actually pretty good. Mario Kart DS no longer feels jerky.
MelonMan says:
Dec 9th 2019
Annie: It was Staplebutter btw.
MelonMan says:
Dec 9th 2019
Meant Arnie. Sorry!
Arnie says:
Dec 10th 2019
Whoops, my bad
Arnie says:
Dec 10th 2019
Anyway, back to melonDS, i seem to have a weird issue where the emulator runs at at 59fps, regardless of VSync setting. this causes an occasional audio stutter. It isnt game breaking by any means, but it is a bit irritating
Generic aka RSDuck says:
Dec 10th 2019
> Anyway, back to melonDS, i seem to have a weird issue where the emulator runs at at 59fps, regardless of VSync setting. this causes an occasional audio stutter. It isnt game breaking by any means, but it is a bit irritating

Vsync might be enabled in your video driver. Try switching to the software renderer and disabling opengl display.
Arisotura says:
Dec 10th 2019
also, try enabling audio sync
andr2535 says:
Dec 10th 2019
I have this audio stutter issue too.(using linux btw)
The emulator seems to lie between 55 and 61 fps most of the time.

It doesn't seem to be because of the games being too demanding,
since they easily run at 300% and more, if I press the fast forward button.

I have tried all combinations of audio sync and limit framerate :)
Guest says:
Dec 11th 2019
If you work on arm64 and Switch does this mean an Android build might be made too? Sorry if dump question
Guest says:
Dec 11th 2019
Dumb* eh
kevincrans says:
Dec 11th 2019
I want to say something about PCSX2, it supports physical discs. Dolphin doesn't even if you have a special LG drive with a Panasonic MN chip. In fact, I did some research and it turns out the Panasonic SW-5584 blu-ray is capable of doing the same things with Wii U discs. Still the best emulator to support physical discs is PCSX2 and will later be RPCS3, so except the GTA SA rendering bug and a too difficult fix, there's nothing bad about PCSX2.
> Why people hate Desmume so much
For me, simply because it ceased development, further there's not much wrong with it besides Pokemon Wifi amateurism and a funny Mario Kart floor glitch making it even more attractive to beat.

Now we go back to MelonDS
Guest, https://github.com/Hydr8gon/melonDS/releases is the way to go, by Hydr8gon.
Post a comment
Name:
DO NOT FILL