summaryrefslogtreecommitdiff
path: root/asm
diff options
context:
space:
mode:
authorMarcus Huderle <huderlem@gmail.com>2018-10-13 11:04:10 -0500
committerMarcus Huderle <huderlem@gmail.com>2018-10-13 11:04:10 -0500
commit75c0dbc467b916cbc6ac9be20ca9727abb371e39 (patch)
tree0acb10307e29ab54145bebb4f756f169a0cf7100 /asm
parent2d9a7ba8beffbd0bcf1912ba8ab35a8ac0f518ee (diff)
Add libagbsyscall
Diffstat (limited to 'asm')
-rwxr-xr-xasm/libagbsyscall.s44
-rwxr-xr-xasm/rom.s2
2 files changed, 45 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