* Fix for https://github.com/Arisotura/melonDS/issues/1169
LoadNAND was storing the stage 2 bootloader, while NWRAM access was disabled by Bit25 of SCFG_EXT putting the stage 2 into old shared WRAM, while executing it later with the bit enabled and fetching from an empty NWRAM.
* Fixed bug, where access to the NWRAM Bank A used the wrong page mask for write access
* Remove spaces before comma
Co-authored-by: Tim Seidel <t.seidel@kts-systeme.de>
Co-authored-by: RSDuck <RSDuck@users.noreply.github.com>
* SCFG_BIOS now selects between NDS and DSi BIOS
Allowing experimental direct boot.
* - making NWRAM Priorities work as in the HW
- fixed loading DSi stage2 Bootloader when in direct boot (should not be loaded) and might interfere with the image loaded into the (N)WRAM previously
* NWRAM and SCFG Registers are now write-guarded by the corresponding SCFG_EXT7/9 Bits
* removed debugging remainder
* Moved NDSHeader dependent SCFG initialization into the new DSi::SetupDirectBoot function called from NDS::SetupDirectBoot when ConsoleType is DSi
* removed redundant SCFG_BIOS bit checks
* Set of changes from RSDuck's review
* removed a forgotten comment
* - removed the guarded debug outputs for NWRAM
- NWRAM writes to bank and window registers now apply their write masks.
- added comment on an existing TODO within the code describing, why this is OK
- fixed initial NWRAM bank reset just accessing set A
* NWRAM not mapped to 03... range if bit25 in SCFG_EXT is cleared
* removed NWRAM write block on cleared bit25 in SCFG_EXT
* changed type of iterator for MapNWRAM_x functions from s8 to int
* - reduced calculations/comparisons on NWRAM write operations
- changed u8 to unsigned int for an iterator MapNWRAM_x
Co-authored-by: Tim Seidel <t.seidel@kts-systeme.de>
* - added fallback to DSi footer copy at 000FF800h if reading footer at end of file failed. See https://problemkaputt.de/gbatek.htm#dsisdmmcimages
- changed output of ConsoleID to use PRIx64 to be consistent with all other tools working with the consoleID (readability/cosmetic improvement)
* Remove extra space
Co-authored-by: Tim Seidel <t.seidel@kts-systeme.de>
Co-authored-by: RSDuck <RSDuck@users.noreply.github.com>
* Add PoroCYon's DSP code.
* Remove some teakra iles that we dont need.
* make some requested changes.
* move DataMemoryOffset into namespace.
* use deault param.
* ad the switch change
* <Generic> forget about the default parameter