Skip to content
This repository has been archived by the owner on Feb 25, 2024. It is now read-only.

Current progress

danielps edited this page Sep 9, 2015 · 16 revisions

Update 9/9/2015: I have some good news for 9.3+ N3DS users. I've been working on making the dynarec generated code relocatable. Without going into details, this means that you can generate it once, bundle it with the executable and run it on newer systems (where we can't set executable memory on the fly) in a similar fashion to a static recompiler. It's much less convenient than the normal dynarec, but it makes it possible for ninjhax2/ironhax/tubehax users to play VirtualBoy games at a decent framerate.

Update 18/7/2015: Since the last update I optimized it a bunch and now it runs at 15-50 fps, depending on the complexity of the ROM and the amount of frameskip. I also got Mario's Tennis booting up, but it's not showing any graphics in-game.

On another note, I was looking forward to Ninjhax 2.0 to make it playable on N3DS, but HB_ReprotectMemory isn't available. It's a bummer because Mednafen VB got a 3X speed boost (from 8 to 25 fps) and the dynarec could benefit a lot from it.

Update 25/3/2015: I decided to look at how other emulators implemented their recompilers and got some ideas on what I should do next. I've been experimenting with some of the stuff and I feel like I'm going to have to make some big changes to the dynarec before anything else. The thing is, that will break everything and bring new issues that will have to be fixed, and that sounds boring. Like, super boring. I was going to be busy for the next few weeks anyway with exams and a project, so I guess I'll be more motivated when I come back.

Update 1/2/2015: I've pushed my changes to the dynarec branch. Don't expect anything too efficient for now, but it seems about twice as fast as the interpreter in the Reality Boy Demo (which is the only working ROM at the moment).

Update 29/1/2015: I've been working on the dynamic recompiler and after a lot of painful debugging it managed to run a homebrew demo. Nothing else works, mainly because almost half of the instructions aren't implemented. It only works on 3dmoo at the moment and it might need some changes before it runs on a real 3DS, but it's a good start. With CPU emulation not being that big of a bottleneck, the next step would be to rewrite the display functions to use hardware rendering, but that probably won't be happening until the dynarec works well enough.

Update 10/1/2015: I continued working on the assembly interpreter up to the point where it follows the same path as the old core (but it doesn't output any graphics) and the speed increase is minimal (about 3 fps from what I've tested), although it could still be optimized a little bit more. I don't think it's worth it to continue at this point, so I should start thinking on that dynarec...

Update 27/12/2014: After spending several days rewriting most of the interpreter core in assembly I noticed it wasn't giving that much of a speed boost (although I'm not sure yet because it's not working properly), so I wondered if it was worth it to continue with it or whether I should start thinking of writing a dynamic recompiler. If I do, that will probably take a lot of time (and I'm going to be busy these days). Besides, my 3DS just broke and if I take it to repair I won't be getting it back until at least mid-January.

Original text:

Thanks to some awesome people at GBAtemp, r3Ddragon has been tested on real 3DSs and it managed to run some homebrew, although there are some issues that need to be fixed.

You can see a video of it working here. Screenshots can be found here

Commercial roms seem to work. Teleroboxer loads the menu but crashes when starting a game (there's a memory read/write error that shouldn't be too hard to debug once I actually get some free time...)

The framerate is too low to be playable and it still needs to be optimized a lot.

Now works on Ninjhax.

If you want to try it out, you might want to change some configuration options in vb_set.c:

  • Changing DSPMODE to DM_3D (or adjusting the slider in the menu) enables 3D (but runs slower).
  • Changing FRMSKIP enables frameskip.
  • Setting PALMODE to PAL_RED (or pressing L/R in the menu) enables the red palette (for those who like to play golf in red fields. Just like in real life, right?)
Clone this wiki locally