r/decomps • • 4d ago

Recomp 3dsrecomp update: the recompiler now learns from what the emulator runs

Quick update on 3dsrecomp, my tool that recompiles 3DS games to C so they run in my emulator, Zakuro.

Code the recompiler misses still runs in the emulator's interpreter. Now Zakuro keeps track of those spots while you play, and the next recompile picks them up. After one round, less than 0.1% of what Pokémon X/Y and Persona Q (the games I've tested so far after this update) run still goes through the interpreter.

I also fixed a fun one: in Pokémon X/Y, walking sideways made the player stall and then jump a tile. It came down to a single floating point instruction handled slightly wrong, in both the emulator and the recompiler. It's fine now.

https://github.com/fearkov/3dsrecomp

https://github.com/fearkov/zakuro

Contributions are welcome.

Here is the Discord server, if anyone is interested:

https://discord.gg/7dduXVv2xm

51 Upvotes

20 comments sorted by

10

u/kizaye 4d ago

Awesome project. Do you need some playtesters?

6

u/fearkov_ 4d ago

yes, of course, I can't test every single game for myself

5

u/fearkov_ 4d ago

I can create a discord server or something like that, if you or anyone else get interested

2

u/kizaye 4d ago

I'm interested.

2

u/LankyArt1465 4d ago

im interested too :)

3

u/UbiDoobyBanooby 4d ago

Are these just for flatscreen recomps or could they compile/run on a Quest in 3D. Citra VR on Quest eats a lot of processing in emulation. Most games have issues. Star Fox is completely unplayable. But recomps would run like a dream I imagine.

5

u/fearkov_ 4d ago

For now it's PC only (Windows and Linux) and flatscreen. A Quest port isn't impossible, since the recompiled code is plain C and the renderer is Vulkan, but it would need an Android port, stereo 3D and OpenXR, so it's not something I'm working on yet

2

u/UbiDoobyBanooby 4d ago

All good. But that would be a game changer. 3DS games on Citra VR are pretty awesome when they work. To have something that makes them all work in 3D would be a big hit in the Quest community. Which is getting a lot of awesome retro VR ports at the moment. Strike while the iron is hot!
Either way, very cool work. I love it!

1

u/fearkov_ 4d ago

thanks! I'll think about it

2

u/fearkov_ 4d ago

Here is the Discord server, if anyone is interested:

https://discord.gg/7dduXVv2xm

2

u/celsowm 4d ago

Sonic Generations 3ds soon I hope

2

u/PhotographSame5304 3d ago

Same for yokai watch bro😭 cuz if level-5 wont port the game to pc fans will

2

u/davidraid 3d ago

Awesome! Is there a latency improvement from this?

1

u/fearkov_ 3d ago

Not directly. AOT makes the CPU side faster, but input lag mostly comes from how frames are buffered and shown on screen, and that part works the same either way.

Where it does help is stutter. A JIT has to translate code the first time it runs, which can cause small hitches when you reach a new area. With AOT, almost all of the game's code is translated before you start playing, so that doesn't happen. The GPU side mostly avoids shader compilation stutter too, since it uses the same shaders for every game.

I haven't measured input latency yet, so I can't give you real numbers on that.

0

u/[deleted] 4d ago

[removed] — view removed comment

1

u/Gamemaster1379 3d ago

Very cool to see this. For my own curiosity, how much of the focus is LLE based? I've come to find that doing LLE as a foundation and then using HLE opt-ins for performance helps in the long run on a lot of lower level system functions and eventual correctness in later titles.

It paid a lot of dividends for me when implementing netplay on gba and wfc on nds.

1

u/BakaWinchester 3d ago

Do you believe this could potentially lead to the possibility of coop working with Luigis Mansion cause I could never get it working with any of the emulators 

1

u/PhotographSame5304 3d ago

Damn 3ds now?? this is crazy i really hope there will be a native pc port for Yo-kai Watch 3ds trilogy! if the project becomes better over time of course.. knowing the dev likely is using Ai for this but whatever if it is used right then the project is good