diff options
Diffstat (limited to 'arm7')
-rw-r--r-- | arm7/Makefile | 4 | ||||
-rw-r--r-- | arm7/asm/arm7_rom.s | 81 |
2 files changed, 49 insertions, 36 deletions
diff --git a/arm7/Makefile b/arm7/Makefile index d2c2681d..edf4b913 100644 --- a/arm7/Makefile +++ b/arm7/Makefile @@ -89,7 +89,7 @@ LDFLAGS = -map -nodead -w off -proc v5te -interworking -map -symtab -m _start SHA1SUM = sha1sum JSONPROC = $(TOOLS_DIR)/jsonproc/jsonproc GFX = $(TOOLS_DIR)/nitrogfx/nitrogfx -MWASMARM_PATCHER = $(TOOLS_DIR)/mwasmarm_patcher/mwasmarm_patcher$(EXE) +MWASMARM_PATCHER = $(TOOLS_DIR)/mwasmarm_patcher/mwasmarm_patcher$(EXE) -q TOOLDIRS = $(filter-out $(TOOLS_DIR)/mwccarm,$(wildcard $(TOOLS_DIR)/*)) TOOLBASE = $(TOOLDIRS:$(TOOLS_DIR)/%=%) @@ -112,7 +112,7 @@ endif MAKEFLAGS += --no-print-directory all: $(ROM) - # @$(SHA1SUM) -c $(TARGET).sha1 + @$(SHA1SUM) -c $(TARGET).sha1 clean: mostlyclean make -C $(TOOLS_DIR)/mwasmarm_patcher clean diff --git a/arm7/asm/arm7_rom.s b/arm7/asm/arm7_rom.s index 3366eba4..65eda913 100644 --- a/arm7/asm/arm7_rom.s +++ b/arm7/asm/arm7_rom.s @@ -61,7 +61,7 @@ _023800a4: ldr r1, _23800f8 ldr lr, _23800fc bx r1 -_23800cc: .word FUN_023801B0 +_23800cc: .word SDK_STATIC_BSS_START _23800d0: .word 0x0380ff00 _23800d4: .word 0x0380ffc0 _23800d8: .word 0x0380ff80 @@ -128,30 +128,33 @@ _0238018c: bx lr _2380194: .word 0x027ffffa _2380198: - .word UNK_23A92F8 - .word UNK_23A931C - .word FUN_023801B0 - .word FUN_023801B0 - .word FUN_023801B0 - .word 0x00000000 + .word SDK_AUTOLOAD_LIST + .word SDK_AUTOLOAD_LIST_END + .word SDK_AUTOLOAD_START + .word SDK_STATIC_BSS_START + .word SDK_STATIC_BSS_END arm_func_end FUN_238015C - arm_func_start FUN_023801B0 -FUN_023801B0: + .balign 16, 0 + +SDK_STATIC_BSS_START: +SDK_STATIC_BSS_END: + +SDK_AUTOLOAD_START: .incbin "baserom.nds", 0x30D1B0, 0x91B0 - thumb_func_start ROM7_SVC_SoftReset -ROM7_SVC_SoftReset: ; 0x02389360 + thumb_func_start SVC_SoftReset +SVC_SoftReset: ; 0x02389360 swi 0 bx lr - thumb_func_start ROM7_SVC_WaitByLoop -ROM7_SVC_WaitByLoop: ; 0x02389364 + thumb_func_start SVC_WaitByLoop +SVC_WaitByLoop: ; 0x02389364 swi 3 bx lr - thumb_func_start ROM7_SVC_WaitIntr -ROM7_SVC_WaitIntr: ; 0x02389368 + thumb_func_start SVC_WaitIntr +SVC_WaitIntr: ; 0x02389368 ldr r2, =0x04000000 mov ip, r2 mov r2, #0x0 @@ -159,54 +162,64 @@ ROM7_SVC_WaitIntr: ; 0x02389368 bx lr .pool - thumb_func_start ROM7_SVC_WaitVBlankIntr -ROM7_SVC_WaitVBlankIntr: + thumb_func_start SVC_WaitVBlankIntr +SVC_WaitVBlankIntr: mov r2, #0x0 swi 5 bx lr - non_word_aligned_thumb_func_start ROM7_SVC_Halt -ROM7_SVC_Halt: + non_word_aligned_thumb_func_start SVC_Halt +SVC_Halt: swi 6 bx lr - non_word_aligned_thumb_func_start ROM7_SVC_Stop -ROM7_SVC_Stop: + non_word_aligned_thumb_func_start SVC_Stop +SVC_Stop: swi 7 bx lr - non_word_aligned_thumb_func_start ROM7_SVC_SoundBias -ROM7_SVC_SoundBias: + non_word_aligned_thumb_func_start SVC_SoundBias +SVC_SoundBias: swi 8 bx lr - non_word_aligned_thumb_func_start ROM7_SVC_SoundBiasSet -ROM7_SVC_SoundBiasSet: + non_word_aligned_thumb_func_start SVC_SoundBiasSet +SVC_SoundBiasSet: add r1, r0, #0x0 mov r0, #0x1 swi 8 bx lr - non_word_aligned_thumb_func_start ROM7_SVC_SoundBiasReset -ROM7_SVC_SoundBiasReset: + non_word_aligned_thumb_func_start SVC_SoundBiasReset +SVC_SoundBiasReset: add r1, r0, #0x0 mov r0, #0x0 swi 8 bx lr - non_word_aligned_thumb_func_start ROM7_SVC_Div -ROM7_SVC_Div: + non_word_aligned_thumb_func_start SVC_Div +SVC_Div: swi 9 bx lr - non_word_aligned_thumb_func_start ROM7_SVC_DivRem -ROM7_SVC_DivRem: + non_word_aligned_thumb_func_start SVC_DivRem +SVC_DivRem: swi 9 add r0, r1, #0x0 bx lr .incbin "baserom.nds", 0x3163a4, 0x1ff54 -UNK_23A92F8: - .incbin "baserom.nds", 0x3362F8, 0x24 +SDK_AUTOLOAD_LIST: + .word 0x027E0000 + .word 0x000000DC + .word 0x00000000 + + .word 0x037F8000 + .word 0x0000F70C + .word 0x00004220 + + .word 0x06000000 + .word 0x00019960 + .word 0x00001590 -UNK_23A931C: +SDK_AUTOLOAD_LIST_END: |