From 2956493be90cc37ae832d554a6083559d109227e Mon Sep 17 00:00:00 2001 From: Alissa Rao Date: Mon, 17 May 2021 11:00:05 -0700 Subject: [PATCH] Sets an initial WAITCNT in rsrt0.S (#147) --- src/rsrt0.S | 7 +++++++ 1 file changed, 7 insertions(+) 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