Merge pull request #802 from PikalaxALT/gflib

Gflib and libagbsyscall
This commit is contained in:
PikalaxALT authored and GitHub committed 2019-09-27 11:34:55 -04:00
commit 301822603e
129 files changed
+786 -260

No files matched your search

+29 -8
View File
@@ -43,6 +43,7 @@ ELF = $(ROM:.gba=.elf)
MAP = $(ROM:.gba=.map)
C_SUBDIR = src
GFLIB_SUBDIR = gflib
ASM_SUBDIR = asm
DATA_SRC_SUBDIR = src/data
DATA_ASM_SUBDIR = data
@@ -50,6 +51,7 @@ SONG_SUBDIR = sound/songs
MID_SUBDIR = sound/songs/midi
C_BUILDDIR = $(OBJ_DIR)/$(C_SUBDIR)
GFLIB_BUILDDIR = $(OBJ_DIR)/$(GFLIB_SUBDIR)
ASM_BUILDDIR = $(OBJ_DIR)/$(ASM_SUBDIR)
DATA_ASM_BUILDDIR = $(OBJ_DIR)/$(DATA_ASM_SUBDIR)
SONG_BUILDDIR = $(OBJ_DIR)/$(SONG_SUBDIR)
@@ -73,14 +75,14 @@ OBJ_DIR := build/modern
LIBPATH := -L $(TOOLCHAIN)/lib/gcc/arm-none-eabi/$(GCC_VER)/thumb -L $(TOOLCHAIN)/arm-none-eabi/lib/thumb
endif
CPPFLAGS := -iquote include -Wno-trigraphs -DMODERN=$(MODERN)
CPPFLAGS := -iquote include -iquote $(GFLIB_SUBDIR) -Wno-trigraphs -DMODERN=$(MODERN)
ifeq ($(MODERN),0)
CPPFLAGS += -I tools/agbcc/include -I tools/agbcc
endif
LDFLAGS = -Map ../../$(MAP)
LIB := $(LIBPATH) -lgcc -lc
LIB := $(LIBPATH) -lgcc -lc -L../../libagbsyscall -lagbsyscall
SHA1 := $(shell { command -v sha1sum || command -v shasum; } 2>/dev/null) -c
GFX := tools/gbagfx/gbagfx$(EXE)
@@ -109,7 +111,7 @@ MAKEFLAGS += --no-print-directory
# Secondary expansion is required for dependency variables in object rules.
.SECONDEXPANSION:
.PHONY: all rom clean compare tidy tools mostlyclean clean-tools $(TOOLDIRS) berry_fix
.PHONY: all rom clean compare tidy tools mostlyclean clean-tools $(TOOLDIRS) berry_fix libagbsyscall
infoshell = $(foreach line, $(shell $1 | sed "s/ /__SPACE__/g"), $(info $(subst __SPACE__, ,$(line))))
@@ -125,6 +127,9 @@ C_SRCS_IN := $(wildcard $(C_SUBDIR)/*.c $(C_SUBDIR)/*/*.c $(C_SUBDIR)/*/*/*.c)
C_SRCS := $(foreach src,$(C_SRCS_IN),$(if $(findstring .inc.c,$(src)),,$(src)))
C_OBJS := $(patsubst $(C_SUBDIR)/%.c,$(C_BUILDDIR)/%.o,$(C_SRCS))
GFLIB_SRCS := $(wildcard $(GFLIB_SUBDIR)/*.c)
GFLIB_OBJS := $(patsubst $(GFLIB_SUBDIR)/%.c,$(GFLIB_BUILDDIR)/%.o,$(GFLIB_SRCS))
C_ASM_SRCS += $(wildcard $(C_SUBDIR)/*.s $(C_SUBDIR)/*/*.s $(C_SUBDIR)/*/*/*.s)
C_ASM_OBJS := $(patsubst $(C_SUBDIR)/%.s,$(C_BUILDDIR)/%.o,$(C_ASM_SRCS))
@@ -140,7 +145,7 @@ SONG_OBJS := $(patsubst $(SONG_SUBDIR)/%.s,$(SONG_BUILDDIR)/%.o,$(SONG_SRCS))
MID_SRCS := $(wildcard $(MID_SUBDIR)/*.mid)
MID_OBJS := $(patsubst $(MID_SUBDIR)/%.mid,$(MID_BUILDDIR)/%.o,$(MID_SRCS))
OBJS := $(C_OBJS) $(C_ASM_OBJS) $(ASM_OBJS) $(DATA_ASM_OBJS) $(SONG_OBJS) $(MID_OBJS)
OBJS := $(C_OBJS) $(GFLIB_OBJS) $(C_ASM_OBJS) $(ASM_OBJS) $(DATA_ASM_OBJS) $(SONG_OBJS) $(MID_OBJS)
OBJS_REL := $(patsubst $(OBJ_DIR)/%,%,$(OBJS))
SUBDIRS := $(sort $(dir $(OBJS)))
@@ -156,7 +161,7 @@ tools: $(TOOLDIRS)
$(TOOLDIRS):
@$(MAKE) -C $@ CC=$(HOSTCC) CXX=$(HOSTCXX)
rom: berry_fix $(ROM)
rom: $(ROM)
ifeq ($(COMPARE),1)
@$(SHA1) rom.sha1
endif
@@ -178,6 +183,7 @@ mostlyclean: tidy
find $(DATA_ASM_SUBDIR)/maps \( -iname 'connections.inc' -o -iname 'events.inc' -o -iname 'header.inc' \) -exec rm {} +
rm -f $(AUTO_GEN_TARGETS)
@$(MAKE) clean -C berry_fix
@$(MAKE) clean -C libagbsyscall
tidy:
rm -f $(ROM) $(ELF) $(MAP)
@@ -230,7 +236,7 @@ endif
ifeq ($(NODEP),1)
$(C_BUILDDIR)/%.o: c_dep :=
else
$(C_BUILDDIR)/%.o: c_dep = $(shell [[ -f $(C_SUBDIR)/$*.c ]] && $(SCANINC) -I include -I tools/agbcc/include $(C_SUBDIR)/$*.c)
$(C_BUILDDIR)/%.o: c_dep = $(shell [[ -f $(C_SUBDIR)/$*.c ]] && $(SCANINC) -I include -I tools/agbcc/include -I gflib $(C_SUBDIR)/$*.c)
endif
ifeq ($(DINFO),1)
@@ -243,6 +249,18 @@ $(C_BUILDDIR)/%.o : $(C_SUBDIR)/%.c $$(c_dep)
@echo -e ".text\n\t.align\t2, 0\n" >> $(C_BUILDDIR)/$*.s
$(AS) $(ASFLAGS) -o $@ $(C_BUILDDIR)/$*.s
ifeq ($(NODEP),1)
$(GFLIB_BUILDDIR)/%.o: c_dep :=
else
$(GFLIB_BUILDDIR)/%.o: c_dep = $(shell [[ -f $(GFLIB_SUBDIR)/$*.c ]] && $(SCANINC) -I include -I tools/agbcc/include -I gflib $(GFLIB_SUBDIR)/$*.c)
endif
$(GFLIB_BUILDDIR)/%.o : $(GFLIB_SUBDIR)/%.c $$(c_dep)
@$(CPP) $(CPPFLAGS) $< -o $(GFLIB_BUILDDIR)/$*.i
@$(PREPROC) $(GFLIB_BUILDDIR)/$*.i charmap.txt | $(CC1) $(CFLAGS) -o $(GFLIB_BUILDDIR)/$*.s
@echo -e ".text\n\t.align\t2, 0\n" >> $(GFLIB_BUILDDIR)/$*.s
$(AS) $(ASFLAGS) -o $@ $(GFLIB_BUILDDIR)/$*.s
ifeq ($(NODEP),1)
$(C_BUILDDIR)/%.o: c_asm_dep :=
else
@@ -293,7 +311,7 @@ endif
$(OBJ_DIR)/ld_script.ld: $(LD_SCRIPT) $(LD_SCRIPT_DEPS)
cd $(OBJ_DIR) && sed "s#tools/#../../tools/#g" ../../$(LD_SCRIPT) > ld_script.ld
$(ELF): $(OBJ_DIR)/ld_script.ld $(OBJS)
$(ELF): $(OBJ_DIR)/ld_script.ld $(OBJS) berry_fix libagbsyscall
cd $(OBJ_DIR) && $(LD) $(LDFLAGS) -T ld_script.ld -o ../../$@ $(OBJS_REL) $(LIB)
$(FIX) $@ -t"$(TITLE)" -c$(GAME_CODE) -m$(MAKER_CODE) -r$(REVISION) --silent
@@ -306,4 +324,7 @@ modern: ; @$(MAKE) MODERN=1
berry_fix/berry_fix.gba: berry_fix
berry_fix:
@$(MAKE) -C berry_fix COMPARE=$(COMPARE)
@$(MAKE) -C berry_fix COMPARE=$(COMPARE) TOOLCHAIN=$(TOOLCHAIN)
libagbsyscall:
@$(MAKE) -C libagbsyscall TOOLCHAIN=$(TOOLCHAIN)
+25 -3
View File
@@ -1,7 +1,29 @@
include $(DEVKITARM)/base_tools
TOOLCHAIN := $(DEVKITARM)
COMPARE ?= 0
ifeq ($(CC),)
HOSTCC := gcc
else
HOSTCC := $(CC)
endif
ifeq ($(CXX),)
HOSTCXX := g++
else
HOSTCXX := $(CXX)
endif
ifneq (,$(wildcard $(TOOLCHAIN)/base_tools))
include $(TOOLCHAIN)/base_tools
else
export PATH := $(TOOLCHAIN)/bin:$(PATH)
PREFIX := arm-none-eabi-
OBJCOPY := $(PREFIX)objcopy
export CC := $(PREFIX)gcc
export AS := $(PREFIX)as
endif
export CPP := $(PREFIX)cpp
export LD := $(PREFIX)ld
COMPARE ?= 0
ifeq ($(OS),Windows_NT)
EXE := .exe
@@ -144,7 +166,7 @@ $(DATA_ASM_BUILDDIR)/%.o: data_dep = $(shell $(SCANINC) $(DATA_ASM_SUBDIR)/$*.s)
endif
payload:
@$(MAKE) -C payload COMPARE=$(COMPARE)
@$(MAKE) -C payload COMPARE=$(COMPARE) TOOLCHAIN=$(TOOLCHAIN)
payload/payload.gba: payload
+24 -2
View File
@@ -1,7 +1,29 @@
include $(DEVKITARM)/base_tools
TOOLCHAIN := $(DEVKITARM)
COMPARE ?= 0
ifeq ($(CC),)
HOSTCC := gcc
else
HOSTCC := $(CC)
endif
ifeq ($(CXX),)
HOSTCXX := g++
else
HOSTCXX := $(CXX)
endif
ifneq (,$(wildcard $(TOOLCHAIN)/base_tools))
include $(TOOLCHAIN)/base_tools
else
export PATH := $(TOOLCHAIN)/bin:$(PATH)
PREFIX := arm-none-eabi-
OBJCOPY := $(PREFIX)objcopy
export CC := $(PREFIX)gcc
export AS := $(PREFIX)as
endif
export CPP := $(PREFIX)cpp
export LD := $(PREFIX)ld
COMPARE ?= 0
ifeq ($(OS),Windows_NT)
EXE := .exe
View File
File renamed without changes.
View File
File renamed without changes.
View File
File renamed without changes.
View File
File renamed without changes.
View File
File renamed without changes.
File renamed without changes.
View File
File renamed without changes.
File renamed without changes.
View File
File renamed without changes.
View File
File renamed without changes.
View File
File renamed without changes.
View File
File renamed without changes.
File renamed without changes.
File renamed without changes.
View File
File renamed without changes.
View File
File renamed without changes.
+1 -1
View File
@@ -1,6 +1,6 @@
#include "global.h"
#include "window.h"
#include "alloc.h"
#include "malloc.h"
#include "bg.h"
#include "blit.h"
View File
File renamed without changes.
+29 -15
View File
@@ -49,15 +49,15 @@ SECTIONS {
{
src/crt0.o(.text);
src/main.o(.text);
src/alloc.o(.text);
src/dma3_manager.o(.text);
src/gpu_regs.o(.text);
src/bg.o(.text);
src/blit.o(.text);
src/window.o(.text);
src/text.o(.text);
src/sprite.o(.text);
src/string_util.o(.text);
gflib/malloc.o(.text);
gflib/dma3_manager.o(.text);
gflib/gpu_regs.o(.text);
gflib/bg.o(.text);
gflib/blit.o(.text);
gflib/window.o(.text);
gflib/text.o(.text);
gflib/sprite.o(.text);
gflib/string_util.o(.text);
src/link.o(.text);
src/link_rfu.o(.text);
src/union_room.o(.text);
@@ -361,7 +361,21 @@ SECTIONS {
src/librfu_rfu.o(.text);
asm/librfu.o(.text);
src/libisagbprn.o(.text);
src/libagbsyscall.o(.text);
*libagbsyscall.a:ArcTan2.o(.text);
*libagbsyscall.a:BgAffineSet.o(.text);
*libagbsyscall.a:CpuFastSet.o(.text);
*libagbsyscall.a:CpuSet.o(.text);
*libagbsyscall.a:Div.o(.text);
*libagbsyscall.a:LZ77UnCompVram.o(.text);
*libagbsyscall.a:LZ77UnCompWram.o(.text);
*libagbsyscall.a:MultiBoot.o(.text);
*libagbsyscall.a:ObjAffineSet.o(.text);
*libagbsyscall.a:RLUnCompVram.o(.text);
*libagbsyscall.a:RLUnCompWram.o(.text);
*libagbsyscall.a:RegisterRamReset.o(.text);
*libagbsyscall.a:SoftReset.o(.text);
*libagbsyscall.a:Sqrt.o(.text);
*libagbsyscall.a:VBlankIntrWait.o(.text);
*libgcc.a:_call_via_rX.o(.text);
*libgcc.a:_divdi3.o(.text);
*libgcc.a:_divsi3.o(.text);
@@ -420,12 +434,12 @@ SECTIONS {
ALIGN(4)
{
src/main.o(.rodata);
src/bg.o(.rodata);
src/window.o(.rodata);
src/text.o(.rodata);
src/sprite.o(.rodata);
gflib/bg.o(.rodata);
gflib/window.o(.rodata);
gflib/text.o(.rodata);
gflib/sprite.o(.rodata);
data/io_reg.o(.rodata);
src/string_util.o(.rodata);
gflib/string_util.o(.rodata);
src/link.o(.rodata);
src/link.o(.rodata.str1.4);
src/link_rfu.o(.rodata);
+6 -1
View File
@@ -14,6 +14,7 @@ SECTIONS {
. = 0x1C000;
src/*.o(ewram_data);
gflib/*.o(ewram_data);
. = 0x40000;
}
@@ -25,12 +26,14 @@ SECTIONS {
{
/* .bss starts at 0x3000000 */
src/*.o(.bss);
gflib/*.o(.bss);
/* .bss.code starts at 0x3001AA8 */
src/m4a.o(.bss.code);
/* COMMON starts at 0x30022A8 */
src/*.o(COMMON);
gflib/*.o(COMMON);
*libc.a:sbrkr.o(COMMON);
end = .;
. = 0x8000;
@@ -43,6 +46,7 @@ SECTIONS {
{
src/crt0.o(.text);
src/*.o(.text);
gflib/*.o(.text);
asm/*.o(.text);
} =0
@@ -67,7 +71,7 @@ SECTIONS {
asm/librfu_intr.o(.text);
src/librfu_rfu.o(.text);
asm/librfu.o(.text);
src/libagbsyscall.o(.text);
*libagbsyscall.a:*.o(.text*);
*libgcc.a:*.o(.text*);
*libc.a:*.o(.text*);
src/libisagbprn.o(.text);
@@ -77,6 +81,7 @@ SECTIONS {
ALIGN(4)
{
src/*.o(.rodata*);
gflib/*.o(.rodata*);
data/*.o(.rodata*);
} =0
+98
View File
@@ -0,0 +1,98 @@
TOOLCHAIN := $(DEVKITARM)
COMPARE ?= 0
ifeq ($(CC),)
HOSTCC := gcc
else
HOSTCC := $(CC)
endif
ifeq ($(CXX),)
HOSTCXX := g++
else
HOSTCXX := $(CXX)
endif
ifneq (,$(wildcard $(TOOLCHAIN)/base_tools))
include $(TOOLCHAIN)/base_tools
else
export PATH := $(TOOLCHAIN)/bin:$(PATH)
PREFIX := arm-none-eabi-
OBJCOPY := $(PREFIX)objcopy
export CC := $(PREFIX)gcc
export AS := $(PREFIX)as
endif
export CPP := $(PREFIX)cpp
export LD := $(PREFIX)ld
ifeq ($(OS),Windows_NT)
EXE := .exe
else
EXE :=
endif
ASFLAGS := -mcpu=arm7tdmi
ARFLAGS := rc
SYSCALLS := IntrWait \
RegisterRamReset \
Sqrt \
MusicPlayerOpen \
SoundBiasReset \
SoundDriverVSyncOn \
Mod \
VBlankIntrWait \
MusicPlayerStart \
SoundDriverVSyncOff \
HuffUnComp \
SoftResetExram \
MusicPlayerFadeOut \
LZ77UnCompWram \
SoundDriverMain \
SoundBiasChange \
LZ77UnCompVram \
ArcTan2 \
MusicPlayerStop \
DivArm \
ModArm \
SoundDriverVSync \
SoundDriverInit \
BgAffineSet \
Diff8bitUnFilterWram \
MultiBoot \
MidiKey2Freq \
Div \
Diff8bitUnFilterVram \
ArcTan \
ObjAffineSet \
SoftResetRom \
SoundDriverMode \
RLUnCompWram \
BitUnPack \
SoundChannelClear \
CpuFastSet \
CpuSet \
Diff16bitUnFilter \
SoundBiasSet \
MusicPlayerContinue \
SoftReset \
RLUnCompVram
ASM_SRCS := libagbsyscall.s
ASM_OBJS := $(foreach syscall, $(SYSCALLS), $(syscall).o)
LIB := libagbsyscall.a
.PHONY: all clean
all: $(LIB)
@:
clean:
rm -f $(LIB) $(ASM_OBJS)
$(LIB): $(ASM_OBJS)
$(AR) $(ARFLAGS) $@ $^
$(ASM_OBJS): libagbsyscall.s
$(AS) $(ASFLAGS) --defsym L_$(*F)=1 -o $@ $<
+432
View File
@@ -0,0 +1,432 @@
.include "../constants/gba_constants.inc"
.include "../asm/macros/function.inc"
.text
.set SOFT_RESET_DIRECT_BUF, 0x03007FFA
.set RESET_EX_WRAM_FLAG, 0x1
.ifdef NO_GRANULAR_AGBSYSCALL
.set L_IntrWait, 1
.set L_RegisterRamReset, 1
.set L_Sqrt, 1
.set L_MusicPlayerOpen, 1
.set L_SoundBiasReset, 1
.set L_SoundDriverVSyncOn, 1
.set L_Mod, 1
.set L_VBlankIntrWait, 1
.set L_MusicPlayerStart, 1
.set L_SoundDriverVSyncOff, 1
.set L_HuffUnComp, 1
.set L_SoftResetExram, 1
.set L_MusicPlayerFadeOut, 1
.set L_LZ77UnCompWram, 1
.set L_SoundDriverMain, 1
.set L_SoundBiasChange, 1
.set L_LZ77UnCompVram, 1
.set L_ArcTan2, 1
.set L_MusicPlayerStop, 1
.set L_DivArm, 1
.set L_ModArm, 1
.set L_SoundDriverVSync, 1
.set L_SoundDriverInit, 1
.set L_BgAffineSet, 1
.set L_Diff8bitUnFilterWram, 1
.set L_MultiBoot, 1
.set L_MidiKey2Freq, 1
.set L_Div, 1
.set L_Diff8bitUnFilterVram, 1
.set L_ArcTan, 1
.set L_ObjAffineSet, 1
.set L_SoftResetRom, 1
.set L_SoundDriverMode, 1
.set L_RLUnCompWram, 1
.set L_BitUnPack, 1
.set L_SoundChannelClear, 1
.set L_CpuFastSet, 1
.set L_CpuSet, 1
.set L_Diff16bitUnFilter, 1
.set L_SoundBiasSet, 1
.set L_MusicPlayerContinue, 1
.set L_SoftReset, 1
.set L_RLUnCompVram, 1
.endif
.ifdef L_IntrWait
thumb_func_start IntrWait
IntrWait:
mov r2, #0
swi 4
bx lr
thumb_func_end IntrWait
.endif
.ifdef L_RegisterRamReset
thumb_func_start RegisterRamReset
RegisterRamReset:
swi 1
bx lr
thumb_func_end RegisterRamReset
.endif
.ifdef L_Sqrt
thumb_func_start Sqrt
Sqrt:
swi 8
bx lr
thumb_func_end Sqrt
.endif
.ifdef L_MusicPlayerOpen
thumb_func_start MusicPlayerOpen
MusicPlayerOpen:
swi 32
bx lr
thumb_func_end MusicPlayerOpen
.endif
.ifdef L_SoundBiasReset
thumb_func_start SoundBiasReset
SoundBiasReset:
mov r0, #0
swi 25
bx lr
thumb_func_end SoundBiasReset
.endif
.ifdef L_SoundDriverVSyncOn
thumb_func_start SoundDriverVSyncOn
SoundDriverVSyncOn:
swi 41
bx lr
thumb_func_end SoundDriverVSyncOn
.endif
.ifdef L_Mod
thumb_func_start Mod
Mod:
swi 6
mov r0, r1
bx lr
thumb_func_end Mod
.endif
.ifdef L_VBlankIntrWait
thumb_func_start VBlankIntrWait
VBlankIntrWait:
mov r2, #0
swi 5
bx lr
thumb_func_end VBlankIntrWait
.endif
.ifdef L_MusicPlayerStart
thumb_func_start MusicPlayerStart
MusicPlayerStart:
swi 33
bx lr
thumb_func_end MusicPlayerStart
.endif
.ifdef L_SoundDriverVSyncOff
thumb_func_start SoundDriverVSyncOff
SoundDriverVSyncOff:
swi 40
bx lr
thumb_func_end SoundDriverVSyncOff
.endif
.ifdef L_HuffUnComp
thumb_func_start HuffUnComp
HuffUnComp:
swi 19
bx lr
thumb_func_end HuffUnComp
.endif
.ifdef L_SoftResetExram
thumb_func_start SoftResetExram
SoftResetExram:
ldr r3, =REG_IME
mov r2, #0
strb r2, [r3, #0]
ldr r3, =SOFT_RESET_DIRECT_BUF
mov r2, #1
strb r2, [r3, #0]
sub r3, #SOFT_RESET_DIRECT_BUF - 0x3007f00
mov sp, r3
mov r2, #RESET_EX_WRAM_FLAG
bic r0, r2
swi 1
swi 0
.pool
thumb_func_end SoftResetExram
.endif
.ifdef L_MusicPlayerFadeOut
thumb_func_start MusicPlayerFadeOut
MusicPlayerFadeOut:
swi 36
bx lr
thumb_func_end MusicPlayerFadeOut
.endif
.ifdef L_LZ77UnCompWram
thumb_func_start LZ77UnCompWram
LZ77UnCompWram:
swi 17
bx lr
thumb_func_end LZ77UnCompWram
.endif
.ifdef L_SoundDriverMain
thumb_func_start SoundDriverMain
SoundDriverMain:
swi 28
bx lr
thumb_func_end SoundDriverMain
.endif
.ifdef L_SoundBiasChange
thumb_func_start SoundBiasChange
SoundBiasChange:
swi 25
bx lr
thumb_func_end SoundBiasChange
.endif
.ifdef L_LZ77UnCompVram
thumb_func_start LZ77UnCompVram
LZ77UnCompVram:
swi 18
bx lr
thumb_func_end LZ77UnCompVram
.endif
.ifdef L_ArcTan2
thumb_func_start ArcTan2
ArcTan2:
swi 10
bx lr
thumb_func_end ArcTan2
.endif
.ifdef L_MusicPlayerStop
thumb_func_start MusicPlayerStop
MusicPlayerStop:
swi 34
bx lr
thumb_func_end MusicPlayerStop
.endif
.ifdef L_DivArm
thumb_func_start DivArm
DivArm:
swi 7
bx lr
thumb_func_end DivArm
.endif
.ifdef L_ModArm
thumb_func_start ModArm
ModArm:
swi 7
mov r0, r1
bx lr
thumb_func_end ModArm
.endif
.ifdef L_SoundDriverVSync
thumb_func_start SoundDriverVSync
SoundDriverVSync:
swi 29
bx lr
thumb_func_end SoundDriverVSync
.endif
.ifdef L_SoundDriverInit
thumb_func_start SoundDriverInit
SoundDriverInit:
swi 26
bx lr
thumb_func_end SoundDriverInit
.endif
.ifdef L_BgAffineSet
thumb_func_start BgAffineSet
BgAffineSet:
swi 14
bx lr
thumb_func_end BgAffineSet
.endif
.ifdef L_Diff8bitUnFilterWram
thumb_func_start Diff8bitUnFilterWram
Diff8bitUnFilterWram:
swi 22
bx lr
thumb_func_end Diff8bitUnFilterWram
.endif
.ifdef L_MultiBoot
thumb_func_start MultiBoot
MultiBoot:
mov r1, #1
swi 37
bx lr
thumb_func_end MultiBoot
.endif
.ifdef L_MidiKey2Freq
thumb_func_start MidiKey2Freq
MidiKey2Freq:
swi 31
bx lr
thumb_func_end MidiKey2Freq
.endif
.ifdef L_Div
thumb_func_start Div
Div:
swi 6
bx lr
thumb_func_end Div
.endif
.ifdef L_Diff8bitUnFilterVram
thumb_func_start Diff8bitUnFilterVram
Diff8bitUnFilterVram:
swi 23
bx lr
thumb_func_end Diff8bitUnFilterVram
.endif
.ifdef L_ArcTan
thumb_func_start ArcTan
ArcTan:
swi 9
bx lr
thumb_func_end ArcTan
.endif
.ifdef L_ObjAffineSet
thumb_func_start ObjAffineSet
ObjAffineSet:
swi 15
bx lr
thumb_func_end ObjAffineSet
.endif
.ifdef L_SoftResetRom
thumb_func_start SoftResetRom
SoftResetRom:
ldr r3, =REG_IME
mov r2, #0
strb r2, [r3, #0]
ldr r3, =SOFT_RESET_DIRECT_BUF
mov r2, #0
strb r2, [r3, #0]
sub r3, #SOFT_RESET_DIRECT_BUF - 0x3007f00
mov sp, r3
swi 1
swi 0
.pool
thumb_func_end SoftResetRom
.endif
.ifdef L_SoundDriverMode
thumb_func_start SoundDriverMode
SoundDriverMode:
swi 27
bx lr
thumb_func_end SoundDriverMode
.endif
.ifdef L_RLUnCompWram
thumb_func_start RLUnCompWram
RLUnCompWram:
swi 20
bx lr
thumb_func_end RLUnCompWram
.endif
.ifdef L_BitUnPack
thumb_func_start BitUnPack
BitUnPack:
swi 16
bx lr
thumb_func_end BitUnPack
.endif
.ifdef L_SoundChannelClear
thumb_func_start SoundChannelClear
SoundChannelClear:
swi 30
bx lr
thumb_func_end SoundChannelClear
.endif
.ifdef L_CpuFastSet
thumb_func_start CpuFastSet
CpuFastSet:
swi 12
bx lr
thumb_func_end CpuFastSet
.endif
.ifdef L_CpuSet
thumb_func_start CpuSet
CpuSet:
swi 11
bx lr
thumb_func_end CpuSet
.endif
.ifdef L_Diff16bitUnFilter
thumb_func_start Diff16bitUnFilter
Diff16bitUnFilter:
swi 24
bx lr
thumb_func_end Diff16bitUnFilter
.endif
.ifdef L_SoundBiasSet
thumb_func_start SoundBiasSet
SoundBiasSet:
mov r0, #1
swi 25
bx lr
thumb_func_end SoundBiasSet
.endif
.ifdef L_MusicPlayerContinue
thumb_func_start MusicPlayerContinue
MusicPlayerContinue:
swi 35
bx lr
thumb_func_end MusicPlayerContinue
.endif
.ifdef L_SoftReset
thumb_func_start SoftReset
SoftReset:
ldr r3, =REG_IME
mov r2, #0
strb r2, [r3, #0]
ldr r1, =0x3007f00
mov sp, r1
swi 1
swi 0
.pool
thumb_func_end SoftReset
.endif
.ifdef L_RLUnCompVram
thumb_func_start RLUnCompVram
RLUnCompVram:
swi 21
bx lr
thumb_func_end RLUnCompVram
.endif
.align 2, 0 @ Don't pad with nop
+1 -1
View File
@@ -10,7 +10,7 @@
#include "item.h"
#include "item_menu.h"
#include "main.h"
#include "alloc.h"
#include "malloc.h"
#include "menu.h"
#include "new_game.h"
#include "party_menu.h"
+1 -1
View File
@@ -1,5 +1,5 @@
#include "global.h"
#include "alloc.h"
#include "malloc.h"
#include "battle_anim.h"
#include "battle_interface.h"
#include "decompress.h"
+1 -1
View File
@@ -1,5 +1,5 @@
#include "global.h"
#include "alloc.h"
#include "malloc.h"
#include "battle_anim.h"
#include "battle_interface.h"
#include "decompress.h"
+1 -1
View File
@@ -1,5 +1,5 @@
#include "global.h"
#include "alloc.h"
#include "malloc.h"
#include "battle.h"
#include "battle_anim.h"
#include "bg.h"
+1 -1
View File
@@ -7,7 +7,7 @@
#include "decompress.h"
#include "dma3.h"
#include "gpu_regs.h"
#include "alloc.h"
#include "malloc.h"
#include "palette.h"
#include "pokemon_icon.h"
#include "sprite.h"
+1 -1
View File
@@ -3,7 +3,7 @@
#include "contest.h"
#include "gpu_regs.h"
#include "graphics.h"
#include "alloc.h"
#include "malloc.h"
#include "palette.h"
#include "sound.h"
#include "sprite.h"
+1 -1
View File
@@ -8,7 +8,7 @@
#include "event_data.h"
#include "overworld.h"
#include "util.h"
#include "alloc.h"
#include "malloc.h"
#include "string_util.h"
#include "random.h"
#include "task.h"
+1 -1
View File
@@ -11,7 +11,7 @@
#include "palette.h"
#include "task.h"
#include "main.h"
#include "alloc.h"
#include "malloc.h"
#include "bg.h"
#include "gpu_regs.h"
#include "string_util.h"
+1 -1
View File
@@ -6,7 +6,7 @@
#include "constants/battle_anim.h"
#include "battle_interface.h"
#include "main.h"
#include "alloc.h"
#include "malloc.h"
#include "graphics.h"
#include "random.h"
#include "util.h"
+1 -1
View File
@@ -26,7 +26,7 @@
#include "link_rfu.h"
#include "load_save.h"
#include "main.h"
#include "alloc.h"
#include "malloc.h"
#include "m4a.h"
#include "palette.h"
#include "party_menu.h"
+1 -1
View File
@@ -9,7 +9,7 @@
#include "task.h"
#include "battle_tower.h"
#include "party_menu.h"
#include "alloc.h"
#include "malloc.h"
#include "palette.h"
#include "script.h"
#include "battle_setup.h"
+1 -1
View File
@@ -23,7 +23,7 @@
#include "main.h"
#include "load_save.h"
#include "script.h"
#include "alloc.h"
#include "malloc.h"
#include "overworld.h"
#include "event_scripts.h"
#include "constants/battle_frontier.h"
+1 -1
View File
@@ -17,7 +17,7 @@
#include "list_menu.h"
#include "mail.h"
#include "main.h"
#include "alloc.h"
#include "malloc.h"
#include "menu.h"
#include "menu_helpers.h"
#include "overworld.h"
+1 -1
View File
@@ -18,7 +18,7 @@
#include "international_string_util.h"
#include "sound.h"
#include "constants/songs.h"
#include "alloc.h"
#include "malloc.h"
#include "gpu_regs.h"
#include "constants/game_stat.h"
#include "trainer_hill.h"
+1 -1
View File
@@ -9,7 +9,7 @@
#include "field_weather.h"
#include "gpu_regs.h"
#include "main.h"
#include "alloc.h"
#include "malloc.h"
#include "overworld.h"
#include "palette.h"
#include "random.h"
+1 -1
View File
@@ -2,7 +2,7 @@
#include "battle.h"
#include "battle_anim.h"
#include "battle_controllers.h"
#include "alloc.h"
#include "malloc.h"
#include "pokemon.h"
#include "trainer_hill.h"
#include "party_menu.h"
+1 -1
View File
@@ -12,7 +12,7 @@
#include "bg.h"
#include "palette.h"
#include "decompress.h"
#include "alloc.h"
#include "malloc.h"
#include "gpu_regs.h"
#include "text.h"
#include "text_window.h"
+1 -1
View File
@@ -1,5 +1,5 @@
#include "global.h"
#include "alloc.h"
#include "malloc.h"
#include "berry_powder.h"
#include "bg.h"
#include "event_data.h"
+1 -1
View File
@@ -1,7 +1,7 @@
#include "global.h"
#include "gpu_regs.h"
#include "multiboot.h"
#include "alloc.h"
#include "malloc.h"
#include "bg.h"
#include "graphics.h"
#include "main.h"
+1 -1
View File
@@ -19,7 +19,7 @@
#include "string_util.h"
#include "strings.h"
#include "bg.h"
#include "alloc.h"
#include "malloc.h"
#include "scanline_effect.h"
#include "gpu_regs.h"
#include "graphics.h"
+1 -1
View File
@@ -6,7 +6,7 @@
#include "field_weather.h"
#include "gpu_regs.h"
#include "graphics.h"
#include "alloc.h"
#include "malloc.h"
#include "main.h"
#include "menu.h"
#include "overworld.h"
+1 -1
View File
@@ -1,7 +1,7 @@
#include "global.h"
#include "gpu_regs.h"
#include "bg.h"
#include "alloc.h"
#include "malloc.h"
#include "constants/items.h"
#include "constants/event_objects.h"
#include "constants/moves.h"
+1 -1
View File
@@ -1,5 +1,5 @@
#include "global.h"
#include "alloc.h"
#include "malloc.h"
#include "battle.h"
#include "battle_gfx_sfx_util.h"
#include "bg.h"
+1 -1
View File
@@ -1,5 +1,5 @@
#include "global.h"
#include "alloc.h"
#include "malloc.h"
#include "battle.h"
#include "battle_gfx_sfx_util.h"
#include "bg.h"
+1 -1
View File
@@ -3,7 +3,7 @@
#include "main.h"
#include "task.h"
#include "bg.h"
#include "alloc.h"
#include "malloc.h"
#include "window.h"
#include "text.h"
#include "menu.h"
+1 -1
View File
@@ -1,5 +1,5 @@
#include "global.h"
#include "alloc.h"
#include "malloc.h"
#include "battle.h"
#include "data.h"
#include "graphics.h"
+1 -1
View File
@@ -1,5 +1,5 @@
#include "global.h"
#include "alloc.h"
#include "malloc.h"
#include "data.h"
#include "decompress.h"
#include "pokemon.h"
+1 -1
View File
@@ -1,5 +1,5 @@
#include "global.h"
#include "alloc.h"
#include "malloc.h"
#include "decompress.h"
#include "decoration.h"
#include "decoration_inventory.h"
+1 -1
View File
@@ -3,7 +3,7 @@
#include "easy_chat.h"
#include "event_data.h"
#include "link.h"
#include "alloc.h"
#include "malloc.h"
#include "random.h"
#include "text.h"
#include "tv.h"
+1 -1
View File
@@ -5,7 +5,7 @@
#include "gpu_regs.h"
#include "scanline_effect.h"
#include "task.h"
#include "alloc.h"
#include "malloc.h"
#include "decompress.h"
#include "bg.h"
#include "window.h"
+1 -1
View File
@@ -1,5 +1,5 @@
#include "global.h"
#include "alloc.h"
#include "malloc.h"
#include "bg.h"
#include "dodrio_berry_picking.h"
#include "dynamic_placeholder_text_util.h"
+1 -1
View File
@@ -1,5 +1,5 @@
#include "global.h"
#include "alloc.h"
#include "malloc.h"
#include "bard_music.h"
#include "bg.h"
#include "data.h"
+1 -1
View File
@@ -17,7 +17,7 @@
#include "menu.h"
#include "trig.h"
#include "random.h"
#include "alloc.h"
#include "malloc.h"
#include "dma3.h"
#include "gpu_regs.h"
#include "bg.h"
+1 -1
View File
@@ -1,5 +1,5 @@
#include "global.h"
#include "alloc.h"
#include "malloc.h"
#include "decompress.h"
#include "ereader_helpers.h"
#include "link.h"
+1 -1
View File
@@ -1,5 +1,5 @@
#include "global.h"
#include "alloc.h"
#include "malloc.h"
#include "decompress.h"
#include "ereader_helpers.h"
#include "link.h"
+1 -1
View File
@@ -1,5 +1,5 @@
#include "global.h"
#include "alloc.h"
#include "malloc.h"
#include "battle_pyramid.h"
#include "berry.h"
#include "decoration.h"
+1 -1
View File
@@ -1,5 +1,5 @@
#include "global.h"
#include "alloc.h"
#include "malloc.h"
#include "battle.h"
#include "battle_message.h"
#include "bg.h"
+1 -1
View File
@@ -3,7 +3,7 @@
#include "gpu_regs.h"
#include "international_string_util.h"
#include "main.h"
#include "alloc.h"
#include "malloc.h"
#include "menu.h"
#include "palette.h"
#include "region_map.h"
+1 -1
View File
@@ -1,5 +1,5 @@
#include "global.h"
#include "alloc.h"
#include "malloc.h"
#include "battle.h"
#include "battle_tower.h"
#include "cable_club.h"
+1 -1
View File
@@ -7,7 +7,7 @@
#include "field_player_avatar.h"
#include "fieldmap.h"
#include "fldeff.h"
#include "alloc.h"
#include "malloc.h"
#include "metatile_behavior.h"
#include "overworld.h"
#include "party_menu.h"
+1 -1
View File
@@ -5,7 +5,7 @@
#include "battle_anim.h"
#include "event_data.h"
#include "recorded_battle.h"
#include "alloc.h"
#include "malloc.h"
#include "sprite.h"
#include "scanline_effect.h"
#include "text_window.h"
+1 -1
View File
@@ -24,7 +24,7 @@
#include "data.h"
#include "record_mixing.h"
#include "strings.h"
#include "alloc.h"
#include "malloc.h"
#include "save.h"
#include "load_save.h"
#include "battle_dome.h"
+1 -1
View File
@@ -6,7 +6,7 @@
#include "pokemon.h"
#include "text.h"
#include "text_window.h"
#include "alloc.h"
#include "malloc.h"
#include "gpu_regs.h"
#include "graphics.h"
#include "main.h"
+1 -1
View File
@@ -5,7 +5,7 @@
#include "task.h"
#include "title_screen.h"
#include "libgcnmultiboot.h"
#include "alloc.h"
#include "malloc.h"
#include "gpu_regs.h"
#include "link.h"
#include "multiboot_pokemon_colosseum.h"
+1 -1
View File
@@ -4,7 +4,7 @@
#include "string_util.h"
#include "text.h"
#include "event_data.h"
#include "alloc.h"
#include "malloc.h"
#include "secret_base.h"
#include "item_menu.h"
#include "strings.h"
+1 -1
View File
@@ -2,7 +2,7 @@
#include "decompress.h"
#include "graphics.h"
#include "item_icon.h"
#include "alloc.h"
#include "malloc.h"
#include "sprite.h"
#include "constants/items.h"
+1 -1
View File
@@ -25,7 +25,7 @@
#include "link.h"
#include "mail.h"
#include "main.h"
#include "alloc.h"
#include "malloc.h"
#include "map_name_popup.h"
#include "menu.h"
#include "money.h"
-116
View File
@@ -1,116 +0,0 @@
.include "constants/gba_constants.inc"
.include "asm/macros.inc"
.syntax unified
.text
thumb_func_start ArcTan2
ArcTan2: @ 82E7078
swi 0xA
bx lr
thumb_func_end ArcTan2
thumb_func_start BgAffineSet
@ void BgAffineSet(BgAffineSet_src_data *src, BgAffineSet_dest_data *dest, int entry_count)
BgAffineSet: @ 82E707C
swi 0xE
bx lr
thumb_func_end BgAffineSet
thumb_func_start CpuFastSet
@ void CpuFastSet(void *src, void *dest, unsigned int mode)
CpuFastSet: @ 82E7080
swi 0xC
bx lr
thumb_func_end CpuFastSet
thumb_func_start CpuSet
@ void CpuSet(void *src, void *dest, unsigned int mode)
CpuSet: @ 82E7084
swi 0xB
bx lr
thumb_func_end CpuSet
thumb_func_start Div
Div: @ 82E7088
swi 0x6
bx lr
thumb_func_end Div
thumb_func_start LZ77UnCompVram
@ void LZ77UnCompVram(void *src, void *dest)
LZ77UnCompVram: @ 82E708C
swi 0x12
bx lr
thumb_func_end LZ77UnCompVram
thumb_func_start LZ77UnCompWram
@ void LZ77UnCompWram(void *src, void *dest)
LZ77UnCompWram: @ 82E7090
swi 0x11
bx lr
thumb_func_end LZ77UnCompWram
thumb_func_start MultiBoot
@ s32 MultiBoot(struct MultiBootParam *mp)
MultiBoot: @ 82E7094
movs r1, 0x1
swi 0x25
bx lr
thumb_func_end MultiBoot
thumb_func_start ObjAffineSet
ObjAffineSet: @ 82E709C
swi 0xF
bx lr
thumb_func_end ObjAffineSet
thumb_func_start RLUnCompVram
RLUnCompVram: @ 82E70A0
swi 0x15
bx lr
thumb_func_end RLUnCompVram
thumb_func_start RLUnCompWram
RLUnCompWram: @ 82E70A4
swi 0x14
bx lr
thumb_func_end RLUnCompWram
thumb_func_start RegisterRamReset
@ void RegisterRamReset(int ResetFlags)
RegisterRamReset: @ 82E70A8
swi 0x1
bx lr
thumb_func_end RegisterRamReset
thumb_func_start SoftReset
@ void SoftReset()
SoftReset: @ 82E70AC
ldr r3, =REG_IME
movs r2, 0
strb r2, [r3]
ldr r1, =0x3007F00
mov sp, r1
swi 0x1
swi 0
.pool
thumb_func_end SoftReset
thumb_func_start Sqrt
@ s16 Sqrt(int)
Sqrt: @ 82E70C4
swi 0x8
bx lr
thumb_func_end Sqrt
thumb_func_start VBlankIntrWait
@ void VBlankIntrWait()
VBlankIntrWait: @ 82E70C8
movs r2, 0
swi 0x5
bx lr
thumb_func_end VBlankIntrWait
.align 2, 0 @ Don't pad with nop.
+1 -1
View File
@@ -2,7 +2,7 @@
// Includes
#include "global.h"
#include "m4a.h"
#include "alloc.h"
#include "malloc.h"
#include "reset_save_heap.h"
#include "save.h"
#include "bg.h"
+1 -1
View File
@@ -1,5 +1,5 @@
#include "global.h"
#include "alloc.h"
#include "malloc.h"
#include "battle.h"
#include "berry_blender.h"
#include "decompress.h"
+1 -1
View File
@@ -8,7 +8,7 @@
#include "trig.h"
#include "decompress.h"
#include "palette.h"
#include "alloc.h"
#include "malloc.h"
#include "strings.h"
#include "sound.h"
#include "constants/songs.h"
+1 -1
View File
@@ -1,5 +1,5 @@
#include "global.h"
#include "alloc.h"
#include "malloc.h"
#include "berry_powder.h"
#include "item.h"
#include "load_save.h"
+1 -1
View File
@@ -17,7 +17,7 @@
#include "bg.h"
#include "pokemon_icon.h"
#include "constants/species.h"
#include "alloc.h"
#include "malloc.h"
#include "easy_chat.h"
#include "constants/rgb.h"
+1 -1
View File
@@ -1,6 +1,6 @@
#include "global.h"
#include "crt0.h"
#include "alloc.h"
#include "malloc.h"
#include "link.h"
#include "link_rfu.h"
#include "librfu.h"
+1 -1
View File
@@ -1,5 +1,5 @@
#include "global.h"
#include "alloc.h"
#include "malloc.h"
#include "battle.h"
#include "battle_setup.h"
#include "bg.h"
+1 -1
View File
@@ -1,5 +1,5 @@
#include "global.h"
#include "alloc.h"
#include "malloc.h"
#include "bg.h"
#include "blit.h"
#include "dma3.h"
+1 -1
View File
@@ -1,5 +1,5 @@
#include "global.h"
#include "alloc.h"
#include "malloc.h"
#include "battle_main.h"
#include "contest_effect.h"
#include "data.h"
+1 -1
View File
@@ -4,7 +4,7 @@
#include "gpu_regs.h"
#include "palette.h"
#include "decompress.h"
#include "alloc.h"
#include "malloc.h"
#include "menu.h"
#include "pokemon_icon.h"
#include "union_room.h"
+1 -1
View File
@@ -1,5 +1,5 @@
#include "global.h"
#include "alloc.h"
#include "malloc.h"
#include "decompress.h"
#include "overworld.h"
#include "script.h"
+1 -1
View File
@@ -1,5 +1,5 @@
#include "global.h"
#include "alloc.h"
#include "malloc.h"
#include "script.h"
#include "mevent.h"
#include "mevent_server.h"
+1 -1
View File
@@ -1,5 +1,5 @@
#include "global.h"
#include "alloc.h"
#include "malloc.h"
#include "decompress.h"
#include "util.h"
#include "link.h"
+1 -1
View File
@@ -1,5 +1,5 @@
#include "global.h"
#include "alloc.h"
#include "malloc.h"
#include "bg.h"
#include "event_data.h"
#include "event_object_movement.h"
+1 -1
View File
@@ -1,7 +1,7 @@
#include "global.h"
#include "event_object_movement.h"
#include "fieldmap.h"
#include "alloc.h"
#include "malloc.h"
#include "mossdeep_gym.h"
#include "script_movement.h"
#include "constants/event_object_movement_constants.h"
+1 -1
View File
@@ -9,7 +9,7 @@
#include "gpu_regs.h"
#include "move_relearner.h"
#include "list_menu.h"
#include "alloc.h"
#include "malloc.h"
#include "menu.h"
#include "menu_helpers.h"
#include "menu_specialized.h"
+1 -1
View File
@@ -2,7 +2,7 @@
#include "main.h"
#include "text.h"
#include "task.h"
#include "alloc.h"
#include "malloc.h"
#include "gpu_regs.h"
#include "scanline_effect.h"
#include "text_window.h"
+1 -1
View File
@@ -1,6 +1,6 @@
#include "global.h"
#include "naming_screen.h"
#include "alloc.h"
#include "malloc.h"
#include "palette.h"
#include "task.h"
#include "sprite.h"
+1 -1
View File
@@ -26,7 +26,7 @@
#include "link_rfu.h"
#include "load_save.h"
#include "main.h"
#include "alloc.h"
#include "malloc.h"
#include "m4a.h"
#include "map_name_popup.h"
#include "match_call.h"
+1 -1
View File
@@ -1,5 +1,5 @@
#include "global.h"
#include "alloc.h"
#include "malloc.h"
#include "battle.h"
#include "battle_anim.h"
#include "battle_controllers.h"
+1 -1
View File
@@ -14,7 +14,7 @@
#include "list_menu.h"
#include "mail.h"
#include "main.h"
#include "alloc.h"
#include "malloc.h"
#include "menu.h"
#include "menu_helpers.h"
#include "overworld.h"
+1 -1
View File
@@ -1,5 +1,5 @@
#include "global.h"
#include "alloc.h"
#include "malloc.h"
#include "battle.h"
#include "battle_controllers.h"
#include "battle_message.h"
+1 -1
View File
@@ -1,5 +1,5 @@
#include "global.h"
#include "alloc.h"
#include "malloc.h"
#include "battle.h"
#include "bg.h"
#include "data.h"
+1 -1
View File
@@ -8,7 +8,7 @@
#include "graphics.h"
#include "international_string_util.h"
#include "main.h"
#include "alloc.h"
#include "malloc.h"
#include "menu.h"
#include "m4a.h"
#include "overworld.h"
+1 -1
View File
@@ -4,7 +4,7 @@
#include "gpu_regs.h"
#include "graphics.h"
#include "main.h"
#include "alloc.h"
#include "malloc.h"
#include "menu.h"
#include "overworld.h"
#include "palette.h"
+1 -1
View File
@@ -2,7 +2,7 @@
#include "bg.h"
#include "m4a.h"
#include "main.h"
#include "alloc.h"
#include "malloc.h"
#include "palette.h"
#include "pokedex_cry_screen.h"
#include "sound.h"
+1 -1
View File
@@ -1,5 +1,5 @@
#include "global.h"
#include "alloc.h"
#include "malloc.h"
#include "apprentice.h"
#include "battle.h"
#include "battle_anim.h"
Loaded 100 of 129 files, more files were not shown because too many files have changed in this diff. Show more