From 56746a3bde3e0c0fe75b35faa9eb1ce4e4dd5eba Mon Sep 17 00:00:00 2001 From: ApacheThunder Date: Tue, 21 Feb 2017 00:20:37 -0600 Subject: [PATCH] Minor change to what is written to SCFG_EXT Also removed unused fifo wait code. Appearently bits 13 and 12 are set on Arm7 SCFG_EXT while in NTR mode. GBATek describes theses as the defualt values. They are even enabled for TWL mode DSiWare too. TWL_FIRM doesn't appear to set these bits however as tests back when dev launcher was patched not to lock SCFG_EXT revealed. But maybe this was something the DSi did that wasn't done on 3DS. --- arm7/source/main.c | 6 +++--- arm9/source/main.cpp | 5 +++-- conf/nds-bootstrap.ini | 2 +- 3 files changed, 7 insertions(+), 6 deletions(-) diff --git a/arm7/source/main.c b/arm7/source/main.c index bc7f686c4..b08459dd0 100644 --- a/arm7/source/main.c +++ b/arm7/source/main.c @@ -105,7 +105,7 @@ int main(void) { //--------------------------------------------------------------------------------- // Switch to NTR Mode REG_SCFG_ROM = 0x703; - REG_SCFG_EXT = 0x93A40000; + REG_SCFG_EXT = 0x93A43000; // Find the DLDI reserved space in the file u32 patchOffset = quickFind (__DSiHeader->ndshdr.arm9destination, dldiMagicString, __DSiHeader->ndshdr.arm9binarySize, sizeof(dldiMagicString)); @@ -138,8 +138,8 @@ int main(void) { wordCommandAddr[1] = 0; wordCommandAddr[0] = (vu32)0x027FEE08; - fifoWaitValue32(FIFO_USER_03); - fifoSendValue32(FIFO_USER_05, 1); + // fifoWaitValue32(FIFO_USER_03); + // fifoSendValue32(FIFO_USER_05, 1); fifoSetValue32Handler(FIFO_USER_01,myFIFOValue32Handler,0); diff --git a/arm9/source/main.cpp b/arm9/source/main.cpp index 1f5c2ed5f..f6fc73d8f 100644 --- a/arm9/source/main.cpp +++ b/arm9/source/main.cpp @@ -161,14 +161,15 @@ int main( int argc, char **argv) { // switch to NTR mode REG_SCFG_EXT = 0x83000000; // NAND/SD Access + initMBK(); if (fatInitDefault()) { nocashMessage("fatInitDefault"); CIniFile bootstrapini( "sd:/_nds/nds-bootstrap.ini" ); - fifoSendValue32(FIFO_USER_03, 1); - fifoWaitValue32(FIFO_USER_05); + // fifoSendValue32(FIFO_USER_03, 1); + // fifoWaitValue32(FIFO_USER_05); if(bootstrapini.GetInt("NDS-BOOTSTRAP","DEBUG",0) == 1) { debug=true; diff --git a/conf/nds-bootstrap.ini b/conf/nds-bootstrap.ini index 20223fa08..3d688bf45 100644 --- a/conf/nds-bootstrap.ini +++ b/conf/nds-bootstrap.ini @@ -3,7 +3,7 @@ NDS_PATH = sd:/nds/cf_ds.nds SAV_PATH = sd:/nds/cf_ds.sav BOOTSTRAP_PATH = sd:/_nds/bootstrap-dldi.nds ARM7_DONOR_PATH = -NTR_MODE_SWITCH = 0 +NTR_MODE_SWITCH = 1 BOOST_CPU = 1 BOOST_VRAM = 0 BOOTSPLASH = 0