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
kevincrans says:
Dec 11th 2019
Whoops, sorry, https://github.com/rafaelvcaetano/melonDS-android/releases is outdated, Arisotura stated that Android development is a pain, it is. It's not about whether it's Intel or ARM. I hope in Visual Studio Android programming will become as easy as Windows ARM programming in the future.
Arisotura 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.

again, a bit comparing apples and oranges there. PS2 discs can be read on a PC as they are regular discs with a typical filesystem. Wii discs use a proprietary encrypted filesystem, but you can't even get to that, because their sectors are laid out differently from regular DVD sectors, which means PC drives can't even read the data. except for these few drives that let you read the raw data via debug commands, but it's too slow to be used in realtime (I recall that dumping Wii discs that way takes hours). I guess the WiiU pulls similar shenanigans. but, regardless, that is why you can't put your Wii disc in your disc drive and have Dolphin read it.
MelonMan says:
Dec 11th 2019
https://i.paste.pics/d1b4c51f3ae6cdb6deda71f5c6e5171b.png
Generic aka RSDuck says:
Dec 11th 2019
MelonMan: can you give some more information? Is it related to the JIT, have you tried turning it or individual optimisations off?
MelonMan says:
Dec 12th 2019
At first I thought It was JIT but I had OGL on JIT and Software Renderor in normal.
Arisotura says:
Dec 12th 2019
for those who are getting audio stutter: try disabling the framerate limiter and enabling audio sync.
Guest says:
Dec 13th 2019
Kevin, I've seen those builds they are very outdated I was hoping for official Android builds with the latest changes and features
Guest says:
Dec 13th 2019
Drastic is becoming open source maybe melonds developers can add multiplayer and dsi to it?
poudink says:
Dec 13th 2019
I've heard "Drastic is becoming open source" for years and it still has yet to happen so I'm starting to seriously doubt that these claims are true. Either way, why would Arisotura and co. work on Drastic when they already have a good DS emulator they coded themselves. Sure Drastic is already on Android but that doesn't change the fact that Android developement sucks.
MelonMan says:
Dec 13th 2019
You can run MelonDS on Android already by using RetroArch
poudink says:
Dec 13th 2019
fairly certain the retroarch version is built off master though and doesn't have the arm64 jit
MelonMan says:
Dec 13th 2019
Oh.
Though can a LibRetro core be built from the arm64 JIT branch?
Sorer says:
Dec 14th 2019
Generic said this on the Retroarch discord:
"from the melonDS side I can say that it probably will take some time until the JIT gets merged into melonDS master
also the x64 JIT doesn't generate PIC compliant code
which means it won't work from a dynamically linked DLL like in retroarch
that'll need some more work"
Yeah this will take some time.
MelonMan says:
Dec 21st 2019
So when it is merged into master it will be available on RetroArch ?
poudink says:
Dec 22nd 2019
if the retroarch guys merge it in their repo, then yeah
Post a comment
Name:
DO NOT TOUCH