NWRAM Initialization for a consistent startup setting. (Was handled by the default initialization, which might not be valid in all compiler settings)

This commit is contained in:
Tim Seidel 2021-07-06 11:10:53 +02:00
parent 4265ab80ca
commit a44d7ff406
1 changed files with 19 additions and 4 deletions

View File

@ -934,10 +934,25 @@ void MMU_Init(void)
slot1_Init();
slot2_Init();
if(Mic_Init() == FALSE)
if (Mic_Init() == FALSE)
INFO("Microphone init failed.\n");
else
INFO("Microphone successfully inited.\n");
#ifdef DSI_NEWWRAM
// Disable all NWRAM Banks on Init
for (int i = 0; i < 20; i++)
MMU.regNRWAM_BankControl[i] = 0;
// Disable all Windows
for (int i = 0; i < 2; i++)
for (int q = 0; q < 3; q++)
MMU.regNWRAM_Windows[i][q] = 0;
// No Write Protection
MMU.regNWRAM_Protect = 0 ;
// update internal data from these init settings
MMU_UpdateNWRAM();
#endif
}
void MMU_DeInit(void) {