summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rwxr-xr-xasm/libagbsyscall.s44
-rwxr-xr-xasm/rom.s2
-rwxr-xr-xld_script.ld1
3 files changed, 46 insertions, 1 deletions
diff --git a/asm/libagbsyscall.s b/asm/libagbsyscall.s
new file mode 100755
index 0000000..7c82dba
--- /dev/null
+++ b/asm/libagbsyscall.s
@@ -0,0 +1,44 @@
+ .include "asm/macros.inc"
+
+ .syntax unified
+
+ .text
+
+ thumb_func_start ArcTan2
+ArcTan2:
+ swi 0xA
+ bx lr
+ thumb_func_end ArcTan2
+
+ thumb_func_start CpuSet
+CpuSet:
+ swi 0xB
+ bx lr
+ thumb_func_end CpuSet
+
+ thumb_func_start LZ77UnCompWram
+LZ77UnCompWram:
+ swi 0x11
+ bx lr
+ thumb_func_end LZ77UnCompWram
+
+ thumb_func_start RegisterRamReset
+RegisterRamReset:
+ swi 0x1
+ bx lr
+ thumb_func_end RegisterRamReset
+
+ thumb_func_start Sqrt
+Sqrt:
+ swi 0x8
+ bx lr
+ thumb_func_end Sqrt
+
+ thumb_func_start VBlankIntrWait
+VBlankIntrWait:
+ movs r2, 0
+ swi 0x5
+ bx lr
+ thumb_func_end VBlankIntrWait
+
+ .align 2, 0 @ Don't pad with nop.
diff --git a/asm/rom.s b/asm/rom.s
index 4b6d382..878e52b 100755
--- a/asm/rom.s
+++ b/asm/rom.s
@@ -1,3 +1,3 @@
.text
-.incbin "baserom.gba", 0x554D4, 0x666AFC
+.incbin "baserom.gba", 0x554F0, 0x666AE0
diff --git a/ld_script.ld b/ld_script.ld
index c18e7b4..147590e 100755
--- a/ld_script.ld
+++ b/ld_script.ld
@@ -29,6 +29,7 @@ SECTIONS
src/m4a_2.o(.text);
asm/m4a_3.o(.text);
src/m4a_4.o(.text);
+ asm/libagbsyscall.o(.text);
asm/rom.o(.text);
}=0xFF
}