diff --git a/asm/non_matchings/controller_pak/func_80075E60.s b/asm/non_matchings/controller_pak/func_80075E60.s index 6162ff1e..738319eb 100644 --- a/asm/non_matchings/controller_pak/func_80075E60.s +++ b/asm/non_matchings/controller_pak/func_80075E60.s @@ -83,7 +83,7 @@ glabel func_80075E60 /* 076B8C 80075F8C AFA40064 */ sw $a0, 0x64($sp) /* 076B90 80075F90 8FA50064 */ lw $a1, 0x64($sp) /* 076B94 80075F94 AE020000 */ sw $v0, ($s0) -/* 076B98 80075F98 0C034138 */ jal memzero +/* 076B98 80075F98 0C034138 */ jal bzero /* 076B9C 80075F9C 00402025 */ move $a0, $v0 /* 076BA0 80075FA0 8FAB0068 */ lw $t3, 0x68($sp) /* 076BA4 80075FA4 8E030000 */ lw $v1, ($s0) diff --git a/asm/non_matchings/gzip/gzip_huft_build.s b/asm/non_matchings/gzip/gzip_huft_build.s index 90cb7cbd..8cdbbee3 100644 --- a/asm/non_matchings/gzip/gzip_huft_build.s +++ b/asm/non_matchings/gzip/gzip_huft_build.s @@ -16,7 +16,7 @@ glabel gzip_huft_build /* 0C6EAC 800C62AC AFA60600 */ sw $a2, 0x600($sp) /* 0C6EB0 800C62B0 AFA70604 */ sw $a3, 0x604($sp) /* 0C6EB4 800C62B4 24050044 */ li $a1, 68 -/* 0C6EB8 800C62B8 0C034138 */ jal memzero +/* 0C6EB8 800C62B8 0C034138 */ jal bzero /* 0C6EBC 800C62BC 02202025 */ move $a0, $s1 /* 0C6EC0 800C62C0 8FAE05FC */ lw $t6, 0x5fc($sp) /* 0C6EC4 800C62C4 0240F025 */ move $fp, $s2 diff --git a/asm/non_matchings/thread0_epc/func_800B7460.s b/asm/non_matchings/thread0_epc/func_800B7460.s index ed86ee21..484121ac 100644 --- a/asm/non_matchings/thread0_epc/func_800B7460.s +++ b/asm/non_matchings/thread0_epc/func_800B7460.s @@ -8,7 +8,7 @@ glabel func_800B7460 /* 0B8078 800B7478 00027100 */ sll $t6, $v0, 4 /* 0B807C 800B747C 05C1008A */ bgez $t6, .L800B76A8 /* 0B8080 800B7480 27A40840 */ addiu $a0, $sp, 0x840 -/* 0B8084 800B7484 0C034138 */ jal memzero +/* 0B8084 800B7484 0C034138 */ jal bzero /* 0B8088 800B7488 240501B0 */ li $a1, 432 /* 0B808C 800B748C 3C028013 */ lui $v0, %hi(D_80129FB0) # $v0, 0x8013 /* 0B8090 800B7490 24429FB0 */ addiu $v0, %lo(D_80129FB0) # addiu $v0, $v0, -0x6050 @@ -41,7 +41,7 @@ glabel func_800B7460 /* 0B80FC 800B74FC 0C032768 */ jal bcopy /* 0B8100 800B7500 AFAC0884 */ sw $t4, 0x884($sp) /* 0B8104 800B7504 27A40240 */ addiu $a0, $sp, 0x240 -/* 0B8108 800B7508 0C034138 */ jal memzero +/* 0B8108 800B7508 0C034138 */ jal bzero /* 0B810C 800B750C 24050200 */ li $a1, 512 /* 0B8110 800B7510 27A40038 */ addiu $a0, $sp, 0x38 /* 0B8114 800B7514 0C009165 */ jal func_80024594 diff --git a/lib/asm/non_matchings/unknown_0CCF90/osInitialize.s b/lib/asm/non_matchings/unknown_0CCF90/osInitialize.s index ebba42c3..a422c429 100644 --- a/lib/asm/non_matchings/unknown_0CCF90/osInitialize.s +++ b/lib/asm/non_matchings/unknown_0CCF90/osInitialize.s @@ -137,7 +137,7 @@ glabel osInitialize /* 0CD3A8 800CC7A8 AC2338A4 */ sw $v1, %lo(osClockRate+4)($at) /* 0CD3AC 800CC7AC 3C048000 */ lui $a0, %hi(osAppNMIBuffer) # $a0, 0x8000 /* 0CD3B0 800CC7B0 2484031C */ addiu $a0, %lo(osAppNMIBuffer) # addiu $a0, $a0, 0x31c -/* 0CD3B4 800CC7B4 0C034138 */ jal memzero +/* 0CD3B4 800CC7B4 0C034138 */ jal bzero /* 0CD3B8 800CC7B8 24050040 */ li $a1, 64 .L800CC7BC: /* 0CD3BC 800CC7BC 3C0DA460 */ lui $t5, %hi(D_A4600010) # $t5, 0xa460 diff --git a/lib/asm/non_matchings/unknown_0D10E0/memzero.s b/lib/asm/non_matchings/unknown_0D10E0/bzero.s similarity index 99% rename from lib/asm/non_matchings/unknown_0D10E0/memzero.s rename to lib/asm/non_matchings/unknown_0D10E0/bzero.s index 36180d98..d62c4bca 100644 --- a/lib/asm/non_matchings/unknown_0D10E0/memzero.s +++ b/lib/asm/non_matchings/unknown_0D10E0/bzero.s @@ -1,4 +1,4 @@ -glabel memzero +glabel bzero /* 0D10E0 800D04E0 28A1000C */ slti $at, $a1, 0xc /* 0D10E4 800D04E4 1420001D */ bnez $at, .L800D055C /* 0D10E8 800D04E8 00041823 */ negu $v1, $a0 diff --git a/lib/asm/non_matchings/unknown_0D3160/__osViInit.s b/lib/asm/non_matchings/unknown_0D3160/__osViInit.s index efa5dc4b..30c05010 100644 --- a/lib/asm/non_matchings/unknown_0D3160/__osViInit.s +++ b/lib/asm/non_matchings/unknown_0D3160/__osViInit.s @@ -3,7 +3,7 @@ glabel __osViInit /* 0D3714 800D2B14 AFBF0014 */ sw $ra, 0x14($sp) /* 0D3718 800D2B18 3C04800E */ lui $a0, %hi(vi) # $a0, 0x800e /* 0D371C 800D2B1C 24844810 */ addiu $a0, %lo(vi) # addiu $a0, $a0, 0x4810 -/* 0D3720 800D2B20 0C034138 */ jal memzero +/* 0D3720 800D2B20 0C034138 */ jal bzero /* 0D3724 800D2B24 24050060 */ li $a1, 96 /* 0D3728 800D2B28 3C0E800E */ lui $t6, %hi(vi) # $t6, 0x800e /* 0D372C 800D2B2C 25CE4810 */ addiu $t6, %lo(vi) # addiu $t6, $t6, 0x4810 diff --git a/lib/src/unknown_0D56B0.c b/lib/src/gu/unknown_0D56B0.c similarity index 100% rename from lib/src/unknown_0D56B0.c rename to lib/src/gu/unknown_0D56B0.c diff --git a/lib/src/memzero.c b/lib/src/os/bzero.c similarity index 57% rename from lib/src/memzero.c rename to lib/src/os/bzero.c index 30c7cb10..e5c9fb07 100644 --- a/lib/src/memzero.c +++ b/lib/src/os/bzero.c @@ -4,4 +4,5 @@ #include "types.h" #include "macros.h" -GLOBAL_ASM("lib/asm/non_matchings/unknown_0D10E0/memzero.s") +//Likely hand written and not intended to decomp +GLOBAL_ASM("lib/asm/non_matchings/unknown_0D10E0/bzero.s") diff --git a/lib/src/unknown_0C7F40.c b/lib/src/os/unknown_0C7F40.c similarity index 86% rename from lib/src/unknown_0C7F40.c rename to lib/src/os/unknown_0C7F40.c index 6986dbab..cb91a737 100644 --- a/lib/src/unknown_0C7F40.c +++ b/lib/src/os/unknown_0C7F40.c @@ -4,6 +4,7 @@ #include "types.h" #include "macros.h" +//Called only in osInitialize s32 func_800C7340(void) { return 0; } diff --git a/src/gzip.c b/src/gzip.c index debda388..710c2307 100644 --- a/src/gzip.c +++ b/src/gzip.c @@ -88,7 +88,7 @@ void gzip_huft_build(u32 *b, u32 n, u32 s, u16 *d, u16 *e, huft **t, s32 *m) { /* Generate counts for each bit length */ - memzero(c, sizeof(c)); + bzero(c, sizeof(c)); p = b; i = n; do { c[*p]++; /* assume all entries <= BMAX */ diff --git a/src/thread0_epc.c b/src/thread0_epc.c index 213f69db..7a5e4e3f 100644 --- a/src/thread0_epc.c +++ b/src/thread0_epc.c @@ -181,7 +181,7 @@ void func_800B7460(s32 *epc, s32 size, s32 mask) { s32 i; if ((get_filtered_cheats() << 4) < 0) { // This is checking if the EPC cheat is active - memzero(&sp840, 0x1B0); + bzero(&sp840, 0x1B0); sp840.a0 = size; sp840.a1 = mask; sp840.epc = epc; @@ -190,7 +190,7 @@ void func_800B7460(s32 *epc, s32 size, s32 mask) { sp840.unk134 = D_80129FB0[1]; sp840.unk138 = D_80129FB0[2]; bcopy(&sp840, &sp40, 0x1B0); - memzero(&sp240, 0x200); + bzero(&sp240, 0x200); v0 = func_80024594(&sp38, &size); for (i = 0; i < size; i++) { sp440[i] = v0[sp38];