From c6cb97ae300b55d3d95da7ee5529fb83e56f4106 Mon Sep 17 00:00:00 2001 From: TuxSH Date: Fri, 6 May 2016 12:49:03 +0200 Subject: [PATCH] Fix all supported arm9 exception vectors other than the Data Abort one --- exceptions/arm9/source/main.c | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) diff --git a/exceptions/arm9/source/main.c b/exceptions/arm9/source/main.c index d405967a..9639baff 100644 --- a/exceptions/arm9/source/main.c +++ b/exceptions/arm9/source/main.c @@ -73,12 +73,14 @@ void main(void) setupStack(7, SP); //Abort setupStack(11, SP); //Undefined - *(vu32 *)0x08000004 = 0xE51FF004; - *(vu32 *)0x08000008 = (u32)FIQHandler; - *(vu32 *)0x08000014 = 0xE51FF004; - *(vu32 *)0x08000018 = (u32)undefinedInstructionHandler; - *(vu32 *)0x0800001C = 0xE51FF004; - *(vu32 *)0x08000020 = (u32)prefetchAbortHandler; + //IRQHandler is at 0x08000000, but we won't handle it for obvious reasons + *(vu32 *)0x08000008 = 0xE51FF004; + *(vu32 *)0x0800000C = (u32)FIQHandler; + //svcHandler is at 0x08000010, but we won't handle svc either + *(vu32 *)0x08000018 = 0xE51FF004; + *(vu32 *)0x0800001C = (u32)undefinedInstructionHandler; + *(vu32 *)0x08000020 = 0xE51FF004; + *(vu32 *)0x08000024 = (u32)prefetchAbortHandler; *(vu32 *)0x08000028 = 0xE51FF004; *(vu32 *)0x0800002C = (u32)dataAbortHandler; } \ No newline at end of file