Skip to content

Commit

Permalink
Clear NDMA slots before clearing RAM
Browse files Browse the repository at this point in the history
  • Loading branch information
RocketRobz committed Mar 8, 2024
1 parent 5de1523 commit 348d42d
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion bootloader/source/boot.c
Original file line number Diff line number Diff line change
Expand Up @@ -177,7 +177,7 @@ Modified by Chishm:
--------------------------------------------------------------------------*/
void resetMemory_ARM7 (void)
{
int i;
int i, reg;
u8 settings1, settings2;
u32 settingsOffset = 0;

Expand Down Expand Up @@ -206,6 +206,7 @@ void resetMemory_ARM7 (void)
DMA_DEST(i) = 0;
TIMER_CR(i) = 0;
TIMER_DATA(i) = 0;
for (reg=0; reg<0x1c; reg+=4)*((vu32*)(0x04004104 + ((i*0x1c)+reg))) = 0;//Reset NDMA.
}

memset_addrs_arm7(0x03800000 - 0x8000, 0x03800000 + (dsiMode ? 0xC000 : 0x10000)); // clear exclusive IWRAM
Expand Down

0 comments on commit 348d42d

Please sign in to comment.