mirror of
https://github.com/SAT-R/sa2.git
synced 2026-10-28 09:43:38 +00:00
chao_garden: use libagbsyscall
This commit is contained in:
1 parent
763812acc3
commit
7fc5ba8f08
3 files changed
+16
-78
No files matched your search
@@ -160,9 +160,9 @@ include songs.mk
|
||||
$(LDSCRIPT):
|
||||
@$(CPP) $(CPPFLAGS) -P ldscript.txt -o $(LDSCRIPT)
|
||||
|
||||
$(ELF): $(OBJS) $(LDSCRIPT)
|
||||
$(ELF): $(OBJS) $(LDSCRIPT) libagbsyscall
|
||||
@echo "$(LD) -T $(LD_SCRIPT) -Map $(MAP) <objects> <lib>"
|
||||
@$(LD) -T $(LDSCRIPT) -Map $(MAP) $(OBJS) ../tools/agbcc/lib/libgcc.a ../tools/agbcc/lib/libc.a -o $@
|
||||
@$(LD) -T $(LDSCRIPT) -Map $(MAP) $(OBJS) ../tools/agbcc/lib/libgcc.a ../tools/agbcc/lib/libc.a -L../libagbsyscall/build/gba -lagbsyscall -o $@
|
||||
|
||||
%.gba: %.elf
|
||||
$(OBJCOPY) -O binary $< $@
|
||||
@@ -206,6 +206,9 @@ $(SONG_BUILDDIR)/%.o: $(SONG_SUBDIR)/%.s
|
||||
@echo "$(AS) <flags> -I sound -o $@ $<"
|
||||
@$(AS) $(ASFLAGS) -I sound -o $@ $<
|
||||
|
||||
libagbsyscall:
|
||||
@$(MAKE) -C ../libagbsyscall MODERN=0 PLATFORM=gba CPU_ARCH=arm
|
||||
|
||||
CONTEXT_FLAGS := -DM2C -DPLATFORM_GBA=1 -DGEN_CTX=1 -Dsize_t=int -D "offsetof(TYPE, MEMBER)"="((size_t)&((TYPE *)0)->MEMBER)"
|
||||
|
||||
ctx.c: $(C_HEADERS)
|
||||
|
||||
@@ -1,75 +0,0 @@
|
||||
.include "../asm/macros/function.inc"
|
||||
.include "../constants/gba_constants.inc"
|
||||
|
||||
.syntax unified
|
||||
.arm
|
||||
|
||||
.set SOFT_RESET_DIRECT_BUF, 0x03007FFA
|
||||
|
||||
thumb_func_start ArcTan2
|
||||
ArcTan2: @ 0x02011950
|
||||
svc #0xa
|
||||
bx lr
|
||||
|
||||
thumb_func_start CpuFastSet
|
||||
CpuFastSet: @ 0x02011954
|
||||
svc #0xc
|
||||
bx lr
|
||||
|
||||
thumb_func_start CpuSet
|
||||
CpuSet: @ 0x02011958
|
||||
svc #0xb
|
||||
bx lr
|
||||
|
||||
thumb_func_start Div
|
||||
Div: @ 0x0201195C
|
||||
svc #6
|
||||
bx lr
|
||||
|
||||
thumb_func_start Mod
|
||||
Mod: @ 0x02011960
|
||||
svc #6
|
||||
adds r0, r1, #0
|
||||
bx lr
|
||||
.align 2, 0
|
||||
|
||||
thumb_func_start LZ77UnCompVram
|
||||
LZ77UnCompVram: @ 0x02011968
|
||||
svc #0x12
|
||||
bx lr
|
||||
|
||||
thumb_func_start LZ77UnCompWram
|
||||
LZ77UnCompWram: @ 0x0201196C
|
||||
svc #0x11
|
||||
bx lr
|
||||
|
||||
thumb_func_start ObjAffineSet
|
||||
ObjAffineSet: @ 0x02011970
|
||||
svc #0xf
|
||||
bx lr
|
||||
|
||||
thumb_func_start Sqrt
|
||||
Sqrt: @ 0x02011974
|
||||
svc #8
|
||||
bx lr
|
||||
|
||||
thumb_func_start VBlankIntrWait
|
||||
VBlankIntrWait: @ 0x02011978
|
||||
movs r2, #0
|
||||
svc #5
|
||||
bx lr
|
||||
.align 2, 0
|
||||
|
||||
thumb_func_start SoftResetRom
|
||||
SoftResetRom:
|
||||
ldr r3, =REG_IME
|
||||
movs r2, #0
|
||||
strb r2, [r3, #0]
|
||||
ldr r3, =SOFT_RESET_DIRECT_BUF
|
||||
movs r2, #0
|
||||
strb r2, [r3, #0]
|
||||
subs r3, #SOFT_RESET_DIRECT_BUF - 0x3007f00
|
||||
mov sp, r3
|
||||
svc #1
|
||||
svc #0
|
||||
.align 2, 0
|
||||
@@ -238,7 +238,17 @@ SECTIONS {
|
||||
build/mb_chao_garden/asm/code.o(.text);
|
||||
build/mb_chao_garden/asm/m4a0.o(.text);
|
||||
build/mb_chao_garden/src/m4a.o(.text);
|
||||
build/mb_chao_garden/asm/libagbsyscall.o(.text);
|
||||
*libagbsyscall.a:ArcTan2.o(.text);
|
||||
*libagbsyscall.a:CpuFastSet.o(.text);
|
||||
*libagbsyscall.a:CpuSet.o(.text);
|
||||
*libagbsyscall.a:Div.o(.text);
|
||||
*libagbsyscall.a:Mod.o(.text);
|
||||
*libagbsyscall.a:LZ77UnCompVram.o(.text);
|
||||
*libagbsyscall.a:LZ77UnCompWram.o(.text);
|
||||
*libagbsyscall.a:ObjAffineSet.o(.text);
|
||||
*libagbsyscall.a:Sqrt.o(.text);
|
||||
*libagbsyscall.a:VBlankIntrWait.o(.text);
|
||||
*libagbsyscall.a:SoftResetRom.o(.text);
|
||||
build/mb_chao_garden/src/agb_flash.o(.text);
|
||||
build/mb_chao_garden/src/agb_flash_512k.o(.text);
|
||||
build/mb_chao_garden/src/agb_flash_le_512k.o(.text);
|
||||
|
||||
Reference in new issue
Block a user