diff options
author | PikalaxALT <pikalaxalt@gmail.com> | 2020-04-28 18:05:13 -0400 |
---|---|---|
committer | PikalaxALT <pikalaxalt@gmail.com> | 2020-04-28 18:05:13 -0400 |
commit | da42b2541090efd6926cec7aa125238e92d26711 (patch) | |
tree | 45dbb696e0165c587e4dd56cd75f5ffb85645aef | |
parent | 9fc70249b9526425c8c1f42a767619fe2efbebea (diff) |
Fully functional arm7.lsf (not travis equipped)
-rw-r--r-- | INSTALL.md | 8 | ||||
-rw-r--r-- | Makefile | 11 | ||||
-rw-r--r-- | arm7/Makefile | 14 | ||||
-rw-r--r-- | arm7/arm7.lsf (renamed from arm7/arm7-ts.lsf) | 1 | ||||
-rw-r--r-- | arm7/arm7.sha1 | 2 | ||||
-rw-r--r-- | arm7/asm/dtcm2.s | 24 | ||||
-rw-r--r-- | arm7/asm/dtcm_bss.s | 470 | ||||
-rw-r--r-- | arm7/asm/ext.s | 4 | ||||
-rw-r--r-- | arm7/global.inc | 12 | ||||
-rw-r--r-- | arm7/undefined_syms.txt | 121 | ||||
-rw-r--r-- | arm9/Makefile | 11 | ||||
-rw-r--r-- | arm9/arm9.lsf | 0 | ||||
-rw-r--r-- | arm9/arm9.sha1 | 2 |
13 files changed, 520 insertions, 160 deletions
@@ -8,7 +8,11 @@ The build system requires the use of the Metrowerk C Compiler 2.0/base to compil In the future, a GCC option will be available so MWCC is not required to build, however it is required for a matching ROM. -### 3. Dependencies +### 3. Install Nitro SDK + +As with the compiler, the Nitro SDK is proprietary and cannot be distributed here. Opened the pinned Mega folder in the PRET discord and download "NITRO SDK v3.0.zip" and "NITRO SDK V3.0 Plus 2.zip" from the "SDK System Libraries" folder. Extract v3.0.zip into a separate folder, then extract v3.0 Plus 2.zip into the same folder, overwriting when prompted. Copy the contents of tools/bin from the Nitro SDK to tools/bin in your pokediamond clone. Finally, copy include/nitro/specfiles/ARM7-TS.lcf.template into the arm7 subdirectory, and include/nitro/specfiles/ARM9-TS.lcf.template into the arm9 subdirectory. Be sure to all comments from both of these files (lines where the first non-whitespace character is `#`). + +### 4. Dependencies #### Linux @@ -46,7 +50,7 @@ You will still require the following packages: Install them using either the Cygwin package manager or using pacman on Msys2. -### 4. Build ROM +### 5. Build ROM Run `make` to build the ROM. @@ -54,8 +54,8 @@ S_FILES := $(foreach dir,$(ASM_DIRS),$(wildcard $(dir)/*.s)) O_FILES := $(foreach file,$(C_FILES),$(BUILD_DIR)/$(file:.c=.o)) \ $(foreach file,$(S_FILES),$(BUILD_DIR)/$(file:.s=.o)) \ -ARM9BIN := arm9/build/arm9.bin -ARM7BIN := arm7/build/arm7.bin +ARM9BIN := arm9/build/arm9.sbin +ARM7BIN := arm7/build/arm7.sbin ##################### Compiler Options ####################### @@ -94,7 +94,7 @@ JSONPROC = $(TOOLS_DIR)/jsonproc/jsonproc GFX = $(TOOLS_DIR)/nitrogfx/nitrogfx MWASMARM_PATCHER = $(TOOLS_DIR)/mwasmarm_patcher/mwasmarm_patcher$(EXE) -q -TOOLDIRS = $(filter-out $(TOOLS_DIR)/mwccarm,$(wildcard $(TOOLS_DIR)/*)) +TOOLDIRS = $(filter-out $(TOOLS_DIR)/mwccarm $(TOOLS_DIR)/bin,$(wildcard $(TOOLS_DIR)/*)) TOOLBASE = $(TOOLDIRS:$(TOOLS_DIR)/%=%) TOOLS = $(foreach tool,$(TOOLBASE),$(TOOLS_DIR)/$(tool)/$(tool)$(EXE)) @@ -161,7 +161,10 @@ $(BUILD_DIR)/$(LD_SCRIPT): $(LD_SCRIPT) undefined_syms.txt $(CPP) $(VERSION_CFLAGS) -MMD -MP -MT $@ -MF $@.d -I include/ -I . -DBUILD_DIR=$(BUILD_DIR) -o $@ $< $(ELF): $(O_FILES) $(BUILD_DIR)/$(LD_SCRIPT) $(ARM9BIN) $(ARM7BIN) - $(LD) $(LDFLAGS) $(BUILD_DIR)/$(LD_SCRIPT) -o $(ELF) $(O_FILES) $(ARM9BIN) $(ARM7BIN) + # Hack because mwldarm doesn't like the sbin suffix + cp $(ARM7BIN) $(BUILD_DIR)/arm7.bin + cp $(ARM9BIN) $(BUILD_DIR)/arm9.bin + $(LD) $(LDFLAGS) $(BUILD_DIR)/$(LD_SCRIPT) -o $(ELF) $(O_FILES) $(BUILD_DIR)/arm7.bin $(BUILD_DIR)/arm9.bin $(ROM): $(ELF) $(OBJCOPY) -O binary --gap-fill=0xFF --pad-to=0x04000000 $< $@ diff --git a/arm7/Makefile b/arm7/Makefile index cdf09c74..cdbb27d7 100644 --- a/arm7/Makefile +++ b/arm7/Makefile @@ -39,9 +39,11 @@ BUILD_DIR := build TARGET := arm7 -ROM := $(BUILD_DIR)/$(TARGET).bin +ROM := $(BUILD_DIR)/$(TARGET).sbin ELF := $(BUILD_DIR)/$(TARGET).elf -LD_SCRIPT := arm7.lcf +LD_SCRIPT := $(TARGET).lcf +LD_SPEC := $(TARGET).lsf +LD_TEMPLATE := ARM7-TS.lcf.template # Directories containing source files SRC_DIRS := src @@ -69,6 +71,7 @@ MWCCARM := $(TOOLS_DIR)/mwccarm/$(MWCCVERSION)/mwccarm.exe # only dependency should be MWCCARM. MWLDARM := $(TOOLS_DIR)/mwccarm/$(MWCCVERSION)/mwldarm.exe MWASMARM := $(TOOLS_DIR)/mwccarm/$(MWCCVERSION)/mwasmarm.exe +MAKELSF := $(WINE) $(TOOLS_DIR)/bin/makelcf.exe AS := $(WINE) $(MWASMARM) CC := $(WINE) $(MWCCARM) @@ -91,7 +94,7 @@ JSONPROC = $(TOOLS_DIR)/jsonproc/jsonproc GFX = $(TOOLS_DIR)/nitrogfx/nitrogfx MWASMARM_PATCHER = $(TOOLS_DIR)/mwasmarm_patcher/mwasmarm_patcher$(EXE) -q -TOOLDIRS = $(filter-out $(TOOLS_DIR)/mwccarm,$(wildcard $(TOOLS_DIR)/*)) +TOOLDIRS = $(filter-out $(TOOLS_DIR)/mwccarm $(TOOLS_DIR)/bin,$(wildcard $(TOOLS_DIR)/*)) TOOLBASE = $(TOOLDIRS:$(TOOLS_DIR)/%=%) TOOLS = $(foreach tool,$(TOOLBASE),$(TOOLS_DIR)/$(tool)/$(tool)$(EXE)) @@ -141,12 +144,11 @@ $(BUILD_DIR)/%.o: %.c $(BUILD_DIR)/%.o: %.s $(AS) $(ASFLAGS) $< -o $@ -$(BUILD_DIR)/$(LD_SCRIPT): $(LD_SCRIPT) undefined_syms.txt - $(CPP) $(VERSION_CFLAGS) -MMD -MP -MT $@ -MF $@.d -I include/ -I . -DBUILD_DIR=$(BUILD_DIR) -o $@ $< +$(BUILD_DIR)/$(LD_SCRIPT): $(LD_SPEC) $(LD_TEMPLATE) + $(MAKELSF) $< $(LD_TEMPLATE) $@ $(ROM): $(O_FILES) $(BUILD_DIR)/$(LD_SCRIPT) $(LD) $(LDFLAGS) $(BUILD_DIR)/$(LD_SCRIPT) -o $(ELF) $(O_FILES) - cp $(ROM:%.bin=%.sbin) $@ # Make sure build directory exists before compiling anything DUMMY != mkdir -p $(ALL_DIRS) diff --git a/arm7/arm7-ts.lsf b/arm7/arm7.lsf index facd658e..8bc0f86d 100644 --- a/arm7/arm7-ts.lsf +++ b/arm7/arm7.lsf @@ -20,7 +20,6 @@ Autoload WRAM Object dtcm2.o Object dtcm_data.o Object dtcm_bss.o - Object dtcm_bss. } Autoload EXT diff --git a/arm7/arm7.sha1 b/arm7/arm7.sha1 index e3bf79ef..e9afff54 100644 --- a/arm7/arm7.sha1 +++ b/arm7/arm7.sha1 @@ -1 +1 @@ -39aacbf97ae65b17783057aeed06b80049b18dee build/arm7.bin +39aacbf97ae65b17783057aeed06b80049b18dee build/arm7.sbin diff --git a/arm7/asm/dtcm2.s b/arm7/asm/dtcm2.s index 522c63c2..9f70a313 100644 --- a/arm7/asm/dtcm2.s +++ b/arm7/asm/dtcm2.s @@ -6284,28 +6284,28 @@ _03806664: .word _0380A3F0 arm_func_start FUN_03806668 FUN_03806668: ;@ 0x03806668 - ldr pc, _0380666C ;@ =FUNC_06006978 -_0380666C: .word FUNC_06006978 + ldr pc, _0380666C ;@ =FUN_06006978 +_0380666C: .word FUN_06006978 arm_func_start FUN_03806670 FUN_03806670: ;@ 0x03806670 - ldr pc, _03806674 ;@ =FUNC_060009A4 -_03806674: .word FUNC_060009A4 + ldr pc, _03806674 ;@ =FUN_060009A4 +_03806674: .word FUN_060009A4 arm_func_start FUN_03806678 FUN_03806678: ;@ 0x03806678 - ldr pc, _0380667C ;@ =FUNC_06000204 -_0380667C: .word FUNC_06000204 + ldr pc, _0380667C ;@ =FUN_06000204 +_0380667C: .word FUN_06000204 arm_func_start FUN_03806680 FUN_03806680: ;@ 0x03806680 - ldr pc, _03806684 ;@ =FUNC_06008CC4 -_03806684: .word FUNC_06008CC4 + ldr pc, _03806684 ;@ =FUN_06008CC4 +_03806684: .word FUN_06008CC4 arm_func_start FUN_03806688 FUN_03806688: ;@ 0x03806688 - ldr pc, _0380668C ;@ =FUNC_060001F8 -_0380668C: .word FUNC_060001F8 + ldr pc, _0380668C ;@ =FUN_060001F8 +_0380668C: .word FUN_060001F8 arm_func_start FUN_03806690 FUN_03806690: ;@ 0x03806690 @@ -6613,8 +6613,8 @@ _03806A8C: .word _0380A4A4 arm_func_start FUN_03806A90 FUN_03806A90: ;@ 0x03806A90 - ldr pc, _03806A94 ;@ =FUNC_06000798 -_03806A94: .word FUNC_06000798 + ldr pc, _03806A94 ;@ =FUN_06000798 +_03806A94: .word FUN_06000798 arm_func_start FUN_03806A98 FUN_03806A98: ;@ 0x03806A98 diff --git a/arm7/asm/dtcm_bss.s b/arm7/asm/dtcm_bss.s new file mode 100644 index 00000000..21efffd5 --- /dev/null +++ b/arm7/asm/dtcm_bss.s @@ -0,0 +1,470 @@ + .include "asm/macros.inc + .include "global.inc" + .section .bss + .global _0380770C +_0380770C: ;0x0380770C + .space 0x03807714 - 0x0380770C + + .global _03807714 +_03807714: ;0x03807714 + .space 0x03807718 - 0x03807714 + + .global _03807718 +_03807718: ;0x03807718 + .space 0x0380771C - 0x03807718 + + .global _0380771C +_0380771C: ;0x0380771C + .space 0x03807744 - 0x0380771C + + .global _03807744 +_03807744: ;0x03807744 + .space 0x03807748 - 0x03807744 + + .global _03807748 +_03807748: ;0x03807748 + .space 0x0380774C - 0x03807748 + + .global _0380774C +_0380774C: ;0x0380774C + .space 0x03807774 - 0x0380774C + + .global _03807774 +_03807774: ;0x03807774 + .space 0x03807780 - 0x03807774 + + .global _03807780 +_03807780: ;0x03807780 + .space 0x03807784 - 0x03807780 + + .global _03807784 +_03807784: ;0x03807784 + .space 0x03807788 - 0x03807784 + + .global _03807788 +_03807788: ;0x03807788 + .space 0x0380778C - 0x03807788 + + .global _0380778C +_0380778C: ;0x0380778C + .space 0x03807790 - 0x0380778C + + .global _03807790 +_03807790: ;0x03807790 + .space 0x03807794 - 0x03807790 + + .global _03807794 +_03807794: ;0x03807794 + .space 0x03807798 - 0x03807794 + + .global _03807798 +_03807798: ;0x03807798 + .space 0x0380779C - 0x03807798 + + .global _0380779C +_0380779C: ;0x0380779C + .space 0x038077A0 - 0x0380779C + + .global _038077A0 +_038077A0: ;0x038077A0 + .space 0x038077AC - 0x038077A0 + + .global _038077AC +_038077AC: ;0x038077AC + .space 0x03807850 - 0x038077AC + + .global _03807850 +_03807850: ;0x03807850 + .space 0x038078F4 - 0x03807850 + + .global _038078F4 +_038078F4: ;0x038078F4 + .space 0x038078F8 - 0x038078F4 + + .global _038078F8 +_038078F8: ;0x038078F8 + .space 0x0380791C - 0x038078F8 + + .global _0380791C +_0380791C: ;0x0380791C + .space 0x03807920 - 0x0380791C + + .global _03807920 +_03807920: ;0x03807920 + .space 0x03807924 - 0x03807920 + + .global _03807924 +_03807924: ;0x03807924 + .space 0x03807928 - 0x03807924 + + .global _03807928 +_03807928: ;0x03807928 + .space 0x03807930 - 0x03807928 + + .global _03807930 +_03807930: ;0x03807930 + .space 0x03807934 - 0x03807930 + + .global _03807934 +_03807934: ;0x03807934 + .space 0x0380793C - 0x03807934 + + .global _0380793C +_0380793C: ;0x0380793C + .space 0x03807940 - 0x0380793C + + .global _03807940 +_03807940: ;0x03807940 + .space 0x03807944 - 0x03807940 + + .global _03807944 +_03807944: ;0x03807944 + .space 0x03807948 - 0x03807944 + + .global _03807948 +_03807948: ;0x03807948 + .space 0x03807950 - 0x03807948 + + .global _03807950 +_03807950: ;0x03807950 + .space 0x03807954 - 0x03807950 + + .global _03807954 +_03807954: ;0x03807954 + .space 0x03807958 - 0x03807954 + + .global _03807958 +_03807958: ;0x03807958 + .space 0x0380795C - 0x03807958 + + .global _0380795C +_0380795C: ;0x0380795C + .space 0x038079DC - 0x0380795C + + .global _038079DC +_038079DC: ;0x038079DC + .space 0x038079E0 - 0x038079DC + + .global _038079E0 +_038079E0: ;0x038079E0 + .space 0x03807A0C - 0x038079E0 + + .global _03807A0C +_03807A0C: ;0x03807A0C + .space 0x03807A10 - 0x03807A0C + + .global _03807A10 +_03807A10: ;0x03807A10 + .space 0x03807A20 - 0x03807A10 + + .global _03807A20 +_03807A20: ;0x03807A20 + .space 0x03807A30 - 0x03807A20 + + .global _03807A30 +_03807A30: ;0x03807A30 + .space 0x03807A34 - 0x03807A30 + + .global _03807A34 +_03807A34: ;0x03807A34 + .space 0x03807A54 - 0x03807A34 + + .global _03807A54 +_03807A54: ;0x03807A54 + .space 0x03807A74 - 0x03807A54 + + .global _03807A74 +_03807A74: ;0x03807A74 + .space 0x03807AA0 - 0x03807A74 + + .global _03807AA0 +_03807AA0: ;0x03807AA0 + .space 0x03807F44 - 0x03807AA0 + + .global _03807F44 +_03807F44: ;0x03807F44 + .space 0x03807F48 - 0x03807F44 + + .global _03807F48 +_03807F48: ;0x03807F48 + .space 0x03807F4C - 0x03807F48 + + .global _03807F4C +_03807F4C: ;0x03807F4C + .space 0x03807F50 - 0x03807F4C + + .global _03807F50 +_03807F50: ;0x03807F50 + .space 0x03807F58 - 0x03807F50 + + .global _03807F58 +_03807F58: ;0x03807F58 + .space 0x03807F68 - 0x03807F58 + + .global _03807F68 +_03807F68: ;0x03807F68 + .space 0x03807F6C - 0x03807F68 + + .global _03807F6C +_03807F6C: ;0x03807F6C + .space 0x038084AC - 0x03807F6C + + .global _038084AC +_038084AC: ;0x038084AC + .space 0x038086EC - 0x038084AC + + .global _038086EC +_038086EC: ;0x038086EC + .space 0x03808EEC - 0x038086EC + + .global _03808EEC +_03808EEC: ;0x03808EEC + .space 0x038090EC - 0x03808EEC + + .global _038090EC +_038090EC: ;0x038090EC + .space 0x0380910C - 0x038090EC + + .global _0380910C +_0380910C: ;0x0380910C + .space 0x0380912C - 0x0380910C + + .global _0380912C +_0380912C: ;0x0380912C + .space 0x03809140 - 0x0380912C + + .global _03809140 +_03809140: ;0x03809140 + .space 0x03809188 - 0x03809140 + + .global _03809188 +_03809188: ;0x03809188 + .space 0x03809760 - 0x03809188 + + .global _03809760 +_03809760: ;0x03809760 + .space 0x03809764 - 0x03809760 + + .global _03809764 +_03809764: ;0x03809764 + .space 0x03809774 - 0x03809764 + + .global _03809774 +_03809774: ;0x03809774 + .space 0x03809780 - 0x03809774 + + .global _03809780 +_03809780: ;0x03809780 + .space 0x038099A0 - 0x03809780 + + .global _038099A0 +_038099A0: ;0x038099A0 + .space 0x038099A4 - 0x038099A0 + + .global _038099A4 +_038099A4: ;0x038099A4 + .space 0x038099A8 - 0x038099A4 + + .global _038099A8 +_038099A8: ;0x038099A8 + .space 0x038099AC - 0x038099A8 + + .global _038099AC +_038099AC: ;0x038099AC + .space 0x038099B0 - 0x038099AC + + .global _038099B0 +_038099B0: ;0x038099B0 + .space 0x038099B8 - 0x038099B0 + + .global _038099B8 +_038099B8: ;0x038099B8 + .space 0x03809C5C - 0x038099B8 + + .global _03809C5C +_03809C5C: ;0x03809C5C + .space 0x03809C7C - 0x03809C5C + + .global _03809C7C +_03809C7C: ;0x03809C7C + .space 0x03809CBC - 0x03809C7C + + .global _03809CBC +_03809CBC: ;0x03809CBC + .space 0x03809CC0 - 0x03809CBC + + .global _03809CC0 +_03809CC0: ;0x03809CC0 + .space 0x03809E40 - 0x03809CC0 + + .global _03809E40 +_03809E40: ;0x03809E40 + .space 0x03809E4C - 0x03809E40 + + .global _03809E4C +_03809E4C: ;0x03809E4C + .space 0x03809E50 - 0x03809E4C + + .global _03809E50 +_03809E50: ;0x03809E50 + .space 0x03809E54 - 0x03809E50 + + .global _03809E54 +_03809E54: ;0x03809E54 + .space 0x03809E80 - 0x03809E54 + + .global _03809E80 +_03809E80: ;0x03809E80 + .space 0x03809F28 - 0x03809E80 + + .global _03809F28 +_03809F28: ;0x03809F28 + .space 0x03809F2C - 0x03809F28 + + .global _03809F2C +_03809F2C: ;0x03809F2C + .space 0x03809F30 - 0x03809F2C + + .global _03809F30 +_03809F30: ;0x03809F30 + .space 0x03809F34 - 0x03809F30 + + .global _03809F34 +_03809F34: ;0x03809F34 + .space 0x03809F38 - 0x03809F34 + + .global _03809F38 +_03809F38: ;0x03809F38 + .space 0x03809F64 - 0x03809F38 + + .global _03809F64 +_03809F64: ;0x03809F64 + .space 0x03809F68 - 0x03809F64 + + .global _03809F68 +_03809F68: ;0x03809F68 + .space 0x03809F6C - 0x03809F68 + + .global _03809F6C +_03809F6C: ;0x03809F6C + .space 0x03809FA8 - 0x03809F6C + + .global _03809FA8 +_03809FA8: ;0x03809FA8 + .space 0x03809FB8 - 0x03809FA8 + + .global _03809FB8 +_03809FB8: ;0x03809FB8 + .space 0x03809FBC - 0x03809FB8 + + .global _03809FBC +_03809FBC: ;0x03809FBC + .space 0x03809FC0 - 0x03809FBC + + .global _03809FC0 +_03809FC0: ;0x03809FC0 + .space 0x03809FC4 - 0x03809FC0 + + .global _03809FC4 +_03809FC4: ;0x03809FC4 + .space 0x03809FC8 - 0x03809FC4 + + .global _03809FC8 +_03809FC8: ;0x03809FC8 + .space 0x03809FCC - 0x03809FC8 + + .global _03809FCC +_03809FCC: ;0x03809FCC + .space 0x03809FD0 - 0x03809FCC + + .global _03809FD0 +_03809FD0: ;0x03809FD0 + .space 0x03809FD4 - 0x03809FD0 + + .global _03809FD4 +_03809FD4: ;0x03809FD4 + .space 0x03809FEC - 0x03809FD4 + + .global _03809FEC +_03809FEC: ;0x03809FEC + .space 0x0380A018 - 0x03809FEC + + .global _0380A018 +_0380A018: ;0x0380A018 + .space 0x0380A038 - 0x0380A018 + + .global _0380A038 +_0380A038: ;0x0380A038 + .space 0x0380A03C - 0x0380A038 + + .global _0380A03C +_0380A03C: ;0x0380A03C + .space 0x0380A05C - 0x0380A03C + + .global _0380A05C +_0380A05C: ;0x0380A05C + .space 0x0380A06C - 0x0380A05C + + .global _0380A06C +_0380A06C: ;0x0380A06C + .space 0x0380A13C - 0x0380A06C + + .global _0380A13C +_0380A13C: ;0x0380A13C + .space 0x0380A210 - 0x0380A13C + + .global _0380A210 +_0380A210: ;0x0380A210 + .space 0x0380A3F0 - 0x0380A210 + + .global _0380A3F0 +_0380A3F0: ;0x0380A3F0 + .space 0x0380A3F4 - 0x0380A3F0 + + .global _0380A3F4 +_0380A3F4: ;0x0380A3F4 + .space 0x0380A3F8 - 0x0380A3F4 + + .global _0380A3F8 +_0380A3F8: ;0x0380A3F8 + .space 0x0380A3FC - 0x0380A3F8 + + .global _0380A3FC +_0380A3FC: ;0x0380A3FC + .space 0x0380A400 - 0x0380A3FC + + .global _0380A400 +_0380A400: ;0x0380A400 + .space 0x0380A4A4 - 0x0380A400 + + .global _0380A4A4 +_0380A4A4: ;0x0380A4A4 + .space 0x0380AA64 - 0x0380A4A4 + + .global _0380AA64 +_0380AA64: ;0x0380AA64 + .space 0x0380B064 - 0x0380AA64 + + .global _0380B064 +_0380B064: ;0x0380B064 + .space 0x0380B764 - 0x0380B064 + + .global _0380B764 +_0380B764: ;0x0380B764 + .space 0x0380B808 - 0x0380B764 + + .global _0380B808 +_0380B808: ;0x0380B808 + .space 0x0380B8AC - 0x0380B808 + + .global _0380B8AC +_0380B8AC: ;0x0380B8AC + .space 0x0380B8D8 - 0x0380B8AC + + .global _0380B8D8 +_0380B8D8: ;0x0380B8D8 + .space 0x0380B904 - 0x0380B8D8 + + .global _0380B904 +_0380B904: ;0x0380B904 + .space 0x0380B92C - 0x0380B904 diff --git a/arm7/asm/ext.s b/arm7/asm/ext.s index 7c312dce..2cb1a3a5 100644 --- a/arm7/asm/ext.s +++ b/arm7/asm/ext.s @@ -29598,11 +29598,11 @@ _06019A08: .space 0xF58 .global _0601A960 _0601A960: - .space 0x118 + .space 0x128 _0601AA88: .space 0x400 .global _0601AE88 _0601AE88: .space 0x2C _0601AEB4: - .space 92 + .space 60 diff --git a/arm7/global.inc b/arm7/global.inc index 8a1de743..9debfbf3 100644 --- a/arm7/global.inc +++ b/arm7/global.inc @@ -297,12 +297,12 @@ .extern _0380B064
; .ext
-.extern FUNC_060001F8
-.extern FUNC_06000204
-.extern FUNC_06000798
-.extern FUNC_060009A4
-.extern FUNC_06006978
-.extern FUNC_06008CC4
+.extern FUN_060001F8
+.extern FUN_06000204
+.extern FUN_06000798
+.extern FUN_060009A4
+.extern FUN_06006978
+.extern FUN_06008CC4
.extern _06019960
.extern _0601A960
.extern _0601AE88
diff --git a/arm7/undefined_syms.txt b/arm7/undefined_syms.txt index 4113b4bf..e69de29b 100644 --- a/arm7/undefined_syms.txt +++ b/arm7/undefined_syms.txt @@ -1,121 +0,0 @@ - -// ??? -// DTCM -// EWRAM -_0380770C = 0x0380770C; -_03807714 = 0x03807714; -_03807718 = 0x03807718; -_0380771C = 0x0380771C; -_03807744 = 0x03807744; -_03807748 = 0x03807748; -_0380774C = 0x0380774C; -_03807774 = 0x03807774; -_03807780 = 0x03807780; -_03807784 = 0x03807784; -_03807788 = 0x03807788; -_0380778C = 0x0380778C; -_03807790 = 0x03807790; -_03807794 = 0x03807794; -_03807798 = 0x03807798; -_0380779C = 0x0380779C; -_038077A0 = 0x038077A0; -_038077AC = 0x038077AC; -_03807850 = 0x03807850; -_038078F4 = 0x038078F4; -_038078F8 = 0x038078F8; -_0380791C = 0x0380791C; -_03807920 = 0x03807920; -_03807924 = 0x03807924; -_03807928 = 0x03807928; -_03807930 = 0x03807930; -_03807934 = 0x03807934; -_0380793C = 0x0380793C; -_03807940 = 0x03807940; -_03807944 = 0x03807944; -_03807948 = 0x03807948; -_03807950 = 0x03807950; -_03807954 = 0x03807954; -_03807958 = 0x03807958; -_0380795C = 0x0380795C; -_038079DC = 0x038079DC; -_038079E0 = 0x038079E0; -_03807A0C = 0x03807A0C; -_03807A10 = 0x03807A10; -_03807A20 = 0x03807A20; -_03807A30 = 0x03807A30; -_03807A34 = 0x03807A34; -_03807A54 = 0x03807A54; -_03807A74 = 0x03807A74; -_03807AA0 = 0x03807AA0; -_03807F44 = 0x03807F44; -_03807F48 = 0x03807F48; -_03807F4C = 0x03807F4C; -_03807F50 = 0x03807F50; -_03807F58 = 0x03807F58; -_03807F68 = 0x03807F68; -_03807F6C = 0x03807F6C; -_038084AC = 0x038084AC; -_038086EC = 0x038086EC; -_03808EEC = 0x03808EEC; -_038090EC = 0x038090EC; -_0380910C = 0x0380910C; -_0380912C = 0x0380912C; -_03809140 = 0x03809140; -_03809188 = 0x03809188; -_03809760 = 0x03809760; -_03809764 = 0x03809764; -_03809774 = 0x03809774; -_03809780 = 0x03809780; -_038099A0 = 0x038099A0; -_038099A4 = 0x038099A4; -_038099A8 = 0x038099A8; -_038099AC = 0x038099AC; -_038099B0 = 0x038099B0; -_038099B8 = 0x038099B8; -_03809C5C = 0x03809C5C; -_03809C7C = 0x03809C7C; -_03809CBC = 0x03809CBC; -_03809CC0 = 0x03809CC0; -_03809E40 = 0x03809E40; -_03809E4C = 0x03809E4C; -_03809E50 = 0x03809E50; -_03809E54 = 0x03809E54; -_03809E80 = 0x03809E80; -_03809F28 = 0x03809F28; -_03809F2C = 0x03809F2C; -_03809F30 = 0x03809F30; -_03809F34 = 0x03809F34; -_03809F38 = 0x03809F38; -_03809F64 = 0x03809F64; -_03809F68 = 0x03809F68; -_03809F6C = 0x03809F6C; -_03809FA8 = 0x03809FA8; -_03809FB8 = 0x03809FB8; -_03809FBC = 0x03809FBC; -_03809FC0 = 0x03809FC0; -_03809FC4 = 0x03809FC4; -_03809FC8 = 0x03809FC8; -_03809FCC = 0x03809FCC; -_03809FD0 = 0x03809FD0; -_03809FD4 = 0x03809FD4; -_03809FEC = 0x03809FEC; -_0380A018 = 0x0380A018; -_0380A038 = 0x0380A038; -_0380A03C = 0x0380A03C; -_0380A05C = 0x0380A05C; -_0380A06C = 0x0380A06C; -_0380A13C = 0x0380A13C; -_0380A210 = 0x0380A210; -_0380A3F0 = 0x0380A3F0; -_0380A3F4 = 0x0380A3F4; -_0380A3F8 = 0x0380A3F8; -_0380A3FC = 0x0380A3FC; -_0380A400 = 0x0380A400; -_0380A4A4 = 0x0380A4A4; -_0380AA64 = 0x0380AA64; -_0380B064 = 0x0380B064; -_0380B764 = 0x0380B764; -_0380B808 = 0x0380B808; -_0380B8AC = 0x0380B8AC; -_0380B8D8 = 0x0380B8D8; -_0380B904 = 0x0380B904; diff --git a/arm9/Makefile b/arm9/Makefile index ac28bbcf..9f61364b 100644 --- a/arm9/Makefile +++ b/arm9/Makefile @@ -39,9 +39,11 @@ BUILD_DIR := build TARGET := arm9 -ROM := $(BUILD_DIR)/$(TARGET).bin +ROM := $(BUILD_DIR)/$(TARGET).sbin ELF := $(BUILD_DIR)/$(TARGET).elf -LD_SCRIPT := arm9.lcf +LD_SCRIPT := $(TARGET).lcf +LD_SPEC := $(TARGET).lsf +LD_TEMPLATE := ARM9-TS.lcf.template # Directories containing source files SRC_DIRS := src @@ -95,7 +97,7 @@ JSONPROC = $(TOOLS_DIR)/jsonproc/jsonproc GFX = $(TOOLS_DIR)/nitrogfx/nitrogfx MWASMARM_PATCHER = $(TOOLS_DIR)/mwasmarm_patcher/mwasmarm_patcher$(EXE) -q -TOOLDIRS = $(filter-out $(TOOLS_DIR)/mwccarm,$(wildcard $(TOOLS_DIR)/*)) +TOOLDIRS = $(filter-out $(TOOLS_DIR)/mwccarm $(TOOLS_DIR)/bin,$(wildcard $(TOOLS_DIR)/*)) TOOLBASE = $(TOOLDIRS:$(TOOLS_DIR)/%=%) TOOLS = $(foreach tool,$(TOOLBASE),$(TOOLS_DIR)/$(tool)/$(tool)$(EXE)) @@ -145,7 +147,8 @@ $(BUILD_DIR)/%.o: %.c $(BUILD_DIR)/%.o: %.s $(AS) $(ASFLAGS) $< -o $@ -$(BUILD_DIR)/$(LD_SCRIPT): $(LD_SCRIPT) undefined_syms.txt macros.lcf.inc +$(BUILD_DIR)/$(LD_SCRIPT): $(LD_SCRIPT) $(LD_TEMPLATE) undefined_syms.txt macros.lcf.inc + # $(MAKELSF) $< $(LD_TEMPLATE) | $(CPP) $(VERSION_CFLAGS) -MMD -MP -MT $@ -MF $@.d -I include/ -I . -DBUILD_DIR=$(BUILD_DIR) -o $@ $(CPP) $(VERSION_CFLAGS) -MMD -MP -MT $@ -MF $@.d -I include/ -I . -DBUILD_DIR=$(BUILD_DIR) -o $@ $< $(ELF): $(O_FILES) $(BUILD_DIR)/$(LD_SCRIPT) $(BIN_FILES) diff --git a/arm9/arm9.lsf b/arm9/arm9.lsf new file mode 100644 index 00000000..e69de29b --- /dev/null +++ b/arm9/arm9.lsf diff --git a/arm9/arm9.sha1 b/arm9/arm9.sha1 index 3bc27b8a..dd825541 100644 --- a/arm9/arm9.sha1 +++ b/arm9/arm9.sha1 @@ -1 +1 @@ -f72681568e075a56beb25b584734a35d118468a1 build/arm9.bin +f72681568e075a56beb25b584734a35d118468a1 build/arm9.sbin |