diff --git a/src/rsrt0.S b/src/rsrt0.S index e3bb3ec..3f06450 100644 --- a/src/rsrt0.S +++ b/src/rsrt0.S @@ -23,6 +23,13 @@ __start: msr CPSR_c, r0 ldr sp, =0x03007F00 + @ Sets WAITCNT to the default used by GBA games + @ + @ See https://problemkaputt.de/gbatek.htm#gbasystemcontrol for reference. + ldr r0, =0x04000204 + ldr r1, =0x4317 + str r1, [r0] + @ copy .data and .text_iwram section to IWRAM ldr r0, =__iwram_lma @ source address ldr r1, =__iwram_start @ destination address