Made ./generate_ld automatic, and moved some more asm libultra functions.

This commit is contained in:
David Benepe
2020-08-02 10:12:41 -05:00
parent 7f8b83431d
commit 3fcdeebd89
20 changed files with 111 additions and 32 deletions
+4
View File
@@ -10,6 +10,10 @@ ifeq ($(wildcard ./assets/.*),)
$(error Error, /assets/ folder was not found. Did you run the ./setup.sh script?)
endif
#################### Generate linker file ####################
GENERATE_LD := $(shell ./generate_ld.sh)
################ Target Executable and Sources ###############
# BUILD_DIR is location where all build artifacts are placed
+16
View File
@@ -0,0 +1,16 @@
/* The comment below is needed for this file to be picked up by generate_ld */
/* RAM_POS: 0x800D4570 */
.include "globals.inc"
.include "macros.inc"
.set noat # allow manual use of $at
.set noreorder # dont insert nops after branches
.set gp=64 # 64-bit instructions are used
glabel __osGetSR
/* 0D5170 800D4570 40026000 */ mfc0 $v0, $12
/* 0D5174 800D4574 03E00008 */ jr $ra
/* 0D5178 800D4578 00000000 */ nop
/* 0D517C 800D457C 00000000 */ nop
+15
View File
@@ -0,0 +1,15 @@
/* The comment below is needed for this file to be picked up by generate_ld */
/* RAM_POS: 0x800D4580 */
.include "globals.inc"
.include "macros.inc"
.set noat # allow manual use of $at
.set noreorder # dont insert nops after branches
.set gp=64 # 64-bit instructions are used
glabel __osSetFpcCsr
/* 0D5180 800D4580 4442F800 */ cfc1 $v0, $31
/* 0D5184 800D4584 44C4F800 */ ctc1 $a0, $31
/* 0D5188 800D4588 03E00008 */ jr $ra
/* 0D518C 800D458C 00000000 */ nop
+16
View File
@@ -0,0 +1,16 @@
/* The comment below is needed for this file to be picked up by generate_ld */
/* RAM_POS: 0x800D4560 */
.include "globals.inc"
.include "macros.inc"
.set noat # allow manual use of $at
.set noreorder # dont insert nops after branches
.set gp=64 # 64-bit instructions are used
glabel __osSetSR
/* 0D5160 800D4560 40846000 */ mtc0 $a0, $12
/* 0D5164 800D4564 00000000 */ nop
/* 0D5168 800D4568 03E00008 */ jr $ra
/* 0D516C 800D456C 00000000 */ nop
@@ -1,3 +1,13 @@
/* The comment below is needed for this file to be picked up by generate_ld */
/* RAM_POS: 0x800C9DA0 */
.include "globals.inc"
.include "macros.inc"
.set noat # allow manual use of $at
.set noreorder # dont insert nops after branches
.set gp=64 # 64-bit instructions are used
glabel bcopy
/* 0CA9A0 800C9DA0 10C0001A */ beqz $a2, .L800C9E0C
/* 0CA9A4 800C9DA4 00A03825 */ move $a3, $a1
@@ -97,7 +97,7 @@ glabel osInitialize
/* 0CD30C 800CC70C 0C03518C */ jal osWritebackDCache
/* 0CD310 800CC710 ADF8000C */ sw $t8, %lo(D_8000000C)($t7)
/* 0CD314 800CC714 3C048000 */ lui $a0, 0x8000
/* 0CD318 800CC718 0C0351AC */ jal osWritebackICache
/* 0CD318 800CC718 0C0351AC */ jal osInvalICache
/* 0CD31C 800CC71C 24050190 */ li $a1, 400
/* 0CD320 800CC720 0C0351CC */ jal osMapTLBRdb
/* 0CD324 800CC724 00000000 */ nop
@@ -1,6 +0,0 @@
glabel __osGetSR
/* 0D5170 800D4570 40026000 */ mfc0 $v0, $12
/* 0D5174 800D4574 03E00008 */ jr $ra
/* 0D5178 800D4578 00000000 */ nop
/* 0D517C 800D457C 00000000 */ nop
@@ -1,6 +0,0 @@
glabel __osSetFpcCsr
/* 0D5180 800D4580 4442F800 */ cfc1 $v0, $31
/* 0D5184 800D4584 44C4F800 */ ctc1 $a0, $31
/* 0D5188 800D4588 03E00008 */ jr $ra
/* 0D518C 800D458C 00000000 */ nop
@@ -1,6 +0,0 @@
glabel __osSetSR
/* 0D5160 800D4560 40846000 */ mtc0 $a0, $12
/* 0D5164 800D4564 00000000 */ nop
/* 0D5168 800D4568 03E00008 */ jr $ra
/* 0D516C 800D456C 00000000 */ nop
@@ -1,4 +1,14 @@
glabel osWritebackICache
/* The comment below is needed for this file to be picked up by generate_ld */
/* RAM_POS: 0x800D46B0 */
.include "globals.inc"
.include "macros.inc"
.set noat # allow manual use of $at
.set noreorder # dont insert nops after branches
.set gp=64 # 64-bit instructions are used
glabel osInvalICache
/* 0D52B0 800D46B0 18A00011 */ blez $a1, .L800D46F8
/* 0D52B4 800D46B4 00000000 */ nop
/* 0D52B8 800D46B8 240B4000 */ li $t3, 16384
@@ -1,3 +1,13 @@
/* The comment below is needed for this file to be picked up by generate_ld */
/* RAM_POS: 0x800D4730 */
.include "globals.inc"
.include "macros.inc"
.set noat # allow manual use of $at
.set noreorder # dont insert nops after branches
.set gp=64 # 64-bit instructions are used
glabel osMapTLBRdb
/* 0D5330 800D4730 40085000 */ mfc0 $t0, $10
/* 0D5334 800D4734 2409001F */ li $t1, 31
@@ -1,3 +1,14 @@
/* The comment below is needed for this file to be picked up by generate_ld */
/* RAM_POS: 0x800D4630 */
.include "globals.inc"
.include "macros.inc"
.set noat # allow manual use of $at
.set noreorder # dont insert nops after branches
.set gp=64 # 64-bit instructions are used
glabel osWritebackDCache
/* 0D5230 800D4630 18A00011 */ blez $a1, .L800D4678
/* 0D5234 800D4634 00000000 */ nop
+1 -2
View File
@@ -1,10 +1,9 @@
/* The comment below is needed for this file to be picked up by generate_ld */
/* RAM_POS: 0x800C9DA0 */
/* RAM_POS: 0x800CA0B0 */
#include "types.h"
#include "macros.h"
GLOBAL_ASM("lib/asm/non_matchings/unknown_0CA9A0/bcopy.s")
GLOBAL_ASM("lib/asm/non_matchings/unknown_0CA9A0/func_800CA0B0.s")
GLOBAL_ASM("lib/asm/non_matchings/unknown_0CA9A0/D_800CA0D0.s")
GLOBAL_ASM("lib/asm/non_matchings/unknown_0CA9A0/D_800CAA7C.s")
-10
View File
@@ -10,13 +10,3 @@ GLOBAL_ASM("lib/asm/non_matchings/unknown_0D4270/osPiGetCmdQueue.s")
GLOBAL_ASM("lib/asm/non_matchings/unknown_0D4270/func_800D3820.s")
GLOBAL_ASM("lib/asm/non_matchings/unknown_0D4270/_Putfld.s")
GLOBAL_ASM("lib/asm/non_matchings/unknown_0D4270/_Printf.s")
GLOBAL_ASM("lib/asm/non_matchings/unknown_0D4270/__osSetSR.s")
GLOBAL_ASM("lib/asm/non_matchings/unknown_0D4270/__osGetSR.s")
GLOBAL_ASM("lib/asm/non_matchings/unknown_0D4270/__osSetFpcCsr.s")
GLOBAL_ASM("lib/asm/non_matchings/unknown_0D4270/__osSiRawReadIo.s")
GLOBAL_ASM("lib/asm/non_matchings/unknown_0D4270/__osSiRawWriteIo.s")
GLOBAL_ASM("lib/asm/non_matchings/unknown_0D4270/osWritebackDCache.s")
GLOBAL_ASM("lib/asm/non_matchings/unknown_0D4270/osWritebackICache.s")
GLOBAL_ASM("lib/asm/non_matchings/unknown_0D4270/osMapTLBRdb.s")
GLOBAL_ASM("lib/asm/non_matchings/unknown_0D4270/osPiRawWriteIo.s")
GLOBAL_ASM("lib/asm/non_matchings/unknown_0D4270/func_800D47F0.s")
+8
View File
@@ -0,0 +1,8 @@
/* The comment below is needed for this file to be picked up by generate_ld */
/* RAM_POS: 0x800D4590 */
#include "types.h"
#include "macros.h"
GLOBAL_ASM("lib/asm/non_matchings/unknown_0D5190/__osSiRawReadIo.s")
GLOBAL_ASM("lib/asm/non_matchings/unknown_0D5190/__osSiRawWriteIo.s")
+8
View File
@@ -0,0 +1,8 @@
/* The comment below is needed for this file to be picked up by generate_ld */
/* RAM_POS: 0x800D4790 */
#include "types.h"
#include "macros.h"
GLOBAL_ASM("lib/asm/non_matchings/unknown_0D5390/osPiRawWriteIo.s")
GLOBAL_ASM("lib/asm/non_matchings/unknown_0D5390/func_800D47F0.s")