Skip to content

Commit

Permalink
Minor change to what is written to SCFG_EXT
Browse files Browse the repository at this point in the history
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.
  • Loading branch information
ApacheThunder committed Feb 21, 2017
1 parent 96c368b commit 56746a3
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 6 deletions.
6 changes: 3 additions & 3 deletions arm7/source/main.c
Original file line number Diff line number Diff line change
Expand Up @@ -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));
Expand Down Expand Up @@ -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);

Expand Down
5 changes: 3 additions & 2 deletions arm9/source/main.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down
2 changes: 1 addition & 1 deletion conf/nds-bootstrap.ini
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 56746a3

Please sign in to comment.