diff options
Diffstat (limited to 'asm')
-rw-r--r-- | asm/crt0.s | 4 | ||||
-rw-r--r-- | asm/dma3_manager.s | 4 | ||||
-rw-r--r-- | asm/gpu_bg.s | 2 | ||||
-rw-r--r-- | asm/gpu_obj.s | 2 | ||||
-rw-r--r-- | asm/libagbbackup.s | 2 | ||||
-rw-r--r-- | asm/libagbsyscall.s | 2 | ||||
-rw-r--r-- | asm/libgcnmultiboot.s | 4 | ||||
-rw-r--r-- | asm/libmks4agb.s | 2 | ||||
-rw-r--r-- | asm/librfu.s | 2 | ||||
-rw-r--r-- | asm/librtc.s | 2 | ||||
-rw-r--r-- | asm/macros.inc (renamed from asm/macros.s) | 14 | ||||
-rw-r--r-- | asm/macros/asm.inc (renamed from asm/macros/asm.s) | 0 | ||||
-rw-r--r-- | asm/macros/contest_ai_script.inc (renamed from asm/macros/contest_ai_script.s) | 0 | ||||
-rw-r--r-- | asm/macros/ec.inc (renamed from asm/macros/ec.s) | 0 | ||||
-rw-r--r-- | asm/macros/field_effect_script.inc (renamed from asm/macros/field_effect_script.s) | 0 | ||||
-rw-r--r-- | asm/macros/function.inc (renamed from asm/macros/function.s) | 0 | ||||
-rw-r--r-- | asm/macros/map.inc (renamed from asm/macros/map.s) | 0 | ||||
-rw-r--r-- | asm/macros/pokemon_data.inc (renamed from asm/macros/pokemon_data.s) | 0 | ||||
-rw-r--r-- | asm/macros/window.inc (renamed from asm/macros/window.s) | 0 | ||||
-rw-r--r-- | asm/main.s | 2 | ||||
-rw-r--r-- | asm/main_menu.s | 2 | ||||
-rw-r--r-- | asm/malloc.s | 339 | ||||
-rw-r--r-- | asm/multiboot.s | 2 | ||||
-rw-r--r-- | asm/pixel_buffer.s | 2 | ||||
-rw-r--r-- | asm/rom_80093CC.s | 4 | ||||
-rw-r--r-- | asm/rom_8032654.s | 4 | ||||
-rw-r--r-- | asm/rom_80A18F4.s | 4 | ||||
-rw-r--r-- | asm/rom_80A92F4.s | 4 | ||||
-rw-r--r-- | asm/rom_81BAD84.s | 4 | ||||
-rw-r--r-- | asm/rom_header.inc (renamed from asm/rom_header.s) | 0 | ||||
-rw-r--r-- | asm/rtc.s | 2 | ||||
-rw-r--r-- | asm/string_util.s | 2 | ||||
-rw-r--r-- | asm/text_renderer.s | 2 | ||||
-rw-r--r-- | asm/tileset_animation.s | 2 | ||||
-rw-r--r-- | asm/window.s | 2 |
35 files changed, 39 insertions, 378 deletions
diff --git a/asm/crt0.s b/asm/crt0.s index 7c2115c15..7b2f38bb7 100644 --- a/asm/crt0.s +++ b/asm/crt0.s @@ -1,4 +1,4 @@ - .include "constants/gba_constants.s" + .include "constants/gba_constants.inc" .syntax unified @@ -11,7 +11,7 @@ Start: @ 8000000 b Init - .include "asm/rom_header.s" + .include "asm/rom_header.inc" @ 80000C0 .word 0 diff --git a/asm/dma3_manager.s b/asm/dma3_manager.s index 6be63dabb..5ab41b675 100644 --- a/asm/dma3_manager.s +++ b/asm/dma3_manager.s @@ -1,5 +1,5 @@ - .include "asm/macros.s" - .include "constants/gba_constants.s" + .include "asm/macros.inc" + .include "constants/gba_constants.inc" .syntax unified diff --git a/asm/gpu_bg.s b/asm/gpu_bg.s index 76b383608..b523c1d2f 100644 --- a/asm/gpu_bg.s +++ b/asm/gpu_bg.s @@ -1,4 +1,4 @@ - .include "asm/macros.s" + .include "asm/macros.inc" .syntax unified diff --git a/asm/gpu_obj.s b/asm/gpu_obj.s index 2ae2eac56..dad412f9f 100644 --- a/asm/gpu_obj.s +++ b/asm/gpu_obj.s @@ -1,4 +1,4 @@ - .include "asm/macros.s" + .include "asm/macros.inc" .syntax unified diff --git a/asm/libagbbackup.s b/asm/libagbbackup.s index 01e972431..35180530c 100644 --- a/asm/libagbbackup.s +++ b/asm/libagbbackup.s @@ -1,4 +1,4 @@ - .include "asm/macros.s" + .include "asm/macros.inc" .syntax unified diff --git a/asm/libagbsyscall.s b/asm/libagbsyscall.s index 41f3718b9..812ab17ec 100644 --- a/asm/libagbsyscall.s +++ b/asm/libagbsyscall.s @@ -1,4 +1,4 @@ - .include "asm/macros.s" + .include "asm/macros.inc" .syntax unified diff --git a/asm/libgcnmultiboot.s b/asm/libgcnmultiboot.s index 7d8e4d340..0e418e51f 100644 --- a/asm/libgcnmultiboot.s +++ b/asm/libgcnmultiboot.s @@ -1,8 +1,8 @@ @ This library can be used to download and execute a multi-boot image from @ a GameCube using the JOY Bus protocol over the link cable. - .include "asm/macros.s" - .include "constants/constants.s" + .include "asm/macros.inc" + .include "constants/constants.inc" .equiv GCMB_STRUCT_BASE_DEST_PTR, 0x20 .equiv GCMB_STRUCT_CUR_DEST_PTR, 0x24 diff --git a/asm/libmks4agb.s b/asm/libmks4agb.s index c0af24a0e..09d4605ca 100644 --- a/asm/libmks4agb.s +++ b/asm/libmks4agb.s @@ -1,4 +1,4 @@ - .include "asm/macros.s" + .include "asm/macros.inc" .syntax unified diff --git a/asm/librfu.s b/asm/librfu.s index d0ee616b2..e60652e4f 100644 --- a/asm/librfu.s +++ b/asm/librfu.s @@ -1,4 +1,4 @@ - .include "asm/macros.s" + .include "asm/macros.inc" .syntax unified diff --git a/asm/librtc.s b/asm/librtc.s index f19734d61..b0c87bb3f 100644 --- a/asm/librtc.s +++ b/asm/librtc.s @@ -1,4 +1,4 @@ - .include "asm/macros.s" + .include "asm/macros.inc" .syntax unified diff --git a/asm/macros.s b/asm/macros.inc index 1e3a3e78f..642b6a33f 100644 --- a/asm/macros.s +++ b/asm/macros.inc @@ -1,10 +1,10 @@ - .include "asm/macros/asm.s" - .include "asm/macros/function.s" - .include "asm/macros/window.s" - .include "asm/macros/pokemon_data.s" - .include "asm/macros/ec.s" - .include "asm/macros/map.s" - .include "asm/macros/field_effect_script.s" + .include "asm/macros/asm.inc" + .include "asm/macros/function.inc" + .include "asm/macros/window.inc" + .include "asm/macros/pokemon_data.inc" + .include "asm/macros/ec.inc" + .include "asm/macros/map.inc" + .include "asm/macros/field_effect_script.inc" .macro region_map_entry x, y, width, height, name .byte \x diff --git a/asm/macros/asm.s b/asm/macros/asm.inc index 4ac003fab..4ac003fab 100644 --- a/asm/macros/asm.s +++ b/asm/macros/asm.inc diff --git a/asm/macros/contest_ai_script.s b/asm/macros/contest_ai_script.inc index 05d70e351..05d70e351 100644 --- a/asm/macros/contest_ai_script.s +++ b/asm/macros/contest_ai_script.inc diff --git a/asm/macros/ec.s b/asm/macros/ec.inc index a70b8e244..a70b8e244 100644 --- a/asm/macros/ec.s +++ b/asm/macros/ec.inc diff --git a/asm/macros/field_effect_script.s b/asm/macros/field_effect_script.inc index 597b89acb..597b89acb 100644 --- a/asm/macros/field_effect_script.s +++ b/asm/macros/field_effect_script.inc diff --git a/asm/macros/function.s b/asm/macros/function.inc index b109595df..b109595df 100644 --- a/asm/macros/function.s +++ b/asm/macros/function.inc diff --git a/asm/macros/map.s b/asm/macros/map.inc index 452f9b714..452f9b714 100644 --- a/asm/macros/map.s +++ b/asm/macros/map.inc diff --git a/asm/macros/pokemon_data.s b/asm/macros/pokemon_data.inc index 31c015334..31c015334 100644 --- a/asm/macros/pokemon_data.s +++ b/asm/macros/pokemon_data.inc diff --git a/asm/macros/window.s b/asm/macros/window.inc index 04c148114..04c148114 100644 --- a/asm/macros/window.s +++ b/asm/macros/window.inc diff --git a/asm/main.s b/asm/main.s index f02f39ed8..bbedc3c26 100644 --- a/asm/main.s +++ b/asm/main.s @@ -1,4 +1,4 @@ - .include "asm/macros.s" + .include "asm/macros.inc" .syntax unified diff --git a/asm/main_menu.s b/asm/main_menu.s index c6dccfff8..3ae2788c7 100644 --- a/asm/main_menu.s +++ b/asm/main_menu.s @@ -1,4 +1,4 @@ - .include "asm/macros.s" + .include "asm/macros.inc" .syntax unified diff --git a/asm/malloc.s b/asm/malloc.s deleted file mode 100644 index 529b654c7..000000000 --- a/asm/malloc.s +++ /dev/null @@ -1,339 +0,0 @@ - .include "asm/macros.s" - - .syntax unified - - .text - - thumb_func_start PutMemBlockHeader -@ void PutMemBlockHeader(void *block, struct MemBlock *prev, struct MemBlock *next, u32 size) -PutMemBlockHeader: @ 8000988 - push {r4,lr} - movs r4, 0 - strh r4, [r0] - ldr r4, =0x0000a3a3 - strh r4, [r0, 0x2] - str r3, [r0, 0x4] - str r1, [r0, 0x8] - str r2, [r0, 0xC] - pop {r4} - pop {r0} - bx r0 - .pool - thumb_func_end PutMemBlockHeader - - thumb_func_start PutFirstMemBlockHeader -@ void PutFirstMemBlockHeader(void *block, u32 size) -PutFirstMemBlockHeader: @ 80009A4 - push {lr} - adds r2, r0, 0 - adds r3, r1, 0 - subs r3, 0x10 - adds r1, r2, 0 - bl PutMemBlockHeader - pop {r0} - bx r0 - thumb_func_end PutFirstMemBlockHeader - - thumb_func_start AllocInternal -@ void *AllocInternal(struct MemBlock *head, u32 size) -AllocInternal: @ 80009B8 - push {r4-r6,lr} - adds r4, r0, 0 - adds r6, r4, 0 - movs r0, 0x3 - ands r0, r1 - cmp r0, 0 - beq _080009CC - lsrs r0, r1, 2 - adds r0, 0x1 - lsls r1, r0, 2 -_080009CC: - movs r2, 0x1 -_080009CE: - ldrh r0, [r4] - cmp r0, 0 - bne _08000A0C - ldr r3, [r4, 0x4] - cmp r3, r1 - bcc _08000A0C - subs r0, r3, r1 - cmp r0, 0x1F - bhi _080009E4 - strh r2, [r4] - b _08000A06 -_080009E4: - subs r3, 0x10 - subs r3, r1 - adds r0, r1, 0 - adds r0, 0x10 - adds r5, r4, r0 - strh r2, [r4] - str r1, [r4, 0x4] - ldr r2, [r4, 0xC] - adds r0, r5, 0 - adds r1, r4, 0 - bl PutMemBlockHeader - str r5, [r4, 0xC] - ldr r0, [r5, 0xC] - cmp r0, r6 - beq _08000A06 - str r5, [r0, 0x8] -_08000A06: - adds r0, r4, 0 - adds r0, 0x10 - b _08000A18 -_08000A0C: - ldr r0, [r4, 0xC] - cmp r0, r6 - beq _08000A16 - adds r4, r0, 0 - b _080009CE -_08000A16: - movs r0, 0 -_08000A18: - pop {r4-r6} - pop {r1} - bx r1 - thumb_func_end AllocInternal - - thumb_func_start FreeInternal -@ void FreeInternal(void *heapStart, void *pointer) -FreeInternal: @ 8000A20 - push {r4,r5,lr} - cmp r1, 0 - beq _08000A7C - adds r5, r0, 0 - adds r2, r1, 0 - subs r2, 0x10 - movs r0, 0 - strh r0, [r2] - ldr r3, [r2, 0xC] - cmp r3, r5 - beq _08000A54 - ldrh r4, [r3] - cmp r4, 0 - bne _08000A54 - ldr r0, [r2, 0x4] - adds r0, 0x10 - ldr r1, [r3, 0x4] - adds r0, r1 - str r0, [r2, 0x4] - strh r4, [r3, 0x2] - ldr r0, [r2, 0xC] - ldr r0, [r0, 0xC] - str r0, [r2, 0xC] - cmp r0, r5 - beq _08000A54 - str r2, [r0, 0x8] -_08000A54: - cmp r2, r5 - beq _08000A7C - ldr r1, [r2, 0x8] - ldrh r3, [r1] - cmp r3, 0 - bne _08000A7C - ldr r0, [r2, 0xC] - str r0, [r1, 0xC] - ldr r1, [r2, 0xC] - cmp r1, r5 - beq _08000A6E - ldr r0, [r2, 0x8] - str r0, [r1, 0x8] -_08000A6E: - strh r3, [r2, 0x2] - ldr r0, [r2, 0x8] - ldr r1, [r0, 0x4] - adds r1, 0x10 - ldr r2, [r2, 0x4] - adds r1, r2 - str r1, [r0, 0x4] -_08000A7C: - pop {r4,r5} - pop {r0} - bx r0 - thumb_func_end FreeInternal - - thumb_func_start AllocZeroedInternal -@ void *AllocZeroedInternal(void *heapStart, u32 size) -AllocZeroedInternal: @ 8000A84 - push {r4,r5,lr} - sub sp, 0x4 - adds r4, r1, 0 - bl AllocInternal - adds r5, r0, 0 - cmp r5, 0 - beq _08000AB8 - movs r0, 0x3 - ands r0, r4 - cmp r0, 0 - beq _08000AA2 - lsrs r0, r4, 2 - adds r0, 0x1 - lsls r4, r0, 2 -_08000AA2: - movs r0, 0 - str r0, [sp] - lsls r2, r4, 9 - lsrs r2, 11 - movs r0, 0xA0 - lsls r0, 19 - orrs r2, r0 - mov r0, sp - adds r1, r5, 0 - bl CpuSet -_08000AB8: - adds r0, r5, 0 - add sp, 0x4 - pop {r4,r5} - pop {r1} - bx r1 - thumb_func_end AllocZeroedInternal - - thumb_func_start CheckMemBlockInternal -@ bool8 CheckMemBlockInternal(struct MemBlock *head, struct MemBlock *node) -CheckMemBlockInternal: @ 8000AC4 - push {r4,r5,lr} - adds r5, r0, 0 - adds r3, r1, 0 - subs r3, 0x10 - ldrh r2, [r3, 0x2] - ldr r0, =0x0000a3a3 - cmp r2, r0 - bne _08000B0A - ldr r0, [r3, 0xC] - ldrh r1, [r0, 0x2] - adds r4, r0, 0 - cmp r1, r2 - bne _08000B0A - cmp r4, r5 - beq _08000AE8 - ldr r0, [r4, 0x8] - cmp r0, r3 - bne _08000B0A -_08000AE8: - ldr r2, [r3, 0x8] - ldrh r1, [r2, 0x2] - ldr r0, =0x0000a3a3 - cmp r1, r0 - bne _08000B0A - cmp r2, r5 - beq _08000AFC - ldr r0, [r2, 0xC] - cmp r0, r3 - bne _08000B0A -_08000AFC: - cmp r4, r5 - beq _08000B14 - ldr r0, [r3, 0x4] - adds r0, 0x10 - adds r0, r3, r0 - cmp r4, r0 - beq _08000B14 -_08000B0A: - movs r0, 0 - b _08000B16 - .pool -_08000B14: - movs r0, 0x1 -_08000B16: - pop {r4,r5} - pop {r1} - bx r1 - thumb_func_end CheckMemBlockInternal - - thumb_func_start InitHeap -@ void InitHeap(void *heapStart, u32 heapSize) -InitHeap: @ 8000B1C - push {lr} - ldr r2, =0x03000004 - str r0, [r2] - ldr r2, =0x03000008 - str r1, [r2] - bl PutFirstMemBlockHeader - pop {r0} - bx r0 - .pool - thumb_func_end InitHeap - - thumb_func_start Alloc -@ void *Alloc(u32 size) -Alloc: @ 8000B38 - push {lr} - adds r1, r0, 0 - ldr r0, =0x03000004 - ldr r0, [r0] - bl AllocInternal - pop {r1} - bx r1 - .pool - thumb_func_end Alloc - - thumb_func_start AllocZeroed -@ void *AllocZeroed(u32 size) -AllocZeroed: @ 8000B4C - push {lr} - adds r1, r0, 0 - ldr r0, =0x03000004 - ldr r0, [r0] - bl AllocZeroedInternal - pop {r1} - bx r1 - .pool - thumb_func_end AllocZeroed - - thumb_func_start Free -@ void Free(void *pointer) -Free: @ 8000B60 - push {lr} - adds r1, r0, 0 - ldr r0, =0x03000004 - ldr r0, [r0] - bl FreeInternal - pop {r0} - bx r0 - .pool - thumb_func_end Free - - thumb_func_start CheckMemBlock -@ bool8 CheckMemBlock(void *pointer) -CheckMemBlock: @ 8000B74 - push {lr} - adds r1, r0, 0 - ldr r0, =0x03000004 - ldr r0, [r0] - bl CheckMemBlockInternal - pop {r1} - bx r1 - .pool - thumb_func_end CheckMemBlock - - thumb_func_start CheckHeap -@ bool8 CheckHeap() -CheckHeap: @ 8000B88 - push {r4,r5,lr} - ldr r0, =0x03000004 - ldr r4, [r0] - adds r5, r0, 0 -_08000B90: - ldr r0, [r5] - adds r1, r4, 0 - adds r1, 0x10 - bl CheckMemBlockInternal - cmp r0, 0 - beq _08000BB0 - ldr r4, [r4, 0xC] - ldr r0, [r5] - cmp r4, r0 - bne _08000B90 - movs r0, 0x1 - b _08000BB2 - .pool -_08000BB0: - movs r0, 0 -_08000BB2: - pop {r4,r5} - pop {r1} - bx r1 - thumb_func_end CheckHeap - - .align 2, 0 @ Don't pad with nop. diff --git a/asm/multiboot.s b/asm/multiboot.s index cf072a87c..6d752c882 100644 --- a/asm/multiboot.s +++ b/asm/multiboot.s @@ -1,4 +1,4 @@ - .include "asm/macros.s" + .include "asm/macros.inc" .syntax unified diff --git a/asm/pixel_buffer.s b/asm/pixel_buffer.s index 0dcbccd18..70229b068 100644 --- a/asm/pixel_buffer.s +++ b/asm/pixel_buffer.s @@ -1,4 +1,4 @@ - .include "asm/macros.s" + .include "asm/macros.inc" .syntax unified diff --git a/asm/rom_80093CC.s b/asm/rom_80093CC.s index 9587dcbc5..753d2f778 100644 --- a/asm/rom_80093CC.s +++ b/asm/rom_80093CC.s @@ -1,5 +1,5 @@ - .include "asm/macros.s" - .include "constants/constants.s" + .include "asm/macros.inc" + .include "constants/constants.inc" .syntax unified diff --git a/asm/rom_8032654.s b/asm/rom_8032654.s index 59cc3bf7d..6283076d9 100644 --- a/asm/rom_8032654.s +++ b/asm/rom_8032654.s @@ -1,5 +1,5 @@ - .include "asm/macros.s" - .include "constants/constants.s" + .include "asm/macros.inc" + .include "constants/constants.inc" .syntax unified diff --git a/asm/rom_80A18F4.s b/asm/rom_80A18F4.s index 9f1d966fd..34a7fb872 100644 --- a/asm/rom_80A18F4.s +++ b/asm/rom_80A18F4.s @@ -1,5 +1,5 @@ - .include "asm/macros.s" - .include "constants/constants.s" + .include "asm/macros.inc" + .include "constants/constants.inc" .syntax unified diff --git a/asm/rom_80A92F4.s b/asm/rom_80A92F4.s index 07a72e235..f6bcd6bfd 100644 --- a/asm/rom_80A92F4.s +++ b/asm/rom_80A92F4.s @@ -1,5 +1,5 @@ - .include "asm/macros.s" - .include "constants/constants.s" + .include "asm/macros.inc" + .include "constants/constants.inc" .syntax unified diff --git a/asm/rom_81BAD84.s b/asm/rom_81BAD84.s index d32d573d0..7c88afd6c 100644 --- a/asm/rom_81BAD84.s +++ b/asm/rom_81BAD84.s @@ -1,5 +1,5 @@ - .include "asm/macros.s" - .include "constants/constants.s" + .include "asm/macros.inc" + .include "constants/constants.inc" .syntax unified diff --git a/asm/rom_header.s b/asm/rom_header.inc index 1cef6393c..1cef6393c 100644 --- a/asm/rom_header.s +++ b/asm/rom_header.inc @@ -1,4 +1,4 @@ - .include "asm/macros.s" + .include "asm/macros.inc" .syntax unified diff --git a/asm/string_util.s b/asm/string_util.s index 6eda21515..47840c5a7 100644 --- a/asm/string_util.s +++ b/asm/string_util.s @@ -1,4 +1,4 @@ - .include "asm/macros.s" + .include "asm/macros.inc" .syntax unified diff --git a/asm/text_renderer.s b/asm/text_renderer.s index 285bcf15a..024a6cf4e 100644 --- a/asm/text_renderer.s +++ b/asm/text_renderer.s @@ -1,4 +1,4 @@ - .include "asm/macros.s" + .include "asm/macros.inc" .syntax unified diff --git a/asm/tileset_animation.s b/asm/tileset_animation.s index 404685366..b27eb059c 100644 --- a/asm/tileset_animation.s +++ b/asm/tileset_animation.s @@ -1,4 +1,4 @@ - .include "asm/macros.s" + .include "asm/macros.inc" .syntax unified diff --git a/asm/window.s b/asm/window.s index 5ea0462ac..bd65b1e5e 100644 --- a/asm/window.s +++ b/asm/window.s @@ -1,4 +1,4 @@ - .include "asm/macros.s" + .include "asm/macros.inc" .syntax unified |