Open JesseTG opened 10 months ago
I will need to submit a PR upstream, as I'll need to access DSi_BPTWL::Registers
, which is private.
From a conversation on Discord...
JesseTG: @CasualPokePlayer suggested an implementation for direct-booting DSi games, as he does in BizHawk. But is there a way to tell when DSiWare is exiting to the main menu? I'd like to implement this, but I'd also like to close the emulator if direct-booting DSiWare.
CasualPokePlayer: unless you're constantly monitoring memory, no
JesseTG: Well, is there a single section of RAM that unambigously tells me if I'm in the DSi menu? If so, then checking an integer at a certain offset every frame would be okay
CasualPokePlayer: there would be some memory location that says the current id of the loaded software iirc
JesseTG: That might be exactly what I need
...
JesseTG: — https://mgba-emu.github.io/gbatek/#2000300h---nintendo-auto-load-feature-via-numeric-title-id Looks like I just need to know the Title ID of the DSi menu.
2000310h 8 AutoLoad New Title ID (new title to be started,0=none/launcher)
Oh, so the DSi menu's title ID is just 0?
CasualPokePlayer: no it's just the autoload feature has 0 to mean go back to launcher FFDFC0-FFE014 (and maybe some after that? idk) of main ram seems to have the currently loaded software
CasualPokePlayer : also at FFFE00-FFFE14
CasualPokePlayer: actually, i guess too this is less "go back to launcher" and more "stay in the launcher" since at this point in the process you're at the launcher
JesseTG: Are those addresses listed in GBATek? I can't find them when searching
CasualPokePlayer: they arent, they're just something i found observing loading games
JesseTG: Ooh, neat.
CasualPokePlayer: (well, more i just ctrl+f'd for the title id and oop found them)
JesseTG: And what's the title ID for the DSi menu?
CasualPokePlayer: the exact title id depends on the region HNA? for the lower title id, 00030017 for the upper title id although the upper title id isnt listed unless you cound its string form in the .app path LAUNCHER is probably a better indicator anyways
Note that if the NAND user settings are invalid in any way (e.g. set to an unsupported language), the direct booting would just fail and it'd kick you to the initial NAND setup screen.
What would you like to see?
It turns out that direct-booting DSiWare is much easier than anyone expected. Hats off to CasualPokePlayer for discovering it. His implementation in the BizHawk core looks like this; I expect mine will be similar.
Terms