Sets an initial WAITCNT in rsrt0.S (#147)

This commit is contained in:
Alissa Rao 2021-05-17 11:00:05 -07:00 committed by GitHub
parent 093edc703f
commit 2956493be9
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -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