Question regarding memory protection and performance

Discussion in '3DS - Homebrew Development and Emulators' started by reanimus, Feb 8, 2015.

  1. reanimus
    OP

    reanimus Newbie

    Newcomer
    1
    0
    Feb 8, 2015
    United States
    So I've really been fixated on the idea of N64 emulation on the 3DS. The biggest hurdle would simply be performance; the 3DS is by no means a beefy platform, and emulation is a tough thing to do even with good hardware.

    In the interest of trying, though, I was thinking about how mupen64 does things. It does have support for dynamic recompilation to improve performance, and their experimental dynarec backend has support for ARM as well. It would however, require setting a region of memory as writable and executable at runtime. I remember reading about the 3DS having memory protection through an ARM feature, and I was wondering if this would come into play, and if so, how to disable/circumvent it.

    Beyond that, I also remember that ninjhax has less processor time available than 3DS homebrew launched via Gateway. Does this still hold true?
     
  2. froggestspirit

    froggestspirit D/P/Pt Demix Guy

    Member
    1,119
    550
    Jul 28, 2011
    United States
    I'm no expert on this, and this is only what I believe is true, so take it with a grain of salt.
    -Ninjhax has no access to kernal 9, so when cubic ninja is boot, it get's half of the 3DS's ram (like normal games?), the rest is left for background processes.
    -Gateway, (which I don't have) has kernal 9 access, aswell as the emunand/cfw when your sysnand is 9.2 or lower.
    I believe with that, you can reallocate the memory, and most likely be able to make it executable, however I do not know how to go about this.
    I'm kind of curious on how the GBA/NDS virtualization is done, as this could be a route for N64? GBA and NDS have a separate firmware I believe, so if one could make one for N64, that could probably be bundled up in a ROM, and ran, though I don't know if this is feasible.