From d62631d60081b4fca503d3c1ff25385cb11b9896 Mon Sep 17 00:00:00 2001 From: Mittenshugg Date: Sat, 1 Aug 2020 03:50:31 -0500 Subject: [PATCH 01/12] c: osPfcFreeBlocks --- Makefile | 1 + data/dkr.data.s | 2 +- include/PR/os_message.h | 17 +++ include/PR/pfs.h | 137 ++++++++++++++++++ include/controller.h | 133 +++++++++++++++++ include/ultra64.h | 1 + .../unknown_0CFFE0/osPfsFreeBlocks.s | 98 ------------- .../unknown_0D2E40/osSpTaskYield.s | 10 -- .../{D_800D35A0.s => __osCleanupThread.s} | 2 +- .../unknown_0D3020/osDestroyThread.s | 12 +- lib/src/osCreateThread.c | 14 +- lib/src/osPfsFreeBlocks.c | 34 +++++ lib/src/unknown_0CFFE0.c | 7 - lib/src/unknown_0D2590.c | 5 + lib/src/unknown_0D2E40.c | 6 +- lib/src/unknown_0D3160.c | 2 +- undefined_syms.txt | 4 +- 17 files changed, 349 insertions(+), 136 deletions(-) create mode 100644 include/PR/pfs.h create mode 100644 include/controller.h delete mode 100644 lib/asm/non_matchings/unknown_0CFFE0/osPfsFreeBlocks.s delete mode 100644 lib/asm/non_matchings/unknown_0D2E40/osSpTaskYield.s rename lib/asm/non_matchings/unknown_0D3020/{D_800D35A0.s => __osCleanupThread.s} (87%) create mode 100644 lib/src/osPfsFreeBlocks.c delete mode 100644 lib/src/unknown_0CFFE0.c diff --git a/Makefile b/Makefile index a71e0ccb..6515848a 100755 --- a/Makefile +++ b/Makefile @@ -176,6 +176,7 @@ $(BUILD_DIR)/lib/src/unknown_0C91A0.o : OPT_FLAGS := -O1 $(BUILD_DIR)/lib/src/unknown_0D29F0.o: OPT_FLAGS := -O1 $(BUILD_DIR)/lib/src/osCreateThread.o : OPT_FLAGS := -O1 $(BUILD_DIR)/lib/src/osGetThreadPri.o : OPT_FLAGS := -O1 +$(BUILD_DIR)/lib/src/osPfsFreeBlocks.o: OPT_FLAGS := -O1 $(BUILD_DIR)/lib/src/osPiStartDma.o : OPT_FLAGS := -O1 $(BUILD_DIR)/lib/src/osRecvMesg.o : OPT_FLAGS := -O1 $(BUILD_DIR)/lib/src/osSendMesg.o : OPT_FLAGS := -O1 diff --git a/data/dkr.data.s b/data/dkr.data.s index dde1465b..142f9591 100644 --- a/data/dkr.data.s +++ b/data/dkr.data.s @@ -9259,7 +9259,7 @@ glabel __osThreadTail glabel D_800E4888 .word 0x800E4880 -glabel D_800E488C +glabel __osActiveQueue .word 0x800E4880 glabel __osRunningThread diff --git a/include/PR/os_message.h b/include/PR/os_message.h index 191e1b1d..0c26e2a6 100644 --- a/include/PR/os_message.h +++ b/include/PR/os_message.h @@ -112,6 +112,23 @@ typedef struct OSMesgQueue_s { #define OS_MESG_NOBLOCK 0 #define OS_MESG_BLOCK 1 +/* + * I/O message types + */ +#define OS_MESG_TYPE_BASE (10) +#define OS_MESG_TYPE_LOOPBACK (OS_MESG_TYPE_BASE+0) +#define OS_MESG_TYPE_DMAREAD (OS_MESG_TYPE_BASE+1) +#define OS_MESG_TYPE_DMAWRITE (OS_MESG_TYPE_BASE+2) +#define OS_MESG_TYPE_VRETRACE (OS_MESG_TYPE_BASE+3) +#define OS_MESG_TYPE_COUNTER (OS_MESG_TYPE_BASE+4) +#define OS_MESG_TYPE_EDMAREAD (OS_MESG_TYPE_BASE+5) +#define OS_MESG_TYPE_EDMAWRITE (OS_MESG_TYPE_BASE+6) + +/* + * I/O message priority + */ +#define OS_MESG_PRI_NORMAL 0 +#define OS_MESG_PRI_HIGH 1 #if defined(_LANGUAGE_C) || defined(_LANGUAGE_C_PLUS_PLUS) diff --git a/include/PR/pfs.h b/include/PR/pfs.h new file mode 100644 index 00000000..183be08e --- /dev/null +++ b/include/PR/pfs.h @@ -0,0 +1,137 @@ +#ifndef _ULTRA64_PFS_H_ +#define _ULTRA64_PFS_H_ + +#include + +/* File System size */ +#define OS_PFS_VERSION 0x0200 +#define OS_PFS_VERSION_HI (OS_PFS_VERSION >> 8) +#define OS_PFS_VERSION_LO (OS_PFS_VERSION & 255) + +#define PFS_INODE_SIZE_PER_PAGE 128 +#define PFS_FILE_NAME_LEN 16 +#define PFS_FILE_EXT_LEN 4 +#define BLOCKSIZE 32 +#define PFS_ONE_PAGE 8 +#define PFS_MAX_BANKS 62 + +/* File System flag */ + +#define PFS_READ 0 +#define PFS_WRITE 1 +#define PFS_CREATE 2 + +/* File System status */ +#define PFS_INITIALIZED 0x1 +#define PFS_CORRUPTED 0x2 +#define PFS_ID_BROKEN 0x4 +#define PFS_MOTOR_INITIALIZED 0x8 +#define PFS_GBPAK_INITIALIZED 0x10 + +/* Definition for page usage */ +#define PFS_EOF 1 +#define PFS_PAGE_NOT_EXIST 2 +#define PFS_PAGE_NOT_USED 3 + +/* File System error number */ + +#define PFS_ERR_NOPACK 1 /* no memory card is plugged or */ +#define PFS_ERR_NEW_PACK 2 /* ram pack has been changed to a different one */ +#define PFS_ERR_INCONSISTENT 3 /* need to run Pfschecker*/ +#define PFS_ERR_CONTRFAIL CONT_OVERRUN_ERROR +#define PFS_ERR_INVALID 5 /* invalid parameter or file not exist*/ +#define PFS_ERR_BAD_DATA 6 /* the data read from pack are bad*/ +#define PFS_DATA_FULL 7 /* no free pages on ram pack*/ +#define PFS_DIR_FULL 8 /* no free directories on ram pack*/ +#define PFS_ERR_EXIST 9 /* file exists*/ +#define PFS_ERR_ID_FATAL 10 /* dead ram pack */ +#define PFS_ERR_DEVICE 11 /* wrong device type*/ +#define PFS_ERR_NO_GBCART 12 /* no gb cartridge (64GB-PAK) */ +#define PFS_ERR_NEW_GBCART 13 /* gb cartridge may be changed */ + +/* Definition for bank */ +#define PFS_ID_BANK_256K 0 +#define PFS_ID_BANK_1M 4 +#define PFS_BANKS_256K 1 + +#define PFS_WRITTEN 2 +#define DEF_DIR_PAGES 2 + +#define PFS_ID_0AREA 1 +#define PFS_ID_1AREA 3 +#define PFS_ID_2AREA 4 +#define PFS_ID_3AREA 6 +#define PFS_LABEL_AREA 7 +#define PFS_ID_PAGE PFS_ONE_PAGE * 0 + +#define PFS_BANK_LAPPED_BY 8 /* => u8 */ +#define PFS_SECTOR_PER_BANK 32 +#define PFS_INODE_DIST_MAP (PFS_BANK_LAPPED_BY * PFS_SECTOR_PER_BANK) +#define PFS_SECTOR_SIZE (PFS_INODE_SIZE_PER_PAGE/PFS_SECTOR_PER_BANK) + +typedef struct { + int status; + OSMesgQueue* queue; + int channel; + u8 id[32]; + u8 label[32]; + int version; + int dir_size; + int inode_table; /* block location */ + int minode_table; /* mirrioring inode_table */ + int dir_table; /* block location */ + int inodeStartPage; /* page # */ + u8 banks; + u8 activebank; +} OSPfs; + +typedef struct { + u32 file_size; /* bytes */ + u32 game_code; + u16 company_code; + char ext_name[4]; + char game_name[16]; +} OSPfsState; + +typedef union { + struct { + u8 bank; + u8 page; + } inode_t; + u16 ipage; +} __OSInodeUnit; + +typedef struct { + __OSInodeUnit inodePage[128]; +} __OSInode; + +typedef struct { + u32 game_code; + u16 company_code; + __OSInodeUnit start_page; + u8 status; + s8 reserved; + u16 data_sum; + u8 ext_name[PFS_FILE_EXT_LEN]; + u8 game_name[PFS_FILE_NAME_LEN]; +} __OSDir; + +typedef struct { + u32 repaired; + u32 random; + u64 serialMid; + u64 serialLow; + u16 deviceid; + u8 banks; + u8 version; + u16 checksum; + u16 invertedChecksum; +} __OSPackId; + +typedef struct { + __OSInode inode; + u8 bank; + u8 map[PFS_INODE_DIST_MAP]; +} __OSInodeCache; + +#endif \ No newline at end of file diff --git a/include/controller.h b/include/controller.h new file mode 100644 index 00000000..0abc36cb --- /dev/null +++ b/include/controller.h @@ -0,0 +1,133 @@ +#ifndef _CONTROLLER_H +#define _CONTROLLER_H +#include "libultra_internal.h" +//#include + +//should go somewhere else but +#define ARRLEN(x) ((s32)(sizeof(x) / sizeof(x[0]))) +#define CHNL_ERR(format) ((format.rxsize & CHNL_ERR_MASK) >> 4) + +typedef struct +{ + /* 0x0 */ u32 ramarray[15]; + /* 0x3C */ u32 pifstatus; +} OSPifRam; + +typedef struct +{ + /* 0x0 */ u8 dummy; + /* 0x1 */ u8 txsize; + /* 0x2 */ u8 rxsize; + /* 0x3 */ u8 cmd; + /* 0x4 */ u16 button; + /* 0x6 */ s8 stick_x; + /* 0x7 */ s8 stick_y; +} __OSContReadFormat; + +typedef struct +{ + /* 0x0 */ u8 dummy; + /* 0x1 */ u8 txsize; + /* 0x2 */ u8 rxsize; + /* 0x3 */ u8 cmd; + /* 0x4 */ u8 typeh; + /* 0x5 */ u8 typel; + /* 0x6 */ u8 status; + /* 0x7 */ u8 dummy1; +} __OSContRequesFormat; + +typedef struct +{ + /* 0x0 */ u8 txsize; + /* 0x1 */ u8 rxsize; + /* 0x2 */ u8 cmd; + /* 0x3 */ u8 typeh; + /* 0x4 */ u8 typel; + /* 0x5 */ u8 status; +} __OSContRequesFormatShort; + +typedef struct +{ + /* 0x0 */ u8 dummy; + /* 0x1 */ u8 txsize; + /* 0x2 */ u8 rxsize; + /* 0x3 */ u8 cmd; + /* 0x4 */ u16 address; + /* 0x6 */ u8 data[32]; + /* 0x26 */ u8 datacrc; +} __OSContRamReadFormat; + + +typedef struct +{ + /* 0x0 */ u8 txsize; + /* 0x1 */ u8 rxsize; + /* 0x2 */ u8 cmd; + /* 0x3 */ u8 address; + /* 0x4 */ u8 data[EEPROM_BLOCK_SIZE]; +} __OSContEepromFormat; + +//from: http://en64.shoutwiki.com/wiki/SI_Registers_Detailed#CONT_CMD_Usage +#define CONT_CMD_REQUEST_STATUS 0 +#define CONT_CMD_READ_BUTTON 1 +#define CONT_CMD_READ_MEMPACK 2 +#define CONT_CMD_WRITE_MEMPACK 3 +#define CONT_CMD_READ_EEPROM 4 +#define CONT_CMD_WRITE_EEPROM 5 +#define CONT_CMD_RESET 0xff + +#define CONT_CMD_REQUEST_STATUS_TX 1 +#define CONT_CMD_READ_BUTTON_TX 1 +#define CONT_CMD_READ_MEMPACK_TX 3 +#define CONT_CMD_WRITE_MEMPACK_TX 35 +#define CONT_CMD_READ_EEPROM_TX 2 +#define CONT_CMD_WRITE_EEPROM_TX 10 +#define CONT_CMD_RESET_TX 1 + +#define CONT_CMD_REQUEST_STATUS_RX 3 +#define CONT_CMD_READ_BUTTON_RX 4 +#define CONT_CMD_READ_MEMPACK_RX 33 +#define CONT_CMD_WRITE_MEMPACK_RX 1 +#define CONT_CMD_READ_EEPROM_RX 8 +#define CONT_CMD_WRITE_EEPROM_RX 1 +#define CONT_CMD_RESET_RX 3 + +#define CONT_CMD_NOP 0xff +#define CONT_CMD_END 0xfe //indicates end of a command +#define CONT_CMD_EXE 1 //set pif ram status byte to this to do a command + +#define DIR_STATUS_EMPTY 0 +#define DIR_STATUS_UNKNOWN 1 +#define DIR_STATUS_OCCUPIED 2 + + + +//some version of this almost certainly existed since there's plenty of times where it's used right before a return 0 +#define ERRCK(fn) \ + ret = fn; \ + if (ret != 0) \ + return ret; + +#define SET_ACTIVEBANK_TO_ZERO \ + if (pfs->activebank != 0) \ + { \ + pfs->activebank = 0; \ + ERRCK(__osPfsSelectBank(pfs)) \ + } + +#define PFS_CHECK_ID \ + if (__osCheckId(pfs) == PFS_ERR_NEW_PACK) \ + return PFS_ERR_NEW_PACK; +#endif + +#define PFS_CHECK_STATUS \ + if ((pfs->status & PFS_INITIALIZED) == 0) \ + return PFS_ERR_INVALID; + +#define PFS_GET_STATUS \ + __osSiGetAccess(); \ + ret = __osPfsGetStatus(queue, channel); \ + __osSiRelAccess(); \ + if (ret != 0) \ + return ret; + \ No newline at end of file diff --git a/include/ultra64.h b/include/ultra64.h index b53e434a..f9dfe94f 100644 --- a/include/ultra64.h +++ b/include/ultra64.h @@ -30,5 +30,6 @@ #include #include #include +#include #endif diff --git a/lib/asm/non_matchings/unknown_0CFFE0/osPfsFreeBlocks.s b/lib/asm/non_matchings/unknown_0CFFE0/osPfsFreeBlocks.s deleted file mode 100644 index 614e1f81..00000000 --- a/lib/asm/non_matchings/unknown_0CFFE0/osPfsFreeBlocks.s +++ /dev/null @@ -1,98 +0,0 @@ -glabel osPfsFreeBlocks -/* 0CFFE0 800CF3E0 27BDFED0 */ addiu $sp, $sp, -0x130 -/* 0CFFE4 800CF3E4 AFA40130 */ sw $a0, 0x130($sp) -/* 0CFFE8 800CF3E8 8FAE0130 */ lw $t6, 0x130($sp) -/* 0CFFEC 800CF3EC AFBF0014 */ sw $ra, 0x14($sp) -/* 0CFFF0 800CF3F0 AFA50134 */ sw $a1, 0x134($sp) -/* 0CFFF4 800CF3F4 AFA00128 */ sw $zero, 0x128($sp) -/* 0CFFF8 800CF3F8 AFA00024 */ sw $zero, 0x24($sp) -/* 0CFFFC 800CF3FC 8DCF0000 */ lw $t7, ($t6) -/* 0D0000 800CF400 31F80001 */ andi $t8, $t7, 1 -/* 0D0004 800CF404 17000003 */ bnez $t8, .L800CF414 -/* 0D0008 800CF408 00000000 */ nop -/* 0D000C 800CF40C 10000043 */ b .L800CF51C -/* 0D0010 800CF410 24020005 */ li $v0, 5 -.L800CF414: -/* 0D0014 800CF414 0C0356F0 */ jal __osCheckId -/* 0D0018 800CF418 8FA40130 */ lw $a0, 0x130($sp) -/* 0D001C 800CF41C 24010002 */ li $at, 2 -/* 0D0020 800CF420 14410003 */ bne $v0, $at, .L800CF430 -/* 0D0024 800CF424 00000000 */ nop -/* 0D0028 800CF428 1000003C */ b .L800CF51C -/* 0D002C 800CF42C 24020002 */ li $v0, 2 -.L800CF430: -/* 0D0030 800CF430 8FB90130 */ lw $t9, 0x130($sp) -/* 0D0034 800CF434 A3A00023 */ sb $zero, 0x23($sp) -/* 0D0038 800CF438 93280064 */ lbu $t0, 0x64($t9) -/* 0D003C 800CF43C 19000031 */ blez $t0, .L800CF504 -/* 0D0040 800CF440 00000000 */ nop -.L800CF444: -/* 0D0044 800CF444 8FA40130 */ lw $a0, 0x130($sp) -/* 0D0048 800CF448 27A50028 */ addiu $a1, $sp, 0x28 -/* 0D004C 800CF44C 00003025 */ move $a2, $zero -/* 0D0050 800CF450 0C03572F */ jal __osPfsRWInode -/* 0D0054 800CF454 93A70023 */ lbu $a3, 0x23($sp) -/* 0D0058 800CF458 AFA20024 */ sw $v0, 0x24($sp) -/* 0D005C 800CF45C 8FA90024 */ lw $t1, 0x24($sp) -/* 0D0060 800CF460 11200003 */ beqz $t1, .L800CF470 -/* 0D0064 800CF464 00000000 */ nop -/* 0D0068 800CF468 1000002C */ b .L800CF51C -/* 0D006C 800CF46C 01201025 */ move $v0, $t1 -.L800CF470: -/* 0D0070 800CF470 93AA0023 */ lbu $t2, 0x23($sp) -/* 0D0074 800CF474 19400004 */ blez $t2, .L800CF488 -/* 0D0078 800CF478 00000000 */ nop -/* 0D007C 800CF47C 240B0001 */ li $t3, 1 -/* 0D0080 800CF480 10000004 */ b .L800CF494 -/* 0D0084 800CF484 AFAB001C */ sw $t3, 0x1c($sp) -.L800CF488: -/* 0D0088 800CF488 8FAC0130 */ lw $t4, 0x130($sp) -/* 0D008C 800CF48C 8D8D0060 */ lw $t5, 0x60($t4) -/* 0D0090 800CF490 AFAD001C */ sw $t5, 0x1c($sp) -.L800CF494: -/* 0D0094 800CF494 8FAE001C */ lw $t6, 0x1c($sp) -/* 0D0098 800CF498 29C10080 */ slti $at, $t6, 0x80 -/* 0D009C 800CF49C 10200010 */ beqz $at, .L800CF4E0 -/* 0D00A0 800CF4A0 AFAE012C */ sw $t6, 0x12c($sp) -.L800CF4A4: -/* 0D00A4 800CF4A4 8FAF012C */ lw $t7, 0x12c($sp) -/* 0D00A8 800CF4A8 24010003 */ li $at, 3 -/* 0D00AC 800CF4AC 000FC040 */ sll $t8, $t7, 1 -/* 0D00B0 800CF4B0 03B8C821 */ addu $t9, $sp, $t8 -/* 0D00B4 800CF4B4 97390028 */ lhu $t9, 0x28($t9) -/* 0D00B8 800CF4B8 17210004 */ bne $t9, $at, .L800CF4CC -/* 0D00BC 800CF4BC 00000000 */ nop -/* 0D00C0 800CF4C0 8FA80128 */ lw $t0, 0x128($sp) -/* 0D00C4 800CF4C4 25090001 */ addiu $t1, $t0, 1 -/* 0D00C8 800CF4C8 AFA90128 */ sw $t1, 0x128($sp) -.L800CF4CC: -/* 0D00CC 800CF4CC 8FAA012C */ lw $t2, 0x12c($sp) -/* 0D00D0 800CF4D0 254B0001 */ addiu $t3, $t2, 1 -/* 0D00D4 800CF4D4 29610080 */ slti $at, $t3, 0x80 -/* 0D00D8 800CF4D8 1420FFF2 */ bnez $at, .L800CF4A4 -/* 0D00DC 800CF4DC AFAB012C */ sw $t3, 0x12c($sp) -.L800CF4E0: -/* 0D00E0 800CF4E0 93AC0023 */ lbu $t4, 0x23($sp) -/* 0D00E4 800CF4E4 8FAF0130 */ lw $t7, 0x130($sp) -/* 0D00E8 800CF4E8 258D0001 */ addiu $t5, $t4, 1 -/* 0D00EC 800CF4EC A3AD0023 */ sb $t5, 0x23($sp) -/* 0D00F0 800CF4F0 91F80064 */ lbu $t8, 0x64($t7) -/* 0D00F4 800CF4F4 31AE00FF */ andi $t6, $t5, 0xff -/* 0D00F8 800CF4F8 01D8082A */ slt $at, $t6, $t8 -/* 0D00FC 800CF4FC 1420FFD1 */ bnez $at, .L800CF444 -/* 0D0100 800CF500 00000000 */ nop -.L800CF504: -/* 0D0104 800CF504 8FB90128 */ lw $t9, 0x128($sp) -/* 0D0108 800CF508 8FAA0134 */ lw $t2, 0x134($sp) -/* 0D010C 800CF50C 00001025 */ move $v0, $zero -/* 0D0110 800CF510 001940C0 */ sll $t0, $t9, 3 -/* 0D0114 800CF514 00084940 */ sll $t1, $t0, 5 -/* 0D0118 800CF518 AD490000 */ sw $t1, ($t2) -.L800CF51C: -/* 0D011C 800CF51C 8FBF0014 */ lw $ra, 0x14($sp) -/* 0D0120 800CF520 27BD0130 */ addiu $sp, $sp, 0x130 -/* 0D0124 800CF524 03E00008 */ jr $ra -/* 0D0128 800CF528 00000000 */ nop - -/* 0D012C 800CF52C 00000000 */ nop - diff --git a/lib/asm/non_matchings/unknown_0D2E40/osSpTaskYield.s b/lib/asm/non_matchings/unknown_0D2E40/osSpTaskYield.s deleted file mode 100644 index 7bb18e7a..00000000 --- a/lib/asm/non_matchings/unknown_0D2E40/osSpTaskYield.s +++ /dev/null @@ -1,10 +0,0 @@ -glabel osSpTaskYield -/* 0D2E40 800D2240 27BDFFE8 */ addiu $sp, $sp, -0x18 -/* 0D2E44 800D2244 AFBF0014 */ sw $ra, 0x14($sp) -/* 0D2E48 800D2248 0C033490 */ jal __osSpSetStatus -/* 0D2E4C 800D224C 24040400 */ li $a0, 1024 -/* 0D2E50 800D2250 8FBF0014 */ lw $ra, 0x14($sp) -/* 0D2E54 800D2254 27BD0018 */ addiu $sp, $sp, 0x18 -/* 0D2E58 800D2258 03E00008 */ jr $ra -/* 0D2E5C 800D225C 00000000 */ nop - diff --git a/lib/asm/non_matchings/unknown_0D3020/D_800D35A0.s b/lib/asm/non_matchings/unknown_0D3020/__osCleanupThread.s similarity index 87% rename from lib/asm/non_matchings/unknown_0D3020/D_800D35A0.s rename to lib/asm/non_matchings/unknown_0D3020/__osCleanupThread.s index d8efce4c..686faede 100644 --- a/lib/asm/non_matchings/unknown_0D3020/D_800D35A0.s +++ b/lib/asm/non_matchings/unknown_0D3020/__osCleanupThread.s @@ -1,4 +1,4 @@ -glabel D_800D35A0 +glabel __osCleanupThread /* 0D41A0 800D35A0 0C035980 */ jal osDestroyThread /* 0D41A4 800D35A4 00002025 */ move $a0, $zero /* 0D41A8 800D35A8 00000000 */ nop diff --git a/lib/asm/non_matchings/unknown_0D3020/osDestroyThread.s b/lib/asm/non_matchings/unknown_0D3020/osDestroyThread.s index 6a4ebe8e..da5d72c4 100644 --- a/lib/asm/non_matchings/unknown_0D3020/osDestroyThread.s +++ b/lib/asm/non_matchings/unknown_0D3020/osDestroyThread.s @@ -24,18 +24,18 @@ glabel osDestroyThread /* 0D7254 800D6654 0C034B1C */ jal __osDequeueThread /* 0D7258 800D6658 03002825 */ move $a1, $t8 .L800D665C: -/* 0D725C 800D665C 3C08800E */ lui $t0, %hi(D_800E488C) # $t0, 0x800e -/* 0D7260 800D6660 8D08488C */ lw $t0, %lo(D_800E488C)($t0) +/* 0D725C 800D665C 3C08800E */ lui $t0, %hi(__osActiveQueue) # $t0, 0x800e +/* 0D7260 800D6660 8D08488C */ lw $t0, %lo(__osActiveQueue)($t0) /* 0D7264 800D6664 8FA90038 */ lw $t1, 0x38($sp) /* 0D7268 800D6668 15090005 */ bne $t0, $t1, .L800D6680 /* 0D726C 800D666C 00000000 */ nop /* 0D7270 800D6670 8D0A000C */ lw $t2, 0xc($t0) -/* 0D7274 800D6674 3C01800E */ lui $at, %hi(D_800E488C) # $at, 0x800e +/* 0D7274 800D6674 3C01800E */ lui $at, %hi(__osActiveQueue) # $at, 0x800e /* 0D7278 800D6678 10000010 */ b .L800D66BC -/* 0D727C 800D667C AC2A488C */ sw $t2, %lo(D_800E488C)($at) +/* 0D727C 800D667C AC2A488C */ sw $t2, %lo(__osActiveQueue)($at) .L800D6680: -/* 0D7280 800D6680 3C11800E */ lui $s1, %hi(D_800E488C) # $s1, 0x800e -/* 0D7284 800D6684 8E31488C */ lw $s1, %lo(D_800E488C)($s1) +/* 0D7280 800D6680 3C11800E */ lui $s1, %hi(__osActiveQueue) # $s1, 0x800e +/* 0D7284 800D6684 8E31488C */ lw $s1, %lo(__osActiveQueue)($s1) /* 0D7288 800D6688 8E32000C */ lw $s2, 0xc($s1) /* 0D728C 800D668C 1240000B */ beqz $s2, .L800D66BC /* 0D7290 800D6690 00000000 */ nop diff --git a/lib/src/osCreateThread.c b/lib/src/osCreateThread.c index fa41adc0..48463f0a 100644 --- a/lib/src/osCreateThread.c +++ b/lib/src/osCreateThread.c @@ -1,15 +1,11 @@ /* The comment below is needed for this file to be picked up by generate_ld */ /* RAM_POS: 0x800C8850 */ -#include "types.h" -#include "macros.h" #include "libultra_internal.h" #include "PR/R4300.h" -//GLOBAL_ASM("lib/asm/non_matchings/osCreateThread_0C9450/osCreateThread.s") - -extern OSThread *D_800E488C; //__osActiveQueue; -void D_800D35A0(void); //__osCleanupThread +extern OSThread *__osActiveQueue; //__osActiveQueue; +void __osCleanupThread(void); //__osCleanupThread void osCreateThread(OSThread *t, OSId id, void (*entry)(void *), void *arg, void *sp, OSPri p) { @@ -22,7 +18,7 @@ void osCreateThread(OSThread *t, OSId id, void (*entry)(void *), void *arg, void t->context.pc = (u32)entry; t->context.a0 = (u64)arg; t->context.sp = (u64)sp - 16; - t->context.ra = (u64)D_800D35A0; + t->context.ra = (u64)__osCleanupThread; mask = OS_IM_ALL; t->context.sr = SR_IMASK | SR_EXL | SR_IE; t->context.rcp = (mask & RCP_IMASK) >> RCP_IMASKSHIFT; @@ -31,7 +27,7 @@ void osCreateThread(OSThread *t, OSId id, void (*entry)(void *), void *arg, void t->state = OS_STATE_STOPPED; t->flags = 0; saveMask = __osDisableInt(); - t->tlnext = D_800E488C; - D_800E488C = t; + t->tlnext = __osActiveQueue; + __osActiveQueue = t; __osRestoreInt(saveMask); } \ No newline at end of file diff --git a/lib/src/osPfsFreeBlocks.c b/lib/src/osPfsFreeBlocks.c new file mode 100644 index 00000000..f3934383 --- /dev/null +++ b/lib/src/osPfsFreeBlocks.c @@ -0,0 +1,34 @@ +/* The comment below is needed for this file to be picked up by generate_ld */ +/* RAM_POS: 0x800CF3E0 */ + +#include "libultra_internal.h" +#include "controller.h" + +s32 osPfsFreeBlocks(OSPfs *pfs, s32 *bytes_not_used) +{ + int j; + int pages; + __OSInode inode; + s32 ret; + u8 bank; + int offset; + pages = 0; + ret = 0; + PFS_CHECK_STATUS; + PFS_CHECK_ID; + for (bank = 0; bank < pfs->banks; bank++) + { + ERRCK(__osPfsRWInode(pfs, &inode, OS_READ, bank)); + if (bank > 0) + offset = 1; + else + offset = pfs->inodeStartPage; + for (j = offset; j < ARRLEN(inode.inodePage); j++) + { + if (inode.inodePage[j].ipage == 3) + pages++; + } + } + *bytes_not_used = pages * 8 * 32; + return 0; +} \ No newline at end of file diff --git a/lib/src/unknown_0CFFE0.c b/lib/src/unknown_0CFFE0.c deleted file mode 100644 index 0c96e522..00000000 --- a/lib/src/unknown_0CFFE0.c +++ /dev/null @@ -1,7 +0,0 @@ -/* The comment below is needed for this file to be picked up by generate_ld */ -/* RAM_POS: 0x800CF3E0 */ - -#include "types.h" -#include "macros.h" - -GLOBAL_ASM("lib/asm/non_matchings/unknown_0CFFE0/osPfsFreeBlocks.s") diff --git a/lib/src/unknown_0D2590.c b/lib/src/unknown_0D2590.c index 44ebfbea..c928470c 100644 --- a/lib/src/unknown_0D2590.c +++ b/lib/src/unknown_0D2590.c @@ -3,6 +3,11 @@ #include "types.h" #include "macros.h" +#include "libultra_internal.h" +extern OSTime __osCurrentTime; +extern u32 __osBaseCounter; +extern u32 D_8012D22C; //__osViIntrCount +//extern u16 D_8012D190; //static u16 retrace GLOBAL_ASM("lib/asm/non_matchings/unknown_0D2590/osCreateViManager.s") GLOBAL_ASM("lib/asm/non_matchings/unknown_0D2590/viMgrMain.s") diff --git a/lib/src/unknown_0D2E40.c b/lib/src/unknown_0D2E40.c index f3012e7b..704199a2 100644 --- a/lib/src/unknown_0D2E40.c +++ b/lib/src/unknown_0D2E40.c @@ -3,6 +3,10 @@ #include "types.h" #include "macros.h" +#include "libultra_internal.h" + +void osSpTaskYield(void) { + __osSpSetStatus(SPSTATUS_SET_SIGNAL0); +} -GLOBAL_ASM("lib/asm/non_matchings/unknown_0D2E40/osSpTaskYield.s") GLOBAL_ASM("lib/asm/non_matchings/unknown_0D2E40/osViSetSpecialFeatures.s") diff --git a/lib/src/unknown_0D3160.c b/lib/src/unknown_0D3160.c index 8a8d2217..b0666507 100644 --- a/lib/src/unknown_0D3160.c +++ b/lib/src/unknown_0D3160.c @@ -19,7 +19,7 @@ GLOBAL_ASM("lib/asm/non_matchings/unknown_0D3020/__osEnqueueAndYield.s") GLOBAL_ASM("lib/asm/non_matchings/unknown_0D3020/__osEnqueueThread.s") GLOBAL_ASM("lib/asm/non_matchings/unknown_0D3020/__osPopThread.s") GLOBAL_ASM("lib/asm/non_matchings/unknown_0D3020/__osDispatchThread.s") -GLOBAL_ASM("lib/asm/non_matchings/unknown_0D3020/D_800D35A0.s") +GLOBAL_ASM("lib/asm/non_matchings/unknown_0D3020/__osCleanupThread.s") GLOBAL_ASM("lib/asm/non_matchings/unknown_0D3020/__osProbeTLB.s") GLOBAL_ASM("lib/asm/non_matchings/unknown_0D3020/func_800D3670.s") GLOBAL_ASM("lib/asm/non_matchings/unknown_0D3020/osJamMesg.s") diff --git a/undefined_syms.txt b/undefined_syms.txt index b5ccb334..a0387b27 100755 --- a/undefined_syms.txt +++ b/undefined_syms.txt @@ -65,7 +65,7 @@ D_800D2680 = 0x800D2680; D_800D2760 = 0x800D2760; __osExceptionPreamble = 0x800D2CB0; __osException = 0x800D2CC0; -D_800D35A0 = 0x800D35A0; +__osCleanupThread = 0x800D35A0; D_800D7600 = 0x800D7600; D_800D84C0 = 0x800D84C0; D_800D8590 = 0x800D8590; @@ -787,7 +787,7 @@ D_800E4874 = 0x800E4874; D_800E4878 = 0x800E4878; __osThreadTail = 0x800E4880; D_800E4888 = 0x800E4888; -D_800E488C = 0x800E488C; +__osActiveQueue = 0x800E488C; __osRunningThread = 0x800E4890; D_800E4894 = 0x800E4894; D_800E48C0 = 0x800E48C0; From 06af1f5abf130cd33f682be8bc17ff31b98cf2cd Mon Sep 17 00:00:00 2001 From: Mittenshugg Date: Sat, 1 Aug 2020 04:09:58 -0500 Subject: [PATCH 02/12] c: __osPfsGetInitData --- Makefile | 1 + .../unknown_071730/func_80071D30.s | 8 +-- .../unknown_071730/func_80071E58.s | 8 +-- include/controller.h | 3 +- .../unknown_0CD820/func_800CCC20.s | 4 +- .../unknown_0CD820/func_800CCE18.s | 8 +-- .../unknown_0CD820/func_800CCEE8.s | 8 +-- .../unknown_0CD820/func_800CD0A4.s | 8 +-- .../unknown_0CD820/func_800CD14C.s | 8 +-- .../unknown_0CDE90/__osPfsGetInitData.s | 59 ------------------- .../unknown_0CDE90/__osPfsRequestData.s | 12 ++-- .../unknown_0CDE90/osPfsIsPlug.s | 28 ++++----- .../unknown_0CE370/__osContRamWrite.s | 16 ++--- .../unknown_0CE370/__osPackRamWriteData.s | 4 +- .../unknown_0CE8A0/__osContRamRead.s | 16 ++--- .../unknown_0CE8A0/__osPackRamReadData.s | 4 +- .../unknown_0CF330/__osPfsGetStatus.s | 8 +-- lib/src/unknown_0CDE90.c | 29 ++++++++- undefined_syms.txt | 4 +- 19 files changed, 102 insertions(+), 134 deletions(-) delete mode 100644 lib/asm/non_matchings/unknown_0CDE90/__osPfsGetInitData.s diff --git a/Makefile b/Makefile index 6515848a..82fbcd52 100755 --- a/Makefile +++ b/Makefile @@ -174,6 +174,7 @@ $(BUILD_DIR)/lib/%.o: OPT_FLAGS := -O2 $(BUILD_DIR)/lib/%.o: MIPSISET := -mips2 $(BUILD_DIR)/lib/src/unknown_0C91A0.o : OPT_FLAGS := -O1 $(BUILD_DIR)/lib/src/unknown_0D29F0.o: OPT_FLAGS := -O1 +$(BUILD_DIR)/lib/src/unknown_0CDE90.o: OPT_FLAGS := -O1 $(BUILD_DIR)/lib/src/osCreateThread.o : OPT_FLAGS := -O1 $(BUILD_DIR)/lib/src/osGetThreadPri.o : OPT_FLAGS := -O1 $(BUILD_DIR)/lib/src/osPfsFreeBlocks.o: OPT_FLAGS := -O1 diff --git a/asm/non_matchings/unknown_071730/func_80071D30.s b/asm/non_matchings/unknown_071730/func_80071D30.s index 7333fb21..025282f9 100644 --- a/asm/non_matchings/unknown_071730/func_80071D30.s +++ b/asm/non_matchings/unknown_071730/func_80071D30.s @@ -19,8 +19,8 @@ glabel func_80071D30 /* 072974 80071D74 8D240004 */ lw $a0, 4($t1) /* 072978 80071D78 0C0322EC */ jal osRecvMesg /* 07297C 80071D7C 24060001 */ li $a2, 1 -/* 072980 80071D80 3C058013 */ lui $a1, %hi(D_8012CDE0) # $a1, 0x8013 -/* 072984 80071D84 24A5CDE0 */ addiu $a1, %lo(D_8012CDE0) # addiu $a1, $a1, -0x3220 +/* 072980 80071D80 3C058013 */ lui $a1, %hi(__osPfsPifRam) # $a1, 0x8013 +/* 072984 80071D84 24A5CDE0 */ addiu $a1, %lo(__osPfsPifRam) # addiu $a1, $a1, -0x3220 /* 072988 80071D88 0C0335B0 */ jal __osSiRawStartDma /* 07298C 80071D8C 00002025 */ move $a0, $zero /* 072990 80071D90 8FAA0050 */ lw $t2, 0x50($sp) @@ -29,9 +29,9 @@ glabel func_80071D30 /* 07299C 80071D9C 0C0322EC */ jal osRecvMesg /* 0729A0 80071DA0 24060001 */ li $a2, 1 /* 0729A4 80071DA4 8FAB0050 */ lw $t3, 0x50($sp) -/* 0729A8 80071DA8 3C038013 */ lui $v1, %hi(D_8012CDE0) # $v1, 0x8013 +/* 0729A8 80071DA8 3C038013 */ lui $v1, %hi(__osPfsPifRam) # $v1, 0x8013 /* 0729AC 80071DAC 8D640008 */ lw $a0, 8($t3) -/* 0729B0 80071DB0 2463CDE0 */ addiu $v1, %lo(D_8012CDE0) # addiu $v1, $v1, -0x3220 +/* 0729B0 80071DB0 2463CDE0 */ addiu $v1, %lo(__osPfsPifRam) # addiu $v1, $v1, -0x3220 /* 0729B4 80071DB4 10800007 */ beqz $a0, .L80071DD4 /* 0729B8 80071DB8 27AC001C */ addiu $t4, $sp, 0x1c /* 0729BC 80071DBC 18800005 */ blez $a0, .L80071DD4 diff --git a/asm/non_matchings/unknown_071730/func_80071E58.s b/asm/non_matchings/unknown_071730/func_80071E58.s index 691b5b06..a28f6961 100644 --- a/asm/non_matchings/unknown_071730/func_80071E58.s +++ b/asm/non_matchings/unknown_071730/func_80071E58.s @@ -19,8 +19,8 @@ glabel func_80071E58 /* 072A9C 80071E9C 8D240004 */ lw $a0, 4($t1) /* 072AA0 80071EA0 0C0322EC */ jal osRecvMesg /* 072AA4 80071EA4 24060001 */ li $a2, 1 -/* 072AA8 80071EA8 3C058013 */ lui $a1, %hi(D_8012CDE0) # $a1, 0x8013 -/* 072AAC 80071EAC 24A5CDE0 */ addiu $a1, %lo(D_8012CDE0) # addiu $a1, $a1, -0x3220 +/* 072AA8 80071EA8 3C058013 */ lui $a1, %hi(__osPfsPifRam) # $a1, 0x8013 +/* 072AAC 80071EAC 24A5CDE0 */ addiu $a1, %lo(__osPfsPifRam) # addiu $a1, $a1, -0x3220 /* 072AB0 80071EB0 0C0335B0 */ jal __osSiRawStartDma /* 072AB4 80071EB4 00002025 */ move $a0, $zero /* 072AB8 80071EB8 8FAA0050 */ lw $t2, 0x50($sp) @@ -29,9 +29,9 @@ glabel func_80071E58 /* 072AC4 80071EC4 0C0322EC */ jal osRecvMesg /* 072AC8 80071EC8 24060001 */ li $a2, 1 /* 072ACC 80071ECC 8FAB0050 */ lw $t3, 0x50($sp) -/* 072AD0 80071ED0 3C038013 */ lui $v1, %hi(D_8012CDE0) # $v1, 0x8013 +/* 072AD0 80071ED0 3C038013 */ lui $v1, %hi(__osPfsPifRam) # $v1, 0x8013 /* 072AD4 80071ED4 8D640008 */ lw $a0, 8($t3) -/* 072AD8 80071ED8 2463CDE0 */ addiu $v1, %lo(D_8012CDE0) # addiu $v1, $v1, -0x3220 +/* 072AD8 80071ED8 2463CDE0 */ addiu $v1, %lo(__osPfsPifRam) # addiu $v1, $v1, -0x3220 /* 072ADC 80071EDC 10800007 */ beqz $a0, .L80071EFC /* 072AE0 80071EE0 27AC001C */ addiu $t4, $sp, 0x1c /* 072AE4 80071EE4 18800005 */ blez $a0, .L80071EFC diff --git a/include/controller.h b/include/controller.h index 0abc36cb..f5f27f82 100644 --- a/include/controller.h +++ b/include/controller.h @@ -5,7 +5,7 @@ //should go somewhere else but #define ARRLEN(x) ((s32)(sizeof(x) / sizeof(x[0]))) -#define CHNL_ERR(format) ((format.rxsize & CHNL_ERR_MASK) >> 4) +#define CHNL_ERR(format) ((format.rxsize & 0xC0) >> 4) typedef struct { @@ -130,4 +130,3 @@ typedef struct __osSiRelAccess(); \ if (ret != 0) \ return ret; - \ No newline at end of file diff --git a/lib/asm/non_matchings/unknown_0CD820/func_800CCC20.s b/lib/asm/non_matchings/unknown_0CD820/func_800CCC20.s index 2037e544..47d7fd04 100644 --- a/lib/asm/non_matchings/unknown_0CD820/func_800CCC20.s +++ b/lib/asm/non_matchings/unknown_0CD820/func_800CCC20.s @@ -89,8 +89,8 @@ glabel func_800CCC20 /* 0CD974 800CCD74 24060001 */ li $a2, 1 .L800CCD78: /* 0CD978 800CCD78 24180004 */ li $t8, 4 -/* 0CD97C 800CCD7C 3C018013 */ lui $at, %hi(D_8012CD91) # $at, 0x8013 -/* 0CD980 800CCD80 A038CD91 */ sb $t8, %lo(D_8012CD91)($at) +/* 0CD97C 800CCD7C 3C018013 */ lui $at, %hi(__osMaxControllers) # $at, 0x8013 +/* 0CD980 800CCD80 A038CD91 */ sb $t8, %lo(__osMaxControllers)($at) /* 0CD984 800CCD84 0C0333BA */ jal func_800CCEE8 /* 0CD988 800CCD88 00002025 */ move $a0, $zero /* 0CD98C 800CCD8C 3C058013 */ lui $a1, %hi(D_8012CD50) # $a1, 0x8013 diff --git a/lib/asm/non_matchings/unknown_0CD820/func_800CCE18.s b/lib/asm/non_matchings/unknown_0CD820/func_800CCE18.s index 6d3fce6f..50961eac 100644 --- a/lib/asm/non_matchings/unknown_0CD820/func_800CCE18.s +++ b/lib/asm/non_matchings/unknown_0CD820/func_800CCE18.s @@ -1,6 +1,6 @@ glabel func_800CCE18 -/* 0CDA18 800CCE18 3C0F8013 */ lui $t7, %hi(D_8012CD91) # $t7, 0x8013 -/* 0CDA1C 800CCE1C 91EFCD91 */ lbu $t7, %lo(D_8012CD91)($t7) +/* 0CDA18 800CCE18 3C0F8013 */ lui $t7, %hi(__osMaxControllers) # $t7, 0x8013 +/* 0CDA1C 800CCE1C 91EFCD91 */ lbu $t7, %lo(__osMaxControllers)($t7) /* 0CDA20 800CCE20 27BDFFE8 */ addiu $sp, $sp, -0x18 /* 0CDA24 800CCE24 3C0E8013 */ lui $t6, %hi(D_8012CD50) # $t6, 0x8013 /* 0CDA28 800CCE28 25CECD50 */ addiu $t6, %lo(D_8012CD50) # addiu $t6, $t6, -0x32b0 @@ -39,8 +39,8 @@ glabel func_800CCE18 /* 0CDAA8 800CCEA8 A3AD0007 */ sb $t5, 7($sp) .L800CCEAC: /* 0CDAAC 800CCEAC 8FAE0008 */ lw $t6, 8($sp) -/* 0CDAB0 800CCEB0 3C198013 */ lui $t9, %hi(D_8012CD91) # $t9, 0x8013 -/* 0CDAB4 800CCEB4 9339CD91 */ lbu $t9, %lo(D_8012CD91)($t9) +/* 0CDAB0 800CCEB0 3C198013 */ lui $t9, %hi(__osMaxControllers) # $t9, 0x8013 +/* 0CDAB4 800CCEB4 9339CD91 */ lbu $t9, %lo(__osMaxControllers)($t9) /* 0CDAB8 800CCEB8 8FA80014 */ lw $t0, 0x14($sp) /* 0CDABC 800CCEBC 25CF0001 */ addiu $t7, $t6, 1 /* 0CDAC0 800CCEC0 01F9082A */ slt $at, $t7, $t9 diff --git a/lib/asm/non_matchings/unknown_0CD820/func_800CCEE8.s b/lib/asm/non_matchings/unknown_0CD820/func_800CCEE8.s index 6c54f8ce..8a4048c0 100644 --- a/lib/asm/non_matchings/unknown_0CD820/func_800CCEE8.s +++ b/lib/asm/non_matchings/unknown_0CD820/func_800CCEE8.s @@ -13,8 +13,8 @@ glabel func_800CCEE8 /* 0CDB10 800CCF10 2B210010 */ slti $at, $t9, 0x10 /* 0CDB14 800CCF14 1420FFF7 */ bnez $at, .L800CCEF4 /* 0CDB18 800CCF18 AFB90000 */ sw $t9, ($sp) -/* 0CDB1C 800CCF1C 3C198013 */ lui $t9, %hi(D_8012CD91) # $t9, 0x8013 -/* 0CDB20 800CCF20 9339CD91 */ lbu $t9, %lo(D_8012CD91)($t9) +/* 0CDB1C 800CCF1C 3C198013 */ lui $t9, %hi(__osMaxControllers) # $t9, 0x8013 +/* 0CDB20 800CCF20 9339CD91 */ lbu $t9, %lo(__osMaxControllers)($t9) /* 0CDB24 800CCF24 3C098013 */ lui $t1, %hi(D_8012CD50) # $t1, 0x8013 /* 0CDB28 800CCF28 24080001 */ li $t0, 1 /* 0CDB2C 800CCF2C 3C018013 */ lui $at, %hi(D_8012CD8C) # $at, 0x8013 @@ -42,14 +42,14 @@ glabel func_800CCEE8 /* 0CDB80 800CCF80 27A90004 */ addiu $t1, $sp, 4 /* 0CDB84 800CCF84 8D210000 */ lw $at, ($t1) /* 0CDB88 800CCF88 8FA8000C */ lw $t0, 0xc($sp) -/* 0CDB8C 800CCF8C 3C188013 */ lui $t8, %hi(D_8012CD91) # $t8, 0x8013 +/* 0CDB8C 800CCF8C 3C188013 */ lui $t8, %hi(__osMaxControllers) # $t8, 0x8013 /* 0CDB90 800CCF90 A9010000 */ swl $at, ($t0) /* 0CDB94 800CCF94 B9010003 */ swr $at, 3($t0) /* 0CDB98 800CCF98 8D2B0004 */ lw $t3, 4($t1) /* 0CDB9C 800CCF9C A90B0004 */ swl $t3, 4($t0) /* 0CDBA0 800CCFA0 B90B0007 */ swr $t3, 7($t0) /* 0CDBA4 800CCFA4 8FAE0000 */ lw $t6, ($sp) -/* 0CDBA8 800CCFA8 9318CD91 */ lbu $t8, %lo(D_8012CD91)($t8) +/* 0CDBA8 800CCFA8 9318CD91 */ lbu $t8, %lo(__osMaxControllers)($t8) /* 0CDBAC 800CCFAC 8FAC000C */ lw $t4, 0xc($sp) /* 0CDBB0 800CCFB0 25CF0001 */ addiu $t7, $t6, 1 /* 0CDBB4 800CCFB4 01F8082A */ slt $at, $t7, $t8 diff --git a/lib/asm/non_matchings/unknown_0CD820/func_800CD0A4.s b/lib/asm/non_matchings/unknown_0CD820/func_800CD0A4.s index dda2b9e3..70e89221 100644 --- a/lib/asm/non_matchings/unknown_0CD820/func_800CD0A4.s +++ b/lib/asm/non_matchings/unknown_0CD820/func_800CD0A4.s @@ -1,6 +1,6 @@ glabel func_800CD0A4 -/* 0CDCA4 800CD0A4 3C0F8013 */ lui $t7, %hi(D_8012CD91) # $t7, 0x8013 -/* 0CDCA8 800CD0A8 91EFCD91 */ lbu $t7, %lo(D_8012CD91)($t7) +/* 0CDCA4 800CD0A4 3C0F8013 */ lui $t7, %hi(__osMaxControllers) # $t7, 0x8013 +/* 0CDCA8 800CD0A8 91EFCD91 */ lbu $t7, %lo(__osMaxControllers)($t7) /* 0CDCAC 800CD0AC 3C0E8013 */ lui $t6, %hi(D_8012CD50) # $t6, 0x8013 /* 0CDCB0 800CD0B0 27BDFFF0 */ addiu $sp, $sp, -0x10 /* 0CDCB4 800CD0B4 25CECD50 */ addiu $t6, %lo(D_8012CD50) # addiu $t6, $t6, -0x32b0 @@ -31,8 +31,8 @@ glabel func_800CD0A4 /* 0CDD14 800CD114 A0880003 */ sb $t0, 3($a0) .L800CD118: /* 0CDD18 800CD118 8FB80000 */ lw $t8, ($sp) -/* 0CDD1C 800CD11C 3C0B8013 */ lui $t3, %hi(D_8012CD91) # $t3, 0x8013 -/* 0CDD20 800CD120 916BCD91 */ lbu $t3, %lo(D_8012CD91)($t3) +/* 0CDD1C 800CD11C 3C0B8013 */ lui $t3, %hi(__osMaxControllers) # $t3, 0x8013 +/* 0CDD20 800CD120 916BCD91 */ lbu $t3, %lo(__osMaxControllers)($t3) /* 0CDD24 800CD124 8FA9000C */ lw $t1, 0xc($sp) /* 0CDD28 800CD128 27190001 */ addiu $t9, $t8, 1 /* 0CDD2C 800CD12C 032B082A */ slt $at, $t9, $t3 diff --git a/lib/asm/non_matchings/unknown_0CD820/func_800CD14C.s b/lib/asm/non_matchings/unknown_0CD820/func_800CD14C.s index 49303dcb..0fc3849d 100644 --- a/lib/asm/non_matchings/unknown_0CD820/func_800CD14C.s +++ b/lib/asm/non_matchings/unknown_0CD820/func_800CD14C.s @@ -15,8 +15,8 @@ glabel func_800CD14C /* 0CDD7C 800CD17C 29010010 */ slti $at, $t0, 0x10 /* 0CDD80 800CD180 1420FFF7 */ bnez $at, .L800CD160 /* 0CDD84 800CD184 AFA80000 */ sw $t0, ($sp) -/* 0CDD88 800CD188 3C198013 */ lui $t9, %hi(D_8012CD91) # $t9, 0x8013 -/* 0CDD8C 800CD18C 9339CD91 */ lbu $t9, %lo(D_8012CD91)($t9) +/* 0CDD88 800CD188 3C198013 */ lui $t9, %hi(__osMaxControllers) # $t9, 0x8013 +/* 0CDD8C 800CD18C 9339CD91 */ lbu $t9, %lo(__osMaxControllers)($t9) /* 0CDD90 800CD190 24090001 */ li $t1, 1 /* 0CDD94 800CD194 3C018013 */ lui $at, %hi(D_8012CD8C) # $at, 0x8013 /* 0CDD98 800CD198 240A00FF */ li $t2, 255 @@ -40,14 +40,14 @@ glabel func_800CD14C /* 0CDDDC 800CD1DC 27A90004 */ addiu $t1, $sp, 4 /* 0CDDE0 800CD1E0 8D210000 */ lw $at, ($t1) /* 0CDDE4 800CD1E4 8FA8000C */ lw $t0, 0xc($sp) -/* 0CDDE8 800CD1E8 3C188013 */ lui $t8, %hi(D_8012CD91) # $t8, 0x8013 +/* 0CDDE8 800CD1E8 3C188013 */ lui $t8, %hi(__osMaxControllers) # $t8, 0x8013 /* 0CDDEC 800CD1EC A9010000 */ swl $at, ($t0) /* 0CDDF0 800CD1F0 B9010003 */ swr $at, 3($t0) /* 0CDDF4 800CD1F4 8D2B0004 */ lw $t3, 4($t1) /* 0CDDF8 800CD1F8 A90B0004 */ swl $t3, 4($t0) /* 0CDDFC 800CD1FC B90B0007 */ swr $t3, 7($t0) /* 0CDE00 800CD200 8FAE0000 */ lw $t6, ($sp) -/* 0CDE04 800CD204 9318CD91 */ lbu $t8, %lo(D_8012CD91)($t8) +/* 0CDE04 800CD204 9318CD91 */ lbu $t8, %lo(__osMaxControllers)($t8) /* 0CDE08 800CD208 8FAC000C */ lw $t4, 0xc($sp) /* 0CDE0C 800CD20C 25CF0001 */ addiu $t7, $t6, 1 /* 0CDE10 800CD210 01F8082A */ slt $at, $t7, $t8 diff --git a/lib/asm/non_matchings/unknown_0CDE90/__osPfsGetInitData.s b/lib/asm/non_matchings/unknown_0CDE90/__osPfsGetInitData.s deleted file mode 100644 index dcfb8367..00000000 --- a/lib/asm/non_matchings/unknown_0CDE90/__osPfsGetInitData.s +++ /dev/null @@ -1,59 +0,0 @@ -glabel __osPfsGetInitData -/* 0CE12C 800CD52C 3C0F8013 */ lui $t7, %hi(D_8012CD91) # $t7, 0x8013 -/* 0CE130 800CD530 91EFCD91 */ lbu $t7, %lo(D_8012CD91)($t7) -/* 0CE134 800CD534 27BDFFE8 */ addiu $sp, $sp, -0x18 -/* 0CE138 800CD538 3C0E8013 */ lui $t6, %hi(D_8012CDE0) # $t6, 0x8013 -/* 0CE13C 800CD53C 25CECDE0 */ addiu $t6, %lo(D_8012CDE0) # addiu $t6, $t6, -0x3220 -/* 0CE140 800CD540 A3A00007 */ sb $zero, 7($sp) -/* 0CE144 800CD544 AFAE0014 */ sw $t6, 0x14($sp) -/* 0CE148 800CD548 19E00028 */ blez $t7, .L800CD5EC -/* 0CE14C 800CD54C AFA00008 */ sw $zero, 8($sp) -.L800CD550: -/* 0CE150 800CD550 8FB90014 */ lw $t9, 0x14($sp) -/* 0CE154 800CD554 27B8000C */ addiu $t8, $sp, 0xc -/* 0CE158 800CD558 8B210000 */ lwl $at, ($t9) -/* 0CE15C 800CD55C 9B210003 */ lwr $at, 3($t9) -/* 0CE160 800CD560 AF010000 */ sw $at, ($t8) -/* 0CE164 800CD564 8B290004 */ lwl $t1, 4($t9) -/* 0CE168 800CD568 9B290007 */ lwr $t1, 7($t9) -/* 0CE16C 800CD56C AF090004 */ sw $t1, 4($t8) -/* 0CE170 800CD570 93AA000E */ lbu $t2, 0xe($sp) -/* 0CE174 800CD574 314B00C0 */ andi $t3, $t2, 0xc0 -/* 0CE178 800CD578 000B6103 */ sra $t4, $t3, 4 -/* 0CE17C 800CD57C A0AC0003 */ sb $t4, 3($a1) -/* 0CE180 800CD580 90AD0003 */ lbu $t5, 3($a1) -/* 0CE184 800CD584 15A0000E */ bnez $t5, .L800CD5C0 -/* 0CE188 800CD588 00000000 */ nop -/* 0CE18C 800CD58C 93AE0011 */ lbu $t6, 0x11($sp) -/* 0CE190 800CD590 93A80010 */ lbu $t0, 0x10($sp) -/* 0CE194 800CD594 240B0001 */ li $t3, 1 -/* 0CE198 800CD598 000E7A00 */ sll $t7, $t6, 8 -/* 0CE19C 800CD59C 01E8C025 */ or $t8, $t7, $t0 -/* 0CE1A0 800CD5A0 A4B80000 */ sh $t8, ($a1) -/* 0CE1A4 800CD5A4 93B90012 */ lbu $t9, 0x12($sp) -/* 0CE1A8 800CD5A8 A0B90002 */ sb $t9, 2($a1) -/* 0CE1AC 800CD5AC 8FAA0008 */ lw $t2, 8($sp) -/* 0CE1B0 800CD5B0 93A90007 */ lbu $t1, 7($sp) -/* 0CE1B4 800CD5B4 014B6004 */ sllv $t4, $t3, $t2 -/* 0CE1B8 800CD5B8 012C6825 */ or $t5, $t1, $t4 -/* 0CE1BC 800CD5BC A3AD0007 */ sb $t5, 7($sp) -.L800CD5C0: -/* 0CE1C0 800CD5C0 8FAE0008 */ lw $t6, 8($sp) -/* 0CE1C4 800CD5C4 3C198013 */ lui $t9, %hi(D_8012CD91) # $t9, 0x8013 -/* 0CE1C8 800CD5C8 9339CD91 */ lbu $t9, %lo(D_8012CD91)($t9) -/* 0CE1CC 800CD5CC 8FA80014 */ lw $t0, 0x14($sp) -/* 0CE1D0 800CD5D0 25CF0001 */ addiu $t7, $t6, 1 -/* 0CE1D4 800CD5D4 01F9082A */ slt $at, $t7, $t9 -/* 0CE1D8 800CD5D8 25180008 */ addiu $t8, $t0, 8 -/* 0CE1DC 800CD5DC AFB80014 */ sw $t8, 0x14($sp) -/* 0CE1E0 800CD5E0 AFAF0008 */ sw $t7, 8($sp) -/* 0CE1E4 800CD5E4 1420FFDA */ bnez $at, .L800CD550 -/* 0CE1E8 800CD5E8 24A50004 */ addiu $a1, $a1, 4 -.L800CD5EC: -/* 0CE1EC 800CD5EC 93AB0007 */ lbu $t3, 7($sp) -/* 0CE1F0 800CD5F0 27BD0018 */ addiu $sp, $sp, 0x18 -/* 0CE1F4 800CD5F4 03E00008 */ jr $ra -/* 0CE1F8 800CD5F8 A08B0000 */ sb $t3, ($a0) - -/* 0CE1FC 800CD5FC 00000000 */ nop - diff --git a/lib/asm/non_matchings/unknown_0CDE90/__osPfsRequestData.s b/lib/asm/non_matchings/unknown_0CDE90/__osPfsRequestData.s index 077902c4..c5950158 100644 --- a/lib/asm/non_matchings/unknown_0CDE90/__osPfsRequestData.s +++ b/lib/asm/non_matchings/unknown_0CDE90/__osPfsRequestData.s @@ -15,12 +15,12 @@ glabel __osPfsRequestData /* 0CE060 800CD460 2B210010 */ slti $at, $t9, 0x10 /* 0CE064 800CD464 1420FFF7 */ bnez $at, .L800CD444 /* 0CE068 800CD468 AFB90000 */ sw $t9, ($sp) -/* 0CE06C 800CD46C 3C198013 */ lui $t9, %hi(D_8012CD91) # $t9, 0x8013 -/* 0CE070 800CD470 9339CD91 */ lbu $t9, %lo(D_8012CD91)($t9) -/* 0CE074 800CD474 3C098013 */ lui $t1, %hi(D_8012CDE0) # $t1, 0x8013 +/* 0CE06C 800CD46C 3C198013 */ lui $t9, %hi(__osMaxControllers) # $t9, 0x8013 +/* 0CE070 800CD470 9339CD91 */ lbu $t9, %lo(__osMaxControllers)($t9) +/* 0CE074 800CD474 3C098013 */ lui $t1, %hi(__osPfsPifRam) # $t1, 0x8013 /* 0CE078 800CD478 24080001 */ li $t0, 1 /* 0CE07C 800CD47C 3C018013 */ lui $at, %hi(D_8012CE1C) # $at, 0x8013 -/* 0CE080 800CD480 2529CDE0 */ addiu $t1, %lo(D_8012CDE0) # addiu $t1, $t1, -0x3220 +/* 0CE080 800CD480 2529CDE0 */ addiu $t1, %lo(__osPfsPifRam) # addiu $t1, $t1, -0x3220 /* 0CE084 800CD484 240A00FF */ li $t2, 255 /* 0CE088 800CD488 240B0001 */ li $t3, 1 /* 0CE08C 800CD48C 240C0003 */ li $t4, 3 @@ -44,14 +44,14 @@ glabel __osPfsRequestData /* 0CE0D0 800CD4D0 27A90004 */ addiu $t1, $sp, 4 /* 0CE0D4 800CD4D4 8D210000 */ lw $at, ($t1) /* 0CE0D8 800CD4D8 8FA8000C */ lw $t0, 0xc($sp) -/* 0CE0DC 800CD4DC 3C188013 */ lui $t8, %hi(D_8012CD91) # $t8, 0x8013 +/* 0CE0DC 800CD4DC 3C188013 */ lui $t8, %hi(__osMaxControllers) # $t8, 0x8013 /* 0CE0E0 800CD4E0 A9010000 */ swl $at, ($t0) /* 0CE0E4 800CD4E4 B9010003 */ swr $at, 3($t0) /* 0CE0E8 800CD4E8 8D2B0004 */ lw $t3, 4($t1) /* 0CE0EC 800CD4EC A90B0004 */ swl $t3, 4($t0) /* 0CE0F0 800CD4F0 B90B0007 */ swr $t3, 7($t0) /* 0CE0F4 800CD4F4 8FAE0000 */ lw $t6, ($sp) -/* 0CE0F8 800CD4F8 9318CD91 */ lbu $t8, %lo(D_8012CD91)($t8) +/* 0CE0F8 800CD4F8 9318CD91 */ lbu $t8, %lo(__osMaxControllers)($t8) /* 0CE0FC 800CD4FC 8FAC000C */ lw $t4, 0xc($sp) /* 0CE100 800CD500 25CF0001 */ addiu $t7, $t6, 1 /* 0CE104 800CD504 01F8082A */ slt $at, $t7, $t8 diff --git a/lib/asm/non_matchings/unknown_0CDE90/osPfsIsPlug.s b/lib/asm/non_matchings/unknown_0CDE90/osPfsIsPlug.s index 4d106b5c..c49b772a 100644 --- a/lib/asm/non_matchings/unknown_0CDE90/osPfsIsPlug.s +++ b/lib/asm/non_matchings/unknown_0CDE90/osPfsIsPlug.s @@ -11,8 +11,8 @@ glabel osPfsIsPlug .L800CD2B4: /* 0CDEB4 800CD2B4 0C03350C */ jal __osPfsRequestData /* 0CDEB8 800CD2B8 00002025 */ move $a0, $zero -/* 0CDEBC 800CD2BC 3C058013 */ lui $a1, %hi(D_8012CDE0) # $a1, 0x8013 -/* 0CDEC0 800CD2C0 24A5CDE0 */ addiu $a1, %lo(D_8012CDE0) # addiu $a1, $a1, -0x3220 +/* 0CDEBC 800CD2BC 3C058013 */ lui $a1, %hi(__osPfsPifRam) # $a1, 0x8013 +/* 0CDEC0 800CD2C0 24A5CDE0 */ addiu $a1, %lo(__osPfsPifRam) # addiu $a1, $a1, -0x3220 /* 0CDEC4 800CD2C4 0C0335B0 */ jal __osSiRawStartDma /* 0CDEC8 800CD2C8 24040001 */ li $a0, 1 /* 0CDECC 800CD2CC AFA2003C */ sw $v0, 0x3c($sp) @@ -20,8 +20,8 @@ glabel osPfsIsPlug /* 0CDED4 800CD2D4 27A50038 */ addiu $a1, $sp, 0x38 /* 0CDED8 800CD2D8 0C0322EC */ jal osRecvMesg /* 0CDEDC 800CD2DC 24060001 */ li $a2, 1 -/* 0CDEE0 800CD2E0 3C058013 */ lui $a1, %hi(D_8012CDE0) # $a1, 0x8013 -/* 0CDEE4 800CD2E4 24A5CDE0 */ addiu $a1, %lo(D_8012CDE0) # addiu $a1, $a1, -0x3220 +/* 0CDEE0 800CD2E0 3C058013 */ lui $a1, %hi(__osPfsPifRam) # $a1, 0x8013 +/* 0CDEE4 800CD2E4 24A5CDE0 */ addiu $a1, %lo(__osPfsPifRam) # addiu $a1, $a1, -0x3220 /* 0CDEE8 800CD2E8 0C0335B0 */ jal __osSiRawStartDma /* 0CDEEC 800CD2EC 00002025 */ move $a0, $zero /* 0CDEF0 800CD2F0 AFA2003C */ sw $v0, 0x3c($sp) @@ -32,8 +32,8 @@ glabel osPfsIsPlug /* 0CDF04 800CD304 27A40037 */ addiu $a0, $sp, 0x37 /* 0CDF08 800CD308 0C03354B */ jal __osPfsGetInitData /* 0CDF0C 800CD30C 27A50024 */ addiu $a1, $sp, 0x24 -/* 0CDF10 800CD310 3C0F8013 */ lui $t7, %hi(D_8012CD91) # $t7, 0x8013 -/* 0CDF14 800CD314 91EFCD91 */ lbu $t7, %lo(D_8012CD91)($t7) +/* 0CDF10 800CD310 3C0F8013 */ lui $t7, %hi(__osMaxControllers) # $t7, 0x8013 +/* 0CDF14 800CD314 91EFCD91 */ lbu $t7, %lo(__osMaxControllers)($t7) /* 0CDF18 800CD318 AFA00020 */ sw $zero, 0x20($sp) /* 0CDF1C 800CD31C 19E00014 */ blez $t7, .L800CD370 /* 0CDF20 800CD320 00000000 */ nop @@ -51,16 +51,16 @@ glabel osPfsIsPlug /* 0CDF4C 800CD34C AFAB0018 */ sw $t3, 0x18($sp) .L800CD350: /* 0CDF50 800CD350 8FAC0020 */ lw $t4, 0x20($sp) -/* 0CDF54 800CD354 3C0E8013 */ lui $t6, %hi(D_8012CD91) # $t6, 0x8013 -/* 0CDF58 800CD358 91CECD91 */ lbu $t6, %lo(D_8012CD91)($t6) +/* 0CDF54 800CD354 3C0E8013 */ lui $t6, %hi(__osMaxControllers) # $t6, 0x8013 +/* 0CDF58 800CD358 91CECD91 */ lbu $t6, %lo(__osMaxControllers)($t6) /* 0CDF5C 800CD35C 258D0001 */ addiu $t5, $t4, 1 /* 0CDF60 800CD360 AFAD0020 */ sw $t5, 0x20($sp) /* 0CDF64 800CD364 01AE082A */ slt $at, $t5, $t6 /* 0CDF68 800CD368 1420FFEE */ bnez $at, .L800CD324 /* 0CDF6C 800CD36C 00000000 */ nop .L800CD370: -/* 0CDF70 800CD370 3C0F8013 */ lui $t7, %hi(D_8012CD91) # $t7, 0x8013 -/* 0CDF74 800CD374 91EFCD91 */ lbu $t7, %lo(D_8012CD91)($t7) +/* 0CDF70 800CD370 3C0F8013 */ lui $t7, %hi(__osMaxControllers) # $t7, 0x8013 +/* 0CDF74 800CD374 91EFCD91 */ lbu $t7, %lo(__osMaxControllers)($t7) /* 0CDF78 800CD378 8FB80020 */ lw $t8, 0x20($sp) /* 0CDF7C 800CD37C 15F80002 */ bne $t7, $t8, .L800CD388 /* 0CDF80 800CD380 00000000 */ nop @@ -69,8 +69,8 @@ glabel osPfsIsPlug /* 0CDF88 800CD388 8FB90018 */ lw $t9, 0x18($sp) /* 0CDF8C 800CD38C 1F20FFC9 */ bgtz $t9, .L800CD2B4 /* 0CDF90 800CD390 00000000 */ nop -/* 0CDF94 800CD394 3C088013 */ lui $t0, %hi(D_8012CD91) # $t0, 0x8013 -/* 0CDF98 800CD398 9108CD91 */ lbu $t0, %lo(D_8012CD91)($t0) +/* 0CDF94 800CD394 3C088013 */ lui $t0, %hi(__osMaxControllers) # $t0, 0x8013 +/* 0CDF98 800CD398 9108CD91 */ lbu $t0, %lo(__osMaxControllers)($t0) /* 0CDF9C 800CD39C AFA00020 */ sw $zero, 0x20($sp) /* 0CDFA0 800CD3A0 19000019 */ blez $t0, .L800CD408 /* 0CDFA4 800CD3A4 00000000 */ nop @@ -93,8 +93,8 @@ glabel osPfsIsPlug /* 0CDFE4 800CD3E4 A3AA001F */ sb $t2, 0x1f($sp) .L800CD3E8: /* 0CDFE8 800CD3E8 8FAB0020 */ lw $t3, 0x20($sp) -/* 0CDFEC 800CD3EC 3C0C8013 */ lui $t4, %hi(D_8012CD91) # $t4, 0x8013 -/* 0CDFF0 800CD3F0 918CCD91 */ lbu $t4, %lo(D_8012CD91)($t4) +/* 0CDFEC 800CD3EC 3C0C8013 */ lui $t4, %hi(__osMaxControllers) # $t4, 0x8013 +/* 0CDFF0 800CD3F0 918CCD91 */ lbu $t4, %lo(__osMaxControllers)($t4) /* 0CDFF4 800CD3F4 256D0001 */ addiu $t5, $t3, 1 /* 0CDFF8 800CD3F8 AFAD0020 */ sw $t5, 0x20($sp) /* 0CDFFC 800CD3FC 01AC082A */ slt $at, $t5, $t4 diff --git a/lib/asm/non_matchings/unknown_0CE370/__osContRamWrite.s b/lib/asm/non_matchings/unknown_0CE370/__osContRamWrite.s index 4039f2c3..ca36ff5e 100644 --- a/lib/asm/non_matchings/unknown_0CE370/__osContRamWrite.s +++ b/lib/asm/non_matchings/unknown_0CE370/__osContRamWrite.s @@ -1,8 +1,8 @@ glabel __osContRamWrite /* 0CE4F0 800CD8F0 27BDFFA0 */ addiu $sp, $sp, -0x60 /* 0CE4F4 800CD8F4 8FB80070 */ lw $t8, 0x70($sp) -/* 0CE4F8 800CD8F8 3C0E8013 */ lui $t6, %hi(D_8012CDE0) # $t6, 0x8013 -/* 0CE4FC 800CD8FC 25CECDE0 */ addiu $t6, %lo(D_8012CDE0) # addiu $t6, $t6, -0x3220 +/* 0CE4F8 800CD8F8 3C0E8013 */ lui $t6, %hi(__osPfsPifRam) # $t6, 0x8013 +/* 0CE4FC 800CD8FC 25CECDE0 */ addiu $t6, %lo(__osPfsPifRam) # addiu $t6, $t6, -0x3220 /* 0CE500 800CD900 240F0002 */ li $t7, 2 /* 0CE504 800CD904 24010001 */ li $at, 1 /* 0CE508 800CD908 AFBF001C */ sw $ra, 0x1c($sp) @@ -33,8 +33,8 @@ glabel __osContRamWrite /* 0CE568 800CD968 97A5006A */ lhu $a1, 0x6a($sp) /* 0CE56C 800CD96C 0C0336C8 */ jal __osPackRamWriteData /* 0CE570 800CD970 8FA6006C */ lw $a2, 0x6c($sp) -/* 0CE574 800CD974 3C058013 */ lui $a1, %hi(D_8012CDE0) # $a1, 0x8013 -/* 0CE578 800CD978 24A5CDE0 */ addiu $a1, %lo(D_8012CDE0) # addiu $a1, $a1, -0x3220 +/* 0CE574 800CD974 3C058013 */ lui $a1, %hi(__osPfsPifRam) # $a1, 0x8013 +/* 0CE578 800CD978 24A5CDE0 */ addiu $a1, %lo(__osPfsPifRam) # addiu $a1, $a1, -0x3220 /* 0CE57C 800CD97C 0C0335B0 */ jal __osSiRawStartDma /* 0CE580 800CD980 24040001 */ li $a0, 1 /* 0CE584 800CD984 AFA2005C */ sw $v0, 0x5c($sp) @@ -57,9 +57,9 @@ glabel __osContRamWrite /* 0CE5C0 800CD9C0 1420FFF6 */ bnez $at, .L800CD99C /* 0CE5C4 800CD9C4 AFAD0058 */ sw $t5, 0x58($sp) /* 0CE5C8 800CD9C8 3C018013 */ lui $at, %hi(D_8012CE1C) # $at, 0x8013 -/* 0CE5CC 800CD9CC 3C058013 */ lui $a1, %hi(D_8012CDE0) # $a1, 0x8013 +/* 0CE5CC 800CD9CC 3C058013 */ lui $a1, %hi(__osPfsPifRam) # $a1, 0x8013 /* 0CE5D0 800CD9D0 AC20CE1C */ sw $zero, %lo(D_8012CE1C)($at) -/* 0CE5D4 800CD9D4 24A5CDE0 */ addiu $a1, %lo(D_8012CDE0) # addiu $a1, $a1, -0x3220 +/* 0CE5D4 800CD9D4 24A5CDE0 */ addiu $a1, %lo(__osPfsPifRam) # addiu $a1, $a1, -0x3220 /* 0CE5D8 800CD9D8 0C0335B0 */ jal __osSiRawStartDma /* 0CE5DC 800CD9DC 00002025 */ move $a0, $zero /* 0CE5E0 800CD9E0 AFA2005C */ sw $v0, 0x5c($sp) @@ -68,8 +68,8 @@ glabel __osContRamWrite /* 0CE5EC 800CD9EC 0C0322EC */ jal osRecvMesg /* 0CE5F0 800CD9F0 24060001 */ li $a2, 1 /* 0CE5F4 800CD9F4 8FAF0064 */ lw $t7, 0x64($sp) -/* 0CE5F8 800CD9F8 3C0E8013 */ lui $t6, %hi(D_8012CDE0) # $t6, 0x8013 -/* 0CE5FC 800CD9FC 25CECDE0 */ addiu $t6, %lo(D_8012CDE0) # addiu $t6, $t6, -0x3220 +/* 0CE5F8 800CD9F8 3C0E8013 */ lui $t6, %hi(__osPfsPifRam) # $t6, 0x8013 +/* 0CE5FC 800CD9FC 25CECDE0 */ addiu $t6, %lo(__osPfsPifRam) # addiu $t6, $t6, -0x3220 /* 0CE600 800CDA00 11E0000C */ beqz $t7, .L800CDA34 /* 0CE604 800CDA04 AFAE0054 */ sw $t6, 0x54($sp) /* 0CE608 800CDA08 19E0000A */ blez $t7, .L800CDA34 diff --git a/lib/asm/non_matchings/unknown_0CE370/__osPackRamWriteData.s b/lib/asm/non_matchings/unknown_0CE370/__osPackRamWriteData.s index 8153e22a..dc820aaa 100644 --- a/lib/asm/non_matchings/unknown_0CE370/__osPackRamWriteData.s +++ b/lib/asm/non_matchings/unknown_0CE370/__osPackRamWriteData.s @@ -1,7 +1,7 @@ glabel __osPackRamWriteData /* 0CE720 800CDB20 27BDFFB8 */ addiu $sp, $sp, -0x48 -/* 0CE724 800CDB24 3C0E8013 */ lui $t6, %hi(D_8012CDE0) # $t6, 0x8013 -/* 0CE728 800CDB28 25CECDE0 */ addiu $t6, %lo(D_8012CDE0) # addiu $t6, $t6, -0x3220 +/* 0CE724 800CDB24 3C0E8013 */ lui $t6, %hi(__osPfsPifRam) # $t6, 0x8013 +/* 0CE728 800CDB28 25CECDE0 */ addiu $t6, %lo(__osPfsPifRam) # addiu $t6, $t6, -0x3220 /* 0CE72C 800CDB2C AFBF0014 */ sw $ra, 0x14($sp) /* 0CE730 800CDB30 AFA40048 */ sw $a0, 0x48($sp) /* 0CE734 800CDB34 AFA5004C */ sw $a1, 0x4c($sp) diff --git a/lib/asm/non_matchings/unknown_0CE8A0/__osContRamRead.s b/lib/asm/non_matchings/unknown_0CE8A0/__osContRamRead.s index d957bc2e..ec84f74e 100644 --- a/lib/asm/non_matchings/unknown_0CE8A0/__osContRamRead.s +++ b/lib/asm/non_matchings/unknown_0CE8A0/__osContRamRead.s @@ -1,8 +1,8 @@ glabel __osContRamRead /* 0CE8A0 800CDCA0 27BDFFA0 */ addiu $sp, $sp, -0x60 -/* 0CE8A4 800CDCA4 3C0E8013 */ lui $t6, %hi(D_8012CDE0) # $t6, 0x8013 +/* 0CE8A4 800CDCA4 3C0E8013 */ lui $t6, %hi(__osPfsPifRam) # $t6, 0x8013 /* 0CE8A8 800CDCA8 AFBF001C */ sw $ra, 0x1c($sp) -/* 0CE8AC 800CDCAC 25CECDE0 */ addiu $t6, %lo(D_8012CDE0) # addiu $t6, $t6, -0x3220 +/* 0CE8AC 800CDCAC 25CECDE0 */ addiu $t6, %lo(__osPfsPifRam) # addiu $t6, $t6, -0x3220 /* 0CE8B0 800CDCB0 240F0002 */ li $t7, 2 /* 0CE8B4 800CDCB4 AFA40060 */ sw $a0, 0x60($sp) /* 0CE8B8 800CDCB8 AFA50064 */ sw $a1, 0x64($sp) @@ -19,8 +19,8 @@ glabel __osContRamRead /* 0CE8E4 800CDCE4 8FA40064 */ lw $a0, 0x64($sp) /* 0CE8E8 800CDCE8 0C0337B9 */ jal __osPackRamReadData /* 0CE8EC 800CDCEC 97A5006A */ lhu $a1, 0x6a($sp) -/* 0CE8F0 800CDCF0 3C058013 */ lui $a1, %hi(D_8012CDE0) # $a1, 0x8013 -/* 0CE8F4 800CDCF4 24A5CDE0 */ addiu $a1, %lo(D_8012CDE0) # addiu $a1, $a1, -0x3220 +/* 0CE8F0 800CDCF0 3C058013 */ lui $a1, %hi(__osPfsPifRam) # $a1, 0x8013 +/* 0CE8F4 800CDCF4 24A5CDE0 */ addiu $a1, %lo(__osPfsPifRam) # addiu $a1, $a1, -0x3220 /* 0CE8F8 800CDCF8 0C0335B0 */ jal __osSiRawStartDma /* 0CE8FC 800CDCFC 24040001 */ li $a0, 1 /* 0CE900 800CDD00 AFA2005C */ sw $v0, 0x5c($sp) @@ -43,9 +43,9 @@ glabel __osContRamRead /* 0CE93C 800CDD3C 1420FFF6 */ bnez $at, .L800CDD18 /* 0CE940 800CDD40 AFAB0058 */ sw $t3, 0x58($sp) /* 0CE944 800CDD44 3C018013 */ lui $at, %hi(D_8012CE1C) # $at, 0x8013 -/* 0CE948 800CDD48 3C058013 */ lui $a1, %hi(D_8012CDE0) # $a1, 0x8013 +/* 0CE948 800CDD48 3C058013 */ lui $a1, %hi(__osPfsPifRam) # $a1, 0x8013 /* 0CE94C 800CDD4C AC20CE1C */ sw $zero, %lo(D_8012CE1C)($at) -/* 0CE950 800CDD50 24A5CDE0 */ addiu $a1, %lo(D_8012CDE0) # addiu $a1, $a1, -0x3220 +/* 0CE950 800CDD50 24A5CDE0 */ addiu $a1, %lo(__osPfsPifRam) # addiu $a1, $a1, -0x3220 /* 0CE954 800CDD54 0C0335B0 */ jal __osSiRawStartDma /* 0CE958 800CDD58 00002025 */ move $a0, $zero /* 0CE95C 800CDD5C AFA2005C */ sw $v0, 0x5c($sp) @@ -54,8 +54,8 @@ glabel __osContRamRead /* 0CE968 800CDD68 0C0322EC */ jal osRecvMesg /* 0CE96C 800CDD6C 24060001 */ li $a2, 1 /* 0CE970 800CDD70 8FAD0064 */ lw $t5, 0x64($sp) -/* 0CE974 800CDD74 3C0C8013 */ lui $t4, %hi(D_8012CDE0) # $t4, 0x8013 -/* 0CE978 800CDD78 258CCDE0 */ addiu $t4, %lo(D_8012CDE0) # addiu $t4, $t4, -0x3220 +/* 0CE974 800CDD74 3C0C8013 */ lui $t4, %hi(__osPfsPifRam) # $t4, 0x8013 +/* 0CE978 800CDD78 258CCDE0 */ addiu $t4, %lo(__osPfsPifRam) # addiu $t4, $t4, -0x3220 /* 0CE97C 800CDD7C 11A0000C */ beqz $t5, .L800CDDB0 /* 0CE980 800CDD80 AFAC0054 */ sw $t4, 0x54($sp) /* 0CE984 800CDD84 19A0000A */ blez $t5, .L800CDDB0 diff --git a/lib/asm/non_matchings/unknown_0CE8A0/__osPackRamReadData.s b/lib/asm/non_matchings/unknown_0CE8A0/__osPackRamReadData.s index f7d25d45..9031c88c 100644 --- a/lib/asm/non_matchings/unknown_0CE8A0/__osPackRamReadData.s +++ b/lib/asm/non_matchings/unknown_0CE8A0/__osPackRamReadData.s @@ -1,7 +1,7 @@ glabel __osPackRamReadData /* 0CEAE4 800CDEE4 27BDFFB8 */ addiu $sp, $sp, -0x48 -/* 0CEAE8 800CDEE8 3C0E8013 */ lui $t6, %hi(D_8012CDE0) # $t6, 0x8013 -/* 0CEAEC 800CDEEC 25CECDE0 */ addiu $t6, %lo(D_8012CDE0) # addiu $t6, $t6, -0x3220 +/* 0CEAE8 800CDEE8 3C0E8013 */ lui $t6, %hi(__osPfsPifRam) # $t6, 0x8013 +/* 0CEAEC 800CDEEC 25CECDE0 */ addiu $t6, %lo(__osPfsPifRam) # addiu $t6, $t6, -0x3220 /* 0CEAF0 800CDEF0 AFBF0014 */ sw $ra, 0x14($sp) /* 0CEAF4 800CDEF4 AFA40048 */ sw $a0, 0x48($sp) /* 0CEAF8 800CDEF8 AFA5004C */ sw $a1, 0x4c($sp) diff --git a/lib/asm/non_matchings/unknown_0CF330/__osPfsGetStatus.s b/lib/asm/non_matchings/unknown_0CF330/__osPfsGetStatus.s index ffcbba39..4056dd0f 100644 --- a/lib/asm/non_matchings/unknown_0CF330/__osPfsGetStatus.s +++ b/lib/asm/non_matchings/unknown_0CF330/__osPfsGetStatus.s @@ -6,8 +6,8 @@ glabel __osPfsGetStatus /* 0CF9E4 800CEDE4 AFA00034 */ sw $zero, 0x34($sp) /* 0CF9E8 800CEDE8 0C03350C */ jal __osPfsRequestData /* 0CF9EC 800CEDEC 00002025 */ move $a0, $zero -/* 0CF9F0 800CEDF0 3C058013 */ lui $a1, %hi(D_8012CDE0) # $a1, 0x8013 -/* 0CF9F4 800CEDF4 24A5CDE0 */ addiu $a1, %lo(D_8012CDE0) # addiu $a1, $a1, -0x3220 +/* 0CF9F0 800CEDF0 3C058013 */ lui $a1, %hi(__osPfsPifRam) # $a1, 0x8013 +/* 0CF9F4 800CEDF4 24A5CDE0 */ addiu $a1, %lo(__osPfsPifRam) # addiu $a1, $a1, -0x3220 /* 0CF9F8 800CEDF8 0C0335B0 */ jal __osSiRawStartDma /* 0CF9FC 800CEDFC 24040001 */ li $a0, 1 /* 0CFA00 800CEE00 AFA20034 */ sw $v0, 0x34($sp) @@ -15,8 +15,8 @@ glabel __osPfsGetStatus /* 0CFA08 800CEE08 27A50030 */ addiu $a1, $sp, 0x30 /* 0CFA0C 800CEE0C 0C0322EC */ jal osRecvMesg /* 0CFA10 800CEE10 24060001 */ li $a2, 1 -/* 0CFA14 800CEE14 3C058013 */ lui $a1, %hi(D_8012CDE0) # $a1, 0x8013 -/* 0CFA18 800CEE18 24A5CDE0 */ addiu $a1, %lo(D_8012CDE0) # addiu $a1, $a1, -0x3220 +/* 0CFA14 800CEE14 3C058013 */ lui $a1, %hi(__osPfsPifRam) # $a1, 0x8013 +/* 0CFA18 800CEE18 24A5CDE0 */ addiu $a1, %lo(__osPfsPifRam) # addiu $a1, $a1, -0x3220 /* 0CFA1C 800CEE1C 0C0335B0 */ jal __osSiRawStartDma /* 0CFA20 800CEE20 00002025 */ move $a0, $zero /* 0CFA24 800CEE24 AFA20034 */ sw $v0, 0x34($sp) diff --git a/lib/src/unknown_0CDE90.c b/lib/src/unknown_0CDE90.c index 3e5c9cfb..b3e536aa 100644 --- a/lib/src/unknown_0CDE90.c +++ b/lib/src/unknown_0CDE90.c @@ -3,7 +3,34 @@ #include "types.h" #include "macros.h" +#include "libultra_internal.h" +#include "controller.h" +extern OSPifRam __osPfsPifRam; //__osPfsPifRam +extern u8 D_8012CD90; //__osContLastCmd +extern u8 __osMaxControllers;//__osMaxControllers GLOBAL_ASM("lib/asm/non_matchings/unknown_0CDE90/osPfsIsPlug.s") GLOBAL_ASM("lib/asm/non_matchings/unknown_0CDE90/__osPfsRequestData.s") -GLOBAL_ASM("lib/asm/non_matchings/unknown_0CDE90/__osPfsGetInitData.s") + +void __osPfsGetInitData(u8 *pattern, OSContStatus *data) +{ + u8 *ptr; + __OSContRequesFormat requestformat; + int i; + u8 bits; + bits = 0; + ptr = (u8 *)&__osPfsPifRam; + for (i = 0; i < __osMaxControllers; i++, ptr += sizeof(__OSContRequesFormat)) + { + requestformat = *(__OSContRequesFormat *)ptr; + data->errno = CHNL_ERR(requestformat); + if (data->errno == 0) + { + data->type = (requestformat.typel << 8) | (requestformat.typeh); + data->status = requestformat.status; + bits |= 1 << i; + } + data++; + } + *pattern = bits; +} diff --git a/undefined_syms.txt b/undefined_syms.txt index a0387b27..d67dbd55 100755 --- a/undefined_syms.txt +++ b/undefined_syms.txt @@ -2814,10 +2814,10 @@ D_8012CCD0 = 0x8012CCD0; D_8012CD50 = 0x8012CD50; D_8012CD8C = 0x8012CD8C; D_8012CD90 = 0x8012CD90; -D_8012CD91 = 0x8012CD91; +__osMaxControllers = 0x8012CD91; D_8012CDB8 = 0x8012CDB8; D_8012CDD0 = 0x8012CDD0; -D_8012CDE0 = 0x8012CDE0; +__osPfsPifRam = 0x8012CDE0; D_8012CE1C = 0x8012CE1C; D_8012CE20 = 0x8012CE20; D_8012CE28 = 0x8012CE28; From eec03d0f574080d89d02550c956de47b8b9f9e7b Mon Sep 17 00:00:00 2001 From: Mittenshugg Date: Tue, 4 Aug 2020 14:10:36 -0500 Subject: [PATCH 03/12] c: osSetEventMesg --- Makefile | 1 + .../unknown_066AA0/func_8006A10C.s | 2 +- .../unknown_079F50/func_80079350.s | 6 ++-- asm/non_matchings/unknown_0AEE70/D_800B6FC4.s | 4 +-- .../unknown_0B8920/func_800C6000.s | 2 +- .../unknown_0B8920/osCreatePiManager.s | 2 +- lib/asm/exception/send_mesg.s | 4 +-- .../osSetEventMsg_0CD7B0/osSetEventMsg.s | 31 ---------------- .../unknown_0D2590/osCreateViManager.s | 4 +-- lib/src/osSetEventMesg.c | 23 ++++++++++++ lib/src/osSetEventMsg.c | 7 ---- lib/src/osSetTime.c | 7 +++- lib/src/unknown_0D3160.c | 36 ------------------- src/unknown_066AA0.c | 2 +- undefined_syms.txt | 2 +- 15 files changed, 44 insertions(+), 89 deletions(-) delete mode 100644 lib/asm/non_matchings/osSetEventMsg_0CD7B0/osSetEventMsg.s create mode 100644 lib/src/osSetEventMesg.c delete mode 100644 lib/src/osSetEventMsg.c diff --git a/Makefile b/Makefile index 4b241fb2..d7c2b148 100755 --- a/Makefile +++ b/Makefile @@ -185,6 +185,7 @@ $(BUILD_DIR)/lib/src/osPfsFreeBlocks.o: OPT_FLAGS := -O1 $(BUILD_DIR)/lib/src/osPiStartDma.o : OPT_FLAGS := -O1 $(BUILD_DIR)/lib/src/osRecvMesg.o : OPT_FLAGS := -O1 $(BUILD_DIR)/lib/src/osSendMesg.o : OPT_FLAGS := -O1 +$(BUILD_DIR)/lib/src/osSetEventMesg.o: OPT_FLAGS := -O1 $(BUILD_DIR)/lib/src/osSetTimer.o: OPT_FLAGS := -O1 $(BUILD_DIR)/lib/src/osStopThread.o: OPT_FLAGS := -O1 $(BUILD_DIR)/lib/src/osTimer.o: OPT_FLAGS := -O1 diff --git a/asm/non_matchings/unknown_066AA0/func_8006A10C.s b/asm/non_matchings/unknown_066AA0/func_8006A10C.s index 36a72fc9..64615811 100644 --- a/asm/non_matchings/unknown_066AA0/func_8006A10C.s +++ b/asm/non_matchings/unknown_066AA0/func_8006A10C.s @@ -11,7 +11,7 @@ glabel func_8006A10C /* 06AD30 8006A130 8CC610FC */ lw $a2, %lo(D_801210FC)($a2) /* 06AD34 8006A134 3C058012 */ lui $a1, %hi(D_801210E0) # $a1, 0x8012 /* 06AD38 8006A138 24A510E0 */ addiu $a1, %lo(D_801210E0) # addiu $a1, $a1, 0x10e0 -/* 06AD3C 8006A13C 0C0332EC */ jal osSetEventMsg +/* 06AD3C 8006A13C 0C0332EC */ jal osSetEventMesg /* 06AD40 8006A140 24040005 */ li $a0, 5 /* 06AD44 8006A144 3C048012 */ lui $a0, %hi(D_801210E0) # $a0, 0x8012 /* 06AD48 8006A148 3C068012 */ lui $a2, %hi(D_80121100) # $a2, 0x8012 diff --git a/asm/non_matchings/unknown_079F50/func_80079350.s b/asm/non_matchings/unknown_079F50/func_80079350.s index 1af277c3..2d3fa628 100644 --- a/asm/non_matchings/unknown_079F50/func_80079350.s +++ b/asm/non_matchings/unknown_079F50/func_80079350.s @@ -43,15 +43,15 @@ glabel func_80079350 /* 079FF4 800793F4 24060008 */ li $a2, 8 /* 079FF8 800793F8 24040004 */ li $a0, 4 /* 079FFC 800793FC 02202825 */ move $a1, $s1 -/* 07A000 80079400 0C0332EC */ jal osSetEventMsg +/* 07A000 80079400 0C0332EC */ jal osSetEventMesg /* 07A004 80079404 2406029B */ li $a2, 667 /* 07A008 80079408 24040009 */ li $a0, 9 /* 07A00C 8007940C 02202825 */ move $a1, $s1 -/* 07A010 80079410 0C0332EC */ jal osSetEventMsg +/* 07A010 80079410 0C0332EC */ jal osSetEventMesg /* 07A014 80079414 2406029C */ li $a2, 668 /* 07A018 80079418 2404000E */ li $a0, 14 /* 07A01C 8007941C 02202825 */ move $a1, $s1 -/* 07A020 80079420 0C0332EC */ jal osSetEventMsg +/* 07A020 80079420 0C0332EC */ jal osSetEventMesg /* 07A024 80079424 2406029D */ li $a2, 669 /* 07A028 80079428 93A6003B */ lbu $a2, 0x3b($sp) /* 07A02C 8007942C 02202025 */ move $a0, $s1 diff --git a/asm/non_matchings/unknown_0AEE70/D_800B6FC4.s b/asm/non_matchings/unknown_0AEE70/D_800B6FC4.s index d1a1b0c8..2028fed9 100644 --- a/asm/non_matchings/unknown_0AEE70/D_800B6FC4.s +++ b/asm/non_matchings/unknown_0AEE70/D_800B6FC4.s @@ -17,11 +17,11 @@ glabel D_800B6FC4 /* 0B7C00 800B7000 24060008 */ li $a2, 8 /* 0B7C04 800B7004 2404000C */ li $a0, 12 /* 0B7C08 800B7008 02802825 */ move $a1, $s4 -/* 0B7C0C 800B700C 0C0332EC */ jal osSetEventMsg +/* 0B7C0C 800B700C 0C0332EC */ jal osSetEventMesg /* 0B7C10 800B7010 24060008 */ li $a2, 8 /* 0B7C14 800B7014 2404000A */ li $a0, 10 /* 0B7C18 800B7018 02802825 */ move $a1, $s4 -/* 0B7C1C 800B701C 0C0332EC */ jal osSetEventMsg +/* 0B7C1C 800B701C 0C0332EC */ jal osSetEventMesg /* 0B7C20 800B7020 24060002 */ li $a2, 2 /* 0B7C24 800B7024 3C058013 */ lui $a1, %hi(D_801297E8) # $a1, 0x8013 /* 0B7C28 800B7028 3C068013 */ lui $a2, %hi(D_801297C8) # $a2, 0x8013 diff --git a/asm/non_matchings/unknown_0B8920/func_800C6000.s b/asm/non_matchings/unknown_0B8920/func_800C6000.s index 6b3d992e..d0ac521f 100644 --- a/asm/non_matchings/unknown_0B8920/func_800C6000.s +++ b/asm/non_matchings/unknown_0B8920/func_800C6000.s @@ -31,7 +31,7 @@ glabel osCreatePiManager /* 0C6C70 800C6070 3C062222 */ lui $a2, (0x22222222 >> 16) # lui $a2, 0x2222 /* 0C6C74 800C6074 34C62222 */ ori $a2, (0x22222222 & 0xFFFF) # ori $a2, $a2, 0x2222 /* 0C6C78 800C6078 24A5AAB0 */ addiu $a1, %lo(D_8012AAB0) # addiu $a1, $a1, -0x5550 -/* 0C6C7C 800C607C 0C0332EC */ jal osSetEventMsg +/* 0C6C7C 800C607C 0C0332EC */ jal osSetEventMesg /* 0C6C80 800C6080 24040008 */ li $a0, 8 /* 0C6C84 800C6084 2418FFFF */ li $t8, -1 /* 0C6C88 800C6088 AFB80028 */ sw $t8, 0x28($sp) diff --git a/asm/non_matchings/unknown_0B8920/osCreatePiManager.s b/asm/non_matchings/unknown_0B8920/osCreatePiManager.s index 6b3d992e..d0ac521f 100644 --- a/asm/non_matchings/unknown_0B8920/osCreatePiManager.s +++ b/asm/non_matchings/unknown_0B8920/osCreatePiManager.s @@ -31,7 +31,7 @@ glabel osCreatePiManager /* 0C6C70 800C6070 3C062222 */ lui $a2, (0x22222222 >> 16) # lui $a2, 0x2222 /* 0C6C74 800C6074 34C62222 */ ori $a2, (0x22222222 & 0xFFFF) # ori $a2, $a2, 0x2222 /* 0C6C78 800C6078 24A5AAB0 */ addiu $a1, %lo(D_8012AAB0) # addiu $a1, $a1, -0x5550 -/* 0C6C7C 800C607C 0C0332EC */ jal osSetEventMsg +/* 0C6C7C 800C607C 0C0332EC */ jal osSetEventMesg /* 0C6C80 800C6080 24040008 */ li $a0, 8 /* 0C6C84 800C6084 2418FFFF */ li $t8, -1 /* 0C6C88 800C6088 AFB80028 */ sw $t8, 0x28($sp) diff --git a/lib/asm/exception/send_mesg.s b/lib/asm/exception/send_mesg.s index c49361a8..e410fb4c 100644 --- a/lib/asm/exception/send_mesg.s +++ b/lib/asm/exception/send_mesg.s @@ -1,6 +1,6 @@ glabel send_mesg -/* 0D3DE4 800D31E4 3C0A8013 */ lui $t2, %hi(D_8012CCD0) # $t2, 0x8013 -/* 0D3DE8 800D31E8 254ACCD0 */ addiu $t2, %lo(D_8012CCD0) # addiu $t2, $t2, -0x3330 +/* 0D3DE4 800D31E4 3C0A8013 */ lui $t2, %hi(__osEventStateTab) # $t2, 0x8013 +/* 0D3DE8 800D31E8 254ACCD0 */ addiu $t2, %lo(__osEventStateTab) # addiu $t2, $t2, -0x3330 /* 0D3DEC 800D31EC 01445021 */ addu $t2, $t2, $a0 /* 0D3DF0 800D31F0 8D490000 */ lw $t1, ($t2) /* 0D3DF4 800D31F4 03E09025 */ move $s2, $ra diff --git a/lib/asm/non_matchings/osSetEventMsg_0CD7B0/osSetEventMsg.s b/lib/asm/non_matchings/osSetEventMsg_0CD7B0/osSetEventMsg.s deleted file mode 100644 index 8a2be78c..00000000 --- a/lib/asm/non_matchings/osSetEventMsg_0CD7B0/osSetEventMsg.s +++ /dev/null @@ -1,31 +0,0 @@ -glabel osSetEventMsg -/* 0CD7B0 800CCBB0 27BDFFD8 */ addiu $sp, $sp, -0x28 -/* 0CD7B4 800CCBB4 AFBF001C */ sw $ra, 0x1c($sp) -/* 0CD7B8 800CCBB8 AFA40028 */ sw $a0, 0x28($sp) -/* 0CD7BC 800CCBBC AFA5002C */ sw $a1, 0x2c($sp) -/* 0CD7C0 800CCBC0 AFA60030 */ sw $a2, 0x30($sp) -/* 0CD7C4 800CCBC4 0C034958 */ jal __osDisableInt -/* 0CD7C8 800CCBC8 AFB00018 */ sw $s0, 0x18($sp) -/* 0CD7CC 800CCBCC 8FAE0028 */ lw $t6, 0x28($sp) -/* 0CD7D0 800CCBD0 3C188013 */ lui $t8, %hi(D_8012CCD0) # $t8, 0x8013 -/* 0CD7D4 800CCBD4 8FA8002C */ lw $t0, 0x2c($sp) -/* 0CD7D8 800CCBD8 2718CCD0 */ addiu $t8, %lo(D_8012CCD0) # addiu $t8, $t8, -0x3330 -/* 0CD7DC 800CCBDC 000E78C0 */ sll $t7, $t6, 3 -/* 0CD7E0 800CCBE0 01F8C821 */ addu $t9, $t7, $t8 -/* 0CD7E4 800CCBE4 AFB90020 */ sw $t9, 0x20($sp) -/* 0CD7E8 800CCBE8 AF280000 */ sw $t0, ($t9) -/* 0CD7EC 800CCBEC 8FAA0020 */ lw $t2, 0x20($sp) -/* 0CD7F0 800CCBF0 8FA90030 */ lw $t1, 0x30($sp) -/* 0CD7F4 800CCBF4 00408025 */ move $s0, $v0 -/* 0CD7F8 800CCBF8 02002025 */ move $a0, $s0 -/* 0CD7FC 800CCBFC 0C034960 */ jal __osRestoreInt -/* 0CD800 800CCC00 AD490004 */ sw $t1, 4($t2) -/* 0CD804 800CCC04 8FBF001C */ lw $ra, 0x1c($sp) -/* 0CD808 800CCC08 8FB00018 */ lw $s0, 0x18($sp) -/* 0CD80C 800CCC0C 27BD0028 */ addiu $sp, $sp, 0x28 -/* 0CD810 800CCC10 03E00008 */ jr $ra -/* 0CD814 800CCC14 00000000 */ nop - -/* 0CD818 800CCC18 00000000 */ nop -/* 0CD81C 800CCC1C 00000000 */ nop - diff --git a/lib/asm/non_matchings/unknown_0D2590/osCreateViManager.s b/lib/asm/non_matchings/unknown_0D2590/osCreateViManager.s index ce503149..8fb6815d 100644 --- a/lib/asm/non_matchings/unknown_0D2590/osCreateViManager.s +++ b/lib/asm/non_matchings/unknown_0D2590/osCreateViManager.s @@ -30,13 +30,13 @@ glabel osCreateViManager /* 0D2600 800D1A00 A0E00002 */ sb $zero, 2($a3) /* 0D2604 800D1A04 ACE00004 */ sw $zero, 4($a3) /* 0D2608 800D1A08 24A5D130 */ addiu $a1, %lo(D_8012D130) # addiu $a1, $a1, -0x2ed0 -/* 0D260C 800D1A0C 0C0332EC */ jal osSetEventMsg +/* 0D260C 800D1A0C 0C0332EC */ jal osSetEventMesg /* 0D2610 800D1A10 24040007 */ li $a0, 7 /* 0D2614 800D1A14 3C078013 */ lui $a3, 0x8013 /* 0D2618 800D1A18 3C058013 */ lui $a1, %hi(D_8012D130) # $a1, 0x8013 /* 0D261C 800D1A1C 24E6D178 */ addiu $a2, $a3, -0x2e88 /* 0D2620 800D1A20 24A5D130 */ addiu $a1, %lo(D_8012D130) # addiu $a1, $a1, -0x2ed0 -/* 0D2624 800D1A24 0C0332EC */ jal osSetEventMsg +/* 0D2624 800D1A24 0C0332EC */ jal osSetEventMesg /* 0D2628 800D1A28 24040003 */ li $a0, 3 /* 0D262C 800D1A2C 2419FFFF */ li $t9, -1 /* 0D2630 800D1A30 AFB90028 */ sw $t9, 0x28($sp) diff --git a/lib/src/osSetEventMesg.c b/lib/src/osSetEventMesg.c new file mode 100644 index 00000000..347200fa --- /dev/null +++ b/lib/src/osSetEventMesg.c @@ -0,0 +1,23 @@ +/* The comment below is needed for this file to be picked up by generate_ld */ +/* RAM_POS: 0x800CCBB0 */ + +#include "libultra_internal.h" + +typedef struct __OSEventState +{ + OSMesgQueue *messageQueue; + OSMesg message; +} __OSEventState; + + +__OSEventState __osEventStateTab[OS_NUM_EVENTS];//__osEventStateTab[OS_NUM_EVENTS]; +void osSetEventMesg(OSEvent event, OSMesgQueue *mq, OSMesg msg) +{ + register u32 saveMask = __osDisableInt(); + __OSEventState *es; + + es = &__osEventStateTab[event]; + es->messageQueue = mq; + es->message = msg; + __osRestoreInt(saveMask); +} \ No newline at end of file diff --git a/lib/src/osSetEventMsg.c b/lib/src/osSetEventMsg.c deleted file mode 100644 index acf045bc..00000000 --- a/lib/src/osSetEventMsg.c +++ /dev/null @@ -1,7 +0,0 @@ -/* The comment below is needed for this file to be picked up by generate_ld */ -/* RAM_POS: 0x800CCBB0 */ - -#include "types.h" -#include "macros.h" - -GLOBAL_ASM("lib/asm/non_matchings/osSetEventMsg_0CD7B0/osSetEventMsg.s") diff --git a/lib/src/osSetTime.c b/lib/src/osSetTime.c index a33ca664..ab1b7e63 100644 --- a/lib/src/osSetTime.c +++ b/lib/src/osSetTime.c @@ -3,5 +3,10 @@ #include "types.h" #include "macros.h" +#include "libultra_internal.h" -GLOBAL_ASM("lib/asm/non_matchings/osSetTime_0CDE60/osSetTime.s") +//GLOBAL_ASM("lib/asm/non_matchings/osSetTime_0CDE60/osSetTime.s") + +void osSetTime(OSTime time){ + __osCurrentTime = time; +} \ No newline at end of file diff --git a/lib/src/unknown_0D3160.c b/lib/src/unknown_0D3160.c index 05abd575..da6e3282 100644 --- a/lib/src/unknown_0D3160.c +++ b/lib/src/unknown_0D3160.c @@ -4,41 +4,6 @@ #include "types.h" #include "macros.h" -<<<<<<< HEAD -GLOBAL_ASM("lib/asm/non_matchings/unknown_0D3020/__osDisableInt.s") -GLOBAL_ASM("lib/asm/non_matchings/unknown_0D3020/__osRestoreInt.s") -GLOBAL_ASM("lib/asm/non_matchings/unknown_0D3020/D_800D25A0.s") -GLOBAL_ASM("lib/asm/non_matchings/unknown_0D3020/D_800D2680.s") -GLOBAL_ASM("lib/asm/non_matchings/unknown_0D3020/D_800D2760.s") -GLOBAL_ASM("lib/asm/non_matchings/unknown_0D3020/__osViInit.s") -GLOBAL_ASM("lib/asm/non_matchings/unknown_0D3020/func_800D2C60.s") -GLOBAL_ASM("lib/asm/non_matchings/unknown_0D3020/__osDequeueThread.s") -GLOBAL_ASM("lib/asm/non_matchings/unknown_0D3020/__osExceptionPreamble.s") -GLOBAL_ASM("lib/asm/non_matchings/unknown_0D3020/__osException.s") -GLOBAL_ASM("lib/asm/non_matchings/unknown_0D3020/send_mesg.s") -GLOBAL_ASM("lib/asm/non_matchings/unknown_0D3020/__osEnqueueAndYield.s") -GLOBAL_ASM("lib/asm/non_matchings/unknown_0D3020/__osEnqueueThread.s") -GLOBAL_ASM("lib/asm/non_matchings/unknown_0D3020/__osPopThread.s") -GLOBAL_ASM("lib/asm/non_matchings/unknown_0D3020/__osDispatchThread.s") -GLOBAL_ASM("lib/asm/non_matchings/unknown_0D3020/__osCleanupThread.s") -GLOBAL_ASM("lib/asm/non_matchings/unknown_0D3020/__osProbeTLB.s") -GLOBAL_ASM("lib/asm/non_matchings/unknown_0D3020/func_800D3670.s") -GLOBAL_ASM("lib/asm/non_matchings/unknown_0D3020/osJamMesg.s") -GLOBAL_ASM("lib/asm/non_matchings/unknown_0D3020/osPiGetCmdQueue.s") -GLOBAL_ASM("lib/asm/non_matchings/unknown_0D3020/func_800D3820.s") -GLOBAL_ASM("lib/asm/non_matchings/unknown_0D3020/_Putfld.s") -GLOBAL_ASM("lib/asm/non_matchings/unknown_0D3020/_Printf.s") -GLOBAL_ASM("lib/asm/non_matchings/unknown_0D3020/__osSetSR.s") -GLOBAL_ASM("lib/asm/non_matchings/unknown_0D3020/__osGetSR.s") -GLOBAL_ASM("lib/asm/non_matchings/unknown_0D3020/__osSetFpcCsr.s") -GLOBAL_ASM("lib/asm/non_matchings/unknown_0D3020/__osSiRawReadIo.s") -GLOBAL_ASM("lib/asm/non_matchings/unknown_0D3020/__osSiRawWriteIo.s") -GLOBAL_ASM("lib/asm/non_matchings/unknown_0D3020/osWritebackDCache.s") -GLOBAL_ASM("lib/asm/non_matchings/unknown_0D3020/osWritebackICache.s") -GLOBAL_ASM("lib/asm/non_matchings/unknown_0D3020/osMapTLBRdb.s") -GLOBAL_ASM("lib/asm/non_matchings/unknown_0D3020/osPiRawWriteIo.s") -GLOBAL_ASM("lib/asm/non_matchings/unknown_0D3020/func_800D47F0.s") -======= GLOBAL_ASM("lib/asm/non_matchings/unknown_0D3160/__osDisableInt.s") GLOBAL_ASM("lib/asm/non_matchings/unknown_0D3160/__osRestoreInt.s") GLOBAL_ASM("lib/asm/non_matchings/unknown_0D3160/D_800D25A0.s") @@ -47,4 +12,3 @@ GLOBAL_ASM("lib/asm/non_matchings/unknown_0D3160/D_800D2760.s") GLOBAL_ASM("lib/asm/non_matchings/unknown_0D3160/__osViInit.s") GLOBAL_ASM("lib/asm/non_matchings/unknown_0D3160/func_800D2C60.s") GLOBAL_ASM("lib/asm/non_matchings/unknown_0D3160/__osDequeueThread.s") ->>>>>>> 1ea984894c2baacd9f5fc72c2f6b34bed05b3021 diff --git a/src/unknown_066AA0.c b/src/unknown_066AA0.c index fd9892b4..cfeb27fe 100644 --- a/src/unknown_066AA0.c +++ b/src/unknown_066AA0.c @@ -835,7 +835,7 @@ extern u8 D_80121103; s32 func_8006A10C(void) { u8 sp23; osCreateMesgQueue(&D_801210E0, &D_801210F8, 1); - osSetEventMsg(5, &D_801210E0, D_801210FC); + osSetEventMesg(5, &D_801210E0, D_801210FC); func_800CCC20(&D_801210E0, &sp23, &D_80121100); func_800CCFE0(&D_801210E0); func_8006A434(); diff --git a/undefined_syms.txt b/undefined_syms.txt index d67dbd55..b924450b 100755 --- a/undefined_syms.txt +++ b/undefined_syms.txt @@ -2810,7 +2810,7 @@ D_8012AAF0 = 0x8012AAF0; D_8012ACA0 = 0x8012ACA0; D_8012ACB8 = 0x8012ACB8; D_8012CCC0 = 0x8012CCC0; -D_8012CCD0 = 0x8012CCD0; +__osEventStateTab = 0x8012CCD0; D_8012CD50 = 0x8012CD50; D_8012CD8C = 0x8012CD8C; D_8012CD90 = 0x8012CD90; From 2cdbb7843c3222db268d02c75cf2e27313bc4f31 Mon Sep 17 00:00:00 2001 From: Mittenshugg Date: Tue, 4 Aug 2020 14:25:23 -0500 Subject: [PATCH 04/12] c: osSetTime --- Makefile | 10 +++++++++- .../non_matchings/osSetTime_0CDE60/osSetTime.s | 15 --------------- lib/src/osSetTime.c | 4 +--- 3 files changed, 10 insertions(+), 19 deletions(-) delete mode 100644 lib/asm/non_matchings/osSetTime_0CDE60/osSetTime.s diff --git a/Makefile b/Makefile index d7c2b148..04030124 100755 --- a/Makefile +++ b/Makefile @@ -186,6 +186,7 @@ $(BUILD_DIR)/lib/src/osPiStartDma.o : OPT_FLAGS := -O1 $(BUILD_DIR)/lib/src/osRecvMesg.o : OPT_FLAGS := -O1 $(BUILD_DIR)/lib/src/osSendMesg.o : OPT_FLAGS := -O1 $(BUILD_DIR)/lib/src/osSetEventMesg.o: OPT_FLAGS := -O1 +$(BUILD_DIR)/lib/src/osSetTime.o: OPT_FLAGS := -O1 $(BUILD_DIR)/lib/src/osSetTimer.o: OPT_FLAGS := -O1 $(BUILD_DIR)/lib/src/osStopThread.o: OPT_FLAGS := -O1 $(BUILD_DIR)/lib/src/osTimer.o: OPT_FLAGS := -O1 @@ -213,12 +214,19 @@ else endif clean_lib: -ifneq ($(wildcard ./build/lib/.*),) +ifneq ($(wildcard ./build/lib/src/.*),) rm -r $(BUILD_DIR)/lib/src/*.o else @echo "/build/lib directory has already been deleted." endif +clean_src: clean_lib +ifneq ($(wildcard ./build/src/.*),) + rm -r $(BUILD_DIR)/src/*.o +else + @echo "/build/lib directory has already been deleted." +endif + $(BUILD_DIR): mkdir $(BUILD_DIR) $(addprefix $(BUILD_DIR)/,$(LIB_DIRS) $(ASM_DIRS) $(SRC_DIRS) $(ASSETS_DIRS)) diff --git a/lib/asm/non_matchings/osSetTime_0CDE60/osSetTime.s b/lib/asm/non_matchings/osSetTime_0CDE60/osSetTime.s deleted file mode 100644 index 205807c6..00000000 --- a/lib/asm/non_matchings/osSetTime_0CDE60/osSetTime.s +++ /dev/null @@ -1,15 +0,0 @@ -glabel osSetTime -/* 0CDE60 800CD260 AFA40000 */ sw $a0, ($sp) -/* 0CDE64 800CD264 8FAE0000 */ lw $t6, ($sp) -/* 0CDE68 800CD268 AFA50004 */ sw $a1, 4($sp) -/* 0CDE6C 800CD26C 3C018013 */ lui $at, %hi(__osCurrentTime) # $at, 0x8013 -/* 0CDE70 800CD270 8FAF0004 */ lw $t7, 4($sp) -/* 0CDE74 800CD274 AC2ED220 */ sw $t6, %lo(__osCurrentTime)($at) -/* 0CDE78 800CD278 3C018013 */ lui $at, 0x8013 -/* 0CDE7C 800CD27C 03E00008 */ jr $ra -/* 0CDE80 800CD280 AC2FD224 */ sw $t7, -0x2ddc($at) - -/* 0CDE84 800CD284 00000000 */ nop -/* 0CDE88 800CD288 00000000 */ nop -/* 0CDE8C 800CD28C 00000000 */ nop - diff --git a/lib/src/osSetTime.c b/lib/src/osSetTime.c index ab1b7e63..82b1cdc7 100644 --- a/lib/src/osSetTime.c +++ b/lib/src/osSetTime.c @@ -1,11 +1,9 @@ /* The comment below is needed for this file to be picked up by generate_ld */ /* RAM_POS: 0x800CD260 */ -#include "types.h" -#include "macros.h" #include "libultra_internal.h" -//GLOBAL_ASM("lib/asm/non_matchings/osSetTime_0CDE60/osSetTime.s") +extern OSTime __osCurrentTime; void osSetTime(OSTime time){ __osCurrentTime = time; From 9d40b86cc853501c6e3d14fb900662485c2b06f2 Mon Sep 17 00:00:00 2001 From: Mittenshugg Date: Tue, 4 Aug 2020 15:05:14 -0500 Subject: [PATCH 05/12] c: osStartThread --- Makefile | 1 + data/dkr.data.s | 2 +- lib/asm/exception/__osDispatchThread.s | 4 +- lib/asm/exception/__osException.s | 16 ++-- lib/asm/exception/send_mesg.s | 4 +- .../osStartThread_0C95A0/osStartThread.s | 92 ------------------- .../unknown_0CCF90/osSetThreadPri.s | 8 +- .../unknown_0D3020/func_800D65B0.s | 4 +- lib/src/osStartThread.c | 44 ++++++++- rename_sym.sh | 4 +- undefined_syms.txt | 2 +- 11 files changed, 65 insertions(+), 116 deletions(-) delete mode 100644 lib/asm/non_matchings/osStartThread_0C95A0/osStartThread.s diff --git a/Makefile b/Makefile index 04030124..395bbb7f 100755 --- a/Makefile +++ b/Makefile @@ -188,6 +188,7 @@ $(BUILD_DIR)/lib/src/osSendMesg.o : OPT_FLAGS := -O1 $(BUILD_DIR)/lib/src/osSetEventMesg.o: OPT_FLAGS := -O1 $(BUILD_DIR)/lib/src/osSetTime.o: OPT_FLAGS := -O1 $(BUILD_DIR)/lib/src/osSetTimer.o: OPT_FLAGS := -O1 +$(BUILD_DIR)/lib/src/osStartThread.o: OPT_FLAGS := -O1 $(BUILD_DIR)/lib/src/osStopThread.o: OPT_FLAGS := -O1 $(BUILD_DIR)/lib/src/osTimer.o: OPT_FLAGS := -O1 $(BUILD_DIR)/lib/src/osViBlack.o: OPT_FLAGS := -O1 diff --git a/data/dkr.data.s b/data/dkr.data.s index 142f9591..e621d950 100644 --- a/data/dkr.data.s +++ b/data/dkr.data.s @@ -9256,7 +9256,7 @@ glabel __osThreadTail .word 0x00000000 .word 0xFFFFFFFF -glabel D_800E4888 +glabel __RunQueue .word 0x800E4880 glabel __osActiveQueue diff --git a/lib/asm/exception/__osDispatchThread.s b/lib/asm/exception/__osDispatchThread.s index 814e9466..e66d875d 100644 --- a/lib/asm/exception/__osDispatchThread.s +++ b/lib/asm/exception/__osDispatchThread.s @@ -1,7 +1,7 @@ glabel __osDispatchThread -/* 0D4024 800D3424 3C04800E */ lui $a0, %hi(D_800E4888) # $a0, 0x800e +/* 0D4024 800D3424 3C04800E */ lui $a0, %hi(__RunQueue) # $a0, 0x800e /* 0D4028 800D3428 0C034D05 */ jal __osPopThread -/* 0D402C 800D342C 24844888 */ addiu $a0, %lo(D_800E4888) # addiu $a0, $a0, 0x4888 +/* 0D402C 800D342C 24844888 */ addiu $a0, %lo(__RunQueue) # addiu $a0, $a0, 0x4888 /* 0D4030 800D3430 3C01800E */ lui $at, %hi(__osRunningThread) # $at, 0x800e /* 0D4034 800D3434 AC224890 */ sw $v0, %lo(__osRunningThread)($at) /* 0D4038 800D3438 24080004 */ li $t0, 4 diff --git a/lib/asm/exception/__osException.s b/lib/asm/exception/__osException.s index 29841890..d3ead3e6 100644 --- a/lib/asm/exception/__osException.s +++ b/lib/asm/exception/__osException.s @@ -281,8 +281,8 @@ glabel __osException /* 0D3CE4 800D30E4 AD2A0000 */ sw $t2, ($t1) /* 0D3CE8 800D30E8 0C034C79 */ jal send_mesg /* 0D3CEC 800D30EC 24040070 */ li $a0, 112 -/* 0D3CF0 800D30F0 3C0A800E */ lui $t2, %hi(D_800E4888) # $t2, 0x800e -/* 0D3CF4 800D30F4 8D4A4888 */ lw $t2, %lo(D_800E4888)($t2) +/* 0D3CF0 800D30F0 3C0A800E */ lui $t2, %hi(__RunQueue) # $t2, 0x800e +/* 0D3CF4 800D30F4 8D4A4888 */ lw $t2, %lo(__RunQueue)($t2) /* 0D3CF8 800D30F8 2401EFFF */ li $at, -4097 /* 0D3CFC 800D30FC 02018024 */ and $s0, $s0, $at /* 0D3D00 800D3100 8D5B0118 */ lw $k1, 0x118($t2) @@ -313,23 +313,23 @@ glabel __osException /* 0D3D60 800D3160 10000001 */ b .L800D3168 /* 0D3D64 800D3164 00000000 */ nop .L800D3168: -/* 0D3D68 800D3168 3C0A800E */ lui $t2, %hi(D_800E4888) # $t2, 0x800e -/* 0D3D6C 800D316C 8D4A4888 */ lw $t2, %lo(D_800E4888)($t2) +/* 0D3D68 800D3168 3C0A800E */ lui $t2, %hi(__RunQueue) # $t2, 0x800e +/* 0D3D6C 800D316C 8D4A4888 */ lw $t2, %lo(__RunQueue)($t2) /* 0D3D70 800D3170 8F490004 */ lw $t1, 4($k0) /* 0D3D74 800D3174 8D4B0004 */ lw $t3, 4($t2) /* 0D3D78 800D3178 012B082A */ slt $at, $t1, $t3 /* 0D3D7C 800D317C 10200007 */ beqz $at, .L800D319C /* 0D3D80 800D3180 00000000 */ nop -/* 0D3D84 800D3184 3C04800E */ lui $a0, %hi(D_800E4888) # $a0, 0x800e +/* 0D3D84 800D3184 3C04800E */ lui $a0, %hi(__RunQueue) # $a0, 0x800e /* 0D3D88 800D3188 03402825 */ move $a1, $k0 /* 0D3D8C 800D318C 0C034CF3 */ jal __osEnqueueThread -/* 0D3D90 800D3190 24844888 */ addiu $a0, %lo(D_800E4888) # addiu $a0, $a0, 0x4888 +/* 0D3D90 800D3190 24844888 */ addiu $a0, %lo(__RunQueue) # addiu $a0, $a0, 0x4888 /* 0D3D94 800D3194 08034D09 */ j __osDispatchThread /* 0D3D98 800D3198 00000000 */ nop .L800D319C: -/* 0D3D9C 800D319C 3C09800E */ lui $t1, %hi(D_800E4888) # $t1, 0x800e -/* 0D3DA0 800D31A0 25294888 */ addiu $t1, %lo(D_800E4888) # addiu $t1, $t1, 0x4888 +/* 0D3D9C 800D319C 3C09800E */ lui $t1, %hi(__RunQueue) # $t1, 0x800e +/* 0D3DA0 800D31A0 25294888 */ addiu $t1, %lo(__RunQueue) # addiu $t1, $t1, 0x4888 /* 0D3DA4 800D31A4 8D2A0000 */ lw $t2, ($t1) /* 0D3DA8 800D31A8 AF4A0000 */ sw $t2, ($k0) /* 0D3DAC 800D31AC 08034D09 */ j __osDispatchThread diff --git a/lib/asm/exception/send_mesg.s b/lib/asm/exception/send_mesg.s index e410fb4c..24f4904f 100644 --- a/lib/asm/exception/send_mesg.s +++ b/lib/asm/exception/send_mesg.s @@ -40,10 +40,10 @@ glabel send_mesg /* 0D3E74 800D3274 0C034D05 */ jal __osPopThread /* 0D3E78 800D3278 01202025 */ move $a0, $t1 /* 0D3E7C 800D327C 00405025 */ move $t2, $v0 -/* 0D3E80 800D3280 3C04800E */ lui $a0, %hi(D_800E4888) # $a0, 0x800e +/* 0D3E80 800D3280 3C04800E */ lui $a0, %hi(__RunQueue) # $a0, 0x800e /* 0D3E84 800D3284 01402825 */ move $a1, $t2 /* 0D3E88 800D3288 0C034CF3 */ jal __osEnqueueThread -/* 0D3E8C 800D328C 24844888 */ addiu $a0, %lo(D_800E4888) # addiu $a0, $a0, 0x4888 +/* 0D3E8C 800D328C 24844888 */ addiu $a0, %lo(__RunQueue) # addiu $a0, $a0, 0x4888 .L800D3290: /* 0D3E90 800D3290 02400008 */ jr $s2 /* 0D3E94 800D3294 00000000 */ nop diff --git a/lib/asm/non_matchings/osStartThread_0C95A0/osStartThread.s b/lib/asm/non_matchings/osStartThread_0C95A0/osStartThread.s deleted file mode 100644 index 55ab7292..00000000 --- a/lib/asm/non_matchings/osStartThread_0C95A0/osStartThread.s +++ /dev/null @@ -1,92 +0,0 @@ -glabel osStartThread -/* 0C95A0 800C89A0 27BDFFD8 */ addiu $sp, $sp, -0x28 -/* 0C95A4 800C89A4 AFBF001C */ sw $ra, 0x1c($sp) -/* 0C95A8 800C89A8 AFA40028 */ sw $a0, 0x28($sp) -/* 0C95AC 800C89AC AFB10018 */ sw $s1, 0x18($sp) -/* 0C95B0 800C89B0 0C034958 */ jal __osDisableInt -/* 0C95B4 800C89B4 AFB00014 */ sw $s0, 0x14($sp) -/* 0C95B8 800C89B8 8FAE0028 */ lw $t6, 0x28($sp) -/* 0C95BC 800C89BC 24010001 */ li $at, 1 -/* 0C95C0 800C89C0 00408025 */ move $s0, $v0 -/* 0C95C4 800C89C4 95D10010 */ lhu $s1, 0x10($t6) -/* 0C95C8 800C89C8 1221000C */ beq $s1, $at, .L800C89FC -/* 0C95CC 800C89CC 24010008 */ li $at, 8 -/* 0C95D0 800C89D0 1621002A */ bne $s1, $at, .L800C8A7C -/* 0C95D4 800C89D4 00000000 */ nop -/* 0C95D8 800C89D8 8FB80028 */ lw $t8, 0x28($sp) -/* 0C95DC 800C89DC 240F0002 */ li $t7, 2 -/* 0C95E0 800C89E0 3C04800E */ lui $a0, %hi(D_800E4888) # $a0, 0x800e -/* 0C95E4 800C89E4 A70F0010 */ sh $t7, 0x10($t8) -/* 0C95E8 800C89E8 8FA50028 */ lw $a1, 0x28($sp) -/* 0C95EC 800C89EC 0C034CF3 */ jal __osEnqueueThread -/* 0C95F0 800C89F0 24844888 */ addiu $a0, %lo(D_800E4888) # addiu $a0, $a0, 0x4888 -/* 0C95F4 800C89F4 10000021 */ b .L800C8A7C -/* 0C95F8 800C89F8 00000000 */ nop -.L800C89FC: -/* 0C95FC 800C89FC 8FB90028 */ lw $t9, 0x28($sp) -/* 0C9600 800C8A00 8F280008 */ lw $t0, 8($t9) -/* 0C9604 800C8A04 11000005 */ beqz $t0, .L800C8A1C -/* 0C9608 800C8A08 00000000 */ nop -/* 0C960C 800C8A0C 3C09800E */ lui $t1, %hi(D_800E4888) # $t1, 0x800e -/* 0C9610 800C8A10 25294888 */ addiu $t1, %lo(D_800E4888) # addiu $t1, $t1, 0x4888 -/* 0C9614 800C8A14 1509000A */ bne $t0, $t1, .L800C8A40 -/* 0C9618 800C8A18 00000000 */ nop -.L800C8A1C: -/* 0C961C 800C8A1C 8FAB0028 */ lw $t3, 0x28($sp) -/* 0C9620 800C8A20 240A0002 */ li $t2, 2 -/* 0C9624 800C8A24 3C04800E */ lui $a0, %hi(D_800E4888) # $a0, 0x800e -/* 0C9628 800C8A28 A56A0010 */ sh $t2, 0x10($t3) -/* 0C962C 800C8A2C 8FA50028 */ lw $a1, 0x28($sp) -/* 0C9630 800C8A30 0C034CF3 */ jal __osEnqueueThread -/* 0C9634 800C8A34 24844888 */ addiu $a0, %lo(D_800E4888) # addiu $a0, $a0, 0x4888 -/* 0C9638 800C8A38 10000010 */ b .L800C8A7C -/* 0C963C 800C8A3C 00000000 */ nop -.L800C8A40: -/* 0C9640 800C8A40 8FAD0028 */ lw $t5, 0x28($sp) -/* 0C9644 800C8A44 240C0008 */ li $t4, 8 -/* 0C9648 800C8A48 A5AC0010 */ sh $t4, 0x10($t5) -/* 0C964C 800C8A4C 8FAE0028 */ lw $t6, 0x28($sp) -/* 0C9650 800C8A50 8DC40008 */ lw $a0, 8($t6) -/* 0C9654 800C8A54 0C034CF3 */ jal __osEnqueueThread -/* 0C9658 800C8A58 01C02825 */ move $a1, $t6 -/* 0C965C 800C8A5C 8FAF0028 */ lw $t7, 0x28($sp) -/* 0C9660 800C8A60 0C034D05 */ jal __osPopThread -/* 0C9664 800C8A64 8DE40008 */ lw $a0, 8($t7) -/* 0C9668 800C8A68 00408825 */ move $s1, $v0 -/* 0C966C 800C8A6C 3C04800E */ lui $a0, %hi(D_800E4888) # $a0, 0x800e -/* 0C9670 800C8A70 24844888 */ addiu $a0, %lo(D_800E4888) # addiu $a0, $a0, 0x4888 -/* 0C9674 800C8A74 0C034CF3 */ jal __osEnqueueThread -/* 0C9678 800C8A78 02202825 */ move $a1, $s1 -.L800C8A7C: -/* 0C967C 800C8A7C 3C18800E */ lui $t8, %hi(__osRunningThread) # $t8, 0x800e -/* 0C9680 800C8A80 8F184890 */ lw $t8, %lo(__osRunningThread)($t8) -/* 0C9684 800C8A84 17000005 */ bnez $t8, .L800C8A9C -/* 0C9688 800C8A88 00000000 */ nop -/* 0C968C 800C8A8C 0C034D09 */ jal __osDispatchThread -/* 0C9690 800C8A90 00000000 */ nop -/* 0C9694 800C8A94 1000000F */ b .L800C8AD4 -/* 0C9698 800C8A98 00000000 */ nop -.L800C8A9C: -/* 0C969C 800C8A9C 3C19800E */ lui $t9, %hi(__osRunningThread) # $t9, 0x800e -/* 0C96A0 800C8AA0 3C09800E */ lui $t1, %hi(D_800E4888) # $t1, 0x800e -/* 0C96A4 800C8AA4 8D294888 */ lw $t1, %lo(D_800E4888)($t1) -/* 0C96A8 800C8AA8 8F394890 */ lw $t9, %lo(__osRunningThread)($t9) -/* 0C96AC 800C8AAC 8D2A0004 */ lw $t2, 4($t1) -/* 0C96B0 800C8AB0 8F280004 */ lw $t0, 4($t9) -/* 0C96B4 800C8AB4 010A082A */ slt $at, $t0, $t2 -/* 0C96B8 800C8AB8 10200006 */ beqz $at, .L800C8AD4 -/* 0C96BC 800C8ABC 00000000 */ nop -/* 0C96C0 800C8AC0 240B0002 */ li $t3, 2 -/* 0C96C4 800C8AC4 3C04800E */ lui $a0, %hi(D_800E4888) # $a0, 0x800e -/* 0C96C8 800C8AC8 A72B0010 */ sh $t3, 0x10($t9) -/* 0C96CC 800C8ACC 0C034CB3 */ jal __osEnqueueAndYield -/* 0C96D0 800C8AD0 24844888 */ addiu $a0, %lo(D_800E4888) # addiu $a0, $a0, 0x4888 -.L800C8AD4: -/* 0C96D4 800C8AD4 0C034960 */ jal __osRestoreInt -/* 0C96D8 800C8AD8 02002025 */ move $a0, $s0 -/* 0C96DC 800C8ADC 8FBF001C */ lw $ra, 0x1c($sp) -/* 0C96E0 800C8AE0 8FB00014 */ lw $s0, 0x14($sp) -/* 0C96E4 800C8AE4 8FB10018 */ lw $s1, 0x18($sp) -/* 0C96E8 800C8AE8 03E00008 */ jr $ra -/* 0C96EC 800C8AEC 27BD0028 */ addiu $sp, $sp, 0x28 - diff --git a/lib/asm/non_matchings/unknown_0CCF90/osSetThreadPri.s b/lib/asm/non_matchings/unknown_0CCF90/osSetThreadPri.s index f628e67e..37d1296e 100644 --- a/lib/asm/non_matchings/unknown_0CCF90/osSetThreadPri.s +++ b/lib/asm/non_matchings/unknown_0CCF90/osSetThreadPri.s @@ -37,8 +37,8 @@ glabel osSetThreadPri /* 0CD4C8 800CC8C8 01802825 */ move $a1, $t4 .L800CC8CC: /* 0CD4CC 800CC8CC 3C0D800E */ lui $t5, %hi(__osRunningThread) # $t5, 0x800e -/* 0CD4D0 800CC8D0 3C0F800E */ lui $t7, %hi(D_800E4888) # $t7, 0x800e -/* 0CD4D4 800CC8D4 8DEF4888 */ lw $t7, %lo(D_800E4888)($t7) +/* 0CD4D0 800CC8D0 3C0F800E */ lui $t7, %hi(__RunQueue) # $t7, 0x800e +/* 0CD4D4 800CC8D4 8DEF4888 */ lw $t7, %lo(__RunQueue)($t7) /* 0CD4D8 800CC8D8 8DAD4890 */ lw $t5, %lo(__osRunningThread)($t5) /* 0CD4DC 800CC8DC 8DF90004 */ lw $t9, 4($t7) /* 0CD4E0 800CC8E0 8DAE0004 */ lw $t6, 4($t5) @@ -46,10 +46,10 @@ glabel osSetThreadPri /* 0CD4E8 800CC8E8 10200006 */ beqz $at, .L800CC904 /* 0CD4EC 800CC8EC 00000000 */ nop /* 0CD4F0 800CC8F0 24080002 */ li $t0, 2 -/* 0CD4F4 800CC8F4 3C04800E */ lui $a0, %hi(D_800E4888) # $a0, 0x800e +/* 0CD4F4 800CC8F4 3C04800E */ lui $a0, %hi(__RunQueue) # $a0, 0x800e /* 0CD4F8 800CC8F8 A5A80010 */ sh $t0, 0x10($t5) /* 0CD4FC 800CC8FC 0C034CB3 */ jal __osEnqueueAndYield -/* 0CD500 800CC900 24844888 */ addiu $a0, %lo(D_800E4888) # addiu $a0, $a0, 0x4888 +/* 0CD500 800CC900 24844888 */ addiu $a0, %lo(__RunQueue) # addiu $a0, $a0, 0x4888 .L800CC904: /* 0CD504 800CC904 0C034960 */ jal __osRestoreInt /* 0CD508 800CC908 02002025 */ move $a0, $s0 diff --git a/lib/asm/non_matchings/unknown_0D3020/func_800D65B0.s b/lib/asm/non_matchings/unknown_0D3020/func_800D65B0.s index 22f7ad3d..5fedf7f0 100644 --- a/lib/asm/non_matchings/unknown_0D3020/func_800D65B0.s +++ b/lib/asm/non_matchings/unknown_0D3020/func_800D65B0.s @@ -6,9 +6,9 @@ glabel func_800D65B0 /* 0D71C0 800D65C0 3C0F800E */ lui $t7, %hi(__osRunningThread) # $t7, 0x800e /* 0D71C4 800D65C4 8DEF4890 */ lw $t7, %lo(__osRunningThread)($t7) /* 0D71C8 800D65C8 240E0002 */ li $t6, 2 -/* 0D71CC 800D65CC 3C04800E */ lui $a0, %hi(D_800E4888) # $a0, 0x800e +/* 0D71CC 800D65CC 3C04800E */ lui $a0, %hi(__RunQueue) # $a0, 0x800e /* 0D71D0 800D65D0 00408025 */ move $s0, $v0 -/* 0D71D4 800D65D4 24844888 */ addiu $a0, %lo(D_800E4888) # addiu $a0, $a0, 0x4888 +/* 0D71D4 800D65D4 24844888 */ addiu $a0, %lo(__RunQueue) # addiu $a0, $a0, 0x4888 /* 0D71D8 800D65D8 0C034CB3 */ jal __osEnqueueAndYield /* 0D71DC 800D65DC A5EE0010 */ sh $t6, 0x10($t7) /* 0D71E0 800D65E0 0C034960 */ jal __osRestoreInt diff --git a/lib/src/osStartThread.c b/lib/src/osStartThread.c index 2e458661..8031692d 100644 --- a/lib/src/osStartThread.c +++ b/lib/src/osStartThread.c @@ -1,7 +1,45 @@ /* The comment below is needed for this file to be picked up by generate_ld */ /* RAM_POS: 0x800C89A0 */ -#include "types.h" -#include "macros.h" +#include "libultra_internal.h" -GLOBAL_ASM("lib/asm/non_matchings/osStartThread_0C95A0/osStartThread.s") +extern OSThread* __osRunningThread; +extern OSThread* __RunQueue; //__osRunQueue + +void osStartThread(OSThread *t) +{ + register u32 saveMask = __osDisableInt(); + switch (t->state) + { + case OS_STATE_WAITING: + t->state = OS_STATE_RUNNABLE; + __osEnqueueThread(&__RunQueue, t); + break; + case OS_STATE_STOPPED: + if (t->queue == NULL || t->queue == &__RunQueue) + { + t->state = OS_STATE_RUNNABLE; + __osEnqueueThread(&__RunQueue, t); + } + else + { + t->state = OS_STATE_WAITING; + __osEnqueueThread(t->queue, t); + __osEnqueueThread(&__RunQueue, __osPopThread(t->queue)); + } + break; + } + if (__osRunningThread == NULL) + { + __osDispatchThread(); + } + else + { + if (__osRunningThread->priority < __RunQueue->priority) + { + __osRunningThread->state = OS_STATE_RUNNABLE; + __osEnqueueAndYield(&__RunQueue); + } + } + __osRestoreInt(saveMask); +} \ No newline at end of file diff --git a/rename_sym.sh b/rename_sym.sh index 251a51e3..e74d7259 100755 --- a/rename_sym.sh +++ b/rename_sym.sh @@ -10,4 +10,6 @@ fi #echo "Replace $1 with $2?" #read -grep -rl "$1" asm/**/*.s src/**/*.{c,h} lib/**/*.{c,s} include/*.h data/dkr.data.s undefined_syms.txt | xargs sed -i "s/\b$1\b/$2/g" \ No newline at end of file +ofiles=$(grep -rl "$1" build/**/*.o) +rm -v $ofiles +grep -rl "$1" asm/**/*.s src/**/*.{c,h} lib/**/*.{c,s} include/*.h data/dkr.data.s undefined_syms.txt | xargs sed -i "s/\b$1\b/$2/g" diff --git a/undefined_syms.txt b/undefined_syms.txt index b924450b..fad1a856 100755 --- a/undefined_syms.txt +++ b/undefined_syms.txt @@ -786,7 +786,7 @@ D_800E4870 = 0x800E4870; D_800E4874 = 0x800E4874; D_800E4878 = 0x800E4878; __osThreadTail = 0x800E4880; -D_800E4888 = 0x800E4888; +__RunQueue = 0x800E4888; __osActiveQueue = 0x800E488C; __osRunningThread = 0x800E4890; D_800E4894 = 0x800E4894; From 111972f9da8edb19e6d55097bacc9f65dfe0d437 Mon Sep 17 00:00:00 2001 From: Mittenshugg Date: Tue, 4 Aug 2020 15:42:51 -0500 Subject: [PATCH 06/12] c: __osPiCreateAccessQueue, __osPiGetAccess, __osPiRelAccess --- Makefile | 5 +--- diff_settings.py | 4 +-- .../unknown_0D3160/__osDequeueThread.s | 21 -------------- lib/src/unknown_0D3020.c | 28 +++++++++++++++++-- lib/src/unknown_0D3160.c | 20 ++++++++++++- rename_sym.sh | 6 ---- 6 files changed, 48 insertions(+), 36 deletions(-) delete mode 100644 lib/asm/non_matchings/unknown_0D3160/__osDequeueThread.s diff --git a/Makefile b/Makefile index 748e5503..66dacf5f 100755 --- a/Makefile +++ b/Makefile @@ -180,6 +180,7 @@ $(BUILD_DIR)/lib/%.o: MIPSISET := -mips2 $(BUILD_DIR)/lib/src/unknown_0C91A0.o : OPT_FLAGS := -O1 $(BUILD_DIR)/lib/src/unknown_0D29F0.o: OPT_FLAGS := -O1 $(BUILD_DIR)/lib/src/unknown_0CDE90.o: OPT_FLAGS := -O1 +$(BUILD_DIR)/lib/src/unknown_0D3160.o: OPT_FLAGS := -O1 $(BUILD_DIR)/lib/src/osCreateThread.o : OPT_FLAGS := -O1 $(BUILD_DIR)/lib/src/osGetThreadPri.o : OPT_FLAGS := -O1 $(BUILD_DIR)/lib/src/osPfsFreeBlocks.o: OPT_FLAGS := -O1 @@ -212,11 +213,7 @@ else endif clean_lib: -<<<<<<< HEAD -ifneq ($(wildcard ./build/lib/src/.*),) -======= ifneq ($(wildcard $(BUILD_DIR)/lib/.*),) ->>>>>>> b1b1e461a6aa490d7355c207a9a9530181aa8fd7 rm -r $(BUILD_DIR)/lib/src/*.o else @echo "build lib directory has already been deleted." diff --git a/diff_settings.py b/diff_settings.py index 65b54d62..e53805a7 100644 --- a/diff_settings.py +++ b/diff_settings.py @@ -13,8 +13,8 @@ def add_custom_arguments(parser): def apply(config, args): lang = args.lang or 'us' - config['mapfile'] = f'build/dkr.map' - config['myimg'] = f'build/dkr.z64' + config['mapfile'] = f'build/us_1.0/dkr.map' + config['myimg'] = f'build/us_1.0/dkr.z64' config['baseimg'] = f'baseroms/Diddy Kong Racing (USA 1.0).z64' config['makeflags'] = [f''] config['source_directories'] = ['src'] diff --git a/lib/asm/non_matchings/unknown_0D3160/__osDequeueThread.s b/lib/asm/non_matchings/unknown_0D3160/__osDequeueThread.s deleted file mode 100644 index dd5446bf..00000000 --- a/lib/asm/non_matchings/unknown_0D3160/__osDequeueThread.s +++ /dev/null @@ -1,21 +0,0 @@ -glabel __osDequeueThread -/* 0D3870 800D2C70 00803025 */ move $a2, $a0 -/* 0D3874 800D2C74 8CC70000 */ lw $a3, ($a2) -/* 0D3878 800D2C78 27BDFFF8 */ addiu $sp, $sp, -8 -/* 0D387C 800D2C7C 10E0000A */ beqz $a3, .L800D2CA8 -/* 0D3880 800D2C80 00000000 */ nop -.L800D2C84: -/* 0D3884 800D2C84 14E50004 */ bne $a3, $a1, .L800D2C98 -/* 0D3888 800D2C88 00000000 */ nop -/* 0D388C 800D2C8C 8CAE0000 */ lw $t6, ($a1) -/* 0D3890 800D2C90 10000005 */ b .L800D2CA8 -/* 0D3894 800D2C94 ACCE0000 */ sw $t6, ($a2) -.L800D2C98: -/* 0D3898 800D2C98 00E03025 */ move $a2, $a3 -/* 0D389C 800D2C9C 8CC70000 */ lw $a3, ($a2) -/* 0D38A0 800D2CA0 14E0FFF8 */ bnez $a3, .L800D2C84 -/* 0D38A4 800D2CA4 00000000 */ nop -.L800D2CA8: -/* 0D38A8 800D2CA8 03E00008 */ jr $ra -/* 0D38AC 800D2CAC 27BD0008 */ addiu $sp, $sp, 8 - diff --git a/lib/src/unknown_0D3020.c b/lib/src/unknown_0D3020.c index a1ec6b87..8ec1b3ad 100644 --- a/lib/src/unknown_0D3020.c +++ b/lib/src/unknown_0D3020.c @@ -3,7 +3,31 @@ #include "types.h" #include "macros.h" - +#include "libultra_internal.h" GLOBAL_ASM("lib/asm/non_matchings/unknown_0D3020/func_800D2470.s") -GLOBAL_ASM("lib/asm/non_matchings/unknown_0D3020/__osPiCreateAccessQueue.s") + +#define PI_Q_BUF_LEN 1 +extern u32 D_800E4800;//__osPiAccessQueueEnabled +extern OSMesg D_8012D1E0[PI_Q_BUF_LEN];//piAccessBuf +extern OSMesgQueue D_8012D1E8; //__osPiAccessQueue +void __osPiCreateAccessQueue(void) +{ + + D_800E4800 = 1; + osCreateMesgQueue(&D_8012D1E8, D_8012D1E0, PI_Q_BUF_LEN); + osSendMesg(&D_8012D1E8, NULL, OS_MESG_NOBLOCK); +} + +void __osPiGetAccess(void) +{ + OSMesg dummyMesg; + if (!D_800E4800) + __osPiCreateAccessQueue(); + osRecvMesg(&D_8012D1E8, &dummyMesg, OS_MESG_BLOCK); +} + +void __osPiRelAccess(void) +{ + osSendMesg(&D_8012D1E8, NULL, OS_MESG_NOBLOCK); +} \ No newline at end of file diff --git a/lib/src/unknown_0D3160.c b/lib/src/unknown_0D3160.c index da6e3282..1144b763 100644 --- a/lib/src/unknown_0D3160.c +++ b/lib/src/unknown_0D3160.c @@ -3,6 +3,7 @@ #include "types.h" #include "macros.h" +#include "libultra_internal.h" GLOBAL_ASM("lib/asm/non_matchings/unknown_0D3160/__osDisableInt.s") GLOBAL_ASM("lib/asm/non_matchings/unknown_0D3160/__osRestoreInt.s") @@ -11,4 +12,21 @@ GLOBAL_ASM("lib/asm/non_matchings/unknown_0D3160/D_800D2680.s") GLOBAL_ASM("lib/asm/non_matchings/unknown_0D3160/D_800D2760.s") GLOBAL_ASM("lib/asm/non_matchings/unknown_0D3160/__osViInit.s") GLOBAL_ASM("lib/asm/non_matchings/unknown_0D3160/func_800D2C60.s") -GLOBAL_ASM("lib/asm/non_matchings/unknown_0D3160/__osDequeueThread.s") + +void __osDequeueThread(OSThread **queue, OSThread *t) +{ + register OSThread *pred; + register OSThread *succ; + pred = (OSThread *)queue; //this is actually legit.. + succ = pred->next; + while (succ != NULL) + { + if (succ == t) + { + pred->next = t->next; + return; + } + pred = succ; + succ = pred->next; + } +} \ No newline at end of file diff --git a/rename_sym.sh b/rename_sym.sh index fe2b1e1b..ffd68456 100755 --- a/rename_sym.sh +++ b/rename_sym.sh @@ -10,13 +10,7 @@ fi #echo "Replace $1 with $2?" #read -<<<<<<< HEAD -ofiles=$(grep -rl "$1" build/**/*.o) -rm -v $ofiles -grep -rl "$1" asm/**/*.s src/**/*.{c,h} lib/**/*.{c,s} include/*.h data/dkr.data.s undefined_syms.txt | xargs sed -i "s/\b$1\b/$2/g" -======= grep -rl "$1" asm/**/*.s src/**/*.{c,h} lib/**/*.{c,s} include/*.h data/dkr.data.s undefined_syms.txt | xargs sed -i "s/\b$1\b/$2/g" # This removes all the .o files that use the old name. grep -rl "$1" build/**/*.o | xargs rm ->>>>>>> b1b1e461a6aa490d7355c207a9a9530181aa8fd7 From 90dc1f30569038ec4217dadeb737bb499c64d0bd Mon Sep 17 00:00:00 2001 From: Mittenshugg Date: Tue, 4 Aug 2020 15:57:18 -0500 Subject: [PATCH 07/12] c: __osSiRawReadIo, __osSiRawWriteIo --- Makefile | 2 + .../unknown_0D3020/__osPiCreateAccessQueue.s | 53 ------------------- .../unknown_0D5190/__osSiRawReadIo.s | 24 --------- .../unknown_0D5190/__osSiRawWriteIo.s | 24 --------- lib/src/__osSiRawReadIo.c | 18 +++++++ lib/src/__osSiRawWriteIo.c | 16 ++++++ lib/src/unknown_0D5190.c | 8 --- 7 files changed, 36 insertions(+), 109 deletions(-) delete mode 100644 lib/asm/non_matchings/unknown_0D3020/__osPiCreateAccessQueue.s delete mode 100644 lib/asm/non_matchings/unknown_0D5190/__osSiRawReadIo.s delete mode 100644 lib/asm/non_matchings/unknown_0D5190/__osSiRawWriteIo.s create mode 100644 lib/src/__osSiRawReadIo.c create mode 100644 lib/src/__osSiRawWriteIo.c delete mode 100644 lib/src/unknown_0D5190.c diff --git a/Makefile b/Makefile index 66dacf5f..024dca4b 100755 --- a/Makefile +++ b/Makefile @@ -190,6 +190,8 @@ $(BUILD_DIR)/lib/src/osSendMesg.o : OPT_FLAGS := -O1 $(BUILD_DIR)/lib/src/osSetEventMesg.o: OPT_FLAGS := -O1 $(BUILD_DIR)/lib/src/osSetTime.o: OPT_FLAGS := -O1 $(BUILD_DIR)/lib/src/osSetTimer.o: OPT_FLAGS := -O1 +$(BUILD_DIR)/lib/src/__osSiRawReadIo.o: OPT_FLAGS := -O1 +$(BUILD_DIR)/lib/src/__osSiRawWriteIo.o: OPT_FLAGS := -O1 $(BUILD_DIR)/lib/src/osStartThread.o: OPT_FLAGS := -O1 $(BUILD_DIR)/lib/src/osStopThread.o: OPT_FLAGS := -O1 $(BUILD_DIR)/lib/src/osTimer.o: OPT_FLAGS := -O1 diff --git a/lib/asm/non_matchings/unknown_0D3020/__osPiCreateAccessQueue.s b/lib/asm/non_matchings/unknown_0D3020/__osPiCreateAccessQueue.s deleted file mode 100644 index 1aa0a41e..00000000 --- a/lib/asm/non_matchings/unknown_0D3020/__osPiCreateAccessQueue.s +++ /dev/null @@ -1,53 +0,0 @@ -glabel __osPiCreateAccessQueue -/* 0D3080 800D2480 27BDFFE8 */ addiu $sp, $sp, -0x18 -/* 0D3084 800D2484 AFBF0014 */ sw $ra, 0x14($sp) -/* 0D3088 800D2488 240E0001 */ li $t6, 1 -/* 0D308C 800D248C 3C01800E */ lui $at, %hi(D_800E4800) # $at, 0x800e -/* 0D3090 800D2490 3C048013 */ lui $a0, %hi(D_8012D1E8) # $a0, 0x8013 -/* 0D3094 800D2494 3C058013 */ lui $a1, %hi(D_8012D1E0) # $a1, 0x8013 -/* 0D3098 800D2498 AC2E4800 */ sw $t6, %lo(D_800E4800)($at) -/* 0D309C 800D249C 24A5D1E0 */ addiu $a1, %lo(D_8012D1E0) # addiu $a1, $a1, -0x2e20 -/* 0D30A0 800D24A0 2484D1E8 */ addiu $a0, %lo(D_8012D1E8) # addiu $a0, $a0, -0x2e18 -/* 0D30A4 800D24A4 0C032208 */ jal osCreateMesgQueue -/* 0D30A8 800D24A8 24060001 */ li $a2, 1 -/* 0D30AC 800D24AC 3C048013 */ lui $a0, %hi(D_8012D1E8) # $a0, 0x8013 -/* 0D30B0 800D24B0 2484D1E8 */ addiu $a0, %lo(D_8012D1E8) # addiu $a0, $a0, -0x2e18 -/* 0D30B4 800D24B4 00002825 */ move $a1, $zero -/* 0D30B8 800D24B8 0C03238C */ jal osSendMesg -/* 0D30BC 800D24BC 00003025 */ move $a2, $zero -/* 0D30C0 800D24C0 8FBF0014 */ lw $ra, 0x14($sp) -/* 0D30C4 800D24C4 27BD0018 */ addiu $sp, $sp, 0x18 -/* 0D30C8 800D24C8 03E00008 */ jr $ra -/* 0D30CC 800D24CC 00000000 */ nop - -/* 0D30D0 800D24D0 3C0E800E */ lui $t6, %hi(D_800E4800) # $t6, 0x800e -/* 0D30D4 800D24D4 8DCE4800 */ lw $t6, %lo(D_800E4800)($t6) -/* 0D30D8 800D24D8 27BDFFE0 */ addiu $sp, $sp, -0x20 -/* 0D30DC 800D24DC AFBF0014 */ sw $ra, 0x14($sp) -/* 0D30E0 800D24E0 15C00003 */ bnez $t6, .L800D24F0 -/* 0D30E4 800D24E4 00000000 */ nop -/* 0D30E8 800D24E8 0C034920 */ jal __osPiCreateAccessQueue -/* 0D30EC 800D24EC 00000000 */ nop -.L800D24F0: -/* 0D30F0 800D24F0 3C048013 */ lui $a0, %hi(D_8012D1E8) # $a0, 0x8013 -/* 0D30F4 800D24F4 2484D1E8 */ addiu $a0, %lo(D_8012D1E8) # addiu $a0, $a0, -0x2e18 -/* 0D30F8 800D24F8 27A5001C */ addiu $a1, $sp, 0x1c -/* 0D30FC 800D24FC 0C0322EC */ jal osRecvMesg -/* 0D3100 800D2500 24060001 */ li $a2, 1 -/* 0D3104 800D2504 8FBF0014 */ lw $ra, 0x14($sp) -/* 0D3108 800D2508 27BD0020 */ addiu $sp, $sp, 0x20 -/* 0D310C 800D250C 03E00008 */ jr $ra -/* 0D3110 800D2510 00000000 */ nop - -/* 0D3114 800D2514 27BDFFE8 */ addiu $sp, $sp, -0x18 -/* 0D3118 800D2518 AFBF0014 */ sw $ra, 0x14($sp) -/* 0D311C 800D251C 3C048013 */ lui $a0, %hi(D_8012D1E8) # $a0, 0x8013 -/* 0D3120 800D2520 2484D1E8 */ addiu $a0, %lo(D_8012D1E8) # addiu $a0, $a0, -0x2e18 -/* 0D3124 800D2524 00002825 */ move $a1, $zero -/* 0D3128 800D2528 0C03238C */ jal osSendMesg -/* 0D312C 800D252C 00003025 */ move $a2, $zero -/* 0D3130 800D2530 8FBF0014 */ lw $ra, 0x14($sp) -/* 0D3134 800D2534 27BD0018 */ addiu $sp, $sp, 0x18 -/* 0D3138 800D2538 03E00008 */ jr $ra -/* 0D313C 800D253C 00000000 */ nop - diff --git a/lib/asm/non_matchings/unknown_0D5190/__osSiRawReadIo.s b/lib/asm/non_matchings/unknown_0D5190/__osSiRawReadIo.s deleted file mode 100644 index ff6bb665..00000000 --- a/lib/asm/non_matchings/unknown_0D5190/__osSiRawReadIo.s +++ /dev/null @@ -1,24 +0,0 @@ -glabel __osSiRawReadIo -/* 0D5190 800D4590 27BDFFE8 */ addiu $sp, $sp, -0x18 -/* 0D5194 800D4594 AFBF0014 */ sw $ra, 0x14($sp) -/* 0D5198 800D4598 AFA40018 */ sw $a0, 0x18($sp) -/* 0D519C 800D459C 0C0354B0 */ jal __osSiDeviceBusy -/* 0D51A0 800D45A0 AFA5001C */ sw $a1, 0x1c($sp) -/* 0D51A4 800D45A4 10400003 */ beqz $v0, .L800D45B4 -/* 0D51A8 800D45A8 00000000 */ nop -/* 0D51AC 800D45AC 10000008 */ b .L800D45D0 -/* 0D51B0 800D45B0 2402FFFF */ li $v0, -1 -.L800D45B4: -/* 0D51B4 800D45B4 8FAE0018 */ lw $t6, 0x18($sp) -/* 0D51B8 800D45B8 3C01A000 */ lui $at, 0xa000 -/* 0D51BC 800D45BC 8FB9001C */ lw $t9, 0x1c($sp) -/* 0D51C0 800D45C0 01C17825 */ or $t7, $t6, $at -/* 0D51C4 800D45C4 8DF80000 */ lw $t8, ($t7) -/* 0D51C8 800D45C8 00001025 */ move $v0, $zero -/* 0D51CC 800D45CC AF380000 */ sw $t8, ($t9) -.L800D45D0: -/* 0D51D0 800D45D0 8FBF0014 */ lw $ra, 0x14($sp) -/* 0D51D4 800D45D4 27BD0018 */ addiu $sp, $sp, 0x18 -/* 0D51D8 800D45D8 03E00008 */ jr $ra -/* 0D51DC 800D45DC 00000000 */ nop - diff --git a/lib/asm/non_matchings/unknown_0D5190/__osSiRawWriteIo.s b/lib/asm/non_matchings/unknown_0D5190/__osSiRawWriteIo.s deleted file mode 100644 index cbf0d0b1..00000000 --- a/lib/asm/non_matchings/unknown_0D5190/__osSiRawWriteIo.s +++ /dev/null @@ -1,24 +0,0 @@ -glabel __osSiRawWriteIo -/* 0D51E0 800D45E0 27BDFFE8 */ addiu $sp, $sp, -0x18 -/* 0D51E4 800D45E4 AFBF0014 */ sw $ra, 0x14($sp) -/* 0D51E8 800D45E8 AFA40018 */ sw $a0, 0x18($sp) -/* 0D51EC 800D45EC 0C0354B0 */ jal __osSiDeviceBusy -/* 0D51F0 800D45F0 AFA5001C */ sw $a1, 0x1c($sp) -/* 0D51F4 800D45F4 10400003 */ beqz $v0, .L800D4604 -/* 0D51F8 800D45F8 00000000 */ nop -/* 0D51FC 800D45FC 10000007 */ b .L800D461C -/* 0D5200 800D4600 2402FFFF */ li $v0, -1 -.L800D4604: -/* 0D5204 800D4604 8FAF0018 */ lw $t7, 0x18($sp) -/* 0D5208 800D4608 8FAE001C */ lw $t6, 0x1c($sp) -/* 0D520C 800D460C 3C01A000 */ lui $at, 0xa000 -/* 0D5210 800D4610 01E1C025 */ or $t8, $t7, $at -/* 0D5214 800D4614 00001025 */ move $v0, $zero -/* 0D5218 800D4618 AF0E0000 */ sw $t6, ($t8) -.L800D461C: -/* 0D521C 800D461C 8FBF0014 */ lw $ra, 0x14($sp) -/* 0D5220 800D4620 27BD0018 */ addiu $sp, $sp, 0x18 -/* 0D5224 800D4624 03E00008 */ jr $ra -/* 0D5228 800D4628 00000000 */ nop - -/* 0D522C 800D462C 00000000 */ nop diff --git a/lib/src/__osSiRawReadIo.c b/lib/src/__osSiRawReadIo.c new file mode 100644 index 00000000..3da94aef --- /dev/null +++ b/lib/src/__osSiRawReadIo.c @@ -0,0 +1,18 @@ +/* The comment below is needed for this file to be picked up by generate_ld */ +/* RAM_POS: 0x800D4590 */ + +#include "types.h" +//#include "macros.h" + +#define PHYS_TO_K1(x) ((u32)(x)|0xA0000000) /* physical to kseg1 */ +#define IO_READ(addr) (*(vu32 *)PHYS_TO_K1(addr)) + +//GLOBAL_ASM("lib/asm/non_matchings/unknown_0D5190/__osSiRawReadIo.s") + +s32 __osSiRawReadIo(u32 devAddr, u32 *data) +{ + if (__osSiDeviceBusy()) + return -1; + *data = IO_READ(devAddr); + return 0; +} diff --git a/lib/src/__osSiRawWriteIo.c b/lib/src/__osSiRawWriteIo.c new file mode 100644 index 00000000..ba8f340e --- /dev/null +++ b/lib/src/__osSiRawWriteIo.c @@ -0,0 +1,16 @@ +/* The comment below is needed for this file to be picked up by generate_ld */ +/* RAM_POS: 0x800D45E0 */ + +#include "types.h" + +#define PHYS_TO_K1(x) ((u32)(x)|0xA0000000) /* physical to kseg1 */ +#define IO_WRITE(addr,data) (*(vu32 *)PHYS_TO_K1(addr)=(u32)(data)) + +s32 __osSiRawWriteIo(u32 devAddr, u32 data) +{ + + if (__osSiDeviceBusy()) + return -1; + IO_WRITE(devAddr, data); + return 0; +} \ No newline at end of file diff --git a/lib/src/unknown_0D5190.c b/lib/src/unknown_0D5190.c deleted file mode 100644 index 36dca54f..00000000 --- a/lib/src/unknown_0D5190.c +++ /dev/null @@ -1,8 +0,0 @@ -/* 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") From bfe4858ca2215febf44b7c86adcf718b5d8aef08 Mon Sep 17 00:00:00 2001 From: Mittenshugg Date: Tue, 4 Aug 2020 16:17:46 -0500 Subject: [PATCH 08/12] c: osPiGetCmdQueue --- Makefile | 2 + .../non_matchings/unknown_0D4270/osJamMesg.s | 94 ------------------- .../unknown_0D4270/osPiGetCmdQueue.s | 16 ---- .../_Printf.s | 0 .../_Putfld.s | 0 .../func_800D3820.s | 0 lib/src/__osSiRawReadIo.c | 3 - lib/src/osJamMesg.c | 35 +++++++ lib/src/osPiGetCmdQueue.c | 13 +++ lib/src/unknown_0D4270.c | 5 - lib/src/unknown_0D43F0.c | 9 ++ 11 files changed, 59 insertions(+), 118 deletions(-) delete mode 100644 lib/asm/non_matchings/unknown_0D4270/osJamMesg.s delete mode 100644 lib/asm/non_matchings/unknown_0D4270/osPiGetCmdQueue.s rename lib/asm/non_matchings/{unknown_0D4270 => unknown_0D43F0}/_Printf.s (100%) rename lib/asm/non_matchings/{unknown_0D4270 => unknown_0D43F0}/_Putfld.s (100%) rename lib/asm/non_matchings/{unknown_0D4270 => unknown_0D43F0}/func_800D3820.s (100%) create mode 100644 lib/src/osJamMesg.c create mode 100644 lib/src/osPiGetCmdQueue.c create mode 100644 lib/src/unknown_0D43F0.c diff --git a/Makefile b/Makefile index 024dca4b..7bf24e22 100755 --- a/Makefile +++ b/Makefile @@ -183,7 +183,9 @@ $(BUILD_DIR)/lib/src/unknown_0CDE90.o: OPT_FLAGS := -O1 $(BUILD_DIR)/lib/src/unknown_0D3160.o: OPT_FLAGS := -O1 $(BUILD_DIR)/lib/src/osCreateThread.o : OPT_FLAGS := -O1 $(BUILD_DIR)/lib/src/osGetThreadPri.o : OPT_FLAGS := -O1 +$(BUILD_DIR)/lib/src/osJamMesg.o : OPT_FLAGS := -O1 $(BUILD_DIR)/lib/src/osPfsFreeBlocks.o: OPT_FLAGS := -O1 +$(BUILD_DIR)/lib/src/osPiGetCmdQueue.o : OPT_FLAGS := -O1 $(BUILD_DIR)/lib/src/osPiStartDma.o : OPT_FLAGS := -O1 $(BUILD_DIR)/lib/src/osRecvMesg.o : OPT_FLAGS := -O1 $(BUILD_DIR)/lib/src/osSendMesg.o : OPT_FLAGS := -O1 diff --git a/lib/asm/non_matchings/unknown_0D4270/osJamMesg.s b/lib/asm/non_matchings/unknown_0D4270/osJamMesg.s deleted file mode 100644 index ac5e04a3..00000000 --- a/lib/asm/non_matchings/unknown_0D4270/osJamMesg.s +++ /dev/null @@ -1,94 +0,0 @@ -glabel osJamMesg -/* 0D42A0 800D36A0 27BDFFD8 */ addiu $sp, $sp, -0x28 -/* 0D42A4 800D36A4 AFBF001C */ sw $ra, 0x1c($sp) -/* 0D42A8 800D36A8 AFA40028 */ sw $a0, 0x28($sp) -/* 0D42AC 800D36AC AFA5002C */ sw $a1, 0x2c($sp) -/* 0D42B0 800D36B0 AFA60030 */ sw $a2, 0x30($sp) -/* 0D42B4 800D36B4 AFB10018 */ sw $s1, 0x18($sp) -/* 0D42B8 800D36B8 0C034958 */ jal __osDisableInt -/* 0D42BC 800D36BC AFB00014 */ sw $s0, 0x14($sp) -/* 0D42C0 800D36C0 8FAE0028 */ lw $t6, 0x28($sp) -/* 0D42C4 800D36C4 00408025 */ move $s0, $v0 -/* 0D42C8 800D36C8 8DCF0008 */ lw $t7, 8($t6) -/* 0D42CC 800D36CC 8DD80010 */ lw $t8, 0x10($t6) -/* 0D42D0 800D36D0 01F8082A */ slt $at, $t7, $t8 -/* 0D42D4 800D36D4 14200018 */ bnez $at, .L800D3738 -/* 0D42D8 800D36D8 00000000 */ nop -.L800D36DC: -/* 0D42DC 800D36DC 8FB90030 */ lw $t9, 0x30($sp) -/* 0D42E0 800D36E0 24010001 */ li $at, 1 -/* 0D42E4 800D36E4 1721000A */ bne $t9, $at, .L800D3710 -/* 0D42E8 800D36E8 00000000 */ nop -/* 0D42EC 800D36EC 3C09800E */ lui $t1, %hi(__osRunningThread) # $t1, 0x800e -/* 0D42F0 800D36F0 8D294890 */ lw $t1, %lo(__osRunningThread)($t1) -/* 0D42F4 800D36F4 24080008 */ li $t0, 8 -/* 0D42F8 800D36F8 A5280010 */ sh $t0, 0x10($t1) -/* 0D42FC 800D36FC 8FA40028 */ lw $a0, 0x28($sp) -/* 0D4300 800D3700 0C034CB3 */ jal __osEnqueueAndYield -/* 0D4304 800D3704 24840004 */ addiu $a0, $a0, 4 -/* 0D4308 800D3708 10000005 */ b .L800D3720 -/* 0D430C 800D370C 00000000 */ nop -.L800D3710: -/* 0D4310 800D3710 0C034960 */ jal __osRestoreInt -/* 0D4314 800D3714 02002025 */ move $a0, $s0 -/* 0D4318 800D3718 10000030 */ b .L800D37DC -/* 0D431C 800D371C 2402FFFF */ li $v0, -1 -.L800D3720: -/* 0D4320 800D3720 8FAA0028 */ lw $t2, 0x28($sp) -/* 0D4324 800D3724 8D4B0008 */ lw $t3, 8($t2) -/* 0D4328 800D3728 8D4C0010 */ lw $t4, 0x10($t2) -/* 0D432C 800D372C 016C082A */ slt $at, $t3, $t4 -/* 0D4330 800D3730 1020FFEA */ beqz $at, .L800D36DC -/* 0D4334 800D3734 00000000 */ nop -.L800D3738: -/* 0D4338 800D3738 8FAD0028 */ lw $t5, 0x28($sp) -/* 0D433C 800D373C 8DAE000C */ lw $t6, 0xc($t5) -/* 0D4340 800D3740 8DAF0010 */ lw $t7, 0x10($t5) -/* 0D4344 800D3744 01CFC021 */ addu $t8, $t6, $t7 -/* 0D4348 800D3748 2719FFFF */ addiu $t9, $t8, -1 -/* 0D434C 800D374C 032F001A */ div $zero, $t9, $t7 -/* 0D4350 800D3750 00004010 */ mfhi $t0 -/* 0D4354 800D3754 ADA8000C */ sw $t0, 0xc($t5) -/* 0D4358 800D3758 8FAA0028 */ lw $t2, 0x28($sp) -/* 0D435C 800D375C 8FA9002C */ lw $t1, 0x2c($sp) -/* 0D4360 800D3760 15E00002 */ bnez $t7, .L800D376C -/* 0D4364 800D3764 00000000 */ nop -/* 0D4368 800D3768 0007000D */ break 7 -.L800D376C: -/* 0D436C 800D376C 2401FFFF */ li $at, -1 -/* 0D4370 800D3770 15E10004 */ bne $t7, $at, .L800D3784 -/* 0D4374 800D3774 3C018000 */ lui $at, 0x8000 -/* 0D4378 800D3778 17210002 */ bne $t9, $at, .L800D3784 -/* 0D437C 800D377C 00000000 */ nop -/* 0D4380 800D3780 0006000D */ break 6 -.L800D3784: -/* 0D4384 800D3784 8D4C000C */ lw $t4, 0xc($t2) -/* 0D4388 800D3788 8D4B0014 */ lw $t3, 0x14($t2) -/* 0D438C 800D378C 000C7080 */ sll $t6, $t4, 2 -/* 0D4390 800D3790 016EC021 */ addu $t8, $t3, $t6 -/* 0D4394 800D3794 AF090000 */ sw $t1, ($t8) -/* 0D4398 800D3798 8FB90028 */ lw $t9, 0x28($sp) -/* 0D439C 800D379C 8F2F0008 */ lw $t7, 8($t9) -/* 0D43A0 800D37A0 25E80001 */ addiu $t0, $t7, 1 -/* 0D43A4 800D37A4 AF280008 */ sw $t0, 8($t9) -/* 0D43A8 800D37A8 8FAD0028 */ lw $t5, 0x28($sp) -/* 0D43AC 800D37AC 8DAA0000 */ lw $t2, ($t5) -/* 0D43B0 800D37B0 8D4C0000 */ lw $t4, ($t2) -/* 0D43B4 800D37B4 11800006 */ beqz $t4, .L800D37D0 -/* 0D43B8 800D37B8 00000000 */ nop -/* 0D43BC 800D37BC 0C034D05 */ jal __osPopThread -/* 0D43C0 800D37C0 01A02025 */ move $a0, $t5 -/* 0D43C4 800D37C4 00408825 */ move $s1, $v0 -/* 0D43C8 800D37C8 0C032268 */ jal osStartThread -/* 0D43CC 800D37CC 02202025 */ move $a0, $s1 -.L800D37D0: -/* 0D43D0 800D37D0 0C034960 */ jal __osRestoreInt -/* 0D43D4 800D37D4 02002025 */ move $a0, $s0 -/* 0D43D8 800D37D8 00001025 */ move $v0, $zero -.L800D37DC: -/* 0D43DC 800D37DC 8FBF001C */ lw $ra, 0x1c($sp) -/* 0D43E0 800D37E0 8FB00014 */ lw $s0, 0x14($sp) -/* 0D43E4 800D37E4 8FB10018 */ lw $s1, 0x18($sp) -/* 0D43E8 800D37E8 03E00008 */ jr $ra -/* 0D43EC 800D37EC 27BD0028 */ addiu $sp, $sp, 0x28 - diff --git a/lib/asm/non_matchings/unknown_0D4270/osPiGetCmdQueue.s b/lib/asm/non_matchings/unknown_0D4270/osPiGetCmdQueue.s deleted file mode 100644 index f10ad9b1..00000000 --- a/lib/asm/non_matchings/unknown_0D4270/osPiGetCmdQueue.s +++ /dev/null @@ -1,16 +0,0 @@ -glabel osPiGetCmdQueue -/* 0D43F0 800D37F0 3C0E800E */ lui $t6, %hi(__osPiDevMgr) # $t6, 0x800e -/* 0D43F4 800D37F4 8DCE3740 */ lw $t6, %lo(__osPiDevMgr)($t6) -/* 0D43F8 800D37F8 15C00003 */ bnez $t6, .L800D3808 -/* 0D43FC 800D37FC 00000000 */ nop -/* 0D4400 800D3800 03E00008 */ jr $ra -/* 0D4404 800D3804 00001025 */ move $v0, $zero - -.L800D3808: -/* 0D4408 800D3808 3C02800E */ lui $v0, %hi(D_800E3748) # $v0, 0x800e -/* 0D440C 800D380C 8C423748 */ lw $v0, %lo(D_800E3748)($v0) -/* 0D4410 800D3810 03E00008 */ jr $ra -/* 0D4414 800D3814 00000000 */ nop - -/* 0D4418 800D3818 00000000 */ nop -/* 0D441C 800D381C 00000000 */ nop diff --git a/lib/asm/non_matchings/unknown_0D4270/_Printf.s b/lib/asm/non_matchings/unknown_0D43F0/_Printf.s similarity index 100% rename from lib/asm/non_matchings/unknown_0D4270/_Printf.s rename to lib/asm/non_matchings/unknown_0D43F0/_Printf.s diff --git a/lib/asm/non_matchings/unknown_0D4270/_Putfld.s b/lib/asm/non_matchings/unknown_0D43F0/_Putfld.s similarity index 100% rename from lib/asm/non_matchings/unknown_0D4270/_Putfld.s rename to lib/asm/non_matchings/unknown_0D43F0/_Putfld.s diff --git a/lib/asm/non_matchings/unknown_0D4270/func_800D3820.s b/lib/asm/non_matchings/unknown_0D43F0/func_800D3820.s similarity index 100% rename from lib/asm/non_matchings/unknown_0D4270/func_800D3820.s rename to lib/asm/non_matchings/unknown_0D43F0/func_800D3820.s diff --git a/lib/src/__osSiRawReadIo.c b/lib/src/__osSiRawReadIo.c index 3da94aef..5ceee26b 100644 --- a/lib/src/__osSiRawReadIo.c +++ b/lib/src/__osSiRawReadIo.c @@ -2,13 +2,10 @@ /* RAM_POS: 0x800D4590 */ #include "types.h" -//#include "macros.h" #define PHYS_TO_K1(x) ((u32)(x)|0xA0000000) /* physical to kseg1 */ #define IO_READ(addr) (*(vu32 *)PHYS_TO_K1(addr)) -//GLOBAL_ASM("lib/asm/non_matchings/unknown_0D5190/__osSiRawReadIo.s") - s32 __osSiRawReadIo(u32 devAddr, u32 *data) { if (__osSiDeviceBusy()) diff --git a/lib/src/osJamMesg.c b/lib/src/osJamMesg.c new file mode 100644 index 00000000..1ae0e2cd --- /dev/null +++ b/lib/src/osJamMesg.c @@ -0,0 +1,35 @@ + +/* The comment below is needed for this file to be picked up by generate_ld */ +/* RAM_POS: 0x800D36A0 */ + +#include "libultra_internal.h" + +extern OSThread* __osRunningThread; + +s32 osJamMesg(OSMesgQueue *mq, OSMesg msg, s32 flag) +{ + register u32 saveMask = __osDisableInt(); + while (mq->validCount >= mq->msgCount) + { + if (flag == OS_MESG_BLOCK) + { + __osRunningThread->state = OS_STATE_WAITING; + __osEnqueueAndYield(&mq->fullqueue); + } + else + { + __osRestoreInt(saveMask); + return -1; + } + } + + mq->first = (mq->first + mq->msgCount - 1) % mq->msgCount; + mq->msg[mq->first] = msg; + mq->validCount++; + if (mq->mtqueue->next != NULL) + { + osStartThread(__osPopThread(&mq->mtqueue)); + } + __osRestoreInt(saveMask); + return 0; +} \ No newline at end of file diff --git a/lib/src/osPiGetCmdQueue.c b/lib/src/osPiGetCmdQueue.c new file mode 100644 index 00000000..493221cd --- /dev/null +++ b/lib/src/osPiGetCmdQueue.c @@ -0,0 +1,13 @@ +/* The comment below is needed for this file to be picked up by generate_ld */ +/* RAM_POS: 0x800D37F0 */ + +#include "libultra_internal.h" + +extern OSDevMgr __osPiDevMgr; + +OSMesgQueue *osPiGetCmdQueue(void) +{ + if (!__osPiDevMgr.active) + return NULL; + return __osPiDevMgr.cmdQueue; +} \ No newline at end of file diff --git a/lib/src/unknown_0D4270.c b/lib/src/unknown_0D4270.c index f9d02b98..ffeafe8a 100644 --- a/lib/src/unknown_0D4270.c +++ b/lib/src/unknown_0D4270.c @@ -5,8 +5,3 @@ #include "macros.h" GLOBAL_ASM("lib/asm/non_matchings/unknown_0D4270/func_800D3670.s") -GLOBAL_ASM("lib/asm/non_matchings/unknown_0D4270/osJamMesg.s") -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") diff --git a/lib/src/unknown_0D43F0.c b/lib/src/unknown_0D43F0.c new file mode 100644 index 00000000..9e2ec6f2 --- /dev/null +++ b/lib/src/unknown_0D43F0.c @@ -0,0 +1,9 @@ +/* The comment below is needed for this file to be picked up by generate_ld */ +/* RAM_POS: 0x800D3820 */ + +#include "types.h" +#include "macros.h" + +GLOBAL_ASM("lib/asm/non_matchings/unknown_0D43F0/func_800D3820.s") +GLOBAL_ASM("lib/asm/non_matchings/unknown_0D43F0/_Putfld.s") +GLOBAL_ASM("lib/asm/non_matchings/unknown_0D43F0/_Printf.s") \ No newline at end of file From 361b12c5000e5f6ae000f8ff310b666fc8876e13 Mon Sep 17 00:00:00 2001 From: Mittenshugg Date: Tue, 4 Aug 2020 18:13:15 -0500 Subject: [PATCH 09/12] C: osCreateViManager --- Makefile | 1 + data/dkr.data.s | 2 +- .../viMgrMain.s | 0 .../unknown_0D2590/osCreateViManager.s | 98 ------------------- lib/src/osViMgr.c | 68 +++++++++++++ lib/src/unknown_0D2590.c | 13 --- undefined_syms.txt | 13 +-- 7 files changed, 77 insertions(+), 118 deletions(-) rename lib/asm/non_matchings/{unknown_0D2590 => osViMgr_0D2590}/viMgrMain.s (100%) delete mode 100644 lib/asm/non_matchings/unknown_0D2590/osCreateViManager.s create mode 100644 lib/src/osViMgr.c delete mode 100644 lib/src/unknown_0D2590.c diff --git a/Makefile b/Makefile index 7bf24e22..0b6fe67b 100755 --- a/Makefile +++ b/Makefile @@ -198,6 +198,7 @@ $(BUILD_DIR)/lib/src/osStartThread.o: OPT_FLAGS := -O1 $(BUILD_DIR)/lib/src/osStopThread.o: OPT_FLAGS := -O1 $(BUILD_DIR)/lib/src/osTimer.o: OPT_FLAGS := -O1 $(BUILD_DIR)/lib/src/osViBlack.o: OPT_FLAGS := -O1 +$(BUILD_DIR)/lib/src/osViMgr.o: OPT_FLAGS := -O2 $(BUILD_DIR)/lib/src/osViSwapBuffer.o : OPT_FLAGS := -O1 ######################## Targets ############################# diff --git a/data/dkr.data.s b/data/dkr.data.s index e621d950..4b21f122 100644 --- a/data/dkr.data.s +++ b/data/dkr.data.s @@ -8226,7 +8226,7 @@ glabel D_800E38D0 .word 0x00000000 .word 0x00000000 -glabel D_800E38E0 +glabel __osViDevMgr .word 0x00000000 .word 0x00000000 .word 0x00000000 diff --git a/lib/asm/non_matchings/unknown_0D2590/viMgrMain.s b/lib/asm/non_matchings/osViMgr_0D2590/viMgrMain.s similarity index 100% rename from lib/asm/non_matchings/unknown_0D2590/viMgrMain.s rename to lib/asm/non_matchings/osViMgr_0D2590/viMgrMain.s diff --git a/lib/asm/non_matchings/unknown_0D2590/osCreateViManager.s b/lib/asm/non_matchings/unknown_0D2590/osCreateViManager.s deleted file mode 100644 index 8fb6815d..00000000 --- a/lib/asm/non_matchings/unknown_0D2590/osCreateViManager.s +++ /dev/null @@ -1,98 +0,0 @@ -glabel osCreateViManager -/* 0D2590 800D1990 27BDFFD0 */ addiu $sp, $sp, -0x30 -/* 0D2594 800D1994 AFB00020 */ sw $s0, 0x20($sp) -/* 0D2598 800D1998 3C10800E */ lui $s0, %hi(D_800E38E0) # $s0, 0x800e -/* 0D259C 800D199C 261038E0 */ addiu $s0, %lo(D_800E38E0) # addiu $s0, $s0, 0x38e0 -/* 0D25A0 800D19A0 8E0E0000 */ lw $t6, ($s0) -/* 0D25A4 800D19A4 AFBF0024 */ sw $ra, 0x24($sp) -/* 0D25A8 800D19A8 AFA40030 */ sw $a0, 0x30($sp) -/* 0D25AC 800D19AC 55C00052 */ bnezl $t6, .L800D1AF8 -/* 0D25B0 800D19B0 8FBF0024 */ lw $ra, 0x24($sp) -/* 0D25B4 800D19B4 0C0353B0 */ jal __osTimerServicesInit -/* 0D25B8 800D19B8 00000000 */ nop -/* 0D25BC 800D19BC 3C048013 */ lui $a0, %hi(D_8012D130) # $a0, 0x8013 -/* 0D25C0 800D19C0 3C058013 */ lui $a1, %hi(D_8012D148) # $a1, 0x8013 -/* 0D25C4 800D19C4 24A5D148 */ addiu $a1, %lo(D_8012D148) # addiu $a1, $a1, -0x2eb8 -/* 0D25C8 800D19C8 2484D130 */ addiu $a0, %lo(D_8012D130) # addiu $a0, $a0, -0x2ed0 -/* 0D25CC 800D19CC 0C032208 */ jal osCreateMesgQueue -/* 0D25D0 800D19D0 24060005 */ li $a2, 5 -/* 0D25D4 800D19D4 3C068013 */ lui $a2, %hi(D_8012D160) # $a2, 0x8013 -/* 0D25D8 800D19D8 3C078013 */ lui $a3, %hi(D_8012D178) # $a3, 0x8013 -/* 0D25DC 800D19DC 24E7D178 */ addiu $a3, %lo(D_8012D178) # addiu $a3, $a3, -0x2e88 -/* 0D25E0 800D19E0 24C6D160 */ addiu $a2, %lo(D_8012D160) # addiu $a2, $a2, -0x2ea0 -/* 0D25E4 800D19E4 240F000D */ li $t7, 13 -/* 0D25E8 800D19E8 2418000E */ li $t8, 14 -/* 0D25EC 800D19EC 3C058013 */ lui $a1, %hi(D_8012D130) # $a1, 0x8013 -/* 0D25F0 800D19F0 A4CF0000 */ sh $t7, ($a2) -/* 0D25F4 800D19F4 A0C00002 */ sb $zero, 2($a2) -/* 0D25F8 800D19F8 ACC00004 */ sw $zero, 4($a2) -/* 0D25FC 800D19FC A4F80000 */ sh $t8, ($a3) -/* 0D2600 800D1A00 A0E00002 */ sb $zero, 2($a3) -/* 0D2604 800D1A04 ACE00004 */ sw $zero, 4($a3) -/* 0D2608 800D1A08 24A5D130 */ addiu $a1, %lo(D_8012D130) # addiu $a1, $a1, -0x2ed0 -/* 0D260C 800D1A0C 0C0332EC */ jal osSetEventMesg -/* 0D2610 800D1A10 24040007 */ li $a0, 7 -/* 0D2614 800D1A14 3C078013 */ lui $a3, 0x8013 -/* 0D2618 800D1A18 3C058013 */ lui $a1, %hi(D_8012D130) # $a1, 0x8013 -/* 0D261C 800D1A1C 24E6D178 */ addiu $a2, $a3, -0x2e88 -/* 0D2620 800D1A20 24A5D130 */ addiu $a1, %lo(D_8012D130) # addiu $a1, $a1, -0x2ed0 -/* 0D2624 800D1A24 0C0332EC */ jal osSetEventMesg -/* 0D2628 800D1A28 24040003 */ li $a0, 3 -/* 0D262C 800D1A2C 2419FFFF */ li $t9, -1 -/* 0D2630 800D1A30 AFB90028 */ sw $t9, 0x28($sp) -/* 0D2634 800D1A34 0C034950 */ jal osGetThreadPri -/* 0D2638 800D1A38 00002025 */ move $a0, $zero -/* 0D263C 800D1A3C 8FA80030 */ lw $t0, 0x30($sp) -/* 0D2640 800D1A40 00002025 */ move $a0, $zero -/* 0D2644 800D1A44 0048082A */ slt $at, $v0, $t0 -/* 0D2648 800D1A48 10200003 */ beqz $at, .L800D1A58 -/* 0D264C 800D1A4C 01002825 */ move $a1, $t0 -/* 0D2650 800D1A50 0C033210 */ jal osSetThreadPri -/* 0D2654 800D1A54 AFA20028 */ sw $v0, 0x28($sp) -.L800D1A58: -/* 0D2658 800D1A58 0C034958 */ jal __osDisableInt -/* 0D265C 800D1A5C 00000000 */ nop -/* 0D2660 800D1A60 8FAB0030 */ lw $t3, 0x30($sp) -/* 0D2664 800D1A64 3C038013 */ lui $v1, %hi(D_8012D130) # $v1, 0x8013 -/* 0D2668 800D1A68 3C048013 */ lui $a0, %hi(D_8012CE80) # $a0, 0x8013 -/* 0D266C 800D1A6C 3C0A8013 */ lui $t2, %hi(D_8012D130) # $t2, 0x8013 -/* 0D2670 800D1A70 2484CE80 */ addiu $a0, %lo(D_8012CE80) # addiu $a0, $a0, -0x3180 -/* 0D2674 800D1A74 2463D130 */ addiu $v1, %lo(D_8012D130) # addiu $v1, $v1, -0x2ed0 -/* 0D2678 800D1A78 24090001 */ li $t1, 1 -/* 0D267C 800D1A7C 254AD130 */ addiu $t2, %lo(D_8012D130) # addiu $t2, $t2, -0x2ed0 -/* 0D2680 800D1A80 3C06800D */ lui $a2, %hi(viMgrMain) # $a2, 0x800d -/* 0D2684 800D1A84 AFA2002C */ sw $v0, 0x2c($sp) -/* 0D2688 800D1A88 AE090000 */ sw $t1, ($s0) -/* 0D268C 800D1A8C AE040004 */ sw $a0, 4($s0) -/* 0D2690 800D1A90 AE030008 */ sw $v1, 8($s0) -/* 0D2694 800D1A94 AE03000C */ sw $v1, 0xc($s0) -/* 0D2698 800D1A98 AE000010 */ sw $zero, 0x10($s0) -/* 0D269C 800D1A9C AE000014 */ sw $zero, 0x14($s0) -/* 0D26A0 800D1AA0 AE000018 */ sw $zero, 0x18($s0) -/* 0D26A4 800D1AA4 24C61B08 */ addiu $a2, %lo(viMgrMain) # addiu $a2, $a2, 0x1b08 -/* 0D26A8 800D1AA8 AFAA0010 */ sw $t2, 0x10($sp) -/* 0D26AC 800D1AAC 00002825 */ move $a1, $zero -/* 0D26B0 800D1AB0 02003825 */ move $a3, $s0 -/* 0D26B4 800D1AB4 0C032214 */ jal osCreateThread -/* 0D26B8 800D1AB8 AFAB0014 */ sw $t3, 0x14($sp) -/* 0D26BC 800D1ABC 0C034AC4 */ jal __osViInit -/* 0D26C0 800D1AC0 00000000 */ nop -/* 0D26C4 800D1AC4 3C048013 */ lui $a0, %hi(D_8012CE80) # $a0, 0x8013 -/* 0D26C8 800D1AC8 0C032268 */ jal osStartThread -/* 0D26CC 800D1ACC 2484CE80 */ addiu $a0, %lo(D_8012CE80) # addiu $a0, $a0, -0x3180 -/* 0D26D0 800D1AD0 0C034960 */ jal __osRestoreInt -/* 0D26D4 800D1AD4 8FA4002C */ lw $a0, 0x2c($sp) -/* 0D26D8 800D1AD8 8FAC0028 */ lw $t4, 0x28($sp) -/* 0D26DC 800D1ADC 2401FFFF */ li $at, -1 -/* 0D26E0 800D1AE0 00002025 */ move $a0, $zero -/* 0D26E4 800D1AE4 51810004 */ beql $t4, $at, .L800D1AF8 -/* 0D26E8 800D1AE8 8FBF0024 */ lw $ra, 0x24($sp) -/* 0D26EC 800D1AEC 0C033210 */ jal osSetThreadPri -/* 0D26F0 800D1AF0 01802825 */ move $a1, $t4 -/* 0D26F4 800D1AF4 8FBF0024 */ lw $ra, 0x24($sp) -.L800D1AF8: -/* 0D26F8 800D1AF8 8FB00020 */ lw $s0, 0x20($sp) -/* 0D26FC 800D1AFC 27BD0030 */ addiu $sp, $sp, 0x30 -/* 0D2700 800D1B00 03E00008 */ jr $ra -/* 0D2704 800D1B04 00000000 */ nop - diff --git a/lib/src/osViMgr.c b/lib/src/osViMgr.c new file mode 100644 index 00000000..98689913 --- /dev/null +++ b/lib/src/osViMgr.c @@ -0,0 +1,68 @@ +/* The comment below is needed for this file to be picked up by generate_ld */ +/* RAM_POS: 0x800D1990 */ + +#include "types.h" +#include "macros.h" +#include "libultra_internal.h" + + +#define OS_VIM_STACKSIZE 4096 + +extern OSTime __osCurrentTime; +extern u32 __osBaseCounter; +extern u32 D_8012D22C; //__osViIntrCount + + +extern OSDevMgr __osViDevMgr; +extern u8 viThreadStack[OS_VIM_STACKSIZE]; +extern OSThread viThread; +extern OSMesgQueue viEventQueue; +extern OSMesg viEventBuf[5]; //viEventBuf; +extern OSIoMesg viRetraceMsg; //viRetraceMsg +extern OSIoMesg viCounterMsg; //viCounterMsg + +void viMgrMain(void *arg); + +void osCreateViManager(OSPri pri) +{ + u32 savedMask; + OSPri oldPri; + OSPri myPri; + if (__osViDevMgr.active == 0) + { + __osTimerServicesInit(); + osCreateMesgQueue(&viEventQueue, viEventBuf, 5); + viRetraceMsg.hdr.type = OS_MESG_TYPE_VRETRACE; + viRetraceMsg.hdr.pri = OS_MESG_PRI_NORMAL; + viRetraceMsg.hdr.retQueue = NULL; + viCounterMsg.hdr.type = OS_MESG_TYPE_COUNTER; + viCounterMsg.hdr.pri = OS_MESG_PRI_NORMAL; + viCounterMsg.hdr.retQueue = NULL; + osSetEventMesg(OS_EVENT_VI, &viEventQueue, &viRetraceMsg); + osSetEventMesg(OS_EVENT_COUNTER, &viEventQueue, &viCounterMsg); + oldPri = -1; + myPri = osGetThreadPri(NULL); + if (myPri < pri) + { + oldPri = myPri; + osSetThreadPri(NULL, pri); + } + savedMask = __osDisableInt(); + __osViDevMgr.active = 1; + __osViDevMgr.thread = &viThread; + __osViDevMgr.cmdQueue = &viEventQueue; + __osViDevMgr.evtQueue = &viEventQueue; + __osViDevMgr.acsQueue = NULL; + __osViDevMgr.dma = NULL; + __osViDevMgr.edma = NULL; + osCreateThread(&viThread, 0, viMgrMain, &__osViDevMgr, &viThreadStack[OS_VIM_STACKSIZE], pri); //TODO give 0x8012C130 a proper symbol + __osViInit(); + osStartThread(&viThread); + __osRestoreInt(savedMask); + if (oldPri != -1) + { + osSetThreadPri(0, oldPri); + } + } +} +GLOBAL_ASM("lib/asm/non_matchings/osViMgr_0D2590/viMgrMain.s") diff --git a/lib/src/unknown_0D2590.c b/lib/src/unknown_0D2590.c deleted file mode 100644 index c928470c..00000000 --- a/lib/src/unknown_0D2590.c +++ /dev/null @@ -1,13 +0,0 @@ -/* The comment below is needed for this file to be picked up by generate_ld */ -/* RAM_POS: 0x800D1990 */ - -#include "types.h" -#include "macros.h" -#include "libultra_internal.h" - -extern OSTime __osCurrentTime; -extern u32 __osBaseCounter; -extern u32 D_8012D22C; //__osViIntrCount -//extern u16 D_8012D190; //static u16 retrace -GLOBAL_ASM("lib/asm/non_matchings/unknown_0D2590/osCreateViManager.s") -GLOBAL_ASM("lib/asm/non_matchings/unknown_0D2590/viMgrMain.s") diff --git a/undefined_syms.txt b/undefined_syms.txt index fad1a856..183b9c87 100755 --- a/undefined_syms.txt +++ b/undefined_syms.txt @@ -772,7 +772,7 @@ D_800E38AC = 0x800E38AC; D_800E38B0 = 0x800E38B0; D_800E38C0 = 0x800E38C0; D_800E38D0 = 0x800E38D0; -D_800E38E0 = 0x800E38E0; +__osViDevMgr = 0x800E38E0; D_800E3900 = 0x800E3900; D_800E4620 = 0x800E4620; D_800E4670 = 0x800E4670; @@ -2809,6 +2809,7 @@ D_8012AAE0 = 0x8012AAE0; D_8012AAF0 = 0x8012AAF0; D_8012ACA0 = 0x8012ACA0; D_8012ACB8 = 0x8012ACB8; +viThreadStack = 0x8012C130; D_8012CCC0 = 0x8012CCC0; __osEventStateTab = 0x8012CCD0; D_8012CD50 = 0x8012CD50; @@ -2823,11 +2824,11 @@ D_8012CE20 = 0x8012CE20; D_8012CE28 = 0x8012CE28; D_8012CE40 = 0x8012CE40; D_8012CE7C = 0x8012CE7C; -D_8012CE80 = 0x8012CE80; -D_8012D130 = 0x8012D130; -D_8012D148 = 0x8012D148; -D_8012D160 = 0x8012D160; -D_8012D178 = 0x8012D178; +viThread = 0x8012CE80; +viEventQueue = 0x8012D130; +viEventBuf = 0x8012D148; +viRetraceMsg = 0x8012D160; +viCounterMsg = 0x8012D178; D_8012D190 = 0x8012D190; D_8012D1A0 = 0x8012D1A0; D_8012D1E0 = 0x8012D1E0; From 2134cfe8df2e1a242c2dcdab14a20e66cba50fce Mon Sep 17 00:00:00 2001 From: Mittenshugg Date: Tue, 4 Aug 2020 19:38:58 -0500 Subject: [PATCH 10/12] c: osPiRawStartDma --- .../unknown_0B8920/func_800C6000.s | 48 ++++----- .../unknown_0B8920/osCreatePiManager.s | 97 ------------------- data/dkr.data.s | 2 +- find_sym.sh | 13 +++ .../non_matchings/unknown_0D3160/D_800D25A0.s | 65 ------------- .../{D_800D2760.s => __osDevMgrMain.s} | 2 +- .../{D_800D2680.s => osEPiRawStartDma.s} | 2 +- lib/src/unknown_0D3020.c | 16 +-- lib/src/unknown_0D3160.c | 33 ++++++- src/unknown_0B8920.c | 51 +++++++++- undefined_syms.txt | 17 ++-- 11 files changed, 137 insertions(+), 209 deletions(-) delete mode 100644 asm/non_matchings/unknown_0B8920/osCreatePiManager.s create mode 100755 find_sym.sh delete mode 100644 lib/asm/non_matchings/unknown_0D3160/D_800D25A0.s rename lib/asm/non_matchings/unknown_0D3160/{D_800D2760.s => __osDevMgrMain.s} (99%) rename lib/asm/non_matchings/unknown_0D3160/{D_800D2680.s => osEPiRawStartDma.s} (99%) diff --git a/asm/non_matchings/unknown_0B8920/func_800C6000.s b/asm/non_matchings/unknown_0B8920/func_800C6000.s index d0ac521f..f8f20825 100644 --- a/asm/non_matchings/unknown_0B8920/func_800C6000.s +++ b/asm/non_matchings/unknown_0B8920/func_800C6000.s @@ -13,24 +13,24 @@ glabel osCreatePiManager /* 0C6C2C 800C602C 00C02825 */ move $a1, $a2 /* 0C6C30 800C6030 0C032208 */ jal osCreateMesgQueue /* 0C6C34 800C6034 00E03025 */ move $a2, $a3 -/* 0C6C38 800C6038 3C048013 */ lui $a0, %hi(D_8012AAB0) # $a0, 0x8013 -/* 0C6C3C 800C603C 3C058013 */ lui $a1, %hi(D_8012AAC8) # $a1, 0x8013 -/* 0C6C40 800C6040 24A5AAC8 */ addiu $a1, %lo(D_8012AAC8) # addiu $a1, $a1, -0x5538 -/* 0C6C44 800C6044 2484AAB0 */ addiu $a0, %lo(D_8012AAB0) # addiu $a0, $a0, -0x5550 +/* 0C6C38 800C6038 3C048013 */ lui $a0, %hi(piEventQueue) # $a0, 0x8013 +/* 0C6C3C 800C603C 3C058013 */ lui $a1, %hi(piEventBuf) # $a1, 0x8013 +/* 0C6C40 800C6040 24A5AAC8 */ addiu $a1, %lo(piEventBuf) # addiu $a1, $a1, -0x5538 +/* 0C6C44 800C6044 2484AAB0 */ addiu $a0, %lo(piEventQueue) # addiu $a0, $a0, -0x5550 /* 0C6C48 800C6048 0C032208 */ jal osCreateMesgQueue /* 0C6C4C 800C604C 24060001 */ li $a2, 1 -/* 0C6C50 800C6050 3C0F800E */ lui $t7, %hi(D_800E4800) # $t7, 0x800e -/* 0C6C54 800C6054 8DEF4800 */ lw $t7, %lo(D_800E4800)($t7) +/* 0C6C50 800C6050 3C0F800E */ lui $t7, %hi(__osPiAccessQueueEnabled) # $t7, 0x800e +/* 0C6C54 800C6054 8DEF4800 */ lw $t7, %lo(__osPiAccessQueueEnabled)($t7) /* 0C6C58 800C6058 00000000 */ nop /* 0C6C5C 800C605C 15E00003 */ bnez $t7, .L800C606C /* 0C6C60 800C6060 00000000 */ nop /* 0C6C64 800C6064 0C034920 */ jal __osPiCreateAccessQueue /* 0C6C68 800C6068 00000000 */ nop .L800C606C: -/* 0C6C6C 800C606C 3C058013 */ lui $a1, %hi(D_8012AAB0) # $a1, 0x8013 +/* 0C6C6C 800C606C 3C058013 */ lui $a1, %hi(piEventQueue) # $a1, 0x8013 /* 0C6C70 800C6070 3C062222 */ lui $a2, (0x22222222 >> 16) # lui $a2, 0x2222 /* 0C6C74 800C6074 34C62222 */ ori $a2, (0x22222222 & 0xFFFF) # ori $a2, $a2, 0x2222 -/* 0C6C78 800C6078 24A5AAB0 */ addiu $a1, %lo(D_8012AAB0) # addiu $a1, $a1, -0x5550 +/* 0C6C78 800C6078 24A5AAB0 */ addiu $a1, %lo(piEventQueue) # addiu $a1, $a1, -0x5550 /* 0C6C7C 800C607C 0C0332EC */ jal osSetEventMesg /* 0C6C80 800C6080 24040008 */ li $a0, 8 /* 0C6C84 800C6084 2418FFFF */ li $t8, -1 @@ -49,20 +49,20 @@ glabel osCreatePiManager /* 0C6CB4 800C60B4 00000000 */ nop /* 0C6CB8 800C60B8 8FA90034 */ lw $t1, 0x34($sp) /* 0C6CBC 800C60BC 8FAF0030 */ lw $t7, 0x30($sp) -/* 0C6CC0 800C60C0 3C048013 */ lui $a0, %hi(D_8012A800) # $a0, 0x8013 -/* 0C6CC4 800C60C4 3C0A8013 */ lui $t2, %hi(D_8012AAB0) # $t2, 0x8013 -/* 0C6CC8 800C60C8 3C0B8013 */ lui $t3, %hi(D_8012D1E8) # $t3, 0x8013 -/* 0C6CCC 800C60CC 3C0C800D */ lui $t4, %hi(D_800D25A0) # $t4, 0x800d -/* 0C6CD0 800C60D0 3C0D800D */ lui $t5, %hi(D_800D2680) # $t5, 0x800d -/* 0C6CD4 800C60D4 3C0E8013 */ lui $t6, %hi(D_8012AAB0) # $t6, 0x8013 -/* 0C6CD8 800C60D8 2484A800 */ addiu $a0, %lo(D_8012A800) # addiu $a0, $a0, -0x5800 +/* 0C6CC0 800C60C0 3C048013 */ lui $a0, %hi(piThread) # $a0, 0x8013 +/* 0C6CC4 800C60C4 3C0A8013 */ lui $t2, %hi(piEventQueue) # $t2, 0x8013 +/* 0C6CC8 800C60C8 3C0B8013 */ lui $t3, %hi(piAccessQueue) # $t3, 0x8013 +/* 0C6CCC 800C60CC 3C0C800D */ lui $t4, %hi(osPiRawStartDma) # $t4, 0x800d +/* 0C6CD0 800C60D0 3C0D800D */ lui $t5, %hi(osEPiRawStartDma) # $t5, 0x800d +/* 0C6CD4 800C60D4 3C0E8013 */ lui $t6, %hi(piEventQueue) # $t6, 0x8013 +/* 0C6CD8 800C60D8 2484A800 */ addiu $a0, %lo(piThread) # addiu $a0, $a0, -0x5800 /* 0C6CDC 800C60DC 24080001 */ li $t0, 1 -/* 0C6CE0 800C60E0 254AAAB0 */ addiu $t2, %lo(D_8012AAB0) # addiu $t2, $t2, -0x5550 -/* 0C6CE4 800C60E4 256BD1E8 */ addiu $t3, %lo(D_8012D1E8) # addiu $t3, $t3, -0x2e18 -/* 0C6CE8 800C60E8 258C25A0 */ addiu $t4, %lo(D_800D25A0) # addiu $t4, $t4, 0x25a0 -/* 0C6CEC 800C60EC 25AD2680 */ addiu $t5, %lo(D_800D2680) # addiu $t5, $t5, 0x2680 -/* 0C6CF0 800C60F0 25CEAAB0 */ addiu $t6, %lo(D_8012AAB0) # addiu $t6, $t6, -0x5550 -/* 0C6CF4 800C60F4 3C06800D */ lui $a2, %hi(D_800D2760) # $a2, 0x800d +/* 0C6CE0 800C60E0 254AAAB0 */ addiu $t2, %lo(piEventQueue) # addiu $t2, $t2, -0x5550 +/* 0C6CE4 800C60E4 256BD1E8 */ addiu $t3, %lo(piAccessQueue) # addiu $t3, $t3, -0x2e18 +/* 0C6CE8 800C60E8 258C25A0 */ addiu $t4, %lo(osPiRawStartDma) # addiu $t4, $t4, 0x25a0 +/* 0C6CEC 800C60EC 25AD2680 */ addiu $t5, %lo(osEPiRawStartDma) # addiu $t5, $t5, 0x2680 +/* 0C6CF0 800C60F0 25CEAAB0 */ addiu $t6, %lo(piEventQueue) # addiu $t6, $t6, -0x5550 +/* 0C6CF4 800C60F4 3C06800D */ lui $a2, %hi(__osDevMgrMain) # $a2, 0x800d /* 0C6CF8 800C60F8 AFA2002C */ sw $v0, 0x2c($sp) /* 0C6CFC 800C60FC AE080000 */ sw $t0, ($s0) /* 0C6D00 800C6100 AE040004 */ sw $a0, 4($s0) @@ -70,16 +70,16 @@ glabel osCreatePiManager /* 0C6D08 800C6108 AE0B0010 */ sw $t3, 0x10($s0) /* 0C6D0C 800C610C AE0C0014 */ sw $t4, 0x14($s0) /* 0C6D10 800C6110 AE0D0018 */ sw $t5, 0x18($s0) -/* 0C6D14 800C6114 24C62760 */ addiu $a2, %lo(D_800D2760) # addiu $a2, $a2, 0x2760 +/* 0C6D14 800C6114 24C62760 */ addiu $a2, %lo(__osDevMgrMain) # addiu $a2, $a2, 0x2760 /* 0C6D18 800C6118 AFAE0010 */ sw $t6, 0x10($sp) /* 0C6D1C 800C611C 00002825 */ move $a1, $zero /* 0C6D20 800C6120 02003825 */ move $a3, $s0 /* 0C6D24 800C6124 AE090008 */ sw $t1, 8($s0) /* 0C6D28 800C6128 0C032214 */ jal osCreateThread /* 0C6D2C 800C612C AFAF0014 */ sw $t7, 0x14($sp) -/* 0C6D30 800C6130 3C048013 */ lui $a0, %hi(D_8012A800) # $a0, 0x8013 +/* 0C6D30 800C6130 3C048013 */ lui $a0, %hi(piThread) # $a0, 0x8013 /* 0C6D34 800C6134 0C032268 */ jal osStartThread -/* 0C6D38 800C6138 2484A800 */ addiu $a0, %lo(D_8012A800) # addiu $a0, $a0, -0x5800 +/* 0C6D38 800C6138 2484A800 */ addiu $a0, %lo(piThread) # addiu $a0, $a0, -0x5800 /* 0C6D3C 800C613C 8FA4002C */ lw $a0, 0x2c($sp) /* 0C6D40 800C6140 0C034960 */ jal __osRestoreInt /* 0C6D44 800C6144 00000000 */ nop diff --git a/asm/non_matchings/unknown_0B8920/osCreatePiManager.s b/asm/non_matchings/unknown_0B8920/osCreatePiManager.s deleted file mode 100644 index d0ac521f..00000000 --- a/asm/non_matchings/unknown_0B8920/osCreatePiManager.s +++ /dev/null @@ -1,97 +0,0 @@ -glabel osCreatePiManager -/* 0C6C00 800C6000 27BDFFD0 */ addiu $sp, $sp, -0x30 -/* 0C6C04 800C6004 AFB00020 */ sw $s0, 0x20($sp) -/* 0C6C08 800C6008 3C10800E */ lui $s0, %hi(__osPiDevMgr) # $s0, 0x800e -/* 0C6C0C 800C600C 26103740 */ addiu $s0, %lo(__osPiDevMgr) # addiu $s0, $s0, 0x3740 -/* 0C6C10 800C6010 8E0E0000 */ lw $t6, ($s0) -/* 0C6C14 800C6014 AFBF0024 */ sw $ra, 0x24($sp) -/* 0C6C18 800C6018 AFA40030 */ sw $a0, 0x30($sp) -/* 0C6C1C 800C601C AFA50034 */ sw $a1, 0x34($sp) -/* 0C6C20 800C6020 15C0004F */ bnez $t6, .L800C6160 -/* 0C6C24 800C6024 AFA60038 */ sw $a2, 0x38($sp) -/* 0C6C28 800C6028 00A02025 */ move $a0, $a1 -/* 0C6C2C 800C602C 00C02825 */ move $a1, $a2 -/* 0C6C30 800C6030 0C032208 */ jal osCreateMesgQueue -/* 0C6C34 800C6034 00E03025 */ move $a2, $a3 -/* 0C6C38 800C6038 3C048013 */ lui $a0, %hi(D_8012AAB0) # $a0, 0x8013 -/* 0C6C3C 800C603C 3C058013 */ lui $a1, %hi(D_8012AAC8) # $a1, 0x8013 -/* 0C6C40 800C6040 24A5AAC8 */ addiu $a1, %lo(D_8012AAC8) # addiu $a1, $a1, -0x5538 -/* 0C6C44 800C6044 2484AAB0 */ addiu $a0, %lo(D_8012AAB0) # addiu $a0, $a0, -0x5550 -/* 0C6C48 800C6048 0C032208 */ jal osCreateMesgQueue -/* 0C6C4C 800C604C 24060001 */ li $a2, 1 -/* 0C6C50 800C6050 3C0F800E */ lui $t7, %hi(D_800E4800) # $t7, 0x800e -/* 0C6C54 800C6054 8DEF4800 */ lw $t7, %lo(D_800E4800)($t7) -/* 0C6C58 800C6058 00000000 */ nop -/* 0C6C5C 800C605C 15E00003 */ bnez $t7, .L800C606C -/* 0C6C60 800C6060 00000000 */ nop -/* 0C6C64 800C6064 0C034920 */ jal __osPiCreateAccessQueue -/* 0C6C68 800C6068 00000000 */ nop -.L800C606C: -/* 0C6C6C 800C606C 3C058013 */ lui $a1, %hi(D_8012AAB0) # $a1, 0x8013 -/* 0C6C70 800C6070 3C062222 */ lui $a2, (0x22222222 >> 16) # lui $a2, 0x2222 -/* 0C6C74 800C6074 34C62222 */ ori $a2, (0x22222222 & 0xFFFF) # ori $a2, $a2, 0x2222 -/* 0C6C78 800C6078 24A5AAB0 */ addiu $a1, %lo(D_8012AAB0) # addiu $a1, $a1, -0x5550 -/* 0C6C7C 800C607C 0C0332EC */ jal osSetEventMesg -/* 0C6C80 800C6080 24040008 */ li $a0, 8 -/* 0C6C84 800C6084 2418FFFF */ li $t8, -1 -/* 0C6C88 800C6088 AFB80028 */ sw $t8, 0x28($sp) -/* 0C6C8C 800C608C 0C034950 */ jal osGetThreadPri -/* 0C6C90 800C6090 00002025 */ move $a0, $zero -/* 0C6C94 800C6094 8FB90030 */ lw $t9, 0x30($sp) -/* 0C6C98 800C6098 00002025 */ move $a0, $zero -/* 0C6C9C 800C609C 0059082A */ slt $at, $v0, $t9 -/* 0C6CA0 800C60A0 10200003 */ beqz $at, .L800C60B0 -/* 0C6CA4 800C60A4 03202825 */ move $a1, $t9 -/* 0C6CA8 800C60A8 0C033210 */ jal osSetThreadPri -/* 0C6CAC 800C60AC AFA20028 */ sw $v0, 0x28($sp) -.L800C60B0: -/* 0C6CB0 800C60B0 0C034958 */ jal __osDisableInt -/* 0C6CB4 800C60B4 00000000 */ nop -/* 0C6CB8 800C60B8 8FA90034 */ lw $t1, 0x34($sp) -/* 0C6CBC 800C60BC 8FAF0030 */ lw $t7, 0x30($sp) -/* 0C6CC0 800C60C0 3C048013 */ lui $a0, %hi(D_8012A800) # $a0, 0x8013 -/* 0C6CC4 800C60C4 3C0A8013 */ lui $t2, %hi(D_8012AAB0) # $t2, 0x8013 -/* 0C6CC8 800C60C8 3C0B8013 */ lui $t3, %hi(D_8012D1E8) # $t3, 0x8013 -/* 0C6CCC 800C60CC 3C0C800D */ lui $t4, %hi(D_800D25A0) # $t4, 0x800d -/* 0C6CD0 800C60D0 3C0D800D */ lui $t5, %hi(D_800D2680) # $t5, 0x800d -/* 0C6CD4 800C60D4 3C0E8013 */ lui $t6, %hi(D_8012AAB0) # $t6, 0x8013 -/* 0C6CD8 800C60D8 2484A800 */ addiu $a0, %lo(D_8012A800) # addiu $a0, $a0, -0x5800 -/* 0C6CDC 800C60DC 24080001 */ li $t0, 1 -/* 0C6CE0 800C60E0 254AAAB0 */ addiu $t2, %lo(D_8012AAB0) # addiu $t2, $t2, -0x5550 -/* 0C6CE4 800C60E4 256BD1E8 */ addiu $t3, %lo(D_8012D1E8) # addiu $t3, $t3, -0x2e18 -/* 0C6CE8 800C60E8 258C25A0 */ addiu $t4, %lo(D_800D25A0) # addiu $t4, $t4, 0x25a0 -/* 0C6CEC 800C60EC 25AD2680 */ addiu $t5, %lo(D_800D2680) # addiu $t5, $t5, 0x2680 -/* 0C6CF0 800C60F0 25CEAAB0 */ addiu $t6, %lo(D_8012AAB0) # addiu $t6, $t6, -0x5550 -/* 0C6CF4 800C60F4 3C06800D */ lui $a2, %hi(D_800D2760) # $a2, 0x800d -/* 0C6CF8 800C60F8 AFA2002C */ sw $v0, 0x2c($sp) -/* 0C6CFC 800C60FC AE080000 */ sw $t0, ($s0) -/* 0C6D00 800C6100 AE040004 */ sw $a0, 4($s0) -/* 0C6D04 800C6104 AE0A000C */ sw $t2, 0xc($s0) -/* 0C6D08 800C6108 AE0B0010 */ sw $t3, 0x10($s0) -/* 0C6D0C 800C610C AE0C0014 */ sw $t4, 0x14($s0) -/* 0C6D10 800C6110 AE0D0018 */ sw $t5, 0x18($s0) -/* 0C6D14 800C6114 24C62760 */ addiu $a2, %lo(D_800D2760) # addiu $a2, $a2, 0x2760 -/* 0C6D18 800C6118 AFAE0010 */ sw $t6, 0x10($sp) -/* 0C6D1C 800C611C 00002825 */ move $a1, $zero -/* 0C6D20 800C6120 02003825 */ move $a3, $s0 -/* 0C6D24 800C6124 AE090008 */ sw $t1, 8($s0) -/* 0C6D28 800C6128 0C032214 */ jal osCreateThread -/* 0C6D2C 800C612C AFAF0014 */ sw $t7, 0x14($sp) -/* 0C6D30 800C6130 3C048013 */ lui $a0, %hi(D_8012A800) # $a0, 0x8013 -/* 0C6D34 800C6134 0C032268 */ jal osStartThread -/* 0C6D38 800C6138 2484A800 */ addiu $a0, %lo(D_8012A800) # addiu $a0, $a0, -0x5800 -/* 0C6D3C 800C613C 8FA4002C */ lw $a0, 0x2c($sp) -/* 0C6D40 800C6140 0C034960 */ jal __osRestoreInt -/* 0C6D44 800C6144 00000000 */ nop -/* 0C6D48 800C6148 8FB80028 */ lw $t8, 0x28($sp) -/* 0C6D4C 800C614C 2401FFFF */ li $at, -1 -/* 0C6D50 800C6150 13010003 */ beq $t8, $at, .L800C6160 -/* 0C6D54 800C6154 00002025 */ move $a0, $zero -/* 0C6D58 800C6158 0C033210 */ jal osSetThreadPri -/* 0C6D5C 800C615C 03002825 */ move $a1, $t8 -.L800C6160: -/* 0C6D60 800C6160 8FBF0024 */ lw $ra, 0x24($sp) -/* 0C6D64 800C6164 8FB00020 */ lw $s0, 0x20($sp) -/* 0C6D68 800C6168 03E00008 */ jr $ra -/* 0C6D6C 800C616C 27BD0030 */ addiu $sp, $sp, 0x30 - diff --git a/data/dkr.data.s b/data/dkr.data.s index 4b21f122..b7d1503d 100644 --- a/data/dkr.data.s +++ b/data/dkr.data.s @@ -9210,7 +9210,7 @@ glabel D_800E47B0 .word 0x000E0204 .word 0x00000002 -glabel D_800E4800 +glabel __osPiAccessQueueEnabled .word 0x00000000 .word 0x00000000 .word 0x00000000 diff --git a/find_sym.sh b/find_sym.sh new file mode 100755 index 00000000..0d1b4c80 --- /dev/null +++ b/find_sym.sh @@ -0,0 +1,13 @@ +#!/bin/bash + +shopt -s globstar + +if [ "$#" -ne "1" ]; +then + echo "usage: $0 name" + exit 1 +fi + +#echo "Replace $1 with $2?" +#read +grep -r "$1" asm/**/*.s src/**/*.c lib/**/*.{c,s} include/*.h data/dkr.data.s undefined_syms.txt \ No newline at end of file diff --git a/lib/asm/non_matchings/unknown_0D3160/D_800D25A0.s b/lib/asm/non_matchings/unknown_0D3160/D_800D25A0.s deleted file mode 100644 index e8ab3292..00000000 --- a/lib/asm/non_matchings/unknown_0D3160/D_800D25A0.s +++ /dev/null @@ -1,65 +0,0 @@ -glabel D_800D25A0 -/* 0D31A0 800D25A0 27BDFFD8 */ addiu $sp, $sp, -0x28 -/* 0D31A4 800D25A4 AFBF001C */ sw $ra, 0x1c($sp) -/* 0D31A8 800D25A8 AFA40028 */ sw $a0, 0x28($sp) -/* 0D31AC 800D25AC AFA5002C */ sw $a1, 0x2c($sp) -/* 0D31B0 800D25B0 AFA60030 */ sw $a2, 0x30($sp) -/* 0D31B4 800D25B4 AFA70034 */ sw $a3, 0x34($sp) -/* 0D31B8 800D25B8 AFB10018 */ sw $s1, 0x18($sp) -/* 0D31BC 800D25BC AFB00014 */ sw $s0, 0x14($sp) -/* 0D31C0 800D25C0 3C0EA460 */ lui $t6, %hi(D_A4600010) # $t6, 0xa460 -/* 0D31C4 800D25C4 8DD00010 */ lw $s0, %lo(D_A4600010)($t6) -/* 0D31C8 800D25C8 320F0003 */ andi $t7, $s0, 3 -/* 0D31CC 800D25CC 11E00006 */ beqz $t7, .L800D25E8 -/* 0D31D0 800D25D0 00000000 */ nop -.L800D25D4: -/* 0D31D4 800D25D4 3C18A460 */ lui $t8, %hi(D_A4600010) # $t8, 0xa460 -/* 0D31D8 800D25D8 8F100010 */ lw $s0, %lo(D_A4600010)($t8) -/* 0D31DC 800D25DC 32190003 */ andi $t9, $s0, 3 -/* 0D31E0 800D25E0 1720FFFC */ bnez $t9, .L800D25D4 -/* 0D31E4 800D25E4 00000000 */ nop -.L800D25E8: -/* 0D31E8 800D25E8 0C03233C */ jal osVirtualToPhysical -/* 0D31EC 800D25EC 8FA40030 */ lw $a0, 0x30($sp) -/* 0D31F0 800D25F0 3C08A460 */ lui $t0, 0xa460 -/* 0D31F4 800D25F4 AD020000 */ sw $v0, ($t0) -/* 0D31F8 800D25F8 3C098000 */ lui $t1, %hi(osRomBase) # $t1, 0x8000 -/* 0D31FC 800D25FC 8D290308 */ lw $t1, %lo(osRomBase)($t1) -/* 0D3200 800D2600 8FAA002C */ lw $t2, 0x2c($sp) -/* 0D3204 800D2604 3C011FFF */ lui $at, (0x1FFFFFFF >> 16) # lui $at, 0x1fff -/* 0D3208 800D2608 3421FFFF */ ori $at, (0x1FFFFFFF & 0xFFFF) # ori $at, $at, 0xffff -/* 0D320C 800D260C 012A5825 */ or $t3, $t1, $t2 -/* 0D3210 800D2610 01616024 */ and $t4, $t3, $at -/* 0D3214 800D2614 3C0DA460 */ lui $t5, %hi(D_A4600004) # $t5, 0xa460 -/* 0D3218 800D2618 ADAC0004 */ sw $t4, %lo(D_A4600004)($t5) -/* 0D321C 800D261C 8FB10028 */ lw $s1, 0x28($sp) -/* 0D3220 800D2620 12200005 */ beqz $s1, .L800D2638 -/* 0D3224 800D2624 24010001 */ li $at, 1 -/* 0D3228 800D2628 12210008 */ beq $s1, $at, .L800D264C -/* 0D322C 800D262C 00000000 */ nop -/* 0D3230 800D2630 1000000B */ b .L800D2660 -/* 0D3234 800D2634 00000000 */ nop -.L800D2638: -/* 0D3238 800D2638 8FAE0034 */ lw $t6, 0x34($sp) -/* 0D323C 800D263C 3C18A460 */ lui $t8, %hi(D_A460000C) # $t8, 0xa460 -/* 0D3240 800D2640 25CFFFFF */ addiu $t7, $t6, -1 -/* 0D3244 800D2644 10000008 */ b .L800D2668 -/* 0D3248 800D2648 AF0F000C */ sw $t7, %lo(D_A460000C)($t8) -.L800D264C: -/* 0D324C 800D264C 8FB90034 */ lw $t9, 0x34($sp) -/* 0D3250 800D2650 3C09A460 */ lui $t1, %hi(D_A4600008) # $t1, 0xa460 -/* 0D3254 800D2654 2728FFFF */ addiu $t0, $t9, -1 -/* 0D3258 800D2658 10000003 */ b .L800D2668 -/* 0D325C 800D265C AD280008 */ sw $t0, %lo(D_A4600008)($t1) -.L800D2660: -/* 0D3260 800D2660 10000002 */ b .L800D266C -/* 0D3264 800D2664 2402FFFF */ li $v0, -1 -.L800D2668: -/* 0D3268 800D2668 00001025 */ move $v0, $zero -.L800D266C: -/* 0D326C 800D266C 8FBF001C */ lw $ra, 0x1c($sp) -/* 0D3270 800D2670 8FB00014 */ lw $s0, 0x14($sp) -/* 0D3274 800D2674 8FB10018 */ lw $s1, 0x18($sp) -/* 0D3278 800D2678 03E00008 */ jr $ra -/* 0D327C 800D267C 27BD0028 */ addiu $sp, $sp, 0x28 - diff --git a/lib/asm/non_matchings/unknown_0D3160/D_800D2760.s b/lib/asm/non_matchings/unknown_0D3160/__osDevMgrMain.s similarity index 99% rename from lib/asm/non_matchings/unknown_0D3160/D_800D2760.s rename to lib/asm/non_matchings/unknown_0D3160/__osDevMgrMain.s index ad5c61a0..665b2cf6 100644 --- a/lib/asm/non_matchings/unknown_0D3160/D_800D2760.s +++ b/lib/asm/non_matchings/unknown_0D3160/__osDevMgrMain.s @@ -1,4 +1,4 @@ -glabel D_800D2760 +glabel __osDevMgrMain /* 0D3360 800D2760 27BDFFC0 */ addiu $sp, $sp, -0x40 /* 0D3364 800D2764 AFA40040 */ sw $a0, 0x40($sp) /* 0D3368 800D2768 8FAE0040 */ lw $t6, 0x40($sp) diff --git a/lib/asm/non_matchings/unknown_0D3160/D_800D2680.s b/lib/asm/non_matchings/unknown_0D3160/osEPiRawStartDma.s similarity index 99% rename from lib/asm/non_matchings/unknown_0D3160/D_800D2680.s rename to lib/asm/non_matchings/unknown_0D3160/osEPiRawStartDma.s index 2303577a..5cd21a7c 100644 --- a/lib/asm/non_matchings/unknown_0D3160/D_800D2680.s +++ b/lib/asm/non_matchings/unknown_0D3160/osEPiRawStartDma.s @@ -1,4 +1,4 @@ -glabel D_800D2680 +glabel osEPiRawStartDma /* 0D3280 800D2680 27BDFFD8 */ addiu $sp, $sp, -0x28 /* 0D3284 800D2684 AFBF001C */ sw $ra, 0x1c($sp) /* 0D3288 800D2688 AFA40028 */ sw $a0, 0x28($sp) diff --git a/lib/src/unknown_0D3020.c b/lib/src/unknown_0D3020.c index 8ec1b3ad..6cc413d8 100644 --- a/lib/src/unknown_0D3020.c +++ b/lib/src/unknown_0D3020.c @@ -8,26 +8,26 @@ GLOBAL_ASM("lib/asm/non_matchings/unknown_0D3020/func_800D2470.s") #define PI_Q_BUF_LEN 1 -extern u32 D_800E4800;//__osPiAccessQueueEnabled +extern u32 __osPiAccessQueueEnabled;//__osPiAccessQueueEnabled extern OSMesg D_8012D1E0[PI_Q_BUF_LEN];//piAccessBuf -extern OSMesgQueue D_8012D1E8; //__osPiAccessQueue +extern OSMesgQueue piAccessQueue; //__osPiAccessQueue void __osPiCreateAccessQueue(void) { - D_800E4800 = 1; - osCreateMesgQueue(&D_8012D1E8, D_8012D1E0, PI_Q_BUF_LEN); - osSendMesg(&D_8012D1E8, NULL, OS_MESG_NOBLOCK); + __osPiAccessQueueEnabled = 1; + osCreateMesgQueue(&piAccessQueue, D_8012D1E0, PI_Q_BUF_LEN); + osSendMesg(&piAccessQueue, NULL, OS_MESG_NOBLOCK); } void __osPiGetAccess(void) { OSMesg dummyMesg; - if (!D_800E4800) + if (!__osPiAccessQueueEnabled) __osPiCreateAccessQueue(); - osRecvMesg(&D_8012D1E8, &dummyMesg, OS_MESG_BLOCK); + osRecvMesg(&piAccessQueue, &dummyMesg, OS_MESG_BLOCK); } void __osPiRelAccess(void) { - osSendMesg(&D_8012D1E8, NULL, OS_MESG_NOBLOCK); + osSendMesg(&piAccessQueue, NULL, OS_MESG_NOBLOCK); } \ No newline at end of file diff --git a/lib/src/unknown_0D3160.c b/lib/src/unknown_0D3160.c index 1144b763..b9db571d 100644 --- a/lib/src/unknown_0D3160.c +++ b/lib/src/unknown_0D3160.c @@ -4,12 +4,39 @@ #include "types.h" #include "macros.h" #include "libultra_internal.h" +#include "hardware.h" GLOBAL_ASM("lib/asm/non_matchings/unknown_0D3160/__osDisableInt.s") GLOBAL_ASM("lib/asm/non_matchings/unknown_0D3160/__osRestoreInt.s") -GLOBAL_ASM("lib/asm/non_matchings/unknown_0D3160/D_800D25A0.s") -GLOBAL_ASM("lib/asm/non_matchings/unknown_0D3160/D_800D2680.s") -GLOBAL_ASM("lib/asm/non_matchings/unknown_0D3160/D_800D2760.s") + +s32 osPiRawStartDma(s32 direction, u32 devAddr, void *dramAddr, u32 size) +{ + register int status; + status = HW_REG(PI_STATUS_REG, u32); + while (status & (PI_STATUS_BUSY | PI_STATUS_IOBUSY | PI_STATUS_ERROR)) { + status = HW_REG(PI_STATUS_REG, u32); + } + + HW_REG(PI_DRAM_ADDR_REG, void *) = (void *) osVirtualToPhysical(dramAddr); + + HW_REG(PI_CART_ADDR_REG, void *) = (void *) (((uintptr_t) osRomBase | devAddr) & 0x1fffffff); + + switch (direction) { + case OS_READ: + HW_REG(PI_WR_LEN_REG, u32) = size - 1; + break; + case OS_WRITE: + HW_REG(PI_RD_LEN_REG, u32) = size - 1; + break; + default: + return -1; + break; + } + return 0; +} + +GLOBAL_ASM("lib/asm/non_matchings/unknown_0D3160/osEPiRawStartDma.s") +GLOBAL_ASM("lib/asm/non_matchings/unknown_0D3160/__osDevMgrMain.s") GLOBAL_ASM("lib/asm/non_matchings/unknown_0D3160/__osViInit.s") GLOBAL_ASM("lib/asm/non_matchings/unknown_0D3160/func_800D2C60.s") diff --git a/src/unknown_0B8920.c b/src/unknown_0B8920.c index 0c3d4ab4..00d6d051 100644 --- a/src/unknown_0B8920.c +++ b/src/unknown_0B8920.c @@ -3,6 +3,18 @@ #include "types.h" #include "macros.h" +#include "libultra_internal.h" + +#define OS_PIM_STACKSIZE 4096 + +extern u32 __osPiAccessQueueEnabled; //__osPiAccessQueueEnabled +extern OSDevMgr __osPiDevMgr; +extern u8 piThreadStack[OS_PIM_STACKSIZE];//piThreadStack +extern OSThread piThread; //piThread +extern OSMesgQueue piEventQueue; //piEventQueue +extern OSMesg piEventBuf[1]; //piEventBuf +extern OSMesgQueue piAccessQueue; //piAccessQueue +void __osDevMgrMain(void); extern s32* D_800E3040; extern s32* D_800E3044; @@ -233,7 +245,44 @@ GLOBAL_ASM("asm/non_matchings/unknown_0B8920/func_800C5AA0.s") GLOBAL_ASM("asm/non_matchings/unknown_0B8920/func_800C5B58.s") GLOBAL_ASM("asm/non_matchings/unknown_0B8920/func_800C5F60.s") -GLOBAL_ASM("asm/non_matchings/unknown_0B8920/osCreatePiManager.s") +void osCreatePiManager(OSPri pri, OSMesgQueue *cmdQ, OSMesg *cmdBuf, s32 cmdMsgCnt) +{ + u32 savedMask; + OSPri oldPri; + OSPri myPri; + if (!__osPiDevMgr.active) + { + osCreateMesgQueue(cmdQ, cmdBuf, cmdMsgCnt); + osCreateMesgQueue(&piEventQueue, (OSMesg*)&piEventBuf, 1); + if (!__osPiAccessQueueEnabled) + __osPiCreateAccessQueue(); + osSetEventMesg(OS_EVENT_PI, &piEventQueue, (OSMesg)0x22222222); + oldPri = -1; + myPri = osGetThreadPri(NULL); + if (myPri < pri) + { + oldPri = myPri; + osSetThreadPri(NULL, pri); + } + savedMask = __osDisableInt(); + __osPiDevMgr.active = 1; + __osPiDevMgr.thread = &piThread; + __osPiDevMgr.cmdQueue = cmdQ; + __osPiDevMgr.evtQueue = &piEventQueue; + __osPiDevMgr.acsQueue = &piAccessQueue; + __osPiDevMgr.dma = osPiRawStartDma; + __osPiDevMgr.edma = osEPiRawStartDma; + + osCreateThread(&piThread, 0, __osDevMgrMain, &__osPiDevMgr, &piThreadStack[OS_PIM_STACKSIZE], pri); + osStartThread(&piThread); + __osRestoreInt(savedMask); + if (oldPri != -1) + { + osSetThreadPri(NULL, oldPri); + } + } +} + void func_800C6170(void) { D_800E3760 = func_80070C9C(0x2800, 0xFF); diff --git a/undefined_syms.txt b/undefined_syms.txt index 183b9c87..c02ecb5b 100755 --- a/undefined_syms.txt +++ b/undefined_syms.txt @@ -60,9 +60,9 @@ D_800CC3C0 = 0x800CC3C0; D_800CC4E0 = 0x800CC4E0; D_800CC514 = 0x800CC514; viMgrMain = 0x800D1B08; -D_800D25A0 = 0x800D25A0; -D_800D2680 = 0x800D2680; -D_800D2760 = 0x800D2760; +osPiRawStartDma = 0x800D25A0; +osEPiRawStartDma = 0x800D2680; +__osDevMgrMain = 0x800D2760; __osExceptionPreamble = 0x800D2CB0; __osException = 0x800D2CC0; __osCleanupThread = 0x800D35A0; @@ -780,7 +780,7 @@ D_800E46C0 = 0x800E46C0; D_800E4710 = 0x800E4710; D_800E4760 = 0x800E4760; D_800E47B0 = 0x800E47B0; -D_800E4800 = 0x800E4800; +__osPiAccessQueueEnabled = 0x800E4800; D_800E4810 = 0x800E4810; D_800E4870 = 0x800E4870; D_800E4874 = 0x800E4874; @@ -2692,6 +2692,7 @@ D_8012991C = 0x8012991C; D_80129920 = 0x80129920; D_80129924 = 0x80129924; D_801299B0 = 0x801299B0; +piThreadStack = 0x80129AB0; D_80129BB0 = 0x80129BB0; D_80129FB0 = 0x80129FB0; D_80129FBC = 0x80129FBC; @@ -2799,9 +2800,9 @@ D_8012A7E8 = 0x8012A7E8; D_8012A7EC = 0x8012A7EC; D_8012A7F0 = 0x8012A7F0; D_8012A7F4 = 0x8012A7F4; -D_8012A800 = 0x8012A800; -D_8012AAB0 = 0x8012AAB0; -D_8012AAC8 = 0x8012AAC8; +piThread = 0x8012A800; +piEventQueue = 0x8012AAB0; +piEventBuf = 0x8012AAC8; gzip_bit_buffer = 0x8012AAD0; gzip_num_bits = 0x8012AAD4; D_8012AAD8 = 0x8012AAD8; @@ -2832,7 +2833,7 @@ viCounterMsg = 0x8012D178; D_8012D190 = 0x8012D190; D_8012D1A0 = 0x8012D1A0; D_8012D1E0 = 0x8012D1E0; -D_8012D1E8 = 0x8012D1E8; +piAccessQueue = 0x8012D1E8; __osCurrentTime = 0x8012D220; D_8012D224 = 0x8012D224; __osBaseCounter = 0x8012D228; From a616a3a5dc372b12e3a2c9aa2b5bb16638a88769 Mon Sep 17 00:00:00 2001 From: Mittenshugg Date: Tue, 4 Aug 2020 20:36:00 -0500 Subject: [PATCH 11/12] libaudio labeling --- .../unknown_001050/func_80000450.s | 4 +- .../unknown_001050/func_80002224.s | 2 +- asm/non_matchings/unknown_003260/D_80002E38.s | 4 +- asm/non_matchings/unknown_003260/D_800033C8.s | 4 +- .../{func_800031C0.s => alSndpNew.s} | 18 ++++---- .../unknown_003260/func_80002660.s | 10 ++--- .../unknown_003260/func_80003040.s | 4 +- .../unknown_003260/func_80003470.s | 12 ++--- .../unknown_003260/func_8000418C.s | 2 +- .../unknown_003260/func_800041FC.s | 4 +- .../unknown_003260/func_80004384.s | 2 +- .../unknown_003260/func_80004520.s | 2 +- .../unknown_003260/func_80004668.s | 6 +-- .../unknown_003260/func_8000488C.s | 2 +- .../unknown_003260/func_800048D8.s | 2 +- .../unknown_003260/func_800049F8.s | 2 +- .../unknown_003260/func_80004A60.s | 2 +- .../{func_8000AE90.s => __initChanState.s} | 2 +- .../unknown_005740/func_8000AB00.s | 6 +-- .../unknown_005740/func_8000AC34.s | 4 +- .../unknown_005740/func_8000AEFC.s | 4 +- asm/non_matchings/unknown_061D30/D_80062408.s | 10 ++--- .../unknown_061D30/func_80062290.s | 12 ++--- .../unknown_061D30/func_800629CC.s | 2 +- .../unknown_061D30/func_80062A3C.s | 2 +- .../unknown_061D30/func_80062B00.s | 8 ++-- .../unknown_061D30/func_800637EC.s | 4 +- .../unknown_061D30/func_80063984.s | 4 +- .../unknown_0646F0/func_80063AF0.s | 2 +- .../unknown_0646F0/func_80063B44.s | 2 +- .../{func_80065130.s => alSynNew.s} | 44 +++++++++---------- .../unknown_065D30/func_800656BC.s | 4 +- .../unknown_065D30/func_8006571C.s | 4 +- .../{D_800659D4.s => alAuxBusParam.s} | 2 +- .../unknown_066500/func_80065A80.s | 4 +- .../{func_800C77F0.s => alHeapDBAlloc.s} | 2 +- .../unknown_0C8450/func_800C7850.s | 2 +- .../unknown_0C84E0/func_800C78E0.s | 2 +- .../unknown_0C8540/func_800C7940.s | 2 +- .../unknown_0C85E0/func_800C79E0.s | 2 +- .../unknown_0C8660/func_800C7A60.s | 2 +- .../unknown_0C9160/func_800C8560.s | 2 +- .../{func_800C8790.s => alLink.s} | 2 +- .../{func_800C8760.s => alUnlink.s} | 2 +- .../unknown_0C91A0/func_800C85A0.s | 2 +- .../unknown_0C91A0/func_800C85D0.s | 2 +- .../unknown_0C91A0/func_800C87EC.s | 2 +- .../{func_800C935C.s => alEvtqNew.s} | 4 +- .../{func_800C92D0.s => alEvtqNextEvent.s} | 8 ++-- .../{func_800C91AC.s => alEvtqPostEvent.s} | 10 ++--- .../{func_800C93D0.s => alSynAddPlayer.s} | 2 +- .../unknown_0C9C90/func_800C9090.s | 8 ++-- .../unknown_0C9C90/func_800C9420.s | 8 ++-- .../{D_800CAA7C.s => alEnvmixerParam.s} | 2 +- .../{D_800CB540.s => alLoadParam.s} | 4 +- .../{D_800CC090.s => alResampleParam.s} | 2 +- .../{D_800CC4E0.s => alSaveParam.s} | 2 +- ...nc_800D6500.s => __osResetGlobalIntMask.s} | 2 +- .../{func_800D6560.s => osEPiRawWriteIo.s} | 2 +- .../{func_800D65B0.s => osYieldThread.s} | 2 +- .../unknown_0D3160/__osDevMgrMain.s | 6 +-- .../{func_800D3820.s => alCopy.s} | 2 +- lib/src/unknown_0C91A0.c | 4 +- lib/src/unknown_0C9C90.c | 8 ++-- lib/src/unknown_0CA9A0.c | 6 +-- lib/src/unknown_0CCF90.c | 2 +- lib/src/unknown_0D43F0.c | 2 +- lib/src/unknown_0D5EC0.c | 6 +-- src/unknown_003260.c | 2 +- src/unknown_005740.c | 2 +- src/unknown_064690.c | 2 +- src/unknown_0647A0.c | 2 +- src/unknown_064830.c | 40 ++++++++--------- src/unknown_065D30.c | 2 +- src/unknown_066500.c | 2 +- src/unknown_0C83F0.c | 2 +- undefined_syms.txt | 10 ++--- 77 files changed, 191 insertions(+), 191 deletions(-) rename asm/non_matchings/unknown_003260/{func_800031C0.s => alSndpNew.s} (93%) rename asm/non_matchings/unknown_005740/{func_8000AE90.s => __initChanState.s} (98%) rename asm/non_matchings/unknown_065D30/{func_80065130.s => alSynNew.s} (90%) rename asm/non_matchings/unknown_066500/{D_800659D4.s => alAuxBusParam.s} (99%) rename asm/non_matchings/unknown_0C83F0/{func_800C77F0.s => alHeapDBAlloc.s} (98%) rename lib/asm/non_matchings/unknown_0C91A0/{func_800C8790.s => alLink.s} (95%) rename lib/asm/non_matchings/unknown_0C91A0/{func_800C8760.s => alUnlink.s} (96%) rename lib/asm/non_matchings/unknown_0C9C90/{func_800C935C.s => alEvtqNew.s} (95%) rename lib/asm/non_matchings/unknown_0C9C90/{func_800C92D0.s => alEvtqNextEvent.s} (90%) rename lib/asm/non_matchings/unknown_0C9C90/{func_800C91AC.s => alEvtqPostEvent.s} (94%) rename lib/asm/non_matchings/unknown_0C9C90/{func_800C93D0.s => alSynAddPlayer.s} (97%) rename lib/asm/non_matchings/unknown_0CA9A0/{D_800CAA7C.s => alEnvmixerParam.s} (99%) rename lib/asm/non_matchings/unknown_0CA9A0/{D_800CB540.s => alLoadParam.s} (98%) rename lib/asm/non_matchings/unknown_0CA9A0/{D_800CC090.s => alResampleParam.s} (99%) rename lib/asm/non_matchings/unknown_0CCF90/{D_800CC4E0.s => alSaveParam.s} (97%) rename lib/asm/non_matchings/unknown_0D3020/{func_800D6500.s => __osResetGlobalIntMask.s} (97%) rename lib/asm/non_matchings/unknown_0D3020/{func_800D6560.s => osEPiRawWriteIo.s} (97%) rename lib/asm/non_matchings/unknown_0D3020/{func_800D65B0.s => osYieldThread.s} (98%) rename lib/asm/non_matchings/unknown_0D43F0/{func_800D3820.s => alCopy.s} (98%) diff --git a/asm/non_matchings/unknown_001050/func_80000450.s b/asm/non_matchings/unknown_001050/func_80000450.s index 203fa2cd..ed42207b 100644 --- a/asm/non_matchings/unknown_001050/func_80000450.s +++ b/asm/non_matchings/unknown_001050/func_80000450.s @@ -111,7 +111,7 @@ glabel func_80000450 /* 001204 80000604 24C65CE8 */ addiu $a2, %lo(D_80115CE8) # addiu $a2, $a2, 0x5ce8 /* 001208 80000608 00002025 */ move $a0, $zero /* 00120C 8000060C 00002825 */ move $a1, $zero -/* 001210 80000610 0C031DFC */ jal func_800C77F0 +/* 001210 80000610 0C031DFC */ jal alHeapDBAlloc /* 001214 80000614 24070001 */ li $a3, 1 /* 001218 80000618 3C108011 */ lui $s0, %hi(D_80115CF8) # $s0, 0x8011 /* 00121C 8000061C 26105CF8 */ addiu $s0, %lo(D_80115CF8) # addiu $s0, $s0, 0x5cf8 @@ -247,7 +247,7 @@ glabel func_80000450 /* 001414 80000814 AFAC0054 */ sw $t4, 0x54($sp) /* 001418 80000818 A7AD005C */ sh $t5, 0x5c($sp) /* 00141C 8000081C AFAE0058 */ sw $t6, 0x58($sp) -/* 001420 80000820 0C000C70 */ jal func_800031C0 +/* 001420 80000820 0C000C70 */ jal alSndpNew /* 001424 80000824 27A4004C */ addiu $a0, $sp, 0x4c /* 001428 80000828 0C000A94 */ jal func_80002A50 /* 00142C 8000082C 00000000 */ nop diff --git a/asm/non_matchings/unknown_001050/func_80002224.s b/asm/non_matchings/unknown_001050/func_80002224.s index 7e0afa76..65a078c9 100644 --- a/asm/non_matchings/unknown_001050/func_80002224.s +++ b/asm/non_matchings/unknown_001050/func_80002224.s @@ -18,7 +18,7 @@ glabel func_80002224 /* 002E64 80002264 AFB90010 */ sw $t9, 0x10($sp) /* 002E68 80002268 00002025 */ move $a0, $zero /* 002E6C 8000226C 00002825 */ move $a1, $zero -/* 002E70 80002270 0C031DFC */ jal func_800C77F0 +/* 002E70 80002270 0C031DFC */ jal alHeapDBAlloc /* 002E74 80002274 24070001 */ li $a3, 1 /* 002E78 80002278 AFA20044 */ sw $v0, 0x44($sp) /* 002E7C 8000227C 00402025 */ move $a0, $v0 diff --git a/asm/non_matchings/unknown_003260/D_80002E38.s b/asm/non_matchings/unknown_003260/D_80002E38.s index 7c14eb84..aadd9e7c 100644 --- a/asm/non_matchings/unknown_003260/D_80002E38.s +++ b/asm/non_matchings/unknown_003260/D_80002E38.s @@ -56,7 +56,7 @@ glabel D_80002E38 /* 003AFC 80002EFC 8E0B0000 */ lw $t3, ($s0) /* 003B00 80002F00 AFA70050 */ sw $a3, 0x50($sp) /* 003B04 80002F04 AFA60038 */ sw $a2, 0x38($sp) -/* 003B08 80002F08 0C0321D8 */ jal func_800C8760 +/* 003B08 80002F08 0C0321D8 */ jal alUnlink /* 003B0C 80002F0C AD2B0008 */ sw $t3, 8($t1) /* 003B10 80002F10 8FA60038 */ lw $a2, 0x38($sp) /* 003B14 80002F14 8FA70050 */ lw $a3, 0x50($sp) @@ -65,7 +65,7 @@ glabel D_80002E38 /* 003B20 80002F20 25299230 */ addiu $t1, %lo(D_80119230) # addiu $t1, $t1, -0x6dd0 /* 003B24 80002F24 02002025 */ move $a0, $s0 /* 003B28 80002F28 00C02825 */ move $a1, $a2 -/* 003B2C 80002F2C 0C0321E4 */ jal func_800C8790 +/* 003B2C 80002F2C 0C0321E4 */ jal alLink /* 003B30 80002F30 AFA70050 */ sw $a3, 0x50($sp) /* 003B34 80002F34 8FA70050 */ lw $a3, 0x50($sp) /* 003B38 80002F38 1000000E */ b .L80002F74 diff --git a/asm/non_matchings/unknown_003260/D_800033C8.s b/asm/non_matchings/unknown_003260/D_800033C8.s index 475af17a..91482555 100644 --- a/asm/non_matchings/unknown_003260/D_800033C8.s +++ b/asm/non_matchings/unknown_003260/D_800033C8.s @@ -19,7 +19,7 @@ glabel D_800033C8 /* 004008 80003408 A7AF003C */ sh $t7, 0x3c($sp) /* 00400C 8000340C 8E06004C */ lw $a2, 0x4c($s0) /* 004010 80003410 02402025 */ move $a0, $s2 -/* 004014 80003414 0C03246B */ jal func_800C91AC +/* 004014 80003414 0C03246B */ jal alEvtqPostEvent /* 004018 80003418 02802825 */ move $a1, $s4 /* 00401C 8000341C 10000004 */ b .L80003430 /* 004020 80003420 02402025 */ move $a0, $s2 @@ -28,7 +28,7 @@ glabel D_800033C8 /* 004028 80003428 02202825 */ move $a1, $s1 /* 00402C 8000342C 02402025 */ move $a0, $s2 .L80003430: -/* 004030 80003430 0C0324B4 */ jal func_800C92D0 +/* 004030 80003430 0C0324B4 */ jal alEvtqNextEvent /* 004034 80003434 02202825 */ move $a1, $s1 /* 004038 80003438 1040FFEF */ beqz $v0, .L800033F8 /* 00403C 8000343C AE020050 */ sw $v0, 0x50($s0) diff --git a/asm/non_matchings/unknown_003260/func_800031C0.s b/asm/non_matchings/unknown_003260/alSndpNew.s similarity index 93% rename from asm/non_matchings/unknown_003260/func_800031C0.s rename to asm/non_matchings/unknown_003260/alSndpNew.s index 81584ac8..4b3668bb 100644 --- a/asm/non_matchings/unknown_003260/func_800031C0.s +++ b/asm/non_matchings/unknown_003260/alSndpNew.s @@ -1,4 +1,4 @@ -glabel func_800031C0 +glabel alSndpNew /* 003DC0 800031C0 27BDFFB0 */ addiu $sp, $sp, -0x50 /* 003DC4 800031C4 AFB20028 */ sw $s2, 0x28($sp) /* 003DC8 800031C8 3C12800E */ lui $s2, %hi(D_800DC6BC) # $s2, 0x800e @@ -24,7 +24,7 @@ glabel func_800031C0 /* 003E18 80003218 8E26000C */ lw $a2, 0xc($s1) /* 003E1C 8000321C 000B6180 */ sll $t4, $t3, 6 /* 003E20 80003220 AFAC0010 */ sw $t4, 0x10($sp) -/* 003E24 80003224 0C031DFC */ jal func_800C77F0 +/* 003E24 80003224 0C031DFC */ jal alHeapDBAlloc /* 003E28 80003228 24070001 */ li $a3, 1 /* 003E2C 8000322C 8E4D0000 */ lw $t5, ($s2) /* 003E30 80003230 00002025 */ move $a0, $zero @@ -36,12 +36,12 @@ glabel func_800031C0 /* 003E48 80003248 000F7880 */ sll $t7, $t7, 2 /* 003E4C 8000324C AFAF0010 */ sw $t7, 0x10($sp) /* 003E50 80003250 00002825 */ move $a1, $zero -/* 003E54 80003254 0C031DFC */ jal func_800C77F0 +/* 003E54 80003254 0C031DFC */ jal alHeapDBAlloc /* 003E58 80003258 24070001 */ li $a3, 1 /* 003E5C 8000325C 8E440000 */ lw $a0, ($s2) /* 003E60 80003260 8E260004 */ lw $a2, 4($s1) /* 003E64 80003264 00402825 */ move $a1, $v0 -/* 003E68 80003268 0C0324D7 */ jal func_800C935C +/* 003E68 80003268 0C0324D7 */ jal alEvtqNew /* 003E6C 8000326C 24840014 */ addiu $a0, $a0, 0x14 /* 003E70 80003270 8E580000 */ lw $t8, ($s2) /* 003E74 80003274 3C01800E */ lui $at, %hi(D_800DC6B8) # $at, 0x800e @@ -59,7 +59,7 @@ glabel func_800031C0 /* 003EA0 800032A0 8D220040 */ lw $v0, 0x40($t1) /* 003EA4 800032A4 00000000 */ nop /* 003EA8 800032A8 01422021 */ addu $a0, $t2, $v0 -/* 003EAC 800032AC 0C0321E4 */ jal func_800C8790 +/* 003EAC 800032AC 0C0321E4 */ jal alLink /* 003EB0 800032B0 2485FFC0 */ addiu $a1, $a0, -0x40 /* 003EB4 800032B4 8E2B0000 */ lw $t3, ($s1) /* 003EB8 800032B8 26100001 */ addiu $s0, $s0, 1 @@ -72,7 +72,7 @@ glabel func_800031C0 /* 003ED0 800032D0 00002025 */ move $a0, $zero /* 003ED4 800032D4 00002825 */ move $a1, $zero /* 003ED8 800032D8 24070002 */ li $a3, 2 -/* 003EDC 800032DC 0C031DFC */ jal func_800C77F0 +/* 003EDC 800032DC 0C031DFC */ jal alHeapDBAlloc /* 003EE0 800032E0 AFAC0010 */ sw $t4, 0x10($sp) /* 003EE4 800032E4 3C048012 */ lui $a0, %hi(D_80119C28) # $a0, 0x8012 /* 003EE8 800032E8 24849C28 */ addiu $a0, %lo(D_80119C28) # addiu $a0, $a0, -0x63d8 @@ -110,19 +110,19 @@ glabel func_800031C0 /* 003F60 80003360 8E500000 */ lw $s0, ($s2) /* 003F64 80003364 00000000 */ nop /* 003F68 80003368 8E040038 */ lw $a0, 0x38($s0) -/* 003F6C 8000336C 0C0324F4 */ jal func_800C93D0 +/* 003F6C 8000336C 0C0324F4 */ jal alSynAddPlayer /* 003F70 80003370 02002825 */ move $a1, $s0 /* 003F74 80003374 8E500000 */ lw $s0, ($s2) /* 003F78 80003378 240C0020 */ li $t4, 32 /* 003F7C 8000337C A7AC0038 */ sh $t4, 0x38($sp) /* 003F80 80003380 8E06004C */ lw $a2, 0x4c($s0) /* 003F84 80003384 27A50038 */ addiu $a1, $sp, 0x38 -/* 003F88 80003388 0C03246B */ jal func_800C91AC +/* 003F88 80003388 0C03246B */ jal alEvtqPostEvent /* 003F8C 8000338C 26040014 */ addiu $a0, $s0, 0x14 /* 003F90 80003390 8E500000 */ lw $s0, ($s2) /* 003F94 80003394 00000000 */ nop /* 003F98 80003398 26040014 */ addiu $a0, $s0, 0x14 -/* 003F9C 8000339C 0C0324B4 */ jal func_800C92D0 +/* 003F9C 8000339C 0C0324B4 */ jal alEvtqNextEvent /* 003FA0 800033A0 26050028 */ addiu $a1, $s0, 0x28 /* 003FA4 800033A4 8E4D0000 */ lw $t5, ($s2) /* 003FA8 800033A8 00000000 */ nop diff --git a/asm/non_matchings/unknown_003260/func_80002660.s b/asm/non_matchings/unknown_003260/func_80002660.s index 3da9e7ff..5c292b13 100644 --- a/asm/non_matchings/unknown_003260/func_80002660.s +++ b/asm/non_matchings/unknown_003260/func_80002660.s @@ -117,14 +117,14 @@ glabel func_80002660 /* 003418 80002818 00008825 */ move $s1, $zero .L8000281C: /* 00341C 8000281C 02002025 */ move $a0, $s0 -/* 003420 80002820 0C0321E4 */ jal func_800C8790 +/* 003420 80002820 0C0321E4 */ jal alLink /* 003424 80002824 02402825 */ move $a1, $s2 /* 003428 80002828 8E660014 */ lw $a2, 0x14($s3) /* 00342C 8000282C 240A0400 */ li $t2, 1024 /* 003430 80002830 AFAA0010 */ sw $t2, 0x10($sp) /* 003434 80002834 00002025 */ move $a0, $zero /* 003438 80002838 00002825 */ move $a1, $zero -/* 00343C 8000283C 0C031DFC */ jal func_800C77F0 +/* 00343C 8000283C 0C031DFC */ jal alHeapDBAlloc /* 003440 80002840 24070001 */ li $a3, 1 /* 003444 80002844 26310001 */ addiu $s1, $s1, 1 /* 003448 80002848 2A210031 */ slti $at, $s1, 0x31 @@ -137,7 +137,7 @@ glabel func_80002660 /* 003464 80002864 AFAB0010 */ sw $t3, 0x10($sp) /* 003468 80002868 00002025 */ move $a0, $zero /* 00346C 8000286C 00002825 */ move $a1, $zero -/* 003470 80002870 0C031DFC */ jal func_800C77F0 +/* 003470 80002870 0C031DFC */ jal alHeapDBAlloc /* 003474 80002874 24070001 */ li $a3, 1 /* 003478 80002878 3C048012 */ lui $a0, %hi(D_80119638) # $a0, 0x8012 /* 00347C 8000287C 24849638 */ addiu $a0, %lo(D_80119638) # addiu $a0, $a0, -0x69c8 @@ -185,7 +185,7 @@ glabel func_80002660 /* 003514 80002914 AFAA0010 */ sw $t2, 0x10($sp) /* 003518 80002918 00002025 */ move $a0, $zero /* 00351C 8000291C 00002825 */ move $a1, $zero -/* 003520 80002920 0C031DFC */ jal func_800C77F0 +/* 003520 80002920 0C031DFC */ jal alHeapDBAlloc /* 003524 80002924 24070001 */ li $a3, 1 /* 003528 80002928 26100004 */ addiu $s0, $s0, 4 /* 00352C 8000292C 0211082B */ sltu $at, $s0, $s1 @@ -214,7 +214,7 @@ glabel func_80002660 /* 003584 80002984 AFA3003C */ sw $v1, 0x3c($sp) /* 003588 80002988 00002025 */ move $a0, $zero /* 00358C 8000298C 00002825 */ move $a1, $zero -/* 003590 80002990 0C031DFC */ jal func_800C77F0 +/* 003590 80002990 0C031DFC */ jal alHeapDBAlloc /* 003594 80002994 24070001 */ li $a3, 1 /* 003598 80002998 8FA3003C */ lw $v1, 0x3c($sp) /* 00359C 8000299C AE020008 */ sw $v0, 8($s0) diff --git a/asm/non_matchings/unknown_003260/func_80003040.s b/asm/non_matchings/unknown_003260/func_80003040.s index e62529dd..8afd6898 100644 --- a/asm/non_matchings/unknown_003260/func_80003040.s +++ b/asm/non_matchings/unknown_003260/func_80003040.s @@ -46,13 +46,13 @@ glabel func_80003040 /* 003CE4 800030E4 00000000 */ nop /* 003CE8 800030E8 AE420004 */ sw $v0, 4($s2) .L800030EC: -/* 003CEC 800030EC 0C0321D8 */ jal func_800C8760 +/* 003CEC 800030EC 0C0321D8 */ jal alUnlink /* 003CF0 800030F0 02002025 */ move $a0, $s0 /* 003CF4 800030F4 8E450008 */ lw $a1, 8($s2) /* 003CF8 800030F8 00000000 */ nop /* 003CFC 800030FC 10A00005 */ beqz $a1, .L80003114 /* 003D00 80003100 00000000 */ nop -/* 003D04 80003104 0C0321E4 */ jal func_800C8790 +/* 003D04 80003104 0C0321E4 */ jal alLink /* 003D08 80003108 02002025 */ move $a0, $s0 /* 003D0C 8000310C 10000004 */ b .L80003120 /* 003D10 80003110 00000000 */ nop diff --git a/asm/non_matchings/unknown_003260/func_80003470.s b/asm/non_matchings/unknown_003260/func_80003470.s index 5e8c1ea7..fbffe24f 100644 --- a/asm/non_matchings/unknown_003260/func_80003470.s +++ b/asm/non_matchings/unknown_003260/func_80003470.s @@ -147,7 +147,7 @@ glabel func_80003470 /* 004288 80003688 AE2C0038 */ sw $t4, 0x38($s1) /* 00428C 8000368C 26E40014 */ addiu $a0, $s7, 0x14 /* 004290 80003690 02A02825 */ move $a1, $s5 -/* 004294 80003694 0C03246B */ jal func_800C91AC +/* 004294 80003694 0C03246B */ jal alEvtqPostEvent /* 004298 80003698 34068235 */ li $a2, 33333 /* 00429C 8000369C 10000290 */ b .L800040E0 /* 0042A0 800036A0 8FBF003C */ lw $ra, 0x3c($sp) @@ -175,7 +175,7 @@ glabel func_80003470 /* 0042F0 800036F0 00008025 */ move $s0, $zero /* 0042F4 800036F4 AFA2006C */ sw $v0, 0x6c($sp) /* 0042F8 800036F8 02802825 */ move $a1, $s4 -/* 0042FC 800036FC 0C03246B */ jal func_800C91AC +/* 0042FC 800036FC 0C03246B */ jal alEvtqPostEvent /* 004300 80003700 240603E8 */ li $a2, 1000 /* 004304 80003704 8FA2006C */ lw $v0, 0x6c($sp) /* 004308 80003708 8EE40038 */ lw $a0, 0x38($s7) @@ -197,7 +197,7 @@ glabel func_80003470 /* 004340 80003740 AE390038 */ sw $t9, 0x38($s1) /* 004344 80003744 26E40014 */ addiu $a0, $s7, 0x14 /* 004348 80003748 02A02825 */ move $a1, $s5 -/* 00434C 8000374C 0C03246B */ jal func_800C91AC +/* 00434C 8000374C 0C03246B */ jal alEvtqPostEvent /* 004350 80003750 240603E9 */ li $a2, 1001 /* 004354 80003754 10000262 */ b .L800040E0 /* 004358 80003758 8FBF003C */ lw $ra, 0x3c($sp) @@ -378,7 +378,7 @@ glabel func_80003470 /* 0045E4 800039E4 46005424 */ cvt.w.s $f16, $f10 /* 0045E8 800039E8 44068000 */ mfc1 $a2, $f16 /* 0045EC 800039EC 44CAF800 */ ctc1 $t2, $31 -/* 0045F0 800039F0 0C03246B */ jal func_800C91AC +/* 0045F0 800039F0 0C03246B */ jal alEvtqPostEvent /* 0045F4 800039F4 00000000 */ nop /* 0045F8 800039F8 96A20000 */ lhu $v0, ($s5) /* 0045FC 800039FC 00000000 */ nop @@ -440,7 +440,7 @@ glabel func_80003470 /* 0046CC 80003ACC AFB100B0 */ sw $s1, 0xb0($sp) /* 0046D0 80003AD0 02802025 */ move $a0, $s4 /* 0046D4 80003AD4 27A500AC */ addiu $a1, $sp, 0xac -/* 0046D8 80003AD8 0C03246B */ jal func_800C91AC +/* 0046D8 80003AD8 0C03246B */ jal alEvtqPostEvent /* 0046DC 80003ADC 02003025 */ move $a2, $s0 /* 0046E0 80003AE0 24190002 */ li $t9, 2 /* 0046E4 80003AE4 10000003 */ b .L80003AF4 @@ -776,7 +776,7 @@ glabel func_80003470 /* 004BAC 80003FAC AFB100B0 */ sw $s1, 0xb0($sp) /* 004BB0 80003FB0 02802025 */ move $a0, $s4 /* 004BB4 80003FB4 27A500AC */ addiu $a1, $sp, 0xac -/* 004BB8 80003FB8 0C03246B */ jal func_800C91AC +/* 004BB8 80003FB8 0C03246B */ jal alEvtqPostEvent /* 004BBC 80003FBC 02003025 */ move $a2, $s0 /* 004BC0 80003FC0 9239003E */ lbu $t9, 0x3e($s1) /* 004BC4 80003FC4 00000000 */ nop diff --git a/asm/non_matchings/unknown_003260/func_8000418C.s b/asm/non_matchings/unknown_003260/func_8000418C.s index 32720d3f..953ec77d 100644 --- a/asm/non_matchings/unknown_003260/func_8000418C.s +++ b/asm/non_matchings/unknown_003260/func_8000418C.s @@ -21,7 +21,7 @@ glabel func_8000418C /* 004DD8 800041D8 34068235 */ li $a2, 33333 /* 004DDC 800041DC AFA70024 */ sw $a3, 0x24($sp) /* 004DE0 800041E0 24840014 */ addiu $a0, $a0, 0x14 -/* 004DE4 800041E4 0C03246B */ jal func_800C91AC +/* 004DE4 800041E4 0C03246B */ jal alEvtqPostEvent /* 004DE8 800041E8 AFB90028 */ sw $t9, 0x28($sp) /* 004DEC 800041EC 8FBF0014 */ lw $ra, 0x14($sp) /* 004DF0 800041F0 27BD0030 */ addiu $sp, $sp, 0x30 diff --git a/asm/non_matchings/unknown_003260/func_800041FC.s b/asm/non_matchings/unknown_003260/func_800041FC.s index c3bd5466..ecd35cbc 100644 --- a/asm/non_matchings/unknown_003260/func_800041FC.s +++ b/asm/non_matchings/unknown_003260/func_800041FC.s @@ -35,10 +35,10 @@ glabel func_800041FC /* 004E7C 8000427C 03284821 */ addu $t1, $t9, $t0 /* 004E80 80004280 AE290008 */ sw $t1, 8($s1) .L80004284: -/* 004E84 80004284 0C0321D8 */ jal func_800C8760 +/* 004E84 80004284 0C0321D8 */ jal alUnlink /* 004E88 80004288 02002025 */ move $a0, $s0 /* 004E8C 8000428C 02002025 */ move $a0, $s0 -/* 004E90 80004290 0C0321E4 */ jal func_800C8790 +/* 004E90 80004290 0C0321E4 */ jal alLink /* 004E94 80004294 02402825 */ move $a1, $s2 .L80004298: /* 004E98 80004298 1620FFEA */ bnez $s1, .L80004244 diff --git a/asm/non_matchings/unknown_003260/func_80004384.s b/asm/non_matchings/unknown_003260/func_80004384.s index 9ddf5151..cc7d58d3 100644 --- a/asm/non_matchings/unknown_003260/func_80004384.s +++ b/asm/non_matchings/unknown_003260/func_80004384.s @@ -17,7 +17,7 @@ glabel func_80004384 /* 004FC0 800043C0 3C03800E */ lui $v1, %hi(D_800DC6B0) # $v1, 0x800e /* 004FC4 800043C4 2463C6B0 */ addiu $v1, %lo(D_800DC6B0) # addiu $v1, $v1, -0x3950 /* 004FC8 800043C8 02002025 */ move $a0, $s0 -/* 004FCC 800043CC 0C0321D8 */ jal func_800C8760 +/* 004FCC 800043CC 0C0321D8 */ jal alUnlink /* 004FD0 800043D0 AC6F0008 */ sw $t7, 8($v1) /* 004FD4 800043D4 3C03800E */ lui $v1, %hi(D_800DC6B0) # $v1, 0x800e /* 004FD8 800043D8 2463C6B0 */ addiu $v1, %lo(D_800DC6B0) # addiu $v1, $v1, -0x3950 diff --git a/asm/non_matchings/unknown_003260/func_80004520.s b/asm/non_matchings/unknown_003260/func_80004520.s index d28f7c4f..c2c43afb 100644 --- a/asm/non_matchings/unknown_003260/func_80004520.s +++ b/asm/non_matchings/unknown_003260/func_80004520.s @@ -17,7 +17,7 @@ glabel func_80004520 /* 005158 80004558 00000000 */ nop /* 00515C 8000455C AC590004 */ sw $t9, 4($v0) .L80004560: -/* 005160 80004560 0C0321D8 */ jal func_800C8760 +/* 005160 80004560 0C0321D8 */ jal alUnlink /* 005164 80004564 AFA40018 */ sw $a0, 0x18($sp) /* 005168 80004568 3C02800E */ lui $v0, %hi(D_800DC6B0) # $v0, 0x800e /* 00516C 8000456C 2442C6B0 */ addiu $v0, %lo(D_800DC6B0) # addiu $v0, $v0, -0x3950 diff --git a/asm/non_matchings/unknown_003260/func_80004668.s b/asm/non_matchings/unknown_003260/func_80004668.s index d5133a6c..65a14e94 100644 --- a/asm/non_matchings/unknown_003260/func_80004668.s +++ b/asm/non_matchings/unknown_003260/func_80004668.s @@ -73,7 +73,7 @@ glabel func_80004668 /* 005378 80004778 31CFFFEF */ andi $t7, $t6, 0xffef /* 00537C 8000477C A20F003E */ sb $t7, 0x3e($s0) /* 005380 80004780 8EA40000 */ lw $a0, ($s5) -/* 005384 80004784 0C03246B */ jal func_800C91AC +/* 005384 80004784 0C03246B */ jal alEvtqPostEvent /* 005388 80004788 24840014 */ addiu $a0, $a0, 0x14 /* 00538C 8000478C 26780001 */ addiu $t8, $s3, 1 /* 005390 80004790 AFB80068 */ sw $t8, 0x68($sp) @@ -82,7 +82,7 @@ glabel func_80004668 .L8000479C: /* 00539C 8000479C 8EA40000 */ lw $a0, ($s5) /* 0053A0 800047A0 26660001 */ addiu $a2, $s3, 1 -/* 0053A4 800047A4 0C03246B */ jal func_800C91AC +/* 0053A4 800047A4 0C03246B */ jal alEvtqPostEvent /* 0053A8 800047A8 24840014 */ addiu $a0, $a0, 0x14 .L800047AC: /* 0053AC 800047AC 0200B825 */ move $s7, $s0 @@ -124,7 +124,7 @@ glabel func_80004668 /* 005434 80004834 AFB70044 */ sw $s7, 0x44($sp) /* 005438 80004838 AFAA0048 */ sw $t2, 0x48($sp) /* 00543C 8000483C AFAB004C */ sw $t3, 0x4c($sp) -/* 005440 80004840 0C03246B */ jal func_800C91AC +/* 005440 80004840 0C03246B */ jal alEvtqPostEvent /* 005444 80004844 24840014 */ addiu $a0, $a0, 0x14 /* 005448 80004848 8FAC008C */ lw $t4, 0x8c($sp) .L8000484C: diff --git a/asm/non_matchings/unknown_003260/func_8000488C.s b/asm/non_matchings/unknown_003260/func_8000488C.s index e4f4f8ab..cd3432f6 100644 --- a/asm/non_matchings/unknown_003260/func_8000488C.s +++ b/asm/non_matchings/unknown_003260/func_8000488C.s @@ -12,7 +12,7 @@ glabel func_8000488C /* 0054B4 800048B4 3C04800E */ lui $a0, %hi(D_800DC6BC) # $a0, 0x800e /* 0054B8 800048B8 8C84C6BC */ lw $a0, %lo(D_800DC6BC)($a0) /* 0054BC 800048BC 00003025 */ move $a2, $zero -/* 0054C0 800048C0 0C03246B */ jal func_800C91AC +/* 0054C0 800048C0 0C03246B */ jal alEvtqPostEvent /* 0054C4 800048C4 24840014 */ addiu $a0, $a0, 0x14 .L800048C8: /* 0054C8 800048C8 8FBF0014 */ lw $ra, 0x14($sp) diff --git a/asm/non_matchings/unknown_003260/func_800048D8.s b/asm/non_matchings/unknown_003260/func_800048D8.s index 9a720d88..9a0fffb1 100644 --- a/asm/non_matchings/unknown_003260/func_800048D8.s +++ b/asm/non_matchings/unknown_003260/func_800048D8.s @@ -31,7 +31,7 @@ glabel func_800048D8 /* 005548 80004948 A218003E */ sb $t8, 0x3e($s0) /* 00554C 8000494C 8E640000 */ lw $a0, ($s3) /* 005550 80004950 00003025 */ move $a2, $zero -/* 005554 80004954 0C03246B */ jal func_800C91AC +/* 005554 80004954 0C03246B */ jal alEvtqPostEvent /* 005558 80004958 24840014 */ addiu $a0, $a0, 0x14 .L8000495C: /* 00555C 8000495C 8E100000 */ lw $s0, ($s0) diff --git a/asm/non_matchings/unknown_003260/func_800049F8.s b/asm/non_matchings/unknown_003260/func_800049F8.s index 38e58105..b60edbc1 100644 --- a/asm/non_matchings/unknown_003260/func_800049F8.s +++ b/asm/non_matchings/unknown_003260/func_800049F8.s @@ -10,7 +10,7 @@ glabel func_800049F8 /* 005618 80004A18 8C84C6BC */ lw $a0, %lo(D_800DC6BC)($a0) /* 00561C 80004A1C 27A50018 */ addiu $a1, $sp, 0x18 /* 005620 80004A20 00003025 */ move $a2, $zero -/* 005624 80004A24 0C03246B */ jal func_800C91AC +/* 005624 80004A24 0C03246B */ jal alEvtqPostEvent /* 005628 80004A28 24840014 */ addiu $a0, $a0, 0x14 .L80004A2C: /* 00562C 80004A2C 8FBF0014 */ lw $ra, 0x14($sp) diff --git a/asm/non_matchings/unknown_003260/func_80004A60.s b/asm/non_matchings/unknown_003260/func_80004A60.s index 4396a578..8187c848 100644 --- a/asm/non_matchings/unknown_003260/func_80004A60.s +++ b/asm/non_matchings/unknown_003260/func_80004A60.s @@ -37,7 +37,7 @@ glabel func_80004A60 /* 0056E8 80004AE8 8E440000 */ lw $a0, ($s2) /* 0056EC 80004AEC A7AB002C */ sh $t3, 0x2c($sp) /* 0056F0 80004AF0 AFB00030 */ sw $s0, 0x30($sp) -/* 0056F4 80004AF4 0C03246B */ jal func_800C91AC +/* 0056F4 80004AF4 0C03246B */ jal alEvtqPostEvent /* 0056F8 80004AF8 24840014 */ addiu $a0, $a0, 0x14 .L80004AFC: /* 0056FC 80004AFC 8E100000 */ lw $s0, ($s0) diff --git a/asm/non_matchings/unknown_005740/func_8000AE90.s b/asm/non_matchings/unknown_005740/__initChanState.s similarity index 98% rename from asm/non_matchings/unknown_005740/func_8000AE90.s rename to asm/non_matchings/unknown_005740/__initChanState.s index aa5ea319..c9752c79 100644 --- a/asm/non_matchings/unknown_005740/func_8000AE90.s +++ b/asm/non_matchings/unknown_005740/__initChanState.s @@ -1,4 +1,4 @@ -glabel func_8000AE90 +glabel __initChanState /* 00BA90 8000AE90 27BDFFD8 */ addiu $sp, $sp, -0x28 /* 00BA94 8000AE94 AFBF0024 */ sw $ra, 0x24($sp) /* 00BA98 8000AE98 AFB20020 */ sw $s2, 0x20($sp) diff --git a/asm/non_matchings/unknown_005740/func_8000AB00.s b/asm/non_matchings/unknown_005740/func_8000AB00.s index 3c45b067..49ce398c 100644 --- a/asm/non_matchings/unknown_005740/func_8000AB00.s +++ b/asm/non_matchings/unknown_005740/func_8000AB00.s @@ -36,10 +36,10 @@ glabel func_8000AB00 /* 00B784 8000AB84 03284821 */ addu $t1, $t9, $t0 /* 00B788 8000AB88 AE290008 */ sw $t1, 8($s1) .L8000AB8C: -/* 00B78C 8000AB8C 0C0321D8 */ jal func_800C8760 +/* 00B78C 8000AB8C 0C0321D8 */ jal alUnlink /* 00B790 8000AB90 02002025 */ move $a0, $s0 /* 00B794 8000AB94 02002025 */ move $a0, $s0 -/* 00B798 8000AB98 0C0321E4 */ jal func_800C8790 +/* 00B798 8000AB98 0C0321E4 */ jal alLink /* 00B79C 8000AB9C 02402825 */ move $a1, $s2 .L8000ABA0: /* 00B7A0 8000ABA0 1620FFEB */ bnez $s1, .L8000AB50 @@ -68,7 +68,7 @@ glabel func_8000AB00 /* 00B7F8 8000ABF8 A7AE0050 */ sh $t6, 0x50($sp) /* 00B7FC 8000ABFC AFB50054 */ sw $s5, 0x54($sp) /* 00B800 8000AC00 02402025 */ move $a0, $s2 -/* 00B804 8000AC04 0C03246B */ jal func_800C91AC +/* 00B804 8000AC04 0C03246B */ jal alEvtqPostEvent /* 00B808 8000AC08 27A50050 */ addiu $a1, $sp, 0x50 /* 00B80C 8000AC0C 8FBF0034 */ lw $ra, 0x34($sp) /* 00B810 8000AC10 8FB00018 */ lw $s0, 0x18($sp) diff --git a/asm/non_matchings/unknown_005740/func_8000AC34.s b/asm/non_matchings/unknown_005740/func_8000AC34.s index 36017d03..6625d182 100644 --- a/asm/non_matchings/unknown_005740/func_8000AC34.s +++ b/asm/non_matchings/unknown_005740/func_8000AC34.s @@ -27,11 +27,11 @@ glabel func_8000AC34 /* 00B894 8000AC94 AC4A0008 */ sw $t2, 8($v0) .L8000AC98: /* 00B898 8000AC98 AFA7002C */ sw $a3, 0x2c($sp) -/* 00B89C 8000AC9C 0C0321D8 */ jal func_800C8760 +/* 00B89C 8000AC9C 0C0321D8 */ jal alUnlink /* 00B8A0 8000ACA0 A3A9001F */ sb $t1, 0x1f($sp) /* 00B8A4 8000ACA4 8FA50030 */ lw $a1, 0x30($sp) /* 00B8A8 8000ACA8 8FA4002C */ lw $a0, 0x2c($sp) -/* 00B8AC 8000ACAC 0C0321E4 */ jal func_800C8790 +/* 00B8AC 8000ACAC 0C0321E4 */ jal alLink /* 00B8B0 8000ACB0 24A50048 */ addiu $a1, $a1, 0x48 /* 00B8B4 8000ACB4 93A9001F */ lbu $t1, 0x1f($sp) /* 00B8B8 8000ACB8 10000006 */ b .L8000ACD4 diff --git a/asm/non_matchings/unknown_005740/func_8000AEFC.s b/asm/non_matchings/unknown_005740/func_8000AEFC.s index b912899d..5fee62bc 100644 --- a/asm/non_matchings/unknown_005740/func_8000AEFC.s +++ b/asm/non_matchings/unknown_005740/func_8000AEFC.s @@ -31,7 +31,7 @@ glabel func_8000AEFC /* 00BB68 8000AF68 8E040014 */ lw $a0, 0x14($s0) /* 00BB6C 8000AF6C 0320F809 */ jalr $t9 /* 00BB70 8000AF70 26B40048 */ addiu $s4, $s5, 0x48 -/* 00BB74 8000AF74 0C0321D8 */ jal func_800C8760 +/* 00BB74 8000AF74 0C0321D8 */ jal alUnlink /* 00BB78 8000AF78 02002025 */ move $a0, $s0 /* 00BB7C 8000AF7C 12200006 */ beqz $s1, .L8000AF98 /* 00BB80 8000AF80 02002025 */ move $a0, $s0 @@ -41,7 +41,7 @@ glabel func_8000AEFC /* 00BB90 8000AF90 01F84021 */ addu $t0, $t7, $t8 /* 00BB94 8000AF94 AE280008 */ sw $t0, 8($s1) .L8000AF98: -/* 00BB98 8000AF98 0C0321E4 */ jal func_800C8790 +/* 00BB98 8000AF98 0C0321E4 */ jal alLink /* 00BB9C 8000AF9C 02802825 */ move $a1, $s4 /* 00BBA0 8000AFA0 16760006 */ bne $s3, $s6, .L8000AFBC /* 00BBA4 8000AFA4 00000000 */ nop diff --git a/asm/non_matchings/unknown_061D30/D_80062408.s b/asm/non_matchings/unknown_061D30/D_80062408.s index daa0ec9a..56220bdb 100644 --- a/asm/non_matchings/unknown_061D30/D_80062408.s +++ b/asm/non_matchings/unknown_061D30/D_80062408.s @@ -37,7 +37,7 @@ glabel D_80062408 /* 063090 80062490 A7B8006C */ sh $t8, 0x6c($sp) /* 063094 80062494 8E46005C */ lw $a2, 0x5c($s2) /* 063098 80062498 02E02025 */ move $a0, $s7 -/* 06309C 8006249C 0C03246B */ jal func_800C91AC +/* 06309C 8006249C 0C03246B */ jal alEvtqPostEvent /* 0630A0 800624A0 03C02825 */ move $a1, $fp /* 0630A4 800624A4 10000135 */ b .L8006297C /* 0630A8 800624A8 8FA50048 */ lw $a1, 0x48($sp) @@ -153,7 +153,7 @@ glabel D_80062408 /* 06324C 8006264C AFB40074 */ sw $s4, 0x74($sp) /* 063250 80062650 02E02025 */ move $a0, $s7 /* 063254 80062654 03C02825 */ move $a1, $fp -/* 063258 80062658 0C03246B */ jal func_800C91AC +/* 063258 80062658 0C03246B */ jal alEvtqPostEvent /* 06325C 8006265C 02603025 */ move $a2, $s3 /* 063260 80062660 100000C6 */ b .L8006297C /* 063264 80062664 8FA50048 */ lw $a1, 0x48($sp) @@ -189,7 +189,7 @@ glabel D_80062408 /* 0632DC 800626DC A3B00078 */ sb $s0, 0x78($sp) /* 0632E0 800626E0 02E02025 */ move $a0, $s7 /* 0632E4 800626E4 03C02825 */ move $a1, $fp -/* 0632E8 800626E8 0C03246B */ jal func_800C91AC +/* 0632E8 800626E8 0C03246B */ jal alEvtqPostEvent /* 0632EC 800626EC 02603025 */ move $a2, $s3 /* 0632F0 800626F0 100000A2 */ b .L8006297C /* 0632F4 800626F4 8FA50048 */ lw $a1, 0x48($sp) @@ -337,7 +337,7 @@ glabel D_80062408 /* 063508 80062908 A7AB006C */ sh $t3, 0x6c($sp) /* 06350C 8006290C 34C6FFFF */ ori $a2, (0x7FFFFFFF & 0xFFFF) # ori $a2, $a2, 0xffff /* 063510 80062910 02E02025 */ move $a0, $s7 -/* 063514 80062914 0C03246B */ jal func_800C91AC +/* 063514 80062914 0C03246B */ jal alEvtqPostEvent /* 063518 80062918 03C02825 */ move $a1, $fp /* 06351C 8006291C 10000017 */ b .L8006297C /* 063520 80062920 8FA50048 */ lw $a1, 0x48($sp) @@ -365,7 +365,7 @@ glabel D_80062408 .L80062978: /* 063578 80062978 8FA50048 */ lw $a1, 0x48($sp) .L8006297C: -/* 06357C 8006297C 0C0324B4 */ jal func_800C92D0 +/* 06357C 8006297C 0C0324B4 */ jal alEvtqNextEvent /* 063580 80062980 02E02025 */ move $a0, $s7 /* 063584 80062984 1040FEB2 */ beqz $v0, .L80062450 /* 063588 80062988 AE420028 */ sw $v0, 0x28($s2) diff --git a/asm/non_matchings/unknown_061D30/func_80062290.s b/asm/non_matchings/unknown_061D30/func_80062290.s index 577a1b37..e9ec4db5 100644 --- a/asm/non_matchings/unknown_061D30/func_80062290.s +++ b/asm/non_matchings/unknown_061D30/func_80062290.s @@ -40,17 +40,17 @@ glabel func_80062290 /* 062F28 80062328 AFAF0010 */ sw $t7, 0x10($sp) /* 062F2C 8006232C 00002025 */ move $a0, $zero /* 062F30 80062330 00002825 */ move $a1, $zero -/* 062F34 80062334 0C031DFC */ jal func_800C77F0 +/* 062F34 80062334 0C031DFC */ jal alHeapDBAlloc /* 062F38 80062338 AFA6002C */ sw $a2, 0x2c($sp) /* 062F3C 8006233C AE020060 */ sw $v0, 0x60($s0) -/* 062F40 80062340 0C002BA4 */ jal func_8000AE90 +/* 062F40 80062340 0C002BA4 */ jal __initChanState /* 062F44 80062344 02002025 */ move $a0, $s0 /* 062F48 80062348 8FA6002C */ lw $a2, 0x2c($sp) /* 062F4C 8006234C 8E270000 */ lw $a3, ($s1) /* 062F50 80062350 24180038 */ li $t8, 56 /* 062F54 80062354 AFB80010 */ sw $t8, 0x10($sp) /* 062F58 80062358 00002025 */ move $a0, $zero -/* 062F5C 8006235C 0C031DFC */ jal func_800C77F0 +/* 062F5C 8006235C 0C031DFC */ jal alHeapDBAlloc /* 062F60 80062360 00002825 */ move $a1, $zero /* 062F64 80062364 AE00006C */ sw $zero, 0x6c($s0) /* 062F68 80062368 8E390000 */ lw $t9, ($s1) @@ -75,11 +75,11 @@ glabel func_80062290 /* 062FAC 800623AC 8FA6002C */ lw $a2, 0x2c($sp) /* 062FB0 800623B0 240A001C */ li $t2, 28 /* 062FB4 800623B4 AFAA0010 */ sw $t2, 0x10($sp) -/* 062FB8 800623B8 0C031DFC */ jal func_800C77F0 +/* 062FB8 800623B8 0C031DFC */ jal alHeapDBAlloc /* 062FBC 800623BC 00002025 */ move $a0, $zero /* 062FC0 800623C0 8E260004 */ lw $a2, 4($s1) /* 062FC4 800623C4 26040048 */ addiu $a0, $s0, 0x48 -/* 062FC8 800623C8 0C0324D7 */ jal func_800C935C +/* 062FC8 800623C8 0C0324D7 */ jal alEvtqNew /* 062FCC 800623CC 00402825 */ move $a1, $v0 /* 062FD0 800623D0 3C0B8006 */ lui $t3, %hi(D_80062408) # $t3, 0x8006 /* 062FD4 800623D4 256B2408 */ addiu $t3, %lo(D_80062408) # addiu $t3, $t3, 0x2408 @@ -88,7 +88,7 @@ glabel func_80062290 /* 062FE0 800623E0 AE100004 */ sw $s0, 4($s0) /* 062FE4 800623E4 3C04800E */ lui $a0, %hi(D_800E3780) # $a0, 0x800e /* 062FE8 800623E8 8C843780 */ lw $a0, %lo(D_800E3780)($a0) -/* 062FEC 800623EC 0C0324F4 */ jal func_800C93D0 +/* 062FEC 800623EC 0C0324F4 */ jal alSynAddPlayer /* 062FF0 800623F0 02002825 */ move $a1, $s0 /* 062FF4 800623F4 8FBF0024 */ lw $ra, 0x24($sp) /* 062FF8 800623F8 8FB0001C */ lw $s0, 0x1c($sp) diff --git a/asm/non_matchings/unknown_061D30/func_800629CC.s b/asm/non_matchings/unknown_061D30/func_800629CC.s index 194295c9..199630c2 100644 --- a/asm/non_matchings/unknown_061D30/func_800629CC.s +++ b/asm/non_matchings/unknown_061D30/func_800629CC.s @@ -21,7 +21,7 @@ glabel func_800629CC /* 063618 80062A18 01F80019 */ multu $t7, $t8 /* 06361C 80062A1C 27A50020 */ addiu $a1, $sp, 0x20 /* 063620 80062A20 00003012 */ mflo $a2 -/* 063624 80062A24 0C03246B */ jal func_800C91AC +/* 063624 80062A24 0C03246B */ jal alEvtqPostEvent /* 063628 80062A28 00000000 */ nop .L80062A2C: /* 06362C 80062A2C 8FBF0014 */ lw $ra, 0x14($sp) diff --git a/asm/non_matchings/unknown_061D30/func_80062A3C.s b/asm/non_matchings/unknown_061D30/func_80062A3C.s index 514527cd..ebebbb9e 100644 --- a/asm/non_matchings/unknown_061D30/func_80062A3C.s +++ b/asm/non_matchings/unknown_061D30/func_80062A3C.s @@ -38,7 +38,7 @@ glabel func_80062A3C /* 0636CC 80062ACC 3C067FFF */ lui $a2, (0x7FFFFFFF >> 16) # lui $a2, 0x7fff /* 0636D0 80062AD0 A7B90028 */ sh $t9, 0x28($sp) /* 0636D4 80062AD4 34C6FFFF */ ori $a2, (0x7FFFFFFF & 0xFFFF) # ori $a2, $a2, 0xffff -/* 0636D8 80062AD8 0C03246B */ jal func_800C91AC +/* 0636D8 80062AD8 0C03246B */ jal alEvtqPostEvent /* 0636DC 80062ADC 26040048 */ addiu $a0, $s0, 0x48 /* 0636E0 80062AE0 10000004 */ b .L80062AF4 /* 0636E4 80062AE4 8FBF001C */ lw $ra, 0x1c($sp) diff --git a/asm/non_matchings/unknown_061D30/func_80062B00.s b/asm/non_matchings/unknown_061D30/func_80062B00.s index 8c94132b..c7789508 100644 --- a/asm/non_matchings/unknown_061D30/func_80062B00.s +++ b/asm/non_matchings/unknown_061D30/func_80062B00.s @@ -210,7 +210,7 @@ glabel func_80062B00 /* 063A1C 80062E1C 27A500AC */ addiu $a1, $sp, 0xac /* 063A20 80062E20 00403025 */ move $a2, $v0 /* 063A24 80062E24 AFA30058 */ sw $v1, 0x58($sp) -/* 063A28 80062E28 0C03246B */ jal func_800C91AC +/* 063A28 80062E28 0C03246B */ jal alEvtqPostEvent /* 063A2C 80062E2C AFAE00B4 */ sw $t6, 0xb4($sp) /* 063A30 80062E30 920F0037 */ lbu $t7, 0x37($s0) /* 063A34 80062E34 8FA30058 */ lw $v1, 0x58($sp) @@ -284,7 +284,7 @@ glabel func_80062B00 /* 063B34 80062F34 00403025 */ move $a2, $v0 /* 063B38 80062F38 AFA30058 */ sw $v1, 0x58($sp) /* 063B3C 80062F3C AFAC00B4 */ sw $t4, 0xb4($sp) -/* 063B40 80062F40 0C03246B */ jal func_800C91AC +/* 063B40 80062F40 0C03246B */ jal alEvtqPostEvent /* 063B44 80062F44 A3AE00B8 */ sb $t6, 0xb8($sp) /* 063B48 80062F48 920F0037 */ lbu $t7, 0x37($s0) /* 063B4C 80062F4C 8FA30058 */ lw $v1, 0x58($sp) @@ -336,7 +336,7 @@ glabel func_80062B00 /* 063C00 80063000 8D8D0000 */ lw $t5, ($t4) /* 063C04 80063004 02603025 */ move $a2, $s3 /* 063C08 80063008 8DB90004 */ lw $t9, 4($t5) -/* 063C0C 8006300C 0C03246B */ jal func_800C91AC +/* 063C0C 8006300C 0C03246B */ jal alEvtqPostEvent /* 063C10 80063010 AFB900B4 */ sw $t9, 0xb4($sp) /* 063C14 80063014 8FA200DC */ lw $v0, 0xdc($sp) /* 063C18 80063018 24080015 */ li $t0, 21 @@ -355,7 +355,7 @@ glabel func_80062B00 /* 063C4C 8006304C 016E0019 */ multu $t3, $t6 /* 063C50 80063050 27A500AC */ addiu $a1, $sp, 0xac /* 063C54 80063054 00003012 */ mflo $a2 -/* 063C58 80063058 0C03246B */ jal func_800C91AC +/* 063C58 80063058 0C03246B */ jal alEvtqPostEvent /* 063C5C 8006305C 00000000 */ nop /* 063C60 80063060 100001DB */ b .L800637D0 /* 063C64 80063064 8FBF003C */ lw $ra, 0x3c($sp) diff --git a/asm/non_matchings/unknown_061D30/func_800637EC.s b/asm/non_matchings/unknown_061D30/func_800637EC.s index 8cfb357f..4fe576eb 100644 --- a/asm/non_matchings/unknown_061D30/func_800637EC.s +++ b/asm/non_matchings/unknown_061D30/func_800637EC.s @@ -42,12 +42,12 @@ glabel func_800637EC /* 064488 80063888 8E110000 */ lw $s1, ($s0) /* 06448C 8006388C 168D0015 */ bne $s4, $t5, .L800638E4 /* 064490 80063890 024C9021 */ addu $s2, $s2, $t4 -/* 064494 80063894 0C0321D8 */ jal func_800C8760 +/* 064494 80063894 0C0321D8 */ jal alUnlink /* 064498 80063898 02002025 */ move $a0, $s0 /* 06449C 8006389C 12600006 */ beqz $s3, .L800638B8 /* 0644A0 800638A0 00000000 */ nop /* 0644A4 800638A4 02002025 */ move $a0, $s0 -/* 0644A8 800638A8 0C0321E4 */ jal func_800C8790 +/* 0644A8 800638A8 0C0321E4 */ jal alLink /* 0644AC 800638AC 02602825 */ move $a1, $s3 /* 0644B0 800638B0 10000004 */ b .L800638C4 /* 0644B4 800638B4 00000000 */ nop diff --git a/asm/non_matchings/unknown_061D30/func_80063984.s b/asm/non_matchings/unknown_061D30/func_80063984.s index 4ca8f9d8..4ff22c8b 100644 --- a/asm/non_matchings/unknown_061D30/func_80063984.s +++ b/asm/non_matchings/unknown_061D30/func_80063984.s @@ -16,7 +16,7 @@ glabel func_80063984 /* 0645B8 800639B8 00000000 */ nop /* 0645BC 800639BC 14800005 */ bnez $a0, .L800639D4 /* 0645C0 800639C0 00000000 */ nop -/* 0645C4 800639C4 0C0321E4 */ jal func_800C8790 +/* 0645C4 800639C4 0C0321E4 */ jal alLink /* 0645C8 800639C8 00E02025 */ move $a0, $a3 /* 0645CC 800639CC 10000013 */ b .L80063A1C /* 0645D0 800639D0 8FA4001C */ lw $a0, 0x1c($sp) @@ -29,7 +29,7 @@ glabel func_80063984 /* 0645E8 800639E8 00437823 */ subu $t7, $v0, $v1 /* 0645EC 800639EC 00627023 */ subu $t6, $v1, $v0 /* 0645F0 800639F0 AC8E0008 */ sw $t6, 8($a0) -/* 0645F4 800639F4 0C0321E4 */ jal func_800C8790 +/* 0645F4 800639F4 0C0321E4 */ jal alLink /* 0645F8 800639F8 00E02025 */ move $a0, $a3 /* 0645FC 800639FC 10000007 */ b .L80063A1C /* 064600 80063A00 8FA4001C */ lw $a0, 0x1c($sp) diff --git a/asm/non_matchings/unknown_0646F0/func_80063AF0.s b/asm/non_matchings/unknown_0646F0/func_80063AF0.s index 0fc4040e..a8255199 100644 --- a/asm/non_matchings/unknown_0646F0/func_80063AF0.s +++ b/asm/non_matchings/unknown_0646F0/func_80063AF0.s @@ -14,7 +14,7 @@ glabel func_80063AF0 /* 064720 80063B20 A3A70022 */ sb $a3, 0x22($sp) /* 064724 80063B24 27A50018 */ addiu $a1, $sp, 0x18 /* 064728 80063B28 24840048 */ addiu $a0, $a0, 0x48 -/* 06472C 80063B2C 0C03246B */ jal func_800C91AC +/* 06472C 80063B2C 0C03246B */ jal alEvtqPostEvent /* 064730 80063B30 00003025 */ move $a2, $zero /* 064734 80063B34 8FBF0014 */ lw $ra, 0x14($sp) /* 064738 80063B38 27BD0028 */ addiu $sp, $sp, 0x28 diff --git a/asm/non_matchings/unknown_0646F0/func_80063B44.s b/asm/non_matchings/unknown_0646F0/func_80063B44.s index 15c2399c..325278a1 100644 --- a/asm/non_matchings/unknown_0646F0/func_80063B44.s +++ b/asm/non_matchings/unknown_0646F0/func_80063B44.s @@ -14,7 +14,7 @@ glabel func_80063B44 /* 064774 80063B74 A3A70022 */ sb $a3, 0x22($sp) /* 064778 80063B78 27A50018 */ addiu $a1, $sp, 0x18 /* 06477C 80063B7C 24840048 */ addiu $a0, $a0, 0x48 -/* 064780 80063B80 0C03246B */ jal func_800C91AC +/* 064780 80063B80 0C03246B */ jal alEvtqPostEvent /* 064784 80063B84 00003025 */ move $a2, $zero /* 064788 80063B88 8FBF0014 */ lw $ra, 0x14($sp) /* 06478C 80063B8C 27BD0028 */ addiu $sp, $sp, 0x28 diff --git a/asm/non_matchings/unknown_065D30/func_80065130.s b/asm/non_matchings/unknown_065D30/alSynNew.s similarity index 90% rename from asm/non_matchings/unknown_065D30/func_80065130.s rename to asm/non_matchings/unknown_065D30/alSynNew.s index ad011840..463bd294 100644 --- a/asm/non_matchings/unknown_065D30/func_80065130.s +++ b/asm/non_matchings/unknown_065D30/alSynNew.s @@ -1,4 +1,4 @@ -glabel func_80065130 +glabel alSynNew /* 065D30 80065130 27BDFF90 */ addiu $sp, $sp, -0x70 /* 065D34 80065134 AFBF0044 */ sw $ra, 0x44($sp) /* 065D38 80065138 AFBE0040 */ sw $fp, 0x40($sp) @@ -29,10 +29,10 @@ glabel func_80065130 /* 065D9C 8006519C 00002025 */ move $a0, $zero /* 065DA0 800651A0 00002825 */ move $a1, $zero /* 065DA4 800651A4 24070001 */ li $a3, 1 -/* 065DA8 800651A8 0C031DFC */ jal func_800C77F0 +/* 065DA8 800651A8 0C031DFC */ jal alHeapDBAlloc /* 065DAC 800651AC 02E03025 */ move $a2, $s7 /* 065DB0 800651B0 AFA2005C */ sw $v0, 0x5c($sp) -/* 065DB4 800651B4 0C019439 */ jal func_800650E4 +/* 065DB4 800651B4 0C019439 */ jal alSaveNew /* 065DB8 800651B8 00402025 */ move $a0, $v0 /* 065DBC 800651BC 8FA9005C */ lw $t1, 0x5c($sp) /* 065DC0 800651C0 240A004C */ li $t2, 76 @@ -41,7 +41,7 @@ glabel func_80065130 /* 065DCC 800651CC 00002025 */ move $a0, $zero /* 065DD0 800651D0 00002825 */ move $a1, $zero /* 065DD4 800651D4 02E03025 */ move $a2, $s7 -/* 065DD8 800651D8 0C031DFC */ jal func_800C77F0 +/* 065DD8 800651D8 0C031DFC */ jal alHeapDBAlloc /* 065DDC 800651DC 24070002 */ li $a3, 2 /* 065DE0 800651E0 240B0002 */ li $t3, 2 /* 065DE4 800651E4 AEC20034 */ sw $v0, 0x34($s6) @@ -51,30 +51,30 @@ glabel func_80065130 /* 065DF4 800651F4 AFAC0010 */ sw $t4, 0x10($sp) /* 065DF8 800651F8 00002025 */ move $a0, $zero /* 065DFC 800651FC 00002825 */ move $a1, $zero -/* 065E00 80065200 0C031DFC */ jal func_800C77F0 +/* 065E00 80065200 0C031DFC */ jal alHeapDBAlloc /* 065E04 80065204 02E03025 */ move $a2, $s7 /* 065E08 80065208 8EC40034 */ lw $a0, 0x34($s6) /* 065E0C 8006520C 8FC60004 */ lw $a2, 4($fp) -/* 065E10 80065210 0C019409 */ jal func_80065024 +/* 065E10 80065210 0C019409 */ jal alAuxBusNew /* 065E14 80065214 00402825 */ move $a1, $v0 /* 065E18 80065218 8FC70004 */ lw $a3, 4($fp) /* 065E1C 8006521C 240D0004 */ li $t5, 4 /* 065E20 80065220 AFAD0010 */ sw $t5, 0x10($sp) /* 065E24 80065224 00002025 */ move $a0, $zero /* 065E28 80065228 00002825 */ move $a1, $zero -/* 065E2C 8006522C 0C031DFC */ jal func_800C77F0 +/* 065E2C 8006522C 0C031DFC */ jal alHeapDBAlloc /* 065E30 80065230 02E03025 */ move $a2, $s7 /* 065E34 80065234 8EC40034 */ lw $a0, 0x34($s6) /* 065E38 80065238 8FC60004 */ lw $a2, 4($fp) /* 065E3C 8006523C 00402825 */ move $a1, $v0 -/* 065E40 80065240 0C019409 */ jal func_80065024 +/* 065E40 80065240 0C019409 */ jal alAuxBusNew /* 065E44 80065244 2484004C */ addiu $a0, $a0, 0x4c /* 065E48 80065248 240E0020 */ li $t6, 32 /* 065E4C 8006524C AFAE0010 */ sw $t6, 0x10($sp) /* 065E50 80065250 00002025 */ move $a0, $zero /* 065E54 80065254 00002825 */ move $a1, $zero /* 065E58 80065258 02E03025 */ move $a2, $s7 -/* 065E5C 8006525C 0C031DFC */ jal func_800C77F0 +/* 065E5C 8006525C 0C031DFC */ jal alHeapDBAlloc /* 065E60 80065260 24070001 */ li $a3, 1 /* 065E64 80065264 AEC20030 */ sw $v0, 0x30($s6) /* 065E68 80065268 8FC70004 */ lw $a3, 4($fp) @@ -82,11 +82,11 @@ glabel func_80065130 /* 065E70 80065270 AFAF0010 */ sw $t7, 0x10($sp) /* 065E74 80065274 00002025 */ move $a0, $zero /* 065E78 80065278 00002825 */ move $a1, $zero -/* 065E7C 8006527C 0C031DFC */ jal func_800C77F0 +/* 065E7C 8006527C 0C031DFC */ jal alHeapDBAlloc /* 065E80 80065280 02E03025 */ move $a2, $s7 /* 065E84 80065284 8EC40030 */ lw $a0, 0x30($s6) /* 065E88 80065288 8FC60004 */ lw $a2, 4($fp) -/* 065E8C 8006528C 0C019421 */ jal func_80065084 +/* 065E8C 8006528C 0C019421 */ jal alMainBusNew /* 065E90 80065290 00402825 */ move $a1, $v0 /* 065E94 80065294 00008025 */ move $s0, $zero /* 065E98 80065298 03C08825 */ move $s1, $fp @@ -128,7 +128,7 @@ glabel func_80065130 /* 065F1C 8006531C AFAA0010 */ sw $t2, 0x10($sp) /* 065F20 80065320 00002025 */ move $a0, $zero /* 065F24 80065324 00002825 */ move $a1, $zero -/* 065F28 80065328 0C031DFC */ jal func_800C77F0 +/* 065F28 80065328 0C031DFC */ jal alHeapDBAlloc /* 065F2C 8006532C 02E03025 */ move $a2, $s7 /* 065F30 80065330 8FCB0004 */ lw $t3, 4($fp) /* 065F34 80065334 00008025 */ move $s0, $zero @@ -142,34 +142,34 @@ glabel func_80065130 .L80065354: /* 065F54 80065354 8FA50048 */ lw $a1, 0x48($sp) /* 065F58 80065358 0220A825 */ move $s5, $s1 -/* 065F5C 8006535C 0C0321E4 */ jal func_800C8790 +/* 065F5C 8006535C 0C0321E4 */ jal alLink /* 065F60 80065360 02202025 */ move $a0, $s1 /* 065F64 80065364 AE200008 */ sw $zero, 8($s1) /* 065F68 80065368 8EC50024 */ lw $a1, 0x24($s6) /* 065F6C 8006536C 02802025 */ move $a0, $s4 -/* 065F70 80065370 0C0193BE */ jal func_80064EF8 +/* 065F70 80065370 0C0193BE */ jal alLoadNew /* 065F74 80065374 02E03025 */ move $a2, $s7 /* 065F78 80065378 02802025 */ move $a0, $s4 /* 065F7C 8006537C 24050001 */ li $a1, 1 -/* 065F80 80065380 0C032D50 */ jal D_800CB540 +/* 065F80 80065380 0C032D50 */ jal alLoadParam /* 065F84 80065384 00003025 */ move $a2, $zero /* 065F88 80065388 02602025 */ move $a0, $s3 -/* 065F8C 8006538C 0C0193E7 */ jal func_80064F9C +/* 065F8C 8006538C 0C0193E7 */ jal alResampleNew /* 065F90 80065390 02E02825 */ move $a1, $s7 /* 065F94 80065394 02602025 */ move $a0, $s3 /* 065F98 80065398 24050001 */ li $a1, 1 -/* 065F9C 8006539C 0C033024 */ jal D_800CC090 +/* 065F9C 8006539C 0C033024 */ jal alResampleParam /* 065FA0 800653A0 02803025 */ move $a2, $s4 /* 065FA4 800653A4 02402025 */ move $a0, $s2 -/* 065FA8 800653A8 0C019395 */ jal func_80064E54 +/* 065FA8 800653A8 0C019395 */ jal alEnvmixerNew /* 065FAC 800653AC 02E02825 */ move $a1, $s7 /* 065FB0 800653B0 02402025 */ move $a0, $s2 /* 065FB4 800653B4 24050001 */ li $a1, 1 -/* 065FB8 800653B8 0C032A9F */ jal D_800CAA7C +/* 065FB8 800653B8 0C032A9F */ jal alEnvmixerParam /* 065FBC 800653BC 02603025 */ move $a2, $s3 /* 065FC0 800653C0 8EC40034 */ lw $a0, 0x34($s6) /* 065FC4 800653C4 24050002 */ li $a1, 2 -/* 065FC8 800653C8 0C019675 */ jal D_800659D4 +/* 065FC8 800653C8 0C019675 */ jal alAuxBusParam /* 065FCC 800653CC 02403025 */ move $a2, $s2 /* 065FD0 800653D0 26AC008C */ addiu $t4, $s5, 0x8c /* 065FD4 800653D4 AEAC000C */ sw $t4, 0xc($s5) @@ -185,14 +185,14 @@ glabel func_80065130 .L800653FC: /* 065FFC 800653FC 8FA4005C */ lw $a0, 0x5c($sp) /* 066000 80065400 8EC60030 */ lw $a2, 0x30($s6) -/* 066004 80065404 0C033138 */ jal D_800CC4E0 +/* 066004 80065404 0C033138 */ jal alSaveParam /* 066008 80065408 24050001 */ li $a1, 1 /* 06600C 8006540C 8FC70008 */ lw $a3, 8($fp) /* 066010 80065410 240E001C */ li $t6, 28 /* 066014 80065414 AFAE0010 */ sw $t6, 0x10($sp) /* 066018 80065418 00002025 */ move $a0, $zero /* 06601C 8006541C 00002825 */ move $a1, $zero -/* 066020 80065420 0C031DFC */ jal func_800C77F0 +/* 066020 80065420 0C031DFC */ jal alHeapDBAlloc /* 066024 80065424 02E03025 */ move $a2, $s7 /* 066028 80065428 AEC0002C */ sw $zero, 0x2c($s6) /* 06602C 8006542C 8FCF0008 */ lw $t7, 8($fp) diff --git a/asm/non_matchings/unknown_065D30/func_800656BC.s b/asm/non_matchings/unknown_065D30/func_800656BC.s index e2840431..3b17c5ec 100644 --- a/asm/non_matchings/unknown_065D30/func_800656BC.s +++ b/asm/non_matchings/unknown_065D30/func_800656BC.s @@ -9,10 +9,10 @@ glabel func_800656BC /* 0662D8 800656D8 1200000A */ beqz $s0, .L80065704 /* 0662DC 800656DC 24920004 */ addiu $s2, $a0, 4 .L800656E0: -/* 0662E0 800656E0 0C0321D8 */ jal func_800C8760 +/* 0662E0 800656E0 0C0321D8 */ jal alUnlink /* 0662E4 800656E4 02002025 */ move $a0, $s0 /* 0662E8 800656E8 02002025 */ move $a0, $s0 -/* 0662EC 800656EC 0C0321E4 */ jal func_800C8790 +/* 0662EC 800656EC 0C0321E4 */ jal alLink /* 0662F0 800656F0 02402825 */ move $a1, $s2 /* 0662F4 800656F4 8E300014 */ lw $s0, 0x14($s1) /* 0662F8 800656F8 00000000 */ nop diff --git a/asm/non_matchings/unknown_065D30/func_8006571C.s b/asm/non_matchings/unknown_065D30/func_8006571C.s index d3ca135e..eb370e19 100644 --- a/asm/non_matchings/unknown_065D30/func_8006571C.s +++ b/asm/non_matchings/unknown_065D30/func_8006571C.s @@ -3,11 +3,11 @@ glabel func_8006571C /* 066320 80065720 AFBF0014 */ sw $ra, 0x14($sp) /* 066324 80065724 AFA40018 */ sw $a0, 0x18($sp) /* 066328 80065728 AFA5001C */ sw $a1, 0x1c($sp) -/* 06632C 8006572C 0C0321D8 */ jal func_800C8760 +/* 06632C 8006572C 0C0321D8 */ jal alUnlink /* 066330 80065730 00A02025 */ move $a0, $a1 /* 066334 80065734 8FA50018 */ lw $a1, 0x18($sp) /* 066338 80065738 8FA4001C */ lw $a0, 0x1c($sp) -/* 06633C 8006573C 0C0321E4 */ jal func_800C8790 +/* 06633C 8006573C 0C0321E4 */ jal alLink /* 066340 80065740 24A50014 */ addiu $a1, $a1, 0x14 /* 066344 80065744 8FBF0014 */ lw $ra, 0x14($sp) /* 066348 80065748 27BD0018 */ addiu $sp, $sp, 0x18 diff --git a/asm/non_matchings/unknown_066500/D_800659D4.s b/asm/non_matchings/unknown_066500/alAuxBusParam.s similarity index 99% rename from asm/non_matchings/unknown_066500/D_800659D4.s rename to asm/non_matchings/unknown_066500/alAuxBusParam.s index 204301b5..5f125f0f 100644 --- a/asm/non_matchings/unknown_066500/D_800659D4.s +++ b/asm/non_matchings/unknown_066500/alAuxBusParam.s @@ -1,4 +1,4 @@ -glabel D_800659D4 +glabel alAuxBusParam /* 0665D4 800659D4 8C83001C */ lw $v1, 0x1c($a0) /* 0665D8 800659D8 24010002 */ li $at, 2 /* 0665DC 800659DC 10A10006 */ beq $a1, $at, .L800659F8 diff --git a/asm/non_matchings/unknown_066500/func_80065A80.s b/asm/non_matchings/unknown_066500/func_80065A80.s index 84d321f7..7bff323a 100644 --- a/asm/non_matchings/unknown_066500/func_80065A80.s +++ b/asm/non_matchings/unknown_066500/func_80065A80.s @@ -17,7 +17,7 @@ glabel func_80065A80 /* 0666BC 80065ABC AFA60018 */ sw $a2, 0x18($sp) /* 0666C0 80065AC0 AFA70024 */ sw $a3, 0x24($sp) /* 0666C4 80065AC4 24050011 */ li $a1, 17 -/* 0666C8 80065AC8 0C019675 */ jal D_800659D4 +/* 0666C8 80065AC8 0C019675 */ jal alAuxBusParam /* 0666CC 80065ACC 03192021 */ addu $a0, $t8, $t9 /* 0666D0 80065AD0 87AA002A */ lh $t2, 0x2a($sp) /* 0666D4 80065AD4 8FA80020 */ lw $t0, 0x20($sp) @@ -29,7 +29,7 @@ glabel func_80065A80 /* 0666EC 80065AEC 8FA60018 */ lw $a2, 0x18($sp) /* 0666F0 80065AF0 000B5880 */ sll $t3, $t3, 2 /* 0666F4 80065AF4 24050002 */ li $a1, 2 -/* 0666F8 80065AF8 0C019675 */ jal D_800659D4 +/* 0666F8 80065AF8 0C019675 */ jal alAuxBusParam /* 0666FC 80065AFC 012B2021 */ addu $a0, $t1, $t3 /* 066700 80065B00 87AC002A */ lh $t4, 0x2a($sp) /* 066704 80065B04 8FAD0024 */ lw $t5, 0x24($sp) diff --git a/asm/non_matchings/unknown_0C83F0/func_800C77F0.s b/asm/non_matchings/unknown_0C83F0/alHeapDBAlloc.s similarity index 98% rename from asm/non_matchings/unknown_0C83F0/func_800C77F0.s rename to asm/non_matchings/unknown_0C83F0/alHeapDBAlloc.s index 9d98beef..b984266d 100644 --- a/asm/non_matchings/unknown_0C83F0/func_800C77F0.s +++ b/asm/non_matchings/unknown_0C83F0/alHeapDBAlloc.s @@ -1,4 +1,4 @@ -glabel func_800C77F0 +glabel alHeapDBAlloc /* 0C83F0 800C77F0 8FAE0010 */ lw $t6, 0x10($sp) /* 0C83F4 800C77F4 AFA40000 */ sw $a0, ($sp) /* 0C83F8 800C77F8 AFA50004 */ sw $a1, 4($sp) diff --git a/asm/non_matchings/unknown_0C8450/func_800C7850.s b/asm/non_matchings/unknown_0C8450/func_800C7850.s index b3a5fc02..1f063fa9 100644 --- a/asm/non_matchings/unknown_0C8450/func_800C7850.s +++ b/asm/non_matchings/unknown_0C8450/func_800C7850.s @@ -8,7 +8,7 @@ glabel func_800C7850 /* 0C8468 800C7868 A7AE001C */ sh $t6, 0x1c($sp) /* 0C846C 800C786C 27A50018 */ addiu $a1, $sp, 0x18 /* 0C8470 800C7870 24840048 */ addiu $a0, $a0, 0x48 -/* 0C8474 800C7874 0C03246B */ jal func_800C91AC +/* 0C8474 800C7874 0C03246B */ jal alEvtqPostEvent /* 0C8478 800C7878 00003025 */ move $a2, $zero /* 0C847C 800C787C 8FBF0014 */ lw $ra, 0x14($sp) /* 0C8480 800C7880 27BD0028 */ addiu $sp, $sp, 0x28 diff --git a/lib/asm/non_matchings/unknown_0C84E0/func_800C78E0.s b/lib/asm/non_matchings/unknown_0C84E0/func_800C78E0.s index 44b087a2..4e57faf0 100644 --- a/lib/asm/non_matchings/unknown_0C84E0/func_800C78E0.s +++ b/lib/asm/non_matchings/unknown_0C84E0/func_800C78E0.s @@ -15,7 +15,7 @@ glabel func_800C78E0 /* 0C8514 800C7914 A3A80022 */ sb $t0, 0x22($sp) /* 0C8518 800C7918 00003025 */ move $a2, $zero /* 0C851C 800C791C 27A50018 */ addiu $a1, $sp, 0x18 -/* 0C8520 800C7920 0C03246B */ jal func_800C91AC +/* 0C8520 800C7920 0C03246B */ jal alEvtqPostEvent /* 0C8524 800C7924 24840048 */ addiu $a0, $a0, 0x48 /* 0C8528 800C7928 8FBF0014 */ lw $ra, 0x14($sp) /* 0C852C 800C792C 27BD0028 */ addiu $sp, $sp, 0x28 diff --git a/lib/asm/non_matchings/unknown_0C8540/func_800C7940.s b/lib/asm/non_matchings/unknown_0C8540/func_800C7940.s index 4d5853ef..f67fd550 100644 --- a/lib/asm/non_matchings/unknown_0C8540/func_800C7940.s +++ b/lib/asm/non_matchings/unknown_0C8540/func_800C7940.s @@ -15,7 +15,7 @@ glabel func_800C7940 /* 0C8574 800C7974 A3A80022 */ sb $t0, 0x22($sp) /* 0C8578 800C7978 00003025 */ move $a2, $zero /* 0C857C 800C797C 27A50018 */ addiu $a1, $sp, 0x18 -/* 0C8580 800C7980 0C03246B */ jal func_800C91AC +/* 0C8580 800C7980 0C03246B */ jal alEvtqPostEvent /* 0C8584 800C7984 24840048 */ addiu $a0, $a0, 0x48 /* 0C8588 800C7988 8FBF0014 */ lw $ra, 0x14($sp) /* 0C858C 800C798C 27BD0028 */ addiu $sp, $sp, 0x28 diff --git a/lib/asm/non_matchings/unknown_0C85E0/func_800C79E0.s b/lib/asm/non_matchings/unknown_0C85E0/func_800C79E0.s index 9a425cfd..10d39d4e 100644 --- a/lib/asm/non_matchings/unknown_0C85E0/func_800C79E0.s +++ b/lib/asm/non_matchings/unknown_0C85E0/func_800C79E0.s @@ -18,7 +18,7 @@ glabel func_800C79E0 /* 0C8620 800C7A20 A3AC0025 */ sb $t4, 0x25($sp) /* 0C8624 800C7A24 27A50018 */ addiu $a1, $sp, 0x18 /* 0C8628 800C7A28 24840048 */ addiu $a0, $a0, 0x48 -/* 0C862C 800C7A2C 0C03246B */ jal func_800C91AC +/* 0C862C 800C7A2C 0C03246B */ jal alEvtqPostEvent /* 0C8630 800C7A30 00003025 */ move $a2, $zero /* 0C8634 800C7A34 8FBF0014 */ lw $ra, 0x14($sp) /* 0C8638 800C7A38 27BD0028 */ addiu $sp, $sp, 0x28 diff --git a/lib/asm/non_matchings/unknown_0C8660/func_800C7A60.s b/lib/asm/non_matchings/unknown_0C8660/func_800C7A60.s index 6e9713c8..4251e998 100644 --- a/lib/asm/non_matchings/unknown_0C8660/func_800C7A60.s +++ b/lib/asm/non_matchings/unknown_0C8660/func_800C7A60.s @@ -6,7 +6,7 @@ glabel func_800C7A60 /* 0C8670 800C7A70 A7AE0018 */ sh $t6, 0x18($sp) /* 0C8674 800C7A74 27A50018 */ addiu $a1, $sp, 0x18 /* 0C8678 800C7A78 24840048 */ addiu $a0, $a0, 0x48 -/* 0C867C 800C7A7C 0C03246B */ jal func_800C91AC +/* 0C867C 800C7A7C 0C03246B */ jal alEvtqPostEvent /* 0C8680 800C7A80 00003025 */ move $a2, $zero /* 0C8684 800C7A84 8FBF0014 */ lw $ra, 0x14($sp) /* 0C8688 800C7A88 27BD0028 */ addiu $sp, $sp, 0x28 diff --git a/lib/asm/non_matchings/unknown_0C9160/func_800C8560.s b/lib/asm/non_matchings/unknown_0C9160/func_800C8560.s index 33ab7b0f..bf6e8685 100644 --- a/lib/asm/non_matchings/unknown_0C9160/func_800C8560.s +++ b/lib/asm/non_matchings/unknown_0C9160/func_800C8560.s @@ -6,7 +6,7 @@ glabel func_800C8560 /* 0C9170 800C8570 A7AE0018 */ sh $t6, 0x18($sp) /* 0C9174 800C8574 27A50018 */ addiu $a1, $sp, 0x18 /* 0C9178 800C8578 24840048 */ addiu $a0, $a0, 0x48 -/* 0C917C 800C857C 0C03246B */ jal func_800C91AC +/* 0C917C 800C857C 0C03246B */ jal alEvtqPostEvent /* 0C9180 800C8580 00003025 */ move $a2, $zero /* 0C9184 800C8584 8FBF0014 */ lw $ra, 0x14($sp) /* 0C9188 800C8588 27BD0028 */ addiu $sp, $sp, 0x28 diff --git a/lib/asm/non_matchings/unknown_0C91A0/func_800C8790.s b/lib/asm/non_matchings/unknown_0C91A0/alLink.s similarity index 95% rename from lib/asm/non_matchings/unknown_0C91A0/func_800C8790.s rename to lib/asm/non_matchings/unknown_0C91A0/alLink.s index 1ad3c495..37be21aa 100644 --- a/lib/asm/non_matchings/unknown_0C91A0/func_800C8790.s +++ b/lib/asm/non_matchings/unknown_0C91A0/alLink.s @@ -1,4 +1,4 @@ -glabel func_800C8790 +glabel alLink /* 0C9390 800C8790 8CAE0000 */ lw $t6, ($a1) /* 0C9394 800C8794 AC850004 */ sw $a1, 4($a0) /* 0C9398 800C8798 AC8E0000 */ sw $t6, ($a0) diff --git a/lib/asm/non_matchings/unknown_0C91A0/func_800C8760.s b/lib/asm/non_matchings/unknown_0C91A0/alUnlink.s similarity index 96% rename from lib/asm/non_matchings/unknown_0C91A0/func_800C8760.s rename to lib/asm/non_matchings/unknown_0C91A0/alUnlink.s index 9e819acf..c314b900 100644 --- a/lib/asm/non_matchings/unknown_0C91A0/func_800C8760.s +++ b/lib/asm/non_matchings/unknown_0C91A0/alUnlink.s @@ -1,4 +1,4 @@ -glabel func_800C8760 +glabel alUnlink /* 0C9360 800C8760 8C820000 */ lw $v0, ($a0) /* 0C9364 800C8764 50400004 */ beql $v0, $zero, .L800C8778 /* 0C9368 800C8768 8C820004 */ lw $v0, 4($a0) diff --git a/lib/asm/non_matchings/unknown_0C91A0/func_800C85A0.s b/lib/asm/non_matchings/unknown_0C91A0/func_800C85A0.s index cd65968b..ef86c0a5 100644 --- a/lib/asm/non_matchings/unknown_0C91A0/func_800C85A0.s +++ b/lib/asm/non_matchings/unknown_0C91A0/func_800C85A0.s @@ -5,7 +5,7 @@ glabel func_800C85A0 /* 0C91AC 800C85AC A7AE0018 */ sh $t6, 0x18($sp) /* 0C91B0 800C85B0 27A50018 */ addiu $a1, $sp, 0x18 /* 0C91B4 800C85B4 24840048 */ addiu $a0, $a0, 0x48 -/* 0C91B8 800C85B8 0C03246B */ jal func_800C91AC +/* 0C91B8 800C85B8 0C03246B */ jal alEvtqPostEvent /* 0C91BC 800C85BC 00003025 */ move $a2, $zero /* 0C91C0 800C85C0 8FBF0014 */ lw $ra, 0x14($sp) /* 0C91C4 800C85C4 27BD0028 */ addiu $sp, $sp, 0x28 diff --git a/lib/asm/non_matchings/unknown_0C91A0/func_800C85D0.s b/lib/asm/non_matchings/unknown_0C91A0/func_800C85D0.s index 226c1d12..9805a0ea 100644 --- a/lib/asm/non_matchings/unknown_0C91A0/func_800C85D0.s +++ b/lib/asm/non_matchings/unknown_0C91A0/func_800C85D0.s @@ -5,7 +5,7 @@ glabel func_800C85D0 /* 0C91DC 800C85DC A7AE0018 */ sh $t6, 0x18($sp) /* 0C91E0 800C85E0 27A50018 */ addiu $a1, $sp, 0x18 /* 0C91E4 800C85E4 24840048 */ addiu $a0, $a0, 0x48 -/* 0C91E8 800C85E8 0C03246B */ jal func_800C91AC +/* 0C91E8 800C85E8 0C03246B */ jal alEvtqPostEvent /* 0C91EC 800C85EC 00003025 */ move $a2, $zero /* 0C91F0 800C85F0 8FBF0014 */ lw $ra, 0x14($sp) /* 0C91F4 800C85F4 27BD0028 */ addiu $sp, $sp, 0x28 diff --git a/lib/asm/non_matchings/unknown_0C91A0/func_800C87EC.s b/lib/asm/non_matchings/unknown_0C91A0/func_800C87EC.s index 22d3a930..358218ea 100644 --- a/lib/asm/non_matchings/unknown_0C91A0/func_800C87EC.s +++ b/lib/asm/non_matchings/unknown_0C91A0/func_800C87EC.s @@ -6,7 +6,7 @@ glabel func_800C87EC /* 0C93FC 800C87FC AFBF0014 */ sw $ra, 0x14($sp) /* 0C9400 800C8800 55C00004 */ bnezl $t6, .L800C8814 /* 0C9404 800C8804 8FBF0014 */ lw $ra, 0x14($sp) -/* 0C9408 800C8808 0C01944C */ jal func_80065130 +/* 0C9408 800C8808 0C01944C */ jal alSynNew /* 0C940C 800C880C AC440000 */ sw $a0, ($v0) /* 0C9410 800C8810 8FBF0014 */ lw $ra, 0x14($sp) .L800C8814: diff --git a/lib/asm/non_matchings/unknown_0C9C90/func_800C935C.s b/lib/asm/non_matchings/unknown_0C9C90/alEvtqNew.s similarity index 95% rename from lib/asm/non_matchings/unknown_0C9C90/func_800C935C.s rename to lib/asm/non_matchings/unknown_0C9C90/alEvtqNew.s index 32e8695e..f8f1728b 100644 --- a/lib/asm/non_matchings/unknown_0C9C90/func_800C935C.s +++ b/lib/asm/non_matchings/unknown_0C9C90/alEvtqNew.s @@ -1,4 +1,4 @@ -glabel func_800C935C +glabel alEvtqNew /* 0C9F5C 800C935C 27BDFFD8 */ addiu $sp, $sp, -0x28 /* 0C9F60 800C9360 AFB30020 */ sw $s3, 0x20($sp) /* 0C9F64 800C9364 AFB2001C */ sw $s2, 0x1c($sp) @@ -17,7 +17,7 @@ glabel func_800C935C /* 0C9F98 800C9398 00A08825 */ move $s1, $a1 .L800C939C: /* 0C9F9C 800C939C 02202025 */ move $a0, $s1 -/* 0C9FA0 800C93A0 0C0321E4 */ jal func_800C8790 +/* 0C9FA0 800C93A0 0C0321E4 */ jal alLink /* 0C9FA4 800C93A4 02402825 */ move $a1, $s2 /* 0C9FA8 800C93A8 26100001 */ addiu $s0, $s0, 1 /* 0C9FAC 800C93AC 1613FFFB */ bne $s0, $s3, .L800C939C diff --git a/lib/asm/non_matchings/unknown_0C9C90/func_800C92D0.s b/lib/asm/non_matchings/unknown_0C9C90/alEvtqNextEvent.s similarity index 90% rename from lib/asm/non_matchings/unknown_0C9C90/func_800C92D0.s rename to lib/asm/non_matchings/unknown_0C9C90/alEvtqNextEvent.s index 0616db48..504bc823 100644 --- a/lib/asm/non_matchings/unknown_0C9C90/func_800C92D0.s +++ b/lib/asm/non_matchings/unknown_0C9C90/alEvtqNextEvent.s @@ -1,4 +1,4 @@ -glabel func_800C92D0 +glabel alEvtqNextEvent /* 0C9ED0 800C92D0 27BDFFD0 */ addiu $sp, $sp, -0x30 /* 0C9ED4 800C92D4 AFBF001C */ sw $ra, 0x1c($sp) /* 0C9ED8 800C92D8 AFA40030 */ sw $a0, 0x30($sp) @@ -13,14 +13,14 @@ glabel func_800C92D0 /* 0C9EFC 800C92FC 00001825 */ move $v1, $zero /* 0C9F00 800C9300 5200000D */ beql $s0, $zero, .L800C9338 /* 0C9F04 800C9304 240FFFFF */ li $t7, -1 -/* 0C9F08 800C9308 0C0321D8 */ jal func_800C8760 +/* 0C9F08 800C9308 0C0321D8 */ jal alUnlink /* 0C9F0C 800C930C 02002025 */ move $a0, $s0 /* 0C9F10 800C9310 2604000C */ addiu $a0, $s0, 0xc /* 0C9F14 800C9314 8FA50034 */ lw $a1, 0x34($sp) -/* 0C9F18 800C9318 0C034E08 */ jal func_800D3820 +/* 0C9F18 800C9318 0C034E08 */ jal alCopy /* 0C9F1C 800C931C 24060010 */ li $a2, 16 /* 0C9F20 800C9320 02002025 */ move $a0, $s0 -/* 0C9F24 800C9324 0C0321E4 */ jal func_800C8790 +/* 0C9F24 800C9324 0C0321E4 */ jal alLink /* 0C9F28 800C9328 8FA50030 */ lw $a1, 0x30($sp) /* 0C9F2C 800C932C 10000003 */ b .L800C933C /* 0C9F30 800C9330 8E030008 */ lw $v1, 8($s0) diff --git a/lib/asm/non_matchings/unknown_0C9C90/func_800C91AC.s b/lib/asm/non_matchings/unknown_0C9C90/alEvtqPostEvent.s similarity index 94% rename from lib/asm/non_matchings/unknown_0C9C90/func_800C91AC.s rename to lib/asm/non_matchings/unknown_0C9C90/alEvtqPostEvent.s index e8fdf496..0b8007e0 100644 --- a/lib/asm/non_matchings/unknown_0C9C90/func_800C91AC.s +++ b/lib/asm/non_matchings/unknown_0C9C90/alEvtqPostEvent.s @@ -1,4 +1,4 @@ -glabel func_800C91AC +glabel alEvtqPostEvent /* 0C9DAC 800C91AC 27BDFFD0 */ addiu $sp, $sp, -0x30 /* 0C9DB0 800C91B0 AFBF0014 */ sw $ra, 0x14($sp) /* 0C9DB4 800C91B4 AFA40030 */ sw $a0, 0x30($sp) @@ -20,12 +20,12 @@ glabel func_800C91AC .L800C91F4: /* 0C9DF4 800C91F4 AFA5001C */ sw $a1, 0x1c($sp) /* 0C9DF8 800C91F8 AFA70038 */ sw $a3, 0x38($sp) -/* 0C9DFC 800C91FC 0C0321D8 */ jal func_800C8760 +/* 0C9DFC 800C91FC 0C0321D8 */ jal alUnlink /* 0C9E00 800C9200 AFA8002C */ sw $t0, 0x2c($sp) /* 0C9E04 800C9204 8FA8002C */ lw $t0, 0x2c($sp) /* 0C9E08 800C9208 8FA40034 */ lw $a0, 0x34($sp) /* 0C9E0C 800C920C 24060010 */ li $a2, 16 -/* 0C9E10 800C9210 0C034E08 */ jal func_800D3820 +/* 0C9E10 800C9210 0C034E08 */ jal alCopy /* 0C9E14 800C9214 2505000C */ addiu $a1, $t0, 0xc /* 0C9E18 800C9218 8FA70038 */ lw $a3, 0x38($sp) /* 0C9E1C 800C921C 3C017FFF */ lui $at, (0x7FFFFFFF >> 16) # lui $at, 0x7fff @@ -50,7 +50,7 @@ glabel func_800C91AC /* 0C9E60 800C9260 AD000008 */ sw $zero, 8($t0) /* 0C9E64 800C9264 AD070008 */ sw $a3, 8($t0) .L800C9268: -/* 0C9E68 800C9268 0C0321E4 */ jal func_800C8790 +/* 0C9E68 800C9268 0C0321E4 */ jal alLink /* 0C9E6C 800C926C 01002025 */ move $a0, $t0 /* 0C9E70 800C9270 10000011 */ b .L800C92B8 /* 0C9E74 800C9274 00000000 */ nop @@ -64,7 +64,7 @@ glabel func_800C91AC /* 0C9E90 800C9290 8CD90008 */ lw $t9, 8($a2) /* 0C9E94 800C9294 01002025 */ move $a0, $t0 /* 0C9E98 800C9298 03274823 */ subu $t1, $t9, $a3 -/* 0C9E9C 800C929C 0C0321E4 */ jal func_800C8790 +/* 0C9E9C 800C929C 0C0321E4 */ jal alLink /* 0C9EA0 800C92A0 ACC90008 */ sw $t1, 8($a2) /* 0C9EA4 800C92A4 10000004 */ b .L800C92B8 /* 0C9EA8 800C92A8 00000000 */ nop diff --git a/lib/asm/non_matchings/unknown_0C9C90/func_800C93D0.s b/lib/asm/non_matchings/unknown_0C9C90/alSynAddPlayer.s similarity index 97% rename from lib/asm/non_matchings/unknown_0C9C90/func_800C93D0.s rename to lib/asm/non_matchings/unknown_0C9C90/alSynAddPlayer.s index 0d98992c..246146b5 100644 --- a/lib/asm/non_matchings/unknown_0C9C90/func_800C93D0.s +++ b/lib/asm/non_matchings/unknown_0C9C90/alSynAddPlayer.s @@ -1,4 +1,4 @@ -glabel func_800C93D0 +glabel alSynAddPlayer /* 0C9FD0 800C93D0 27BDFFE8 */ addiu $sp, $sp, -0x18 /* 0C9FD4 800C93D4 AFBF0014 */ sw $ra, 0x14($sp) /* 0C9FD8 800C93D8 00803025 */ move $a2, $a0 diff --git a/lib/asm/non_matchings/unknown_0C9C90/func_800C9090.s b/lib/asm/non_matchings/unknown_0C9C90/func_800C9090.s index c77e0505..e7548973 100644 --- a/lib/asm/non_matchings/unknown_0C9C90/func_800C9090.s +++ b/lib/asm/non_matchings/unknown_0C9C90/func_800C9090.s @@ -28,10 +28,10 @@ glabel func_800C9090 /* 0C9CF4 800C90F4 03194021 */ addu $t0, $t8, $t9 /* 0C9CF8 800C90F8 AE280008 */ sw $t0, 8($s1) .L800C90FC: -/* 0C9CFC 800C90FC 0C0321D8 */ jal func_800C8760 +/* 0C9CFC 800C90FC 0C0321D8 */ jal alUnlink /* 0C9D00 800C9100 02002025 */ move $a0, $s0 /* 0C9D04 800C9104 02002025 */ move $a0, $s0 -/* 0C9D08 800C9108 0C0321E4 */ jal func_800C8790 +/* 0C9D08 800C9108 0C0321E4 */ jal alLink /* 0C9D0C 800C910C 02402825 */ move $a1, $s2 .L800C9110: /* 0C9D10 800C9110 1620FFF0 */ bnez $s1, .L800C90D4 @@ -61,10 +61,10 @@ glabel func_800C9090 /* 0C9D68 800C9168 00000000 */ nop .L800C916C: /* 0C9D6C 800C916C 8E110000 */ lw $s1, ($s0) -/* 0C9D70 800C9170 0C0321D8 */ jal func_800C8760 +/* 0C9D70 800C9170 0C0321D8 */ jal alUnlink /* 0C9D74 800C9174 02002025 */ move $a0, $s0 /* 0C9D78 800C9178 02002025 */ move $a0, $s0 -/* 0C9D7C 800C917C 0C0321E4 */ jal func_800C8790 +/* 0C9D7C 800C917C 0C0321E4 */ jal alLink /* 0C9D80 800C9180 02402825 */ move $a1, $s2 /* 0C9D84 800C9184 1620FFF9 */ bnez $s1, .L800C916C /* 0C9D88 800C9188 02208025 */ move $s0, $s1 diff --git a/lib/asm/non_matchings/unknown_0C9C90/func_800C9420.s b/lib/asm/non_matchings/unknown_0C9C90/func_800C9420.s index eaa916c5..70a5fdae 100644 --- a/lib/asm/non_matchings/unknown_0C9C90/func_800C9420.s +++ b/lib/asm/non_matchings/unknown_0C9C90/func_800C9420.s @@ -12,11 +12,11 @@ glabel func_800C9420 /* 0CA048 800C9448 AFA80028 */ sw $t0, 0x28($sp) /* 0CA04C 800C944C AFA70024 */ sw $a3, 0x24($sp) /* 0CA050 800C9450 AFA0001C */ sw $zero, 0x1c($sp) -/* 0CA054 800C9454 0C0321D8 */ jal func_800C8760 +/* 0CA054 800C9454 0C0321D8 */ jal alUnlink /* 0CA058 800C9458 00E02025 */ move $a0, $a3 /* 0CA05C 800C945C 8FA80028 */ lw $t0, 0x28($sp) /* 0CA060 800C9460 8FA40024 */ lw $a0, 0x24($sp) -/* 0CA064 800C9464 0C0321E4 */ jal func_800C8790 +/* 0CA064 800C9464 0C0321E4 */ jal alLink /* 0CA068 800C9468 2505000C */ addiu $a1, $t0, 0xc /* 0CA06C 800C946C 10000021 */ b .L800C94F4 /* 0CA070 800C9470 8FA3001C */ lw $v1, 0x1c($sp) @@ -27,11 +27,11 @@ glabel func_800C9420 /* 0CA080 800C9480 ACA70000 */ sw $a3, ($a1) /* 0CA084 800C9484 AFA80028 */ sw $t0, 0x28($sp) /* 0CA088 800C9488 AFA70024 */ sw $a3, 0x24($sp) -/* 0CA08C 800C948C 0C0321D8 */ jal func_800C8760 +/* 0CA08C 800C948C 0C0321D8 */ jal alUnlink /* 0CA090 800C9490 AFA3001C */ sw $v1, 0x1c($sp) /* 0CA094 800C9494 8FA80028 */ lw $t0, 0x28($sp) /* 0CA098 800C9498 8FA40024 */ lw $a0, 0x24($sp) -/* 0CA09C 800C949C 0C0321E4 */ jal func_800C8790 +/* 0CA09C 800C949C 0C0321E4 */ jal alLink /* 0CA0A0 800C94A0 2505000C */ addiu $a1, $t0, 0xc /* 0CA0A4 800C94A4 10000013 */ b .L800C94F4 /* 0CA0A8 800C94A8 8FA3001C */ lw $v1, 0x1c($sp) diff --git a/lib/asm/non_matchings/unknown_0CA9A0/D_800CAA7C.s b/lib/asm/non_matchings/unknown_0CA9A0/alEnvmixerParam.s similarity index 99% rename from lib/asm/non_matchings/unknown_0CA9A0/D_800CAA7C.s rename to lib/asm/non_matchings/unknown_0CA9A0/alEnvmixerParam.s index c587571e..a6d65bd6 100644 --- a/lib/asm/non_matchings/unknown_0CA9A0/D_800CAA7C.s +++ b/lib/asm/non_matchings/unknown_0CA9A0/alEnvmixerParam.s @@ -1,4 +1,4 @@ -glabel D_800CAA7C +glabel alEnvmixerParam /* 0CB67C 800CAA7C 27BDFFD0 */ addiu $sp, $sp, -0x30 /* 0CB680 800CAA80 AFBF001C */ sw $ra, 0x1c($sp) /* 0CB684 800CAA84 AFA40030 */ sw $a0, 0x30($sp) diff --git a/lib/asm/non_matchings/unknown_0CA9A0/D_800CB540.s b/lib/asm/non_matchings/unknown_0CA9A0/alLoadParam.s similarity index 98% rename from lib/asm/non_matchings/unknown_0CA9A0/D_800CB540.s rename to lib/asm/non_matchings/unknown_0CA9A0/alLoadParam.s index 6f131496..2f3c7f52 100644 --- a/lib/asm/non_matchings/unknown_0CA9A0/D_800CB540.s +++ b/lib/asm/non_matchings/unknown_0CA9A0/alLoadParam.s @@ -1,4 +1,4 @@ -glabel D_800CB540 +glabel alLoadParam /* 0CC140 800CB540 27BDFFE8 */ addiu $sp, $sp, -0x18 /* 0CC144 800CB544 24010004 */ li $at, 4 /* 0CC148 800CB548 AFBF0014 */ sw $ra, 0x14($sp) @@ -64,7 +64,7 @@ glabel D_800CB540 /* 0CC22C 800CB62C 8F190008 */ lw $t9, 8($t8) /* 0CC230 800CB630 ACF90024 */ sw $t9, 0x24($a3) /* 0CC234 800CB634 8C44000C */ lw $a0, 0xc($v0) -/* 0CC238 800CB638 0C034E08 */ jal func_800D3820 +/* 0CC238 800CB638 0C034E08 */ jal alCopy /* 0CC23C 800CB63C 2484000C */ addiu $a0, $a0, 0xc /* 0CC240 800CB640 10000031 */ b .L800CB708 /* 0CC244 800CB644 8FBF0014 */ lw $ra, 0x14($sp) diff --git a/lib/asm/non_matchings/unknown_0CA9A0/D_800CC090.s b/lib/asm/non_matchings/unknown_0CA9A0/alResampleParam.s similarity index 99% rename from lib/asm/non_matchings/unknown_0CA9A0/D_800CC090.s rename to lib/asm/non_matchings/unknown_0CA9A0/alResampleParam.s index f18d2b88..dd4bc702 100644 --- a/lib/asm/non_matchings/unknown_0CA9A0/D_800CC090.s +++ b/lib/asm/non_matchings/unknown_0CA9A0/alResampleParam.s @@ -1,4 +1,4 @@ -glabel D_800CC090 +glabel alResampleParam /* 0CCC90 800CC090 24AEFFFF */ addiu $t6, $a1, -1 /* 0CCC94 800CC094 27BDFFD8 */ addiu $sp, $sp, -0x28 /* 0CCC98 800CC098 2DC10009 */ sltiu $at, $t6, 9 diff --git a/lib/asm/non_matchings/unknown_0CCF90/D_800CC4E0.s b/lib/asm/non_matchings/unknown_0CCF90/alSaveParam.s similarity index 97% rename from lib/asm/non_matchings/unknown_0CCF90/D_800CC4E0.s rename to lib/asm/non_matchings/unknown_0CCF90/alSaveParam.s index 231bafe1..e6ea7780 100644 --- a/lib/asm/non_matchings/unknown_0CCF90/D_800CC4E0.s +++ b/lib/asm/non_matchings/unknown_0CCF90/alSaveParam.s @@ -1,4 +1,4 @@ -glabel D_800CC4E0 +glabel alSaveParam /* 0CD0E0 800CC4E0 24010001 */ li $at, 1 /* 0CD0E4 800CC4E4 10A10006 */ beq $a1, $at, .L800CC500 /* 0CD0E8 800CC4E8 00001025 */ move $v0, $zero diff --git a/lib/asm/non_matchings/unknown_0D3020/func_800D6500.s b/lib/asm/non_matchings/unknown_0D3020/__osResetGlobalIntMask.s similarity index 97% rename from lib/asm/non_matchings/unknown_0D3020/func_800D6500.s rename to lib/asm/non_matchings/unknown_0D3020/__osResetGlobalIntMask.s index 52c878c2..35a91e80 100644 --- a/lib/asm/non_matchings/unknown_0D3020/func_800D6500.s +++ b/lib/asm/non_matchings/unknown_0D3020/__osResetGlobalIntMask.s @@ -1,4 +1,4 @@ -glabel func_800D6500 +glabel __osResetGlobalIntMask /* 0D7100 800D6500 27BDFFD8 */ addiu $sp, $sp, -0x28 /* 0D7104 800D6504 AFBF001C */ sw $ra, 0x1c($sp) /* 0D7108 800D6508 AFA40028 */ sw $a0, 0x28($sp) diff --git a/lib/asm/non_matchings/unknown_0D3020/func_800D6560.s b/lib/asm/non_matchings/unknown_0D3020/osEPiRawWriteIo.s similarity index 97% rename from lib/asm/non_matchings/unknown_0D3020/func_800D6560.s rename to lib/asm/non_matchings/unknown_0D3020/osEPiRawWriteIo.s index 9a96903b..76e1a859 100644 --- a/lib/asm/non_matchings/unknown_0D3020/func_800D6560.s +++ b/lib/asm/non_matchings/unknown_0D3020/osEPiRawWriteIo.s @@ -1,4 +1,4 @@ -glabel func_800D6560 +glabel osEPiRawWriteIo /* 0D7160 800D6560 3C0EA460 */ lui $t6, %hi(D_A4600010) # $t6, 0xa460 /* 0D7164 800D6564 8DC70010 */ lw $a3, %lo(D_A4600010)($t6) /* 0D7168 800D6568 27BDFFF8 */ addiu $sp, $sp, -8 diff --git a/lib/asm/non_matchings/unknown_0D3020/func_800D65B0.s b/lib/asm/non_matchings/unknown_0D3020/osYieldThread.s similarity index 98% rename from lib/asm/non_matchings/unknown_0D3020/func_800D65B0.s rename to lib/asm/non_matchings/unknown_0D3020/osYieldThread.s index 5fedf7f0..fb7f2db7 100644 --- a/lib/asm/non_matchings/unknown_0D3020/func_800D65B0.s +++ b/lib/asm/non_matchings/unknown_0D3020/osYieldThread.s @@ -1,4 +1,4 @@ -glabel func_800D65B0 +glabel osYieldThread /* 0D71B0 800D65B0 27BDFFD8 */ addiu $sp, $sp, -0x28 /* 0D71B4 800D65B4 AFBF001C */ sw $ra, 0x1c($sp) /* 0D71B8 800D65B8 0C034958 */ jal __osDisableInt diff --git a/lib/asm/non_matchings/unknown_0D3160/__osDevMgrMain.s b/lib/asm/non_matchings/unknown_0D3160/__osDevMgrMain.s index 665b2cf6..8e6cc44f 100644 --- a/lib/asm/non_matchings/unknown_0D3160/__osDevMgrMain.s +++ b/lib/asm/non_matchings/unknown_0D3160/__osDevMgrMain.s @@ -73,7 +73,7 @@ glabel __osDevMgrMain /* 0D3468 800D2868 0C0322EC */ jal osRecvMesg /* 0D346C 800D286C 8D640010 */ lw $a0, 0x10($t3) /* 0D3470 800D2870 3C040010 */ lui $a0, (0x00100401 >> 16) # lui $a0, 0x10 -/* 0D3474 800D2874 0C035940 */ jal func_800D6500 +/* 0D3474 800D2874 0C035940 */ jal __osResetGlobalIntMask /* 0D3478 800D2878 34840401 */ ori $a0, (0x00100401 & 0xFFFF) # ori $a0, $a0, 0x401 /* 0D347C 800D287C 8FAE0020 */ lw $t6, 0x20($sp) /* 0D3480 800D2880 8FAD003C */ lw $t5, 0x3c($sp) @@ -83,7 +83,7 @@ glabel __osDevMgrMain /* 0D3490 800D2890 34A50510 */ ori $a1, (0x05000510 & 0xFFFF) # ori $a1, $a1, 0x510 /* 0D3494 800D2894 00C15025 */ or $t2, $a2, $at /* 0D3498 800D2898 01403025 */ move $a2, $t2 -/* 0D349C 800D289C 0C035958 */ jal func_800D6560 +/* 0D349C 800D289C 0C035958 */ jal osEPiRawWriteIo /* 0D34A0 800D28A0 8DA40014 */ lw $a0, 0x14($t5) .L800D28A4: /* 0D34A4 800D28A4 8FAF002C */ lw $t7, 0x2c($sp) @@ -119,7 +119,7 @@ glabel __osDevMgrMain /* 0D3518 800D2918 95CA001A */ lhu $t2, 0x1a($t6) /* 0D351C 800D291C 1541FF98 */ bne $t2, $at, .L800D2780 /* 0D3520 800D2920 00000000 */ nop -/* 0D3524 800D2924 0C03596C */ jal func_800D65B0 +/* 0D3524 800D2924 0C03596C */ jal osYieldThread /* 0D3528 800D2928 00000000 */ nop /* 0D352C 800D292C 1000FF94 */ b .L800D2780 /* 0D3530 800D2930 00000000 */ nop diff --git a/lib/asm/non_matchings/unknown_0D43F0/func_800D3820.s b/lib/asm/non_matchings/unknown_0D43F0/alCopy.s similarity index 98% rename from lib/asm/non_matchings/unknown_0D43F0/func_800D3820.s rename to lib/asm/non_matchings/unknown_0D43F0/alCopy.s index 542f81ef..17bcae43 100644 --- a/lib/asm/non_matchings/unknown_0D43F0/func_800D3820.s +++ b/lib/asm/non_matchings/unknown_0D43F0/alCopy.s @@ -1,4 +1,4 @@ -glabel func_800D3820 +glabel alCopy /* 0D4420 800D3820 00801025 */ move $v0, $a0 /* 0D4424 800D3824 00A01825 */ move $v1, $a1 /* 0D4428 800D3828 18C00018 */ blez $a2, .L800D388C diff --git a/lib/src/unknown_0C91A0.c b/lib/src/unknown_0C91A0.c index a8275a73..38b3a023 100644 --- a/lib/src/unknown_0C91A0.c +++ b/lib/src/unknown_0C91A0.c @@ -8,8 +8,8 @@ GLOBAL_ASM("lib/asm/non_matchings/unknown_0C91A0/func_800C85A0.s") GLOBAL_ASM("lib/asm/non_matchings/unknown_0C91A0/func_800C85D0.s") GLOBAL_ASM("lib/asm/non_matchings/unknown_0C91A0/func_800C8600.s") -GLOBAL_ASM("lib/asm/non_matchings/unknown_0C91A0/func_800C8760.s") -GLOBAL_ASM("lib/asm/non_matchings/unknown_0C91A0/func_800C8790.s") +GLOBAL_ASM("lib/asm/non_matchings/unknown_0C91A0/alUnlink.s") +GLOBAL_ASM("lib/asm/non_matchings/unknown_0C91A0/alLink.s") GLOBAL_ASM("lib/asm/non_matchings/unknown_0C91A0/func_800C87B4.s") GLOBAL_ASM("lib/asm/non_matchings/unknown_0C91A0/func_800C87EC.s") diff --git a/lib/src/unknown_0C9C90.c b/lib/src/unknown_0C9C90.c index ac4cf806..3ec10ecf 100644 --- a/lib/src/unknown_0C9C90.c +++ b/lib/src/unknown_0C9C90.c @@ -5,9 +5,9 @@ #include "macros.h" GLOBAL_ASM("lib/asm/non_matchings/unknown_0C9C90/func_800C9090.s") -GLOBAL_ASM("lib/asm/non_matchings/unknown_0C9C90/func_800C91AC.s") -GLOBAL_ASM("lib/asm/non_matchings/unknown_0C9C90/func_800C92D0.s") -GLOBAL_ASM("lib/asm/non_matchings/unknown_0C9C90/func_800C935C.s") -GLOBAL_ASM("lib/asm/non_matchings/unknown_0C9C90/func_800C93D0.s") +GLOBAL_ASM("lib/asm/non_matchings/unknown_0C9C90/alEvtqPostEvent.s") +GLOBAL_ASM("lib/asm/non_matchings/unknown_0C9C90/alEvtqNextEvent.s") +GLOBAL_ASM("lib/asm/non_matchings/unknown_0C9C90/alEvtqNew.s") +GLOBAL_ASM("lib/asm/non_matchings/unknown_0C9C90/alSynAddPlayer.s") GLOBAL_ASM("lib/asm/non_matchings/unknown_0C9C90/func_800C9420.s") GLOBAL_ASM("lib/asm/non_matchings/unknown_0C9C90/func_800C9508.s") diff --git a/lib/src/unknown_0CA9A0.c b/lib/src/unknown_0CA9A0.c index 4cbd9eec..f1db61e5 100644 --- a/lib/src/unknown_0CA9A0.c +++ b/lib/src/unknown_0CA9A0.c @@ -6,13 +6,13 @@ 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") +GLOBAL_ASM("lib/asm/non_matchings/unknown_0CA9A0/alEnvmixerParam.s") GLOBAL_ASM("lib/asm/non_matchings/unknown_0CA9A0/func_800CAC5C.s") GLOBAL_ASM("lib/asm/non_matchings/unknown_0CA9A0/func_800CB2D4.s") GLOBAL_ASM("lib/asm/non_matchings/unknown_0CA9A0/func_800CB498.s") -GLOBAL_ASM("lib/asm/non_matchings/unknown_0CA9A0/D_800CB540.s") +GLOBAL_ASM("lib/asm/non_matchings/unknown_0CA9A0/alLoadParam.s") GLOBAL_ASM("lib/asm/non_matchings/unknown_0CA9A0/D_800CB714.s") GLOBAL_ASM("lib/asm/non_matchings/unknown_0CA9A0/func_800CBAC0.s") GLOBAL_ASM("lib/asm/non_matchings/unknown_0CA9A0/D_800CBBEC.s") -GLOBAL_ASM("lib/asm/non_matchings/unknown_0CA9A0/D_800CC090.s") +GLOBAL_ASM("lib/asm/non_matchings/unknown_0CA9A0/alResampleParam.s") GLOBAL_ASM("lib/asm/non_matchings/unknown_0CA9A0/D_800CC17C.s") diff --git a/lib/src/unknown_0CCF90.c b/lib/src/unknown_0CCF90.c index 3bda4ce4..812bc4f2 100644 --- a/lib/src/unknown_0CCF90.c +++ b/lib/src/unknown_0CCF90.c @@ -6,7 +6,7 @@ GLOBAL_ASM("lib/asm/non_matchings/unknown_0CCF90/D_800CC390.s") GLOBAL_ASM("lib/asm/non_matchings/unknown_0CCF90/D_800CC3C0.s") -GLOBAL_ASM("lib/asm/non_matchings/unknown_0CCF90/D_800CC4E0.s") +GLOBAL_ASM("lib/asm/non_matchings/unknown_0CCF90/alSaveParam.s") GLOBAL_ASM("lib/asm/non_matchings/unknown_0CCF90/D_800CC514.s") GLOBAL_ASM("lib/asm/non_matchings/unknown_0CCF90/osInitialize.s") GLOBAL_ASM("lib/asm/non_matchings/unknown_0CCF90/osSetThreadPri.s") diff --git a/lib/src/unknown_0D43F0.c b/lib/src/unknown_0D43F0.c index 9e2ec6f2..468ef72c 100644 --- a/lib/src/unknown_0D43F0.c +++ b/lib/src/unknown_0D43F0.c @@ -4,6 +4,6 @@ #include "types.h" #include "macros.h" -GLOBAL_ASM("lib/asm/non_matchings/unknown_0D43F0/func_800D3820.s") +GLOBAL_ASM("lib/asm/non_matchings/unknown_0D43F0/alCopy.s") GLOBAL_ASM("lib/asm/non_matchings/unknown_0D43F0/_Putfld.s") GLOBAL_ASM("lib/asm/non_matchings/unknown_0D43F0/_Printf.s") \ No newline at end of file diff --git a/lib/src/unknown_0D5EC0.c b/lib/src/unknown_0D5EC0.c index a626a551..81b14289 100644 --- a/lib/src/unknown_0D5EC0.c +++ b/lib/src/unknown_0D5EC0.c @@ -19,9 +19,9 @@ GLOBAL_ASM("lib/asm/non_matchings/unknown_0D3020/func_800D63F0.s") GLOBAL_ASM("lib/asm/non_matchings/unknown_0D3020/__osSpSetPc.s") GLOBAL_ASM("lib/asm/non_matchings/unknown_0D3020/__osSpRawStartDma.s") GLOBAL_ASM("lib/asm/non_matchings/unknown_0D3020/__osSpDeviceBusy.s") -GLOBAL_ASM("lib/asm/non_matchings/unknown_0D3020/func_800D6500.s") -GLOBAL_ASM("lib/asm/non_matchings/unknown_0D3020/func_800D6560.s") -GLOBAL_ASM("lib/asm/non_matchings/unknown_0D3020/func_800D65B0.s") +GLOBAL_ASM("lib/asm/non_matchings/unknown_0D3020/__osResetGlobalIntMask.s") +GLOBAL_ASM("lib/asm/non_matchings/unknown_0D3020/osEPiRawWriteIo.s") +GLOBAL_ASM("lib/asm/non_matchings/unknown_0D3020/osYieldThread.s") GLOBAL_ASM("lib/asm/non_matchings/unknown_0D3020/osDestroyThread.s") GLOBAL_ASM("lib/asm/non_matchings/unknown_0D3020/_Litob.s") GLOBAL_ASM("lib/asm/non_matchings/unknown_0D3020/_Genld.s") diff --git a/src/unknown_003260.c b/src/unknown_003260.c index 480596ce..369abc3f 100644 --- a/src/unknown_003260.c +++ b/src/unknown_003260.c @@ -53,7 +53,7 @@ void func_8000318C(s32 arg0) { } } -GLOBAL_ASM("asm/non_matchings/unknown_003260/func_800031C0.s") +GLOBAL_ASM("asm/non_matchings/unknown_003260/alSndpNew.s") GLOBAL_ASM("asm/non_matchings/unknown_003260/D_800033C8.s") GLOBAL_ASM("asm/non_matchings/unknown_003260/func_80003470.s") GLOBAL_ASM("asm/non_matchings/unknown_003260/func_8000410C.s") diff --git a/src/unknown_005740.c b/src/unknown_005740.c index 6aee862a..e4d6432b 100644 --- a/src/unknown_005740.c +++ b/src/unknown_005740.c @@ -51,7 +51,7 @@ GLOBAL_ASM("asm/non_matchings/unknown_005740/func_8000AC34.s") GLOBAL_ASM("asm/non_matchings/unknown_005740/func_8000ACE0.s") GLOBAL_ASM("asm/non_matchings/unknown_005740/func_8000AD98.s") GLOBAL_ASM("asm/non_matchings/unknown_005740/func_8000ADF4.s") -GLOBAL_ASM("asm/non_matchings/unknown_005740/func_8000AE90.s") +GLOBAL_ASM("asm/non_matchings/unknown_005740/__initChanState.s") GLOBAL_ASM("asm/non_matchings/unknown_005740/func_8000AEFC.s") /* Unknown Size */ diff --git a/src/unknown_064690.c b/src/unknown_064690.c index 3460d1d6..f7fcb336 100644 --- a/src/unknown_064690.c +++ b/src/unknown_064690.c @@ -22,7 +22,7 @@ void func_80063A90(u32 arg0, u8 arg1) { unknownStruct.unk8 = 0xB0; unknownStruct.unk9 = 0x5F; unknownStruct.unkA = arg1; - func_800C91AC(arg0 + 0x48, &unknownStruct, 0); + alEvtqPostEvent(arg0 + 0x48, &unknownStruct, 0); } diff --git a/src/unknown_0647A0.c b/src/unknown_0647A0.c index a396d57d..6fc01d22 100644 --- a/src/unknown_0647A0.c +++ b/src/unknown_0647A0.c @@ -22,6 +22,6 @@ void func_80063BA0(u32 arg0, u8 arg1, u8 arg2) { unknownStruct.unk8 = arg1 | 0xB0; unknownStruct.unk9 = 8; unknownStruct.unkA = arg2; - func_800C91AC(arg0 + 0x48, &unknownStruct, 0); + alEvtqPostEvent(arg0 + 0x48, &unknownStruct, 0); } diff --git a/src/unknown_064830.c b/src/unknown_064830.c index 8f7be2d9..fee4cbbb 100644 --- a/src/unknown_064830.c +++ b/src/unknown_064830.c @@ -5,16 +5,16 @@ #include "macros.h" extern s32 D_80065900; -extern s32 D_800659D4; +extern s32 alAuxBusParam; extern s32 D_800CA0D0; -extern s32 D_800CAA7C; -extern s32 D_800CB540; +extern s32 alEnvmixerParam; +extern s32 alLoadParam; extern s32 D_800CBBEC; -extern s32 D_800CC090; +extern s32 alResampleParam; extern s32 D_800CC17C; extern s32 D_800CC390; extern s32 D_800CC3C0; -extern s32 D_800CC4E0; +extern s32 alSaveParam; extern s32 D_800CC514; GLOBAL_ASM("asm/non_matchings/unknown_064830/D_80063C30.s") @@ -59,9 +59,9 @@ typedef struct unk80064E54 { s32 unk48; } unk80064E54; -void func_80064E54(unk80064E54* arg0, s32 arg1) { - func_800CA0B0(arg0, &D_800CA0D0, &D_800CAA7C, 4); - arg0->unk14 = func_800C77F0(0, 0, arg1, 1, 0x50); +void alEnvmixerNew(unk80064E54* arg0, s32 arg1) { + func_800CA0B0(arg0, &D_800CA0D0, &alEnvmixerParam, 4); + arg0->unk14 = alHeapDBAlloc(0, 0, arg1, 1, 0x50); arg0->unk38 = 1; arg0->unk48 = 0; arg0->unk1A = 1; @@ -94,10 +94,10 @@ typedef struct unk80064EF8 { s32 unk44; } unk80064EF8; -void func_80064EF8(unk80064EF8* arg0, s32 (*arg1)(s32*), s32 arg2) { - func_800CA0B0(arg0, &D_800CBBEC, &D_800CB540, 0); - arg0->unk14 = func_800C77F0(0, 0, arg2, 1, 0x20); - arg0->unk18 = func_800C77F0(0, 0, arg2, 1, 0x20); +void alLoadNew(unk80064EF8* arg0, s32 (*arg1)(s32*), s32 arg2) { + func_800CA0B0(arg0, &D_800CBBEC, &alLoadParam, 0); + arg0->unk14 = alHeapDBAlloc(0, 0, arg2, 1, 0x20); + arg0->unk18 = alHeapDBAlloc(0, 0, arg2, 1, 0x20); arg0->unk30 = arg1(&arg0->unk34); arg0->unk3C = 0; arg0->unk40 = 1; @@ -116,9 +116,9 @@ typedef struct unk80064F9C { s32 unk30; } unk80064F9C; -void func_80064F9C(unk80064F9C* arg0, s32 arg1) { - func_800CA0B0(arg0, &D_800CC17C, &D_800CC090, 1); - arg0->unk14 = func_800C77F0(0, 0, arg1, 1, 0x20); +void alResampleNew(unk80064F9C* arg0, s32 arg1) { + func_800CA0B0(arg0, &D_800CC17C, &alResampleParam, 1); + arg0->unk14 = alHeapDBAlloc(0, 0, arg1, 1, 0x20); arg0->unk24 = 1; arg0->unk30 = 0; arg0->unk1C = 0; @@ -135,8 +135,8 @@ typedef struct unk80065024 { s32 unk1C; } unk80065024; -void func_80065024(unk80065024* arg0, s32 arg1, s32 arg2) { - func_800CA0B0(arg0, &D_80065900, &D_800659D4, 6); +void alAuxBusNew(unk80065024* arg0, s32 arg1, s32 arg2) { + func_800CA0B0(arg0, &D_80065900, &alAuxBusParam, 6); arg0->unk14 = 0; arg0->unk18 = arg2; arg0->unk1C = arg1; @@ -149,7 +149,7 @@ typedef struct unk80065084 { s32 unk1C; } unk80065084; -void func_80065084(unk80065084* arg0, s32 arg1, s32 arg2) { +void alMainBusNew(unk80065084* arg0, s32 arg1, s32 arg2) { func_800CA0B0(arg0, &D_800CC3C0, &D_800CC390, 7); arg0->unk14 = 0; arg0->unk18 = arg2; @@ -162,8 +162,8 @@ typedef struct unk800650E4 { s32 unk18; } unk800650E4; -void func_800650E4(unk800650E4* arg0) { - func_800CA0B0(arg0, &D_800CC514, &D_800CC4E0, 3); +void alSaveNew(unk800650E4* arg0) { + func_800CA0B0(arg0, &D_800CC514, &alSaveParam, 3); arg0->unk14 = 0; arg0->unk18 = 1; } diff --git a/src/unknown_065D30.c b/src/unknown_065D30.c index 01da4c60..dcca369d 100644 --- a/src/unknown_065D30.c +++ b/src/unknown_065D30.c @@ -4,7 +4,7 @@ #include "types.h" #include "macros.h" -GLOBAL_ASM("asm/non_matchings/unknown_065D30/func_80065130.s") +GLOBAL_ASM("asm/non_matchings/unknown_065D30/alSynNew.s") GLOBAL_ASM("asm/non_matchings/unknown_065D30/func_80065494.s") GLOBAL_ASM("asm/non_matchings/unknown_065D30/func_80065668.s") GLOBAL_ASM("asm/non_matchings/unknown_065D30/func_8006569C.s") diff --git a/src/unknown_066500.c b/src/unknown_066500.c index 301293cd..e0db5877 100644 --- a/src/unknown_066500.c +++ b/src/unknown_066500.c @@ -5,6 +5,6 @@ #include "macros.h" GLOBAL_ASM("asm/non_matchings/unknown_066500/D_80065900.s") -GLOBAL_ASM("asm/non_matchings/unknown_066500/D_800659D4.s") +GLOBAL_ASM("asm/non_matchings/unknown_066500/alAuxBusParam.s") GLOBAL_ASM("asm/non_matchings/unknown_066500/func_80065A80.s") GLOBAL_ASM("asm/non_matchings/unknown_066500/func_80065B20.s") diff --git a/src/unknown_0C83F0.c b/src/unknown_0C83F0.c index 8c75cb09..2133d77d 100644 --- a/src/unknown_0C83F0.c +++ b/src/unknown_0C83F0.c @@ -4,4 +4,4 @@ #include "types.h" #include "macros.h" -GLOBAL_ASM("asm/non_matchings/unknown_0C83F0/func_800C77F0.s") +GLOBAL_ASM("asm/non_matchings/unknown_0C83F0/alHeapDBAlloc.s") diff --git a/undefined_syms.txt b/undefined_syms.txt index c02ecb5b..16b32cac 100755 --- a/undefined_syms.txt +++ b/undefined_syms.txt @@ -38,7 +38,7 @@ D_80063C30 = 0x80063C30; D_80063F94 = 0x80063F94; D_80063FAC = 0x80063FAC; D_80065900 = 0x80065900; -D_800659D4 = 0x800659D4; +alAuxBusParam = 0x800659D4; D_80065D40 = 0x80065D40; D_80065D98 = 0x80065D98; D_8006C330 = 0x8006C330; @@ -49,15 +49,15 @@ D_800C7340 = 0x800C7340; D_800C74A0 = 0x800C74A0; D_800C9D40 = 0x800C9D40; D_800CA0D0 = 0x800CA0D0; -D_800CAA7C = 0x800CAA7C; -D_800CB540 = 0x800CB540; +alEnvmixerParam = 0x800CAA7C; +alLoadParam = 0x800CB540; D_800CB714 = 0x800CB714; D_800CBBEC = 0x800CBBEC; -D_800CC090 = 0x800CC090; +alResampleParam = 0x800CC090; D_800CC17C = 0x800CC17C; D_800CC390 = 0x800CC390; D_800CC3C0 = 0x800CC3C0; -D_800CC4E0 = 0x800CC4E0; +alSaveParam = 0x800CC4E0; D_800CC514 = 0x800CC514; viMgrMain = 0x800D1B08; osPiRawStartDma = 0x800D25A0; From efb3771247def0a4284094db5097adf4d9b5534b Mon Sep 17 00:00:00 2001 From: Mittenshugg Date: Wed, 5 Aug 2020 01:34:49 -0500 Subject: [PATCH 12/12] identify libaudio functions --- .../unknown_001050/func_80002224.s | 2 +- asm/non_matchings/unknown_003260/D_80002A98.s | 2 +- .../{func_80003470.s => _handleEvent.s} | 26 ++++---- .../{D_800033C8.s => _sndpVoiceHandler.s} | 4 +- asm/non_matchings/unknown_003260/alSndpNew.s | 8 +-- .../unknown_003260/func_80002660.s | 4 +- .../unknown_003260/func_80002C00.s | 2 +- .../unknown_003260/func_8000410C.s | 4 +- .../unknown_003260/func_8000418C.s | 2 +- .../unknown_003260/func_80004384.s | 4 +- .../unknown_005740/__initChanState.s | 2 +- .../{func_8000ACE0.s => __initFromBank.s} | 10 ++-- .../{func_8000A8D0.s => __lookupSoundQuick.s} | 2 +- .../{func_8000A84C.s => __lookupVoice.s} | 2 +- .../{func_8000A71C.s => __mapVoice.s} | 2 +- ...func_8000ADF4.s => __resetPerfChanState.s} | 2 +- .../{func_8000AB00.s => __seqpReleaseVoice.s} | 6 +- .../{func_8000AEFC.s => __seqpStopOsc.s} | 2 +- .../{func_8000AD98.s => __setInstChanState.s} | 2 +- .../{func_8000A7C4.s => __unmapVoice.s} | 2 +- ...func_8000AC34.s => __voiceNeedsNoteKill.s} | 2 +- .../{func_8000AA88.s => __vsDelta.s} | 2 +- .../{func_8000AAAC.s => __vsPan.s} | 2 +- .../{func_8000A9F8.s => __vsVol.s} | 2 +- .../unknown_005740/func_80006BFC.s | 2 +- .../unknown_00BC20/func_8000A71C.s | 2 +- .../unknown_00BC20/func_8000A8D0.s | 2 +- .../{func_80062B00.s => __CSPHandleMIDIMsg.s} | 60 +++++++++---------- .../{func_800637EC.s => __CSPHandleMetaMsg.s} | 6 +- ...c_80062A3C.s => __CSPHandleNextSeqEvent.s} | 14 ++--- ...unc_800629CC.s => __CSPPostNextSeqEvent.s} | 4 +- .../{func_80063984.s => __CSPRepostEvent.s} | 2 +- .../{D_80062408.s => __CSPVoiceHandler.s} | 58 +++++++++--------- .../{func_80063A34.s => __setUsptFromTempo.s} | 2 +- .../{func_80062290.s => alCSPNew.s} | 14 ++--- .../{func_80064884.s => _doModFunc.s} | 2 +- .../{func_800647D0.s => _filterBuffer.s} | 2 +- .../{func_800644A0.s => _loadBuffer.s} | 2 +- .../{func_80064224.s => _loadOutputBuffer.s} | 8 +-- .../{func_80064638.s => _saveBuffer.s} | 2 +- .../{func_80064A08.s => alFxNew.s} | 18 +++--- .../{D_80063FAC.s => alFxParamHdl.s} | 8 +-- .../{D_80063C30.s => alFxPull.s} | 16 ++--- .../{func_80064950.s => init_lpfilter.s} | 2 +- .../{func_80065668.s => __allocParam.s} | 6 +- .../{func_800656BC.s => __collectPVoices.s} | 2 +- .../{func_8006571C.s => __freePVoices.s} | 2 +- .../{func_8006569C.s => __freeParam.s} | 6 +- .../{func_800657EC.s => __nextSampleTime.s} | 2 +- .../{func_800657C4.s => __timeToSamples.s} | 4 +- ...nc_80065754.s => __timeToSamplesNoRound.s} | 2 +- .../{func_80065494.s => alAudioFrame.s} | 14 ++--- asm/non_matchings/unknown_065D30/alSynNew.s | 4 +- .../{func_80065860.s => alSynAllocFX.s} | 8 +-- .../{D_80065900.s => alAuxBusPull.s} | 2 +- .../{func_80065B20.s => alSynSetPan.s} | 4 +- ...unc_80065C38.s => alSynStartVoiceParams.s} | 6 +- data/dkr.data.s | 2 +- ...unc_800C7D04.s => __alCSeqGetTrackEvent.s} | 24 ++++---- .../{func_800C83EC.s => __alCSeqNextDelta.s} | 2 +- .../{func_800C7BE0.s => __getTrackByte.s} | 2 +- .../{func_800C7CA4.s => __readVarLen.s} | 6 +- .../unknown_0C86A0/func_800C7FFC.s | 4 +- .../{func_800C87B4.s => alClose.s} | 12 ++-- .../{func_800C87EC.s => alInit.s} | 6 +- .../{func_800C9420.s => _allocatePVoice.s} | 2 +- .../{func_800C9090.s => alEvtqFlushType.s} | 2 +- .../{func_800C9508.s => alSynAllocVoice.s} | 8 +-- .../{func_800C9650.s => alSynSetVol.s} | 6 +- .../unknown_0CA2F0/func_800C96F0.s | 2 +- .../{func_800C9780.s => alSynSetPitch.s} | 4 +- .../unknown_0CA410/func_800C9810.s | 2 +- .../{func_800C98B0.s => alSynStopVoice.s} | 4 +- .../{func_800C99E0.s => alCents2Ratio.s} | 2 +- .../{func_800C9930.s => alSynFreeVoice.s} | 6 +- .../{func_800C9AE0.s => alSynSetPriority.s} | 2 +- .../{D_800CA0D0.s => alEnvMixerPull.s} | 10 ++-- .../{func_800CA0B0.s => alFilterNew.s} | 2 +- .../unknown_0CA9A0/alLoadParam.s | 4 +- .../{D_800CBBEC.s => alLoadPull.s} | 2 +- .../{D_800CC17C.s => alResamplePull.s} | 2 +- .../{D_800CC390.s => alMainBusParam.s} | 2 +- .../{D_800CC3C0.s => alMainBusPull.s} | 2 +- .../{D_800CC514.s => alSavePull.s} | 2 +- .../{func_800D2C60.s => alSynDelete.s} | 2 +- lib/src/unknown_0C86A0.c | 8 +-- lib/src/unknown_0C91A0.c | 4 +- lib/src/unknown_0C9C90.c | 6 +- lib/src/unknown_0CA250.c | 2 +- lib/src/unknown_0CA380.c | 2 +- lib/src/unknown_0CA4B0.c | 2 +- lib/src/unknown_0CA530.c | 4 +- lib/src/unknown_0CA6E0.c | 2 +- lib/src/unknown_0CA9A0.c | 8 +-- lib/src/unknown_0CCF90.c | 6 +- lib/src/unknown_0D3160.c | 2 +- src/unknown_003260.c | 4 +- src/unknown_005740.c | 26 ++++---- src/unknown_061D30.c | 16 ++--- src/unknown_064830.c | 53 ++++++++-------- src/unknown_065D30.c | 16 ++--- src/unknown_066460.c | 2 +- src/unknown_066500.c | 4 +- src/unknown_0667D0.c | 2 +- undefined_syms.txt | 26 ++++---- 105 files changed, 354 insertions(+), 353 deletions(-) rename asm/non_matchings/unknown_003260/{func_80003470.s => _handleEvent.s} (98%) rename asm/non_matchings/unknown_003260/{D_800033C8.s => _sndpVoiceHandler.s} (96%) rename asm/non_matchings/unknown_005740/{func_8000ACE0.s => __initFromBank.s} (89%) rename asm/non_matchings/unknown_005740/{func_8000A8D0.s => __lookupSoundQuick.s} (99%) rename asm/non_matchings/unknown_005740/{func_8000A84C.s => __lookupVoice.s} (98%) rename asm/non_matchings/unknown_005740/{func_8000A71C.s => __mapVoice.s} (99%) rename asm/non_matchings/unknown_005740/{func_8000ADF4.s => __resetPerfChanState.s} (98%) rename asm/non_matchings/unknown_005740/{func_8000AB00.s => __seqpReleaseVoice.s} (96%) rename asm/non_matchings/unknown_005740/{func_8000AEFC.s => __seqpStopOsc.s} (99%) rename asm/non_matchings/unknown_005740/{func_8000AD98.s => __setInstChanState.s} (97%) rename asm/non_matchings/unknown_005740/{func_8000A7C4.s => __unmapVoice.s} (98%) rename asm/non_matchings/unknown_005740/{func_8000AC34.s => __voiceNeedsNoteKill.s} (98%) rename asm/non_matchings/unknown_005740/{func_8000AA88.s => __vsDelta.s} (95%) rename asm/non_matchings/unknown_005740/{func_8000AAAC.s => __vsPan.s} (98%) rename asm/non_matchings/unknown_005740/{func_8000A9F8.s => __vsVol.s} (98%) rename asm/non_matchings/unknown_061D30/{func_80062B00.s => __CSPHandleMIDIMsg.s} (96%) rename asm/non_matchings/unknown_061D30/{func_800637EC.s => __CSPHandleMetaMsg.s} (97%) rename asm/non_matchings/unknown_061D30/{func_80062A3C.s => __CSPHandleNextSeqEvent.s} (85%) rename asm/non_matchings/unknown_061D30/{func_800629CC.s => __CSPPostNextSeqEvent.s} (94%) rename asm/non_matchings/unknown_061D30/{func_80063984.s => __CSPRepostEvent.s} (98%) rename asm/non_matchings/unknown_061D30/{D_80062408.s => __CSPVoiceHandler.s} (92%) rename asm/non_matchings/unknown_061D30/{func_80063A34.s => __setUsptFromTempo.s} (97%) rename asm/non_matchings/unknown_061D30/{func_80062290.s => alCSPNew.s} (90%) rename asm/non_matchings/unknown_064830/{func_80064884.s => _doModFunc.s} (99%) rename asm/non_matchings/unknown_064830/{func_800647D0.s => _filterBuffer.s} (99%) rename asm/non_matchings/unknown_064830/{func_800644A0.s => _loadBuffer.s} (99%) rename asm/non_matchings/unknown_064830/{func_80064224.s => _loadOutputBuffer.s} (97%) rename asm/non_matchings/unknown_064830/{func_80064638.s => _saveBuffer.s} (99%) rename asm/non_matchings/unknown_064830/{func_80064A08.s => alFxNew.s} (95%) rename asm/non_matchings/unknown_064830/{D_80063FAC.s => alFxParamHdl.s} (97%) rename asm/non_matchings/unknown_064830/{D_80063C30.s => alFxPull.s} (96%) rename asm/non_matchings/unknown_064830/{func_80064950.s => init_lpfilter.s} (99%) rename asm/non_matchings/unknown_065D30/{func_80065668.s => __allocParam.s} (77%) rename asm/non_matchings/unknown_065D30/{func_800656BC.s => __collectPVoices.s} (98%) rename asm/non_matchings/unknown_065D30/{func_8006571C.s => __freePVoices.s} (97%) rename asm/non_matchings/unknown_065D30/{func_8006569C.s => __freeParam.s} (63%) rename asm/non_matchings/unknown_065D30/{func_800657EC.s => __nextSampleTime.s} (98%) rename asm/non_matchings/unknown_065D30/{func_800657C4.s => __timeToSamples.s} (84%) rename asm/non_matchings/unknown_065D30/{func_80065754.s => __timeToSamplesNoRound.s} (97%) rename asm/non_matchings/unknown_065D30/{func_80065494.s => alAudioFrame.s} (93%) rename asm/non_matchings/unknown_066460/{func_80065860.s => alSynAllocFX.s} (91%) rename asm/non_matchings/unknown_066500/{D_80065900.s => alAuxBusPull.s} (99%) rename asm/non_matchings/unknown_066500/{func_80065B20.s => alSynSetPan.s} (96%) rename asm/non_matchings/unknown_0667D0/{func_80065C38.s => alSynStartVoiceParams.s} (93%) rename lib/asm/non_matchings/unknown_0C86A0/{func_800C7D04.s => __alCSeqGetTrackEvent.s} (93%) rename lib/asm/non_matchings/unknown_0C86A0/{func_800C83EC.s => __alCSeqNextDelta.s} (99%) rename lib/asm/non_matchings/unknown_0C86A0/{func_800C7BE0.s => __getTrackByte.s} (99%) rename lib/asm/non_matchings/unknown_0C86A0/{func_800C7CA4.s => __readVarLen.s} (89%) rename lib/asm/non_matchings/unknown_0C91A0/{func_800C87B4.s => alClose.s} (57%) rename lib/asm/non_matchings/unknown_0C91A0/{func_800C87EC.s => alInit.s} (75%) rename lib/asm/non_matchings/unknown_0C9C90/{func_800C9420.s => _allocatePVoice.s} (99%) rename lib/asm/non_matchings/unknown_0C9C90/{func_800C9090.s => alEvtqFlushType.s} (99%) rename lib/asm/non_matchings/unknown_0C9C90/{func_800C9508.s => alSynAllocVoice.s} (95%) rename lib/asm/non_matchings/unknown_0CA250/{func_800C9650.s => alSynSetVol.s} (93%) rename lib/asm/non_matchings/unknown_0CA380/{func_800C9780.s => alSynSetPitch.s} (96%) rename lib/asm/non_matchings/unknown_0CA4B0/{func_800C98B0.s => alSynStopVoice.s} (95%) rename lib/asm/non_matchings/unknown_0CA530/{func_800C99E0.s => alCents2Ratio.s} (98%) rename lib/asm/non_matchings/unknown_0CA530/{func_800C9930.s => alSynFreeVoice.s} (94%) rename lib/asm/non_matchings/unknown_0CA6E0/{func_800C9AE0.s => alSynSetPriority.s} (97%) rename lib/asm/non_matchings/unknown_0CA9A0/{D_800CA0D0.s => alEnvMixerPull.s} (99%) rename lib/asm/non_matchings/unknown_0CA9A0/{func_800CA0B0.s => alFilterNew.s} (94%) rename lib/asm/non_matchings/unknown_0CA9A0/{D_800CBBEC.s => alLoadPull.s} (99%) rename lib/asm/non_matchings/unknown_0CA9A0/{D_800CC17C.s => alResamplePull.s} (99%) rename lib/asm/non_matchings/unknown_0CCF90/{D_800CC390.s => alMainBusParam.s} (96%) rename lib/asm/non_matchings/unknown_0CCF90/{D_800CC3C0.s => alMainBusPull.s} (99%) rename lib/asm/non_matchings/unknown_0CCF90/{D_800CC514.s => alSavePull.s} (99%) rename lib/asm/non_matchings/unknown_0D3160/{func_800D2C60.s => alSynDelete.s} (89%) diff --git a/asm/non_matchings/unknown_001050/func_80002224.s b/asm/non_matchings/unknown_001050/func_80002224.s index 65a078c9..d8d82490 100644 --- a/asm/non_matchings/unknown_001050/func_80002224.s +++ b/asm/non_matchings/unknown_001050/func_80002224.s @@ -22,7 +22,7 @@ glabel func_80002224 /* 002E74 80002274 24070001 */ li $a3, 1 /* 002E78 80002278 AFA20044 */ sw $v0, 0x44($sp) /* 002E7C 8000227C 00402025 */ move $a0, $v0 -/* 002E80 80002280 0C0188A4 */ jal func_80062290 +/* 002E80 80002280 0C0188A4 */ jal alCSPNew /* 002E84 80002284 27A50024 */ addiu $a1, $sp, 0x24 /* 002E88 80002288 3C088011 */ lui $t0, %hi(D_80115D10) # $t0, 0x8011 /* 002E8C 8000228C 8D085D10 */ lw $t0, %lo(D_80115D10)($t0) diff --git a/asm/non_matchings/unknown_003260/D_80002A98.s b/asm/non_matchings/unknown_003260/D_80002A98.s index 37ae24a9..82993463 100644 --- a/asm/non_matchings/unknown_003260/D_80002A98.s +++ b/asm/non_matchings/unknown_003260/D_80002A98.s @@ -80,7 +80,7 @@ glabel D_80002A98 /* 0037BC 80002BBC 1200FFD8 */ beqz $s0, .L80002B20 /* 0037C0 80002BC0 00000000 */ nop /* 0037C4 80002BC4 3C048011 */ lui $a0, %hi(D_801161D0) # $a0, 0x8011 -/* 0037C8 80002BC8 0C0321ED */ jal func_800C87B4 +/* 0037C8 80002BC8 0C0321ED */ jal alClose /* 0037CC 80002BCC 248461D0 */ addiu $a0, %lo(D_801161D0) # addiu $a0, $a0, 0x61d0 /* 0037D0 80002BD0 8FBF003C */ lw $ra, 0x3c($sp) /* 0037D4 80002BD4 8FB00018 */ lw $s0, 0x18($sp) diff --git a/asm/non_matchings/unknown_003260/func_80003470.s b/asm/non_matchings/unknown_003260/_handleEvent.s similarity index 98% rename from asm/non_matchings/unknown_003260/func_80003470.s rename to asm/non_matchings/unknown_003260/_handleEvent.s index fbffe24f..6a4c76b0 100644 --- a/asm/non_matchings/unknown_003260/func_80003470.s +++ b/asm/non_matchings/unknown_003260/_handleEvent.s @@ -1,4 +1,4 @@ -glabel func_80003470 +glabel _handleEvent /* 004070 80003470 27BDFF30 */ addiu $sp, $sp, -0xd0 /* 004074 80003474 AFBE0038 */ sw $fp, 0x38($sp) /* 004078 80003478 AFB70034 */ sw $s7, 0x34($sp) @@ -116,7 +116,7 @@ glabel func_80003470 /* 00421C 8000361C 8FAF007C */ lw $t7, 0x7c($sp) .L80003620: /* 004220 80003620 8EE40038 */ lw $a0, 0x38($s7) -/* 004224 80003624 0C032542 */ jal func_800C9508 +/* 004224 80003624 0C032542 */ jal alSynAllocVoice /* 004228 80003628 27A600C8 */ addiu $a2, $sp, 0xc8 /* 00422C 8000362C AFA2007C */ sw $v0, 0x7c($sp) /* 004230 80003630 8FAF007C */ lw $t7, 0x7c($sp) @@ -181,7 +181,7 @@ glabel func_80003470 /* 004308 80003708 8EE40038 */ lw $a0, 0x38($s7) /* 00430C 8000370C 00003025 */ move $a2, $zero /* 004310 80003710 240703E8 */ li $a3, 1000 -/* 004314 80003714 0C032594 */ jal func_800C9650 +/* 004314 80003714 0C032594 */ jal alSynSetVol /* 004318 80003718 2445000C */ addiu $a1, $v0, 0xc /* 00431C 8000371C 8FA2006C */ lw $v0, 0x6c($sp) /* 004320 80003720 00000000 */ nop @@ -285,7 +285,7 @@ glabel func_80003470 /* 004490 80003890 00003825 */ move $a3, $zero /* 004494 80003894 00001012 */ mflo $v0 /* 004498 80003898 00024202 */ srl $t0, $v0, 8 -/* 00449C 8000389C 0C032594 */ jal func_800C9650 +/* 00449C 8000389C 0C032594 */ jal alSynSetVol /* 0044A0 800038A0 AFA80090 */ sw $t0, 0x90($sp) /* 0044A4 800038A4 8FA20090 */ lw $v0, 0x90($sp) /* 0044A8 800038A8 8EE40038 */ lw $a0, 0x38($s7) @@ -293,7 +293,7 @@ glabel func_80003470 /* 0044B0 800038B0 00065403 */ sra $t2, $a2, 0x10 /* 0044B4 800038B4 01403025 */ move $a2, $t2 /* 0044B8 800038B8 02602825 */ move $a1, $s3 -/* 0044BC 800038BC 0C032594 */ jal func_800C9650 +/* 0044BC 800038BC 0C032594 */ jal alSynSetVol /* 0044C0 800038C0 02003825 */ move $a3, $s0 /* 0044C4 800038C4 922B003C */ lbu $t3, 0x3c($s1) /* 0044C8 800038C8 924C000C */ lbu $t4, 0xc($s2) @@ -317,7 +317,7 @@ glabel func_80003470 /* 004508 80003908 304600FF */ andi $a2, $v0, 0xff .L8000390C: /* 00450C 8000390C 8EE40038 */ lw $a0, 0x38($s7) -/* 004510 80003910 0C0196C8 */ jal func_80065B20 +/* 004510 80003910 0C0196C8 */ jal alSynSetPan /* 004514 80003914 02602825 */ move $a1, $s3 /* 004518 80003918 C626002C */ lwc1 $f6, 0x2c($s1) /* 00451C 8000391C C6280028 */ lwc1 $f8, 0x28($s1) @@ -325,7 +325,7 @@ glabel func_80003470 /* 004524 80003924 46083282 */ mul.s $f10, $f6, $f8 /* 004528 80003928 02602825 */ move $a1, $s3 /* 00452C 8000392C 44065000 */ mfc1 $a2, $f10 -/* 004530 80003930 0C0325E0 */ jal func_800C9780 +/* 004530 80003930 0C0325E0 */ jal alSynSetPitch /* 004534 80003934 00000000 */ nop /* 004538 80003938 92CF0003 */ lbu $t7, 3($s6) /* 00453C 8000393C 922D003D */ lbu $t5, 0x3d($s1) @@ -432,7 +432,7 @@ glabel func_80003470 /* 0046AC 80003AAC 460084A4 */ cvt.w.s $f18, $f16 /* 0046B0 80003AB0 44109000 */ mfc1 $s0, $f18 /* 0046B4 80003AB4 44D8F800 */ ctc1 $t8, $31 -/* 0046B8 80003AB8 0C032594 */ jal func_800C9650 +/* 0046B8 80003AB8 0C032594 */ jal alSynSetVol /* 0046BC 80003ABC 02003825 */ move $a3, $s0 /* 0046C0 80003AC0 1200000A */ beqz $s0, .L80003AEC /* 0046C4 80003AC4 240E0080 */ li $t6, 128 @@ -492,7 +492,7 @@ glabel func_80003470 /* 004780 80003B80 304600FF */ andi $a2, $v0, 0xff .L80003B84: /* 004784 80003B84 8EE40038 */ lw $a0, 0x38($s7) -/* 004788 80003B88 0C0196C8 */ jal func_80065B20 +/* 004788 80003B88 0C0196C8 */ jal alSynSetPan /* 00478C 80003B8C 2625000C */ addiu $a1, $s1, 0xc .L80003B90: /* 004790 80003B90 96A20000 */ lhu $v0, ($s5) @@ -511,7 +511,7 @@ glabel func_80003470 /* 0047C4 80003BC4 46083282 */ mul.s $f10, $f6, $f8 /* 0047C8 80003BC8 2625000C */ addiu $a1, $s1, 0xc /* 0047CC 80003BCC 44065000 */ mfc1 $a2, $f10 -/* 0047D0 80003BD0 0C0325E0 */ jal func_800C9780 +/* 0047D0 80003BD0 0C0325E0 */ jal alSynSetPitch /* 0047D4 80003BD4 00000000 */ nop /* 0047D8 80003BD8 9238003E */ lbu $t8, 0x3e($s1) /* 0047DC 80003BDC 00000000 */ nop @@ -619,7 +619,7 @@ glabel func_80003470 /* 004950 80003D50 00026A02 */ srl $t5, $v0, 8 /* 004954 80003D54 000D3400 */ sll $a2, $t5, 0x10 /* 004958 80003D58 00064C03 */ sra $t1, $a2, 0x10 -/* 00495C 80003D5C 0C032594 */ jal func_800C9650 +/* 00495C 80003D5C 0C032594 */ jal alSynSetVol /* 004960 80003D60 01203025 */ move $a2, $t1 .L80003D64: /* 004964 80003D64 96A20000 */ lhu $v0, ($s5) @@ -692,7 +692,7 @@ glabel func_80003470 /* 004A68 80003E68 00026A02 */ srl $t5, $v0, 8 /* 004A6C 80003E6C 000D3400 */ sll $a2, $t5, 0x10 /* 004A70 80003E70 0006C403 */ sra $t8, $a2, 0x10 -/* 004A74 80003E74 0C032594 */ jal func_800C9650 +/* 004A74 80003E74 0C032594 */ jal alSynSetVol /* 004A78 80003E78 03003025 */ move $a2, $t8 /* 004A7C 80003E7C 96A30000 */ lhu $v1, ($s5) /* 004A80 80003E80 00000000 */ nop @@ -769,7 +769,7 @@ glabel func_80003470 /* 004B90 80003F90 460084A4 */ cvt.w.s $f18, $f16 /* 004B94 80003F94 44109000 */ mfc1 $s0, $f18 /* 004B98 80003F98 44D8F800 */ ctc1 $t8, $31 -/* 004B9C 80003F9C 0C032594 */ jal func_800C9650 +/* 004B9C 80003F9C 0C032594 */ jal alSynSetVol /* 004BA0 80003FA0 02003825 */ move $a3, $s0 /* 004BA4 80003FA4 24080002 */ li $t0, 2 /* 004BA8 80003FA8 A7A800AC */ sh $t0, 0xac($sp) diff --git a/asm/non_matchings/unknown_003260/D_800033C8.s b/asm/non_matchings/unknown_003260/_sndpVoiceHandler.s similarity index 96% rename from asm/non_matchings/unknown_003260/D_800033C8.s rename to asm/non_matchings/unknown_003260/_sndpVoiceHandler.s index 91482555..c5e6b997 100644 --- a/asm/non_matchings/unknown_003260/D_800033C8.s +++ b/asm/non_matchings/unknown_003260/_sndpVoiceHandler.s @@ -1,4 +1,4 @@ -glabel D_800033C8 +glabel _sndpVoiceHandler /* 003FC8 800033C8 27BDFFB0 */ addiu $sp, $sp, -0x50 /* 003FCC 800033CC AFB40028 */ sw $s4, 0x28($sp) /* 003FD0 800033D0 AFB30024 */ sw $s3, 0x24($sp) @@ -24,7 +24,7 @@ glabel D_800033C8 /* 00401C 8000341C 10000004 */ b .L80003430 /* 004020 80003420 02402025 */ move $a0, $s2 .L80003424: -/* 004024 80003424 0C000D1C */ jal func_80003470 +/* 004024 80003424 0C000D1C */ jal _handleEvent /* 004028 80003428 02202825 */ move $a1, $s1 /* 00402C 8000342C 02402025 */ move $a0, $s2 .L80003430: diff --git a/asm/non_matchings/unknown_003260/alSndpNew.s b/asm/non_matchings/unknown_003260/alSndpNew.s index 4b3668bb..a04ce6a1 100644 --- a/asm/non_matchings/unknown_003260/alSndpNew.s +++ b/asm/non_matchings/unknown_003260/alSndpNew.s @@ -80,7 +80,7 @@ glabel alSndpNew /* 003EF0 800032F0 962D0010 */ lhu $t5, 0x10($s1) /* 003EF4 800032F4 00008025 */ move $s0, $zero /* 003EF8 800032F8 11A0000C */ beqz $t5, .L8000332C -/* 003EFC 800032FC 3C19800E */ lui $t9, %hi(D_800E3780) # $t9, 0x800e +/* 003EFC 800032FC 3C19800E */ lui $t9, %hi(alGlobals) # $t9, 0x800e /* 003F00 80003300 00001025 */ move $v0, $zero /* 003F04 80003304 24037FFF */ li $v1, 32767 .L80003308: @@ -94,12 +94,12 @@ glabel alSndpNew /* 003F24 80003324 1420FFF8 */ bnez $at, .L80003308 /* 003F28 80003328 00000000 */ nop .L8000332C: -/* 003F2C 8000332C 8F393780 */ lw $t9, %lo(D_800E3780)($t9) +/* 003F2C 8000332C 8F393780 */ lw $t9, %lo(alGlobals)($t9) /* 003F30 80003330 8E480000 */ lw $t0, ($s2) -/* 003F34 80003334 3C0A8000 */ lui $t2, %hi(D_800033C8) # $t2, 0x8000 +/* 003F34 80003334 3C0A8000 */ lui $t2, %hi(_sndpVoiceHandler) # $t2, 0x8000 /* 003F38 80003338 AD190038 */ sw $t9, 0x38($t0) /* 003F3C 8000333C 8E490000 */ lw $t1, ($s2) -/* 003F40 80003340 254A33C8 */ addiu $t2, %lo(D_800033C8) # addiu $t2, $t2, 0x33c8 +/* 003F40 80003340 254A33C8 */ addiu $t2, %lo(_sndpVoiceHandler) # addiu $t2, $t2, 0x33c8 /* 003F44 80003344 AD200000 */ sw $zero, ($t1) /* 003F48 80003348 8E4B0000 */ lw $t3, ($s2) /* 003F4C 8000334C 00000000 */ nop diff --git a/asm/non_matchings/unknown_003260/func_80002660.s b/asm/non_matchings/unknown_003260/func_80002660.s index 5c292b13..48fcff8d 100644 --- a/asm/non_matchings/unknown_003260/func_80002660.s +++ b/asm/non_matchings/unknown_003260/func_80002660.s @@ -94,7 +94,7 @@ glabel func_80002660 /* 0033C4 800027C4 AE710020 */ sw $s1, 0x20($s3) /* 0033C8 800027C8 AE600024 */ sw $zero, 0x24($s3) /* 0033CC 800027CC 248461D0 */ addiu $a0, %lo(D_801161D0) # addiu $a0, $a0, 0x61d0 -/* 0033D0 800027D0 0C0321FB */ jal func_800C87EC +/* 0033D0 800027D0 0C0321FB */ jal alInit /* 0033D4 800027D4 02602825 */ move $a1, $s3 /* 0033D8 800027D8 0C01C450 */ jal func_80071140 /* 0033DC 800027DC 02202025 */ move $a0, $s1 @@ -103,7 +103,7 @@ glabel func_80002660 .L800027E8: /* 0033E8 800027E8 3C048011 */ lui $a0, %hi(D_801161D0) # $a0, 0x8011 /* 0033EC 800027EC 248461D0 */ addiu $a0, %lo(D_801161D0) # addiu $a0, $a0, 0x61d0 -/* 0033F0 800027F0 0C0321FB */ jal func_800C87EC +/* 0033F0 800027F0 0C0321FB */ jal alInit /* 0033F4 800027F4 02602825 */ move $a1, $s3 .L800027F8: /* 0033F8 800027F8 3C028012 */ lui $v0, %hi(D_80119240) # $v0, 0x8012 diff --git a/asm/non_matchings/unknown_003260/func_80002C00.s b/asm/non_matchings/unknown_003260/func_80002C00.s index c1e15a64..4bceb066 100644 --- a/asm/non_matchings/unknown_003260/func_80002C00.s +++ b/asm/non_matchings/unknown_003260/func_80002C00.s @@ -57,7 +57,7 @@ glabel func_80002C00 /* 0038D4 80002CD4 008C2021 */ addu $a0, $a0, $t4 /* 0038D8 80002CD8 8C845F98 */ lw $a0, 0x5f98($a0) /* 0038DC 80002CDC 8FA60024 */ lw $a2, 0x24($sp) -/* 0038E0 80002CE0 0C019525 */ jal func_80065494 +/* 0038E0 80002CE0 0C019525 */ jal alAudioFrame /* 0038E4 80002CE4 24A59634 */ addiu $a1, %lo(D_80119634) # addiu $a1, $a1, -0x69cc /* 0038E8 80002CE8 3C0D8011 */ lui $t5, %hi(D_80116198) # $t5, 0x8011 /* 0038EC 80002CEC 24030002 */ li $v1, 2 diff --git a/asm/non_matchings/unknown_003260/func_8000410C.s b/asm/non_matchings/unknown_003260/func_8000410C.s index d2088271..450fe054 100644 --- a/asm/non_matchings/unknown_003260/func_8000410C.s +++ b/asm/non_matchings/unknown_003260/func_8000410C.s @@ -10,13 +10,13 @@ glabel func_8000410C /* 004D2C 8000412C 8F39C6BC */ lw $t9, %lo(D_800DC6BC)($t9) /* 004D30 80004130 25C5000C */ addiu $a1, $t6, 0xc /* 004D34 80004134 8F240038 */ lw $a0, 0x38($t9) -/* 004D38 80004138 0C03262C */ jal func_800C98B0 +/* 004D38 80004138 0C03262C */ jal alSynStopVoice /* 004D3C 8000413C AFA5001C */ sw $a1, 0x1c($sp) /* 004D40 80004140 3C08800E */ lui $t0, %hi(D_800DC6BC) # $t0, 0x800e /* 004D44 80004144 8D08C6BC */ lw $t0, %lo(D_800DC6BC)($t0) /* 004D48 80004148 8FA5001C */ lw $a1, 0x1c($sp) /* 004D4C 8000414C 8D040038 */ lw $a0, 0x38($t0) -/* 004D50 80004150 0C03264C */ jal func_800C9930 +/* 004D50 80004150 0C03264C */ jal alSynFreeVoice /* 004D54 80004154 00000000 */ nop .L80004158: /* 004D58 80004158 8FA40020 */ lw $a0, 0x20($sp) diff --git a/asm/non_matchings/unknown_003260/func_8000418C.s b/asm/non_matchings/unknown_003260/func_8000418C.s index 953ec77d..a9f2f2b9 100644 --- a/asm/non_matchings/unknown_003260/func_8000418C.s +++ b/asm/non_matchings/unknown_003260/func_8000418C.s @@ -6,7 +6,7 @@ glabel func_8000418C /* 004D9C 8000419C 8DCF0004 */ lw $t7, 4($t6) /* 004DA0 800041A0 00000000 */ nop /* 004DA4 800041A4 81E40005 */ lb $a0, 5($t7) -/* 004DA8 800041A8 0C032678 */ jal func_800C99E0 +/* 004DA8 800041A8 0C032678 */ jal alCents2Ratio /* 004DAC 800041AC AFA70030 */ sw $a3, 0x30($sp) /* 004DB0 800041B0 8FA70030 */ lw $a3, 0x30($sp) /* 004DB4 800041B4 3C04800E */ lui $a0, %hi(D_800DC6BC) # $a0, 0x800e diff --git a/asm/non_matchings/unknown_003260/func_80004384.s b/asm/non_matchings/unknown_003260/func_80004384.s index cc7d58d3..25f5886f 100644 --- a/asm/non_matchings/unknown_003260/func_80004384.s +++ b/asm/non_matchings/unknown_003260/func_80004384.s @@ -70,7 +70,7 @@ glabel func_80004384 /* 00508C 8000448C 000F78C0 */ sll $t7, $t7, 3 /* 005090 80004490 01E47821 */ addu $t7, $t7, $a0 /* 005094 80004494 000F7880 */ sll $t7, $t7, 2 -/* 005098 80004498 0C032678 */ jal func_800C99E0 +/* 005098 80004498 0C032678 */ jal alCents2Ratio /* 00509C 8000449C 25E4E890 */ addiu $a0, $t7, -0x1770 /* 0050A0 800044A0 8FA50024 */ lw $a1, 0x24($sp) /* 0050A4 800044A4 1000000E */ b .L800044E0 @@ -85,7 +85,7 @@ glabel func_80004384 /* 0050C4 800044C4 0019C880 */ sll $t9, $t9, 2 /* 0050C8 800044C8 03282021 */ addu $a0, $t9, $t0 /* 0050CC 800044CC 2484E890 */ addiu $a0, $a0, -0x1770 -/* 0050D0 800044D0 0C032678 */ jal func_800C99E0 +/* 0050D0 800044D0 0C032678 */ jal alCents2Ratio /* 0050D4 800044D4 AFA50024 */ sw $a1, 0x24($sp) /* 0050D8 800044D8 8FA50024 */ lw $a1, 0x24($sp) /* 0050DC 800044DC E6000028 */ swc1 $f0, 0x28($s0) diff --git a/asm/non_matchings/unknown_005740/__initChanState.s b/asm/non_matchings/unknown_005740/__initChanState.s index c9752c79..c0f867ae 100644 --- a/asm/non_matchings/unknown_005740/__initChanState.s +++ b/asm/non_matchings/unknown_005740/__initChanState.s @@ -14,7 +14,7 @@ glabel __initChanState /* 00BABC 8000AEBC 02202025 */ move $a0, $s1 /* 00BAC0 8000AEC0 01F2C021 */ addu $t8, $t7, $s2 /* 00BAC4 8000AEC4 AF000000 */ sw $zero, ($t8) -/* 00BAC8 8000AEC8 0C002B7D */ jal func_8000ADF4 +/* 00BAC8 8000AEC8 0C002B7D */ jal __resetPerfChanState /* 00BACC 8000AECC 02002825 */ move $a1, $s0 /* 00BAD0 8000AED0 92390034 */ lbu $t9, 0x34($s1) /* 00BAD4 8000AED4 26100001 */ addiu $s0, $s0, 1 diff --git a/asm/non_matchings/unknown_005740/func_8000ACE0.s b/asm/non_matchings/unknown_005740/__initFromBank.s similarity index 89% rename from asm/non_matchings/unknown_005740/func_8000ACE0.s rename to asm/non_matchings/unknown_005740/__initFromBank.s index 00fb1130..042d382f 100644 --- a/asm/non_matchings/unknown_005740/func_8000ACE0.s +++ b/asm/non_matchings/unknown_005740/__initFromBank.s @@ -1,4 +1,4 @@ -glabel func_8000ACE0 +glabel __initFromBank /* 00B8E0 8000ACE0 27BDFFD8 */ addiu $sp, $sp, -0x28 /* 00B8E4 8000ACE4 AFB20020 */ sw $s2, 0x20($sp) /* 00B8E8 8000ACE8 00809025 */ move $s2, $a0 @@ -17,11 +17,11 @@ glabel func_8000ACE0 /* 00B918 8000AD18 19C0000C */ blez $t6, .L8000AD4C /* 00B91C 8000AD1C 02402025 */ move $a0, $s2 .L8000AD20: -/* 00B920 8000AD20 0C002B7D */ jal func_8000ADF4 +/* 00B920 8000AD20 0C002B7D */ jal __resetPerfChanState /* 00B924 8000AD24 02002825 */ move $a1, $s0 /* 00B928 8000AD28 02402025 */ move $a0, $s2 /* 00B92C 8000AD2C 02202825 */ move $a1, $s1 -/* 00B930 8000AD30 0C002B66 */ jal func_8000AD98 +/* 00B930 8000AD30 0C002B66 */ jal __setInstChanState /* 00B934 8000AD34 02003025 */ move $a2, $s0 /* 00B938 8000AD38 924F0034 */ lbu $t7, 0x34($s2) /* 00B93C 8000AD3C 26100001 */ addiu $s0, $s0, 1 @@ -35,12 +35,12 @@ glabel func_8000ACE0 /* 00B958 8000AD58 00000000 */ nop /* 00B95C 8000AD5C 13200009 */ beqz $t9, .L8000AD84 /* 00B960 8000AD60 8FBF0024 */ lw $ra, 0x24($sp) -/* 00B964 8000AD64 0C002B7D */ jal func_8000ADF4 +/* 00B964 8000AD64 0C002B7D */ jal __resetPerfChanState /* 00B968 8000AD68 02002825 */ move $a1, $s0 /* 00B96C 8000AD6C 8FA8002C */ lw $t0, 0x2c($sp) /* 00B970 8000AD70 02402025 */ move $a0, $s2 /* 00B974 8000AD74 8D050008 */ lw $a1, 8($t0) -/* 00B978 8000AD78 0C002B66 */ jal func_8000AD98 +/* 00B978 8000AD78 0C002B66 */ jal __setInstChanState /* 00B97C 8000AD7C 24060009 */ li $a2, 9 /* 00B980 8000AD80 8FBF0024 */ lw $ra, 0x24($sp) .L8000AD84: diff --git a/asm/non_matchings/unknown_005740/func_8000A8D0.s b/asm/non_matchings/unknown_005740/__lookupSoundQuick.s similarity index 99% rename from asm/non_matchings/unknown_005740/func_8000A8D0.s rename to asm/non_matchings/unknown_005740/__lookupSoundQuick.s index 3166d572..ec0344f0 100644 --- a/asm/non_matchings/unknown_005740/func_8000A8D0.s +++ b/asm/non_matchings/unknown_005740/__lookupSoundQuick.s @@ -1,4 +1,4 @@ -glabel func_8000A8D0 +glabel __lookupSoundQuick /* 00B4D0 8000A8D0 27BDFFF8 */ addiu $sp, $sp, -8 /* 00B4D4 8000A8D4 30EF00FF */ andi $t7, $a3, 0xff /* 00B4D8 8000A8D8 AFB00004 */ sw $s0, 4($sp) diff --git a/asm/non_matchings/unknown_005740/func_8000A84C.s b/asm/non_matchings/unknown_005740/__lookupVoice.s similarity index 98% rename from asm/non_matchings/unknown_005740/func_8000A84C.s rename to asm/non_matchings/unknown_005740/__lookupVoice.s index 7a8a2476..9a0c6770 100644 --- a/asm/non_matchings/unknown_005740/func_8000A84C.s +++ b/asm/non_matchings/unknown_005740/__lookupVoice.s @@ -1,4 +1,4 @@ -glabel func_8000A84C +glabel __lookupVoice /* 00B44C 8000A84C AFA50004 */ sw $a1, 4($sp) /* 00B450 8000A850 AFA60008 */ sw $a2, 8($sp) /* 00B454 8000A854 8C830064 */ lw $v1, 0x64($a0) diff --git a/asm/non_matchings/unknown_005740/func_8000A71C.s b/asm/non_matchings/unknown_005740/__mapVoice.s similarity index 99% rename from asm/non_matchings/unknown_005740/func_8000A71C.s rename to asm/non_matchings/unknown_005740/__mapVoice.s index 2f5b9305..c3962578 100644 --- a/asm/non_matchings/unknown_005740/func_8000A71C.s +++ b/asm/non_matchings/unknown_005740/__mapVoice.s @@ -1,4 +1,4 @@ -glabel func_8000A71C +glabel __mapVoice /* 00B31C 8000A71C AFA50004 */ sw $a1, 4($sp) /* 00B320 8000A720 AFA60008 */ sw $a2, 8($sp) /* 00B324 8000A724 AFA7000C */ sw $a3, 0xc($sp) diff --git a/asm/non_matchings/unknown_005740/func_8000ADF4.s b/asm/non_matchings/unknown_005740/__resetPerfChanState.s similarity index 98% rename from asm/non_matchings/unknown_005740/func_8000ADF4.s rename to asm/non_matchings/unknown_005740/__resetPerfChanState.s index bc7c385d..d7c770d7 100644 --- a/asm/non_matchings/unknown_005740/func_8000ADF4.s +++ b/asm/non_matchings/unknown_005740/__resetPerfChanState.s @@ -1,4 +1,4 @@ -glabel func_8000ADF4 +glabel __resetPerfChanState /* 00B9F4 8000ADF4 00051080 */ sll $v0, $a1, 2 /* 00B9F8 8000ADF8 8C8E0060 */ lw $t6, 0x60($a0) /* 00B9FC 8000ADFC 00451021 */ addu $v0, $v0, $a1 diff --git a/asm/non_matchings/unknown_005740/func_8000AB00.s b/asm/non_matchings/unknown_005740/__seqpReleaseVoice.s similarity index 96% rename from asm/non_matchings/unknown_005740/func_8000AB00.s rename to asm/non_matchings/unknown_005740/__seqpReleaseVoice.s index 49ce398c..c7b74c73 100644 --- a/asm/non_matchings/unknown_005740/func_8000AB00.s +++ b/asm/non_matchings/unknown_005740/__seqpReleaseVoice.s @@ -1,4 +1,4 @@ -glabel func_8000AB00 +glabel __seqpReleaseVoice /* 00B700 8000AB00 27BDFFA0 */ addiu $sp, $sp, -0x60 /* 00B704 8000AB04 AFBF0034 */ sw $ra, 0x34($sp) /* 00B708 8000AB08 AFB60030 */ sw $s6, 0x30($sp) @@ -56,12 +56,12 @@ glabel func_8000AB00 /* 00B7C8 8000ABC8 AECD0024 */ sw $t5, 0x24($s6) /* 00B7CC 8000ABCC 8E840014 */ lw $a0, 0x14($s4) /* 00B7D0 8000ABD0 00003025 */ move $a2, $zero -/* 00B7D4 8000ABD4 0C0326B8 */ jal func_800C9AE0 +/* 00B7D4 8000ABD4 0C0326B8 */ jal alSynSetPriority /* 00B7D8 8000ABD8 26920048 */ addiu $s2, $s4, 0x48 /* 00B7DC 8000ABDC 8E840014 */ lw $a0, 0x14($s4) /* 00B7E0 8000ABE0 8FA70068 */ lw $a3, 0x68($sp) /* 00B7E4 8000ABE4 02A02825 */ move $a1, $s5 -/* 00B7E8 8000ABE8 0C032594 */ jal func_800C9650 +/* 00B7E8 8000ABE8 0C032594 */ jal alSynSetVol /* 00B7EC 8000ABEC 00003025 */ move $a2, $zero /* 00B7F0 8000ABF0 240E0005 */ li $t6, 5 /* 00B7F4 8000ABF4 8FA60068 */ lw $a2, 0x68($sp) diff --git a/asm/non_matchings/unknown_005740/func_8000AEFC.s b/asm/non_matchings/unknown_005740/__seqpStopOsc.s similarity index 99% rename from asm/non_matchings/unknown_005740/func_8000AEFC.s rename to asm/non_matchings/unknown_005740/__seqpStopOsc.s index 5fee62bc..f3fc6bfe 100644 --- a/asm/non_matchings/unknown_005740/func_8000AEFC.s +++ b/asm/non_matchings/unknown_005740/__seqpStopOsc.s @@ -1,4 +1,4 @@ -glabel func_8000AEFC +glabel __seqpStopOsc /* 00BAFC 8000AEFC 27BDFFC8 */ addiu $sp, $sp, -0x38 /* 00BB00 8000AF00 AFBF0034 */ sw $ra, 0x34($sp) /* 00BB04 8000AF04 AFB70030 */ sw $s7, 0x30($sp) diff --git a/asm/non_matchings/unknown_005740/func_8000AD98.s b/asm/non_matchings/unknown_005740/__setInstChanState.s similarity index 97% rename from asm/non_matchings/unknown_005740/func_8000AD98.s rename to asm/non_matchings/unknown_005740/__setInstChanState.s index ce7e519d..8fd61123 100644 --- a/asm/non_matchings/unknown_005740/func_8000AD98.s +++ b/asm/non_matchings/unknown_005740/__setInstChanState.s @@ -1,4 +1,4 @@ -glabel func_8000AD98 +glabel __setInstChanState /* 00B998 8000AD98 00061080 */ sll $v0, $a2, 2 /* 00B99C 8000AD9C 8C8E0060 */ lw $t6, 0x60($a0) /* 00B9A0 8000ADA0 00461021 */ addu $v0, $v0, $a2 diff --git a/asm/non_matchings/unknown_005740/func_8000A7C4.s b/asm/non_matchings/unknown_005740/__unmapVoice.s similarity index 98% rename from asm/non_matchings/unknown_005740/func_8000A7C4.s rename to asm/non_matchings/unknown_005740/__unmapVoice.s index e44a6233..ab98ad10 100644 --- a/asm/non_matchings/unknown_005740/func_8000A7C4.s +++ b/asm/non_matchings/unknown_005740/__unmapVoice.s @@ -1,4 +1,4 @@ -glabel func_8000A7C4 +glabel __unmapVoice /* 00B3C4 8000A7C4 8C830064 */ lw $v1, 0x64($a0) /* 00B3C8 8000A7C8 00001025 */ move $v0, $zero /* 00B3CC 8000A7CC 1060001D */ beqz $v1, .L8000A844 diff --git a/asm/non_matchings/unknown_005740/func_8000AC34.s b/asm/non_matchings/unknown_005740/__voiceNeedsNoteKill.s similarity index 98% rename from asm/non_matchings/unknown_005740/func_8000AC34.s rename to asm/non_matchings/unknown_005740/__voiceNeedsNoteKill.s index 6625d182..8aa7c24a 100644 --- a/asm/non_matchings/unknown_005740/func_8000AC34.s +++ b/asm/non_matchings/unknown_005740/__voiceNeedsNoteKill.s @@ -1,4 +1,4 @@ -glabel func_8000AC34 +glabel __voiceNeedsNoteKill /* 00B834 8000AC34 27BDFFD0 */ addiu $sp, $sp, -0x30 /* 00B838 8000AC38 AFBF0014 */ sw $ra, 0x14($sp) /* 00B83C 8000AC3C AFA40030 */ sw $a0, 0x30($sp) diff --git a/asm/non_matchings/unknown_005740/func_8000AA88.s b/asm/non_matchings/unknown_005740/__vsDelta.s similarity index 95% rename from asm/non_matchings/unknown_005740/func_8000AA88.s rename to asm/non_matchings/unknown_005740/__vsDelta.s index 0ea920a3..07c7ca37 100644 --- a/asm/non_matchings/unknown_005740/func_8000AA88.s +++ b/asm/non_matchings/unknown_005740/__vsDelta.s @@ -1,4 +1,4 @@ -glabel func_8000AA88 +glabel __vsDelta /* 00B688 8000AA88 8C8E0024 */ lw $t6, 0x24($a0) /* 00B68C 8000AA8C 240203E8 */ li $v0, 1000 /* 00B690 8000AA90 01C51823 */ subu $v1, $t6, $a1 diff --git a/asm/non_matchings/unknown_005740/func_8000AAAC.s b/asm/non_matchings/unknown_005740/__vsPan.s similarity index 98% rename from asm/non_matchings/unknown_005740/func_8000AAAC.s rename to asm/non_matchings/unknown_005740/__vsPan.s index 8d01bbd2..4d90c22f 100644 --- a/asm/non_matchings/unknown_005740/func_8000AAAC.s +++ b/asm/non_matchings/unknown_005740/__vsPan.s @@ -1,4 +1,4 @@ -glabel func_8000AAAC +glabel __vsPan /* 00B6AC 8000AAAC 908F0031 */ lbu $t7, 0x31($a0) /* 00B6B0 8000AAB0 8CAE0060 */ lw $t6, 0x60($a1) /* 00B6B4 8000AAB4 000FC080 */ sll $t8, $t7, 2 diff --git a/asm/non_matchings/unknown_005740/func_8000A9F8.s b/asm/non_matchings/unknown_005740/__vsVol.s similarity index 98% rename from asm/non_matchings/unknown_005740/func_8000A9F8.s rename to asm/non_matchings/unknown_005740/__vsVol.s index 2b09b350..fba0da1c 100644 --- a/asm/non_matchings/unknown_005740/func_8000A9F8.s +++ b/asm/non_matchings/unknown_005740/__vsVol.s @@ -1,4 +1,4 @@ -glabel func_8000A9F8 +glabel __vsVol /* 00B5F8 8000A9F8 908E0036 */ lbu $t6, 0x36($a0) /* 00B5FC 8000A9FC 908F0033 */ lbu $t7, 0x33($a0) /* 00B600 8000AA00 90990030 */ lbu $t9, 0x30($a0) diff --git a/asm/non_matchings/unknown_005740/func_80006BFC.s b/asm/non_matchings/unknown_005740/func_80006BFC.s index 0cdd629a..955e0cfe 100644 --- a/asm/non_matchings/unknown_005740/func_80006BFC.s +++ b/asm/non_matchings/unknown_005740/func_80006BFC.s @@ -190,7 +190,7 @@ glabel func_80006BFC /* 007AC4 80006EC4 46005124 */ cvt.w.s $f4, $f10 /* 007AC8 80006EC8 44042000 */ mfc1 $a0, $f4 /* 007ACC 80006ECC 44CEF800 */ ctc1 $t6, $31 -/* 007AD0 80006ED0 0C032678 */ jal func_800C99E0 +/* 007AD0 80006ED0 0C032678 */ jal alCents2Ratio /* 007AD4 80006ED4 00000000 */ nop /* 007AD8 80006ED8 3C028012 */ lui $v0, %hi(D_80119C38) # $v0, 0x8012 /* 007ADC 80006EDC 8C429C38 */ lw $v0, %lo(D_80119C38)($v0) diff --git a/asm/non_matchings/unknown_00BC20/func_8000A71C.s b/asm/non_matchings/unknown_00BC20/func_8000A71C.s index 2f5b9305..c3962578 100644 --- a/asm/non_matchings/unknown_00BC20/func_8000A71C.s +++ b/asm/non_matchings/unknown_00BC20/func_8000A71C.s @@ -1,4 +1,4 @@ -glabel func_8000A71C +glabel __mapVoice /* 00B31C 8000A71C AFA50004 */ sw $a1, 4($sp) /* 00B320 8000A720 AFA60008 */ sw $a2, 8($sp) /* 00B324 8000A724 AFA7000C */ sw $a3, 0xc($sp) diff --git a/asm/non_matchings/unknown_00BC20/func_8000A8D0.s b/asm/non_matchings/unknown_00BC20/func_8000A8D0.s index 3166d572..ec0344f0 100644 --- a/asm/non_matchings/unknown_00BC20/func_8000A8D0.s +++ b/asm/non_matchings/unknown_00BC20/func_8000A8D0.s @@ -1,4 +1,4 @@ -glabel func_8000A8D0 +glabel __lookupSoundQuick /* 00B4D0 8000A8D0 27BDFFF8 */ addiu $sp, $sp, -8 /* 00B4D4 8000A8D4 30EF00FF */ andi $t7, $a3, 0xff /* 00B4D8 8000A8D8 AFB00004 */ sw $s0, 4($sp) diff --git a/asm/non_matchings/unknown_061D30/func_80062B00.s b/asm/non_matchings/unknown_061D30/__CSPHandleMIDIMsg.s similarity index 96% rename from asm/non_matchings/unknown_061D30/func_80062B00.s rename to asm/non_matchings/unknown_061D30/__CSPHandleMIDIMsg.s index c7789508..b95db91a 100644 --- a/asm/non_matchings/unknown_061D30/func_80062B00.s +++ b/asm/non_matchings/unknown_061D30/__CSPHandleMIDIMsg.s @@ -1,4 +1,4 @@ -glabel func_80062B00 +glabel __CSPHandleMIDIMsg /* 063700 80062B00 27BDFF28 */ addiu $sp, $sp, -0xd8 /* 063704 80062B04 AFBF003C */ sw $ra, 0x3c($sp) /* 063708 80062B08 AFB40038 */ sw $s4, 0x38($sp) @@ -40,7 +40,7 @@ glabel func_80062B00 /* 063794 80062B94 8DCF0000 */ lw $t7, ($t6) /* 063798 80062B98 26050004 */ addiu $a1, $s0, 4 /* 06379C 80062B9C 8DE60008 */ lw $a2, 8($t7) -/* 0637A0 80062BA0 0C002AC0 */ jal func_8000AB00 +/* 0637A0 80062BA0 0C002AC0 */ jal __seqpReleaseVoice /* 0637A4 80062BA4 00000000 */ nop .L80062BA8: /* 0637A8 80062BA8 8E100000 */ lw $s0, ($s0) @@ -92,7 +92,7 @@ glabel func_80062B00 /* 063850 80062C50 93A500CA */ lbu $a1, 0xca($sp) /* 063854 80062C54 326600FF */ andi $a2, $s3, 0xff /* 063858 80062C58 A3A700CB */ sb $a3, 0xcb($sp) -/* 06385C 80062C5C 0C002A34 */ jal func_8000A8D0 +/* 06385C 80062C5C 0C002A34 */ jal __lookupSoundQuick /* 063860 80062C60 AFB000DC */ sw $s0, 0xdc($sp) /* 063864 80062C64 104002D9 */ beqz $v0, .L800637CC /* 063868 80062C68 AFA20090 */ sw $v0, 0x90($sp) @@ -109,7 +109,7 @@ glabel func_80062B00 /* 063894 80062C94 AFA30058 */ sw $v1, 0x58($sp) /* 063898 80062C98 02402025 */ move $a0, $s2 /* 06389C 80062C9C 326600FF */ andi $a2, $s3, 0xff -/* 0638A0 80062CA0 0C0029C7 */ jal func_8000A71C +/* 0638A0 80062CA0 0C0029C7 */ jal __mapVoice /* 0638A4 80062CA4 A7A90094 */ sh $t1, 0x94($sp) /* 0638A8 80062CA8 8FA30058 */ lw $v1, 0x58($sp) /* 0638AC 80062CAC 104002C7 */ beqz $v0, .L800637CC @@ -119,7 +119,7 @@ glabel func_80062B00 /* 0638BC 80062CBC 93B100CA */ lbu $s1, 0xca($sp) /* 0638C0 80062CC0 AFA50050 */ sw $a1, 0x50($sp) /* 0638C4 80062CC4 AFA30058 */ sw $v1, 0x58($sp) -/* 0638C8 80062CC8 0C032542 */ jal func_800C9508 +/* 0638C8 80062CC8 0C032542 */ jal alSynAllocVoice /* 0638CC 80062CCC 27A60094 */ addiu $a2, $sp, 0x94 /* 0638D0 80062CD0 8FA30058 */ lw $v1, 0x58($sp) /* 0638D4 80062CD4 10400008 */ beqz $v0, .L80062CF8 @@ -161,7 +161,7 @@ glabel func_80062B00 /* 063958 80062D58 03282021 */ addu $a0, $t9, $t0 /* 06395C 80062D5C 00044C00 */ sll $t1, $a0, 0x10 /* 063960 80062D60 00092403 */ sra $a0, $t1, 0x10 -/* 063964 80062D64 0C032678 */ jal func_800C99E0 +/* 063964 80062D64 0C032678 */ jal alCents2Ratio /* 063968 80062D68 AFA30058 */ sw $v1, 0x58($sp) /* 06396C 80062D6C 8FA30058 */ lw $v1, 0x58($sp) /* 063970 80062D70 E6000028 */ swc1 $f0, 0x28($s0) @@ -304,11 +304,11 @@ glabel func_80062B00 /* 063B80 80062F80 46083282 */ mul.s $f10, $f6, $f8 /* 063B84 80062F84 E7AA0088 */ swc1 $f10, 0x88($sp) /* 063B88 80062F88 9051000A */ lbu $s1, 0xa($v0) -/* 063B8C 80062F8C 0C002AAB */ jal func_8000AAAC +/* 063B8C 80062F8C 0C002AAB */ jal __vsPan /* 063B90 80062F90 00000000 */ nop /* 063B94 80062F94 A3A200A3 */ sb $v0, 0xa3($sp) /* 063B98 80062F98 02002025 */ move $a0, $s0 -/* 063B9C 80062F9C 0C002A7E */ jal func_8000A9F8 +/* 063B9C 80062F9C 0C002A7E */ jal __vsVol /* 063BA0 80062FA0 02402825 */ move $a1, $s2 /* 063BA4 80062FA4 8FA80090 */ lw $t0, 0x90($sp) /* 063BA8 80062FA8 8E440014 */ lw $a0, 0x14($s2) @@ -321,7 +321,7 @@ glabel func_80062B00 /* 063BC4 80062FC4 AFB10018 */ sw $s1, 0x18($sp) /* 063BC8 80062FC8 AFA20010 */ sw $v0, 0x10($sp) /* 063BCC 80062FCC AFB3001C */ sw $s3, 0x1c($sp) -/* 063BD0 80062FD0 0C01970E */ jal func_80065C38 +/* 063BD0 80062FD0 0C01970E */ jal alSynStartVoiceParams /* 063BD4 80062FD4 AFB80014 */ sw $t8, 0x14($sp) /* 063BD8 80062FD8 8FAB0050 */ lw $t3, 0x50($sp) /* 063BDC 80062FDC 8FAC0090 */ lw $t4, 0x90($sp) @@ -362,7 +362,7 @@ glabel func_80062B00 /* 063C68 80063068 93A500CA */ lbu $a1, 0xca($sp) .L8006306C: /* 063C6C 8006306C 02402025 */ move $a0, $s2 -/* 063C70 80063070 0C002A13 */ jal func_8000A84C +/* 063C70 80063070 0C002A13 */ jal __lookupVoice /* 063C74 80063074 30E600FF */ andi $a2, $a3, 0xff /* 063C78 80063078 104001D4 */ beqz $v0, .L800637CC /* 063C7C 8006307C 00408025 */ move $s0, $v0 @@ -379,32 +379,32 @@ glabel func_80062B00 /* 063CA4 800630A4 8F290000 */ lw $t1, ($t9) /* 063CA8 800630A8 02402025 */ move $a0, $s2 /* 063CAC 800630AC 8D260008 */ lw $a2, 8($t1) -/* 063CB0 800630B0 0C002AC0 */ jal func_8000AB00 +/* 063CB0 800630B0 0C002AC0 */ jal __seqpReleaseVoice /* 063CB4 800630B4 26050004 */ addiu $a1, $s0, 4 /* 063CB8 800630B8 100001C5 */ b .L800637D0 /* 063CBC 800630BC 8FBF003C */ lw $ra, 0x3c($sp) /* 063CC0 800630C0 93A500CA */ lbu $a1, 0xca($sp) /* 063CC4 800630C4 02402025 */ move $a0, $s2 -/* 063CC8 800630C8 0C002A13 */ jal func_8000A84C +/* 063CC8 800630C8 0C002A13 */ jal __lookupVoice /* 063CCC 800630CC 30E600FF */ andi $a2, $a3, 0xff /* 063CD0 800630D0 104001BE */ beqz $v0, .L800637CC /* 063CD4 800630D4 00408025 */ move $s0, $v0 /* 063CD8 800630D8 A0530033 */ sb $s3, 0x33($v0) /* 063CDC 800630DC 00402025 */ move $a0, $v0 -/* 063CE0 800630E0 0C002A7E */ jal func_8000A9F8 +/* 063CE0 800630E0 0C002A7E */ jal __vsVol /* 063CE4 800630E4 02402825 */ move $a1, $s2 /* 063CE8 800630E8 00028C00 */ sll $s1, $v0, 0x10 /* 063CEC 800630EC 00114403 */ sra $t0, $s1, 0x10 /* 063CF0 800630F0 8E45001C */ lw $a1, 0x1c($s2) /* 063CF4 800630F4 01008825 */ move $s1, $t0 -/* 063CF8 800630F8 0C002AA2 */ jal func_8000AA88 +/* 063CF8 800630F8 0C002AA2 */ jal __vsDelta /* 063CFC 800630FC 02002025 */ move $a0, $s0 /* 063D00 80063100 00113400 */ sll $a2, $s1, 0x10 /* 063D04 80063104 0006C403 */ sra $t8, $a2, 0x10 /* 063D08 80063108 8E440014 */ lw $a0, 0x14($s2) /* 063D0C 8006310C 03003025 */ move $a2, $t8 /* 063D10 80063110 26050004 */ addiu $a1, $s0, 4 -/* 063D14 80063114 0C032594 */ jal func_800C9650 +/* 063D14 80063114 0C032594 */ jal alSynSetVol /* 063D18 80063118 00403825 */ move $a3, $v0 /* 063D1C 8006311C 100001AC */ b .L800637D0 /* 063D20 80063120 8FBF003C */ lw $ra, 0x3c($sp) @@ -418,20 +418,20 @@ glabel func_80062B00 /* 063D3C 8006313C 168A0011 */ bne $s4, $t2, .L80063184 /* 063D40 80063140 02002025 */ move $a0, $s0 /* 063D44 80063144 A20B0033 */ sb $t3, 0x33($s0) -/* 063D48 80063148 0C002A7E */ jal func_8000A9F8 +/* 063D48 80063148 0C002A7E */ jal __vsVol /* 063D4C 8006314C 02402825 */ move $a1, $s2 /* 063D50 80063150 00028C00 */ sll $s1, $v0, 0x10 /* 063D54 80063154 00117403 */ sra $t6, $s1, 0x10 /* 063D58 80063158 8E45001C */ lw $a1, 0x1c($s2) /* 063D5C 8006315C 01C08825 */ move $s1, $t6 -/* 063D60 80063160 0C002AA2 */ jal func_8000AA88 +/* 063D60 80063160 0C002AA2 */ jal __vsDelta /* 063D64 80063164 02002025 */ move $a0, $s0 /* 063D68 80063168 00113400 */ sll $a2, $s1, 0x10 /* 063D6C 8006316C 00067C03 */ sra $t7, $a2, 0x10 /* 063D70 80063170 8E440014 */ lw $a0, 0x14($s2) /* 063D74 80063174 01E03025 */ move $a2, $t7 /* 063D78 80063178 26050004 */ addiu $a1, $s0, 4 -/* 063D7C 8006317C 0C032594 */ jal func_800C9650 +/* 063D7C 8006317C 0C032594 */ jal alSynSetVol /* 063D80 80063180 00403825 */ move $a3, $v0 .L80063184: /* 063D84 80063184 8E100000 */ lw $s0, ($s0) @@ -479,11 +479,11 @@ glabel func_80062B00 /* 063E24 80063224 02002025 */ move $a0, $s0 /* 063E28 80063228 16890007 */ bne $s4, $t1, .L80063248 /* 063E2C 8006322C 00000000 */ nop -/* 063E30 80063230 0C002AAB */ jal func_8000AAAC +/* 063E30 80063230 0C002AAB */ jal __vsPan /* 063E34 80063234 02402825 */ move $a1, $s2 /* 063E38 80063238 8E440014 */ lw $a0, 0x14($s2) /* 063E3C 8006323C 26050004 */ addiu $a1, $s0, 4 -/* 063E40 80063240 0C0196C8 */ jal func_80065B20 +/* 063E40 80063240 0C0196C8 */ jal alSynSetPan /* 063E44 80063244 304600FF */ andi $a2, $v0, 0xff .L80063248: /* 063E48 80063248 8E100000 */ lw $s0, ($s0) @@ -570,20 +570,20 @@ glabel func_80062B00 /* 063F70 80063370 24010003 */ li $at, 3 /* 063F74 80063374 11A10010 */ beq $t5, $at, .L800633B8 /* 063F78 80063378 02002025 */ move $a0, $s0 -/* 063F7C 8006337C 0C002A7E */ jal func_8000A9F8 +/* 063F7C 8006337C 0C002A7E */ jal __vsVol /* 063F80 80063380 02402825 */ move $a1, $s2 /* 063F84 80063384 00028C00 */ sll $s1, $v0, 0x10 /* 063F88 80063388 0011CC03 */ sra $t9, $s1, 0x10 /* 063F8C 8006338C 8E45001C */ lw $a1, 0x1c($s2) /* 063F90 80063390 03208825 */ move $s1, $t9 -/* 063F94 80063394 0C002AA2 */ jal func_8000AA88 +/* 063F94 80063394 0C002AA2 */ jal __vsDelta /* 063F98 80063398 02002025 */ move $a0, $s0 /* 063F9C 8006339C 00113400 */ sll $a2, $s1, 0x10 /* 063FA0 800633A0 00064C03 */ sra $t1, $a2, 0x10 /* 063FA4 800633A4 8E440014 */ lw $a0, 0x14($s2) /* 063FA8 800633A8 01203025 */ move $a2, $t1 /* 063FAC 800633AC 26050004 */ addiu $a1, $s0, 4 -/* 063FB0 800633B0 0C032594 */ jal func_800C9650 +/* 063FB0 800633B0 0C032594 */ jal alSynSetVol /* 063FB4 800633B4 00403825 */ move $a3, $v0 .L800633B8: /* 063FB8 800633B8 8E100000 */ lw $s0, ($s0) @@ -660,20 +660,20 @@ glabel func_80062B00 /* 0640C0 800634C0 24010003 */ li $at, 3 /* 0640C4 800634C4 11210010 */ beq $t1, $at, .L80063508 /* 0640C8 800634C8 02002025 */ move $a0, $s0 -/* 0640CC 800634CC 0C002A7E */ jal func_8000A9F8 +/* 0640CC 800634CC 0C002A7E */ jal __vsVol /* 0640D0 800634D0 02402825 */ move $a1, $s2 /* 0640D4 800634D4 00028C00 */ sll $s1, $v0, 0x10 /* 0640D8 800634D8 00114403 */ sra $t0, $s1, 0x10 /* 0640DC 800634DC 8E45001C */ lw $a1, 0x1c($s2) /* 0640E0 800634E0 01008825 */ move $s1, $t0 -/* 0640E4 800634E4 0C002AA2 */ jal func_8000AA88 +/* 0640E4 800634E4 0C002AA2 */ jal __vsDelta /* 0640E8 800634E8 02002025 */ move $a0, $s0 /* 0640EC 800634EC 00113400 */ sll $a2, $s1, 0x10 /* 0640F0 800634F0 0006C403 */ sra $t8, $a2, 0x10 /* 0640F4 800634F4 8E440014 */ lw $a0, 0x14($s2) /* 0640F8 800634F8 03003025 */ move $a2, $t8 /* 0640FC 800634FC 26050004 */ addiu $a1, $s0, 4 -/* 064100 80063500 0C032594 */ jal func_800C9650 +/* 064100 80063500 0C032594 */ jal alSynSetVol /* 064104 80063504 00403825 */ move $a3, $v0 .L80063508: /* 064108 80063508 8E100000 */ lw $s0, ($s0) @@ -727,7 +727,7 @@ glabel func_80062B00 /* 0641B4 800635B4 8F0A0000 */ lw $t2, ($t8) /* 0641B8 800635B8 02402025 */ move $a0, $s2 /* 0641BC 800635BC 8D460008 */ lw $a2, 8($t2) -/* 0641C0 800635C0 0C002AC0 */ jal func_8000AB00 +/* 0641C0 800635C0 0C002AC0 */ jal __seqpReleaseVoice /* 0641C4 800635C4 26050004 */ addiu $a1, $s0, 4 .L800635C8: /* 0641C8 800635C8 8E100000 */ lw $s0, ($s0) @@ -817,7 +817,7 @@ glabel func_80062B00 /* 0642F8 800636F8 004DC821 */ addu $t9, $v0, $t5 /* 0642FC 800636FC 8F25000C */ lw $a1, 0xc($t9) /* 064300 80063700 02402025 */ move $a0, $s2 -/* 064304 80063704 0C002B66 */ jal func_8000AD98 +/* 064304 80063704 0C002B66 */ jal __setInstChanState /* 064308 80063708 02803025 */ move $a2, $s4 /* 06430C 8006370C 10000030 */ b .L800637D0 /* 064310 80063710 8FBF003C */ lw $ra, 0x3c($sp) @@ -839,7 +839,7 @@ glabel func_80062B00 /* 064350 80063750 24811FFF */ addiu $at, $a0, 0x1fff /* 064354 80063754 00017B43 */ sra $t7, $at, 0xd .L80063758: -/* 064358 80063758 0C032678 */ jal func_800C99E0 +/* 064358 80063758 0C032678 */ jal alCents2Ratio /* 06435C 8006375C 01E02025 */ move $a0, $t7 /* 064360 80063760 E7A00068 */ swc1 $f0, 0x68($sp) /* 064364 80063764 8FA30058 */ lw $v1, 0x58($sp) @@ -863,7 +863,7 @@ glabel func_80062B00 /* 0643A8 800637A8 26050004 */ addiu $a1, $s0, 4 /* 0643AC 800637AC 46104102 */ mul.s $f4, $f8, $f16 /* 0643B0 800637B0 44062000 */ mfc1 $a2, $f4 -/* 0643B4 800637B4 0C0325E0 */ jal func_800C9780 +/* 0643B4 800637B4 0C0325E0 */ jal alSynSetPitch /* 0643B8 800637B8 00000000 */ nop .L800637BC: /* 0643BC 800637BC 8E100000 */ lw $s0, ($s0) diff --git a/asm/non_matchings/unknown_061D30/func_800637EC.s b/asm/non_matchings/unknown_061D30/__CSPHandleMetaMsg.s similarity index 97% rename from asm/non_matchings/unknown_061D30/func_800637EC.s rename to asm/non_matchings/unknown_061D30/__CSPHandleMetaMsg.s index 4fe576eb..2f55586a 100644 --- a/asm/non_matchings/unknown_061D30/func_800637EC.s +++ b/asm/non_matchings/unknown_061D30/__CSPHandleMetaMsg.s @@ -1,4 +1,4 @@ -glabel func_800637EC +glabel __CSPHandleMetaMsg /* 0643EC 800637EC 27BDFFC8 */ addiu $sp, $sp, -0x38 /* 0643F0 800637F0 AFBF0034 */ sw $ra, 0x34($sp) /* 0643F4 800637F4 AFB60030 */ sw $s6, 0x30($sp) @@ -29,7 +29,7 @@ glabel func_800637EC /* 064458 80063858 8C960024 */ lw $s6, 0x24($a0) /* 06445C 8006385C 46802120 */ cvt.s.w $f4, $f4 /* 064460 80063860 44052000 */ mfc1 $a1, $f4 -/* 064464 80063864 0C018E8D */ jal func_80063A34 +/* 064464 80063864 0C018E8D */ jal __setUsptFromTempo /* 064468 80063868 00000000 */ nop /* 06446C 8006386C 8EB00050 */ lw $s0, 0x50($s5) /* 064470 80063870 00000000 */ nop @@ -96,7 +96,7 @@ glabel func_800637EC /* 064540 80063940 01020019 */ multu $t0, $v0 /* 064544 80063944 0000C812 */ mflo $t9 /* 064548 80063948 AE190008 */ sw $t9, 8($s0) -/* 06454C 8006394C 0C018E61 */ jal func_80063984 +/* 06454C 8006394C 0C018E61 */ jal __CSPRepostEvent /* 064550 80063950 00000000 */ nop /* 064554 80063954 1620FFE8 */ bnez $s1, .L800638F8 /* 064558 80063958 02208025 */ move $s0, $s1 diff --git a/asm/non_matchings/unknown_061D30/func_80062A3C.s b/asm/non_matchings/unknown_061D30/__CSPHandleNextSeqEvent.s similarity index 85% rename from asm/non_matchings/unknown_061D30/func_80062A3C.s rename to asm/non_matchings/unknown_061D30/__CSPHandleNextSeqEvent.s index ebebbb9e..6644f6ae 100644 --- a/asm/non_matchings/unknown_061D30/func_80062A3C.s +++ b/asm/non_matchings/unknown_061D30/__CSPHandleNextSeqEvent.s @@ -1,4 +1,4 @@ -glabel func_80062A3C +glabel __CSPHandleNextSeqEvent /* 06363C 80062A3C 27BDFFC8 */ addiu $sp, $sp, -0x38 /* 063640 80062A40 AFBF001C */ sw $ra, 0x1c($sp) /* 063644 80062A44 AFB00018 */ sw $s0, 0x18($sp) @@ -6,7 +6,7 @@ glabel func_80062A3C /* 06364C 80062A4C 00808025 */ move $s0, $a0 /* 063650 80062A50 10C00027 */ beqz $a2, .L80062AF0 /* 063654 80062A54 27A50028 */ addiu $a1, $sp, 0x28 -/* 063658 80062A58 0C031F41 */ jal func_800C7D04 +/* 063658 80062A58 0C031F41 */ jal __alCSeqGetTrackEvent /* 06365C 80062A5C 00C02025 */ move $a0, $a2 /* 063660 80062A60 87AE0028 */ lh $t6, 0x28($sp) /* 063664 80062A64 27A50028 */ addiu $a1, $sp, 0x28 @@ -20,15 +20,15 @@ glabel func_80062A3C /* 063684 80062A84 00000000 */ nop /* 063688 80062A88 01E00008 */ jr $t7 /* 06368C 80062A8C 00000000 */ nop -/* 063690 80062A90 0C018AC0 */ jal func_80062B00 +/* 063690 80062A90 0C018AC0 */ jal __CSPHandleMIDIMsg /* 063694 80062A94 02002025 */ move $a0, $s0 -/* 063698 80062A98 0C018A73 */ jal func_800629CC +/* 063698 80062A98 0C018A73 */ jal __CSPPostNextSeqEvent /* 06369C 80062A9C 02002025 */ move $a0, $s0 /* 0636A0 80062AA0 10000014 */ b .L80062AF4 /* 0636A4 80062AA4 8FBF001C */ lw $ra, 0x1c($sp) -/* 0636A8 80062AA8 0C018DFB */ jal func_800637EC +/* 0636A8 80062AA8 0C018DFB */ jal __CSPHandleMetaMsg /* 0636AC 80062AAC 02002025 */ move $a0, $s0 -/* 0636B0 80062AB0 0C018A73 */ jal func_800629CC +/* 0636B0 80062AB0 0C018A73 */ jal __CSPPostNextSeqEvent /* 0636B4 80062AB4 02002025 */ move $a0, $s0 /* 0636B8 80062AB8 1000000E */ b .L80062AF4 /* 0636BC 80062ABC 8FBF001C */ lw $ra, 0x1c($sp) @@ -42,7 +42,7 @@ glabel func_80062A3C /* 0636DC 80062ADC 26040048 */ addiu $a0, $s0, 0x48 /* 0636E0 80062AE0 10000004 */ b .L80062AF4 /* 0636E4 80062AE4 8FBF001C */ lw $ra, 0x1c($sp) -/* 0636E8 80062AE8 0C018A73 */ jal func_800629CC +/* 0636E8 80062AE8 0C018A73 */ jal __CSPPostNextSeqEvent /* 0636EC 80062AEC 02002025 */ move $a0, $s0 .L80062AF0: /* 0636F0 80062AF0 8FBF001C */ lw $ra, 0x1c($sp) diff --git a/asm/non_matchings/unknown_061D30/func_800629CC.s b/asm/non_matchings/unknown_061D30/__CSPPostNextSeqEvent.s similarity index 94% rename from asm/non_matchings/unknown_061D30/func_800629CC.s rename to asm/non_matchings/unknown_061D30/__CSPPostNextSeqEvent.s index 199630c2..d1b7c5cd 100644 --- a/asm/non_matchings/unknown_061D30/func_800629CC.s +++ b/asm/non_matchings/unknown_061D30/__CSPPostNextSeqEvent.s @@ -1,4 +1,4 @@ -glabel func_800629CC +glabel __CSPPostNextSeqEvent /* 0635CC 800629CC 27BDFFD0 */ addiu $sp, $sp, -0x30 /* 0635D0 800629D0 AFBF0014 */ sw $ra, 0x14($sp) /* 0635D4 800629D4 8C8E002C */ lw $t6, 0x2c($a0) @@ -9,7 +9,7 @@ glabel func_800629CC /* 0635E8 800629E8 27A5001C */ addiu $a1, $sp, 0x1c /* 0635EC 800629EC 10800010 */ beqz $a0, .L80062A30 /* 0635F0 800629F0 8FBF0014 */ lw $ra, 0x14($sp) -/* 0635F4 800629F4 0C0320FB */ jal func_800C83EC +/* 0635F4 800629F4 0C0320FB */ jal __alCSeqNextDelta /* 0635F8 800629F8 AFA70030 */ sw $a3, 0x30($sp) /* 0635FC 800629FC 8FA70030 */ lw $a3, 0x30($sp) /* 063600 80062A00 1040000B */ beqz $v0, .L80062A30 diff --git a/asm/non_matchings/unknown_061D30/func_80063984.s b/asm/non_matchings/unknown_061D30/__CSPRepostEvent.s similarity index 98% rename from asm/non_matchings/unknown_061D30/func_80063984.s rename to asm/non_matchings/unknown_061D30/__CSPRepostEvent.s index 4ff22c8b..e8889da6 100644 --- a/asm/non_matchings/unknown_061D30/func_80063984.s +++ b/asm/non_matchings/unknown_061D30/__CSPRepostEvent.s @@ -1,4 +1,4 @@ -glabel func_80063984 +glabel __CSPRepostEvent /* 064584 80063984 27BDFFE0 */ addiu $sp, $sp, -0x20 /* 064588 80063988 AFBF0014 */ sw $ra, 0x14($sp) /* 06458C 8006398C AFA40020 */ sw $a0, 0x20($sp) diff --git a/asm/non_matchings/unknown_061D30/D_80062408.s b/asm/non_matchings/unknown_061D30/__CSPVoiceHandler.s similarity index 92% rename from asm/non_matchings/unknown_061D30/D_80062408.s rename to asm/non_matchings/unknown_061D30/__CSPVoiceHandler.s index 56220bdb..152dcef5 100644 --- a/asm/non_matchings/unknown_061D30/D_80062408.s +++ b/asm/non_matchings/unknown_061D30/__CSPVoiceHandler.s @@ -1,4 +1,4 @@ -glabel D_80062408 +glabel __CSPVoiceHandler /* 063008 80062408 27BDFF80 */ addiu $sp, $sp, -0x80 /* 06300C 8006240C AFBE0038 */ sw $fp, 0x38($sp) /* 063010 80062410 AFB70034 */ sw $s7, 0x34($sp) @@ -29,7 +29,7 @@ glabel D_80062408 /* 063070 80062470 00000000 */ nop /* 063074 80062474 01E00008 */ jr $t7 /* 063078 80062478 00000000 */ nop -/* 06307C 8006247C 0C018A8F */ jal func_80062A3C +/* 06307C 8006247C 0C018A8F */ jal __CSPHandleNextSeqEvent /* 063080 80062480 02402025 */ move $a0, $s2 /* 063084 80062484 1000013D */ b .L8006297C /* 063088 80062488 8FA50048 */ lw $a1, 0x48($sp) @@ -43,10 +43,10 @@ glabel D_80062408 /* 0630A8 800624A8 8FA50048 */ lw $a1, 0x48($sp) /* 0630AC 800624AC 8E50003C */ lw $s0, 0x3c($s2) /* 0630B0 800624B0 8E440014 */ lw $a0, 0x14($s2) -/* 0630B4 800624B4 0C03262C */ jal func_800C98B0 +/* 0630B4 800624B4 0C03262C */ jal alSynStopVoice /* 0630B8 800624B8 02002825 */ move $a1, $s0 /* 0630BC 800624BC 8E440014 */ lw $a0, 0x14($s2) -/* 0630C0 800624C0 0C03264C */ jal func_800C9930 +/* 0630C0 800624C0 0C03264C */ jal alSynFreeVoice /* 0630C4 800624C4 02002825 */ move $a1, $s0 /* 0630C8 800624C8 8E110010 */ lw $s1, 0x10($s0) /* 0630CC 800624CC 02402025 */ move $a0, $s2 @@ -54,11 +54,11 @@ glabel D_80062408 /* 0630D4 800624D4 00000000 */ nop /* 0630D8 800624D8 13200003 */ beqz $t9, .L800624E8 /* 0630DC 800624DC 00000000 */ nop -/* 0630E0 800624E0 0C002BBF */ jal func_8000AEFC +/* 0630E0 800624E0 0C002BBF */ jal __seqpStopOsc /* 0630E4 800624E4 02202825 */ move $a1, $s1 .L800624E8: /* 0630E8 800624E8 02402025 */ move $a0, $s2 -/* 0630EC 800624EC 0C0029F1 */ jal func_8000A7C4 +/* 0630EC 800624EC 0C0029F1 */ jal __unmapVoice /* 0630F0 800624F0 02002825 */ move $a1, $s0 /* 0630F4 800624F4 10000121 */ b .L8006297C /* 0630F8 800624F8 8FA50048 */ lw $a1, 0x48($sp) @@ -78,14 +78,14 @@ glabel D_80062408 /* 06312C 8006252C 01535821 */ addu $t3, $t2, $s3 /* 063130 80062530 AE2B0024 */ sw $t3, 0x24($s1) /* 063134 80062534 924C0044 */ lbu $t4, 0x44($s2) -/* 063138 80062538 0C002A7E */ jal func_8000A9F8 +/* 063138 80062538 0C002A7E */ jal __vsVol /* 06313C 8006253C A22C0030 */ sb $t4, 0x30($s1) /* 063140 80062540 00023400 */ sll $a2, $v0, 0x10 /* 063144 80062544 00066C03 */ sra $t5, $a2, 0x10 /* 063148 80062548 8E440014 */ lw $a0, 0x14($s2) /* 06314C 8006254C 01A03025 */ move $a2, $t5 /* 063150 80062550 02002825 */ move $a1, $s0 -/* 063154 80062554 0C032594 */ jal func_800C9650 +/* 063154 80062554 0C032594 */ jal alSynSetVol /* 063158 80062558 02603825 */ move $a3, $s3 /* 06315C 8006255C 10000107 */ b .L8006297C /* 063160 80062560 8FA50048 */ lw $a1, 0x48($sp) @@ -132,20 +132,20 @@ glabel D_80062408 /* 0631FC 800625FC 00000000 */ nop .L80062600: /* 063200 80062600 44CEF800 */ ctc1 $t6, $31 -/* 063204 80062604 0C002A7E */ jal func_8000A9F8 +/* 063204 80062604 0C002A7E */ jal __vsVol /* 063208 80062608 A22F0036 */ sb $t7, 0x36($s1) /* 06320C 8006260C 00028400 */ sll $s0, $v0, 0x10 /* 063210 80062610 0010C403 */ sra $t8, $s0, 0x10 /* 063214 80062614 8E45001C */ lw $a1, 0x1c($s2) /* 063218 80062618 03008025 */ move $s0, $t8 -/* 06321C 8006261C 0C002AA2 */ jal func_8000AA88 +/* 06321C 8006261C 0C002AA2 */ jal __vsDelta /* 063220 80062620 02202025 */ move $a0, $s1 /* 063224 80062624 00103400 */ sll $a2, $s0, 0x10 /* 063228 80062628 00064403 */ sra $t0, $a2, 0x10 /* 06322C 8006262C 8E440014 */ lw $a0, 0x14($s2) /* 063230 80062630 01003025 */ move $a2, $t0 /* 063234 80062634 26250004 */ addiu $a1, $s1, 4 -/* 063238 80062638 0C032594 */ jal func_800C9650 +/* 063238 80062638 0C032594 */ jal alSynSetVol /* 06323C 8006263C 00403825 */ move $a3, $v0 /* 063240 80062640 24090016 */ li $t1, 22 /* 063244 80062644 A7A9006C */ sh $t1, 0x6c($sp) @@ -180,7 +180,7 @@ glabel D_80062408 /* 0632B8 800626B8 00000000 */ nop /* 0632BC 800626BC 46045182 */ mul.s $f6, $f10, $f4 /* 0632C0 800626C0 44063000 */ mfc1 $a2, $f6 -/* 0632C4 800626C4 0C0325E0 */ jal func_800C9780 +/* 0632C4 800626C4 0C0325E0 */ jal alSynSetPitch /* 0632C8 800626C8 00000000 */ nop /* 0632CC 800626CC 240D0017 */ li $t5, 23 /* 0632D0 800626D0 A7AD006C */ sh $t5, 0x6c($sp) @@ -194,12 +194,12 @@ glabel D_80062408 /* 0632F0 800626F0 100000A2 */ b .L8006297C /* 0632F4 800626F4 8FA50048 */ lw $a1, 0x48($sp) /* 0632F8 800626F8 8FA50048 */ lw $a1, 0x48($sp) -/* 0632FC 800626FC 0C018AC0 */ jal func_80062B00 +/* 0632FC 800626FC 0C018AC0 */ jal __CSPHandleMIDIMsg /* 063300 80062700 02402025 */ move $a0, $s2 /* 063304 80062704 1000009D */ b .L8006297C /* 063308 80062708 8FA50048 */ lw $a1, 0x48($sp) /* 06330C 8006270C 8FA50048 */ lw $a1, 0x48($sp) -/* 063310 80062710 0C018DFB */ jal func_800637EC +/* 063310 80062710 0C018DFB */ jal __CSPHandleMetaMsg /* 063314 80062714 02402025 */ move $a0, $s2 /* 063318 80062718 10000098 */ b .L8006297C /* 06331C 8006271C 8FA50048 */ lw $a1, 0x48($sp) @@ -209,20 +209,20 @@ glabel D_80062408 /* 06332C 8006272C 12200092 */ beqz $s1, .L80062978 /* 063330 80062730 02202025 */ move $a0, $s1 .L80062734: -/* 063334 80062734 0C002A7E */ jal func_8000A9F8 +/* 063334 80062734 0C002A7E */ jal __vsVol /* 063338 80062738 02402825 */ move $a1, $s2 /* 06333C 8006273C 00028400 */ sll $s0, $v0, 0x10 /* 063340 80062740 00107C03 */ sra $t7, $s0, 0x10 /* 063344 80062744 8E45001C */ lw $a1, 0x1c($s2) /* 063348 80062748 01E08025 */ move $s0, $t7 -/* 06334C 8006274C 0C002AA2 */ jal func_8000AA88 +/* 06334C 8006274C 0C002AA2 */ jal __vsDelta /* 063350 80062750 02202025 */ move $a0, $s1 /* 063354 80062754 00103400 */ sll $a2, $s0, 0x10 /* 063358 80062758 0006C403 */ sra $t8, $a2, 0x10 /* 06335C 8006275C 8E440014 */ lw $a0, 0x14($s2) /* 063360 80062760 03003025 */ move $a2, $t8 /* 063364 80062764 26250004 */ addiu $a1, $s1, 4 -/* 063368 80062768 0C032594 */ jal func_800C9650 +/* 063368 80062768 0C032594 */ jal alSynSetVol /* 06336C 8006276C 00403825 */ move $a3, $v0 /* 063370 80062770 8E310000 */ lw $s1, ($s1) /* 063374 80062774 00000000 */ nop @@ -235,7 +235,7 @@ glabel D_80062408 /* 063390 80062790 11010079 */ beq $t0, $at, .L80062978 /* 063394 80062794 24090001 */ li $t1, 1 /* 063398 80062798 AE49002C */ sw $t1, 0x2c($s2) -/* 06339C 8006279C 0C018A73 */ jal func_800629CC +/* 06339C 8006279C 0C018A73 */ jal __CSPPostNextSeqEvent /* 0633A0 800627A0 02402025 */ move $a0, $s2 /* 0633A4 800627A4 10000075 */ b .L8006297C /* 0633A8 800627A8 8FA50048 */ lw $a1, 0x48($sp) @@ -275,20 +275,20 @@ glabel D_80062408 .L80062828: /* 063428 80062828 8E440014 */ lw $a0, 0x14($s2) /* 06342C 8006282C 26300004 */ addiu $s0, $s1, 4 -/* 063430 80062830 0C03262C */ jal func_800C98B0 +/* 063430 80062830 0C03262C */ jal alSynStopVoice /* 063434 80062834 02002825 */ move $a1, $s0 /* 063438 80062838 8E440014 */ lw $a0, 0x14($s2) -/* 06343C 8006283C 0C03264C */ jal func_800C9930 +/* 06343C 8006283C 0C03264C */ jal alSynFreeVoice /* 063440 80062840 02002825 */ move $a1, $s0 /* 063444 80062844 92290037 */ lbu $t1, 0x37($s1) /* 063448 80062848 02402025 */ move $a0, $s2 /* 06344C 8006284C 11200003 */ beqz $t1, .L8006285C /* 063450 80062850 00000000 */ nop -/* 063454 80062854 0C002BBF */ jal func_8000AEFC +/* 063454 80062854 0C002BBF */ jal __seqpStopOsc /* 063458 80062858 02202825 */ move $a1, $s1 .L8006285C: /* 06345C 8006285C 02402025 */ move $a0, $s2 -/* 063460 80062860 0C0029F1 */ jal func_8000A7C4 +/* 063460 80062860 0C0029F1 */ jal __unmapVoice /* 063464 80062864 02002825 */ move $a1, $s0 /* 063468 80062868 8E510064 */ lw $s1, 0x64($s2) /* 06346C 8006286C 00000000 */ nop @@ -301,13 +301,13 @@ glabel D_80062408 /* 063484 80062884 24010001 */ li $at, 1 /* 063488 80062888 1721003B */ bne $t9, $at, .L80062978 /* 06348C 8006288C 02E02025 */ move $a0, $s7 -/* 063490 80062890 0C032424 */ jal func_800C9090 +/* 063490 80062890 0C032424 */ jal alEvtqFlushType /* 063494 80062894 00002825 */ move $a1, $zero /* 063498 80062898 02E02025 */ move $a0, $s7 -/* 06349C 8006289C 0C032424 */ jal func_800C9090 +/* 06349C 8006289C 0C032424 */ jal alEvtqFlushType /* 0634A0 800628A0 24050015 */ li $a1, 21 /* 0634A4 800628A4 02E02025 */ move $a0, $s7 -/* 0634A8 800628A8 0C032424 */ jal func_800C9090 +/* 0634A8 800628A8 0C032424 */ jal alEvtqFlushType /* 0634AC 800628AC 24050002 */ li $a1, 2 /* 0634B0 800628B0 8E510064 */ lw $s1, 0x64($s2) /* 0634B4 800628B4 00000000 */ nop @@ -317,12 +317,12 @@ glabel D_80062408 /* 0634C0 800628C0 26300004 */ addiu $s0, $s1, 4 /* 0634C4 800628C4 02002825 */ move $a1, $s0 /* 0634C8 800628C8 02402025 */ move $a0, $s2 -/* 0634CC 800628CC 0C002B0D */ jal func_8000AC34 +/* 0634CC 800628CC 0C002B0D */ jal __voiceNeedsNoteKill /* 0634D0 800628D0 3406C350 */ li $a2, 50000 /* 0634D4 800628D4 10400004 */ beqz $v0, .L800628E8 /* 0634D8 800628D8 02402025 */ move $a0, $s2 /* 0634DC 800628DC 02002825 */ move $a1, $s0 -/* 0634E0 800628E0 0C002AC0 */ jal func_8000AB00 +/* 0634E0 800628E0 0C002AC0 */ jal __seqpReleaseVoice /* 0634E4 800628E4 3406C350 */ li $a2, 50000 .L800628E8: /* 0634E8 800628E8 8E310000 */ lw $s1, ($s1) @@ -354,13 +354,13 @@ glabel D_80062408 /* 06354C 8006294C AE580018 */ sw $t8, 0x18($s2) /* 063550 80062950 10A00009 */ beqz $a1, .L80062978 /* 063554 80062954 00000000 */ nop -/* 063558 80062958 0C002B38 */ jal func_8000ACE0 +/* 063558 80062958 0C002B38 */ jal __initFromBank /* 06355C 8006295C 02402025 */ move $a0, $s2 /* 063560 80062960 10000006 */ b .L8006297C /* 063564 80062964 8FA50048 */ lw $a1, 0x48($sp) /* 063568 80062968 8E45003C */ lw $a1, 0x3c($s2) /* 06356C 8006296C 02402025 */ move $a0, $s2 -/* 063570 80062970 0C002B38 */ jal func_8000ACE0 +/* 063570 80062970 0C002B38 */ jal __initFromBank /* 063574 80062974 AE450020 */ sw $a1, 0x20($s2) .L80062978: /* 063578 80062978 8FA50048 */ lw $a1, 0x48($sp) diff --git a/asm/non_matchings/unknown_061D30/func_80063A34.s b/asm/non_matchings/unknown_061D30/__setUsptFromTempo.s similarity index 97% rename from asm/non_matchings/unknown_061D30/func_80063A34.s rename to asm/non_matchings/unknown_061D30/__setUsptFromTempo.s index e60b689e..b4612597 100644 --- a/asm/non_matchings/unknown_061D30/func_80063A34.s +++ b/asm/non_matchings/unknown_061D30/__setUsptFromTempo.s @@ -1,4 +1,4 @@ -glabel func_80063A34 +glabel __setUsptFromTempo /* 064634 80063A34 8C820018 */ lw $v0, 0x18($a0) /* 064638 80063A38 44856000 */ mtc1 $a1, $f12 /* 06463C 80063A3C 1040000F */ beqz $v0, .L80063A7C diff --git a/asm/non_matchings/unknown_061D30/func_80062290.s b/asm/non_matchings/unknown_061D30/alCSPNew.s similarity index 90% rename from asm/non_matchings/unknown_061D30/func_80062290.s rename to asm/non_matchings/unknown_061D30/alCSPNew.s index e9ec4db5..7c553734 100644 --- a/asm/non_matchings/unknown_061D30/func_80062290.s +++ b/asm/non_matchings/unknown_061D30/alCSPNew.s @@ -1,4 +1,4 @@ -glabel func_80062290 +glabel alCSPNew /* 062E90 80062290 27BDFFC0 */ addiu $sp, $sp, -0x40 /* 062E94 80062294 AFBF0024 */ sw $ra, 0x24($sp) /* 062E98 80062298 AFB10020 */ sw $s1, 0x20($sp) @@ -6,8 +6,8 @@ glabel func_80062290 /* 062EA0 800622A0 8CA6000C */ lw $a2, 0xc($a1) /* 062EA4 800622A4 AC800020 */ sw $zero, 0x20($a0) /* 062EA8 800622A8 AC800018 */ sw $zero, 0x18($a0) -/* 062EAC 800622AC 3C0E800E */ lui $t6, %hi(D_800E3780) # $t6, 0x800e -/* 062EB0 800622B0 8DCE3780 */ lw $t6, %lo(D_800E3780)($t6) +/* 062EAC 800622AC 3C0E800E */ lui $t6, %hi(alGlobals) # $t6, 0x800e +/* 062EB0 800622B0 8DCE3780 */ lw $t6, %lo(alGlobals)($t6) /* 062EB4 800622B4 340FFFFF */ li $t7, 65535 /* 062EB8 800622B8 241801E8 */ li $t8, 488 /* 062EBC 800622BC 24197FFF */ li $t9, 32767 @@ -81,13 +81,13 @@ glabel func_80062290 /* 062FC4 800623C4 26040048 */ addiu $a0, $s0, 0x48 /* 062FC8 800623C8 0C0324D7 */ jal alEvtqNew /* 062FCC 800623CC 00402825 */ move $a1, $v0 -/* 062FD0 800623D0 3C0B8006 */ lui $t3, %hi(D_80062408) # $t3, 0x8006 -/* 062FD4 800623D4 256B2408 */ addiu $t3, %lo(D_80062408) # addiu $t3, $t3, 0x2408 +/* 062FD0 800623D0 3C0B8006 */ lui $t3, %hi(__CSPVoiceHandler) # $t3, 0x8006 +/* 062FD4 800623D4 256B2408 */ addiu $t3, %lo(__CSPVoiceHandler) # addiu $t3, $t3, 0x2408 /* 062FD8 800623D8 AE000000 */ sw $zero, ($s0) /* 062FDC 800623DC AE0B0008 */ sw $t3, 8($s0) /* 062FE0 800623E0 AE100004 */ sw $s0, 4($s0) -/* 062FE4 800623E4 3C04800E */ lui $a0, %hi(D_800E3780) # $a0, 0x800e -/* 062FE8 800623E8 8C843780 */ lw $a0, %lo(D_800E3780)($a0) +/* 062FE4 800623E4 3C04800E */ lui $a0, %hi(alGlobals) # $a0, 0x800e +/* 062FE8 800623E8 8C843780 */ lw $a0, %lo(alGlobals)($a0) /* 062FEC 800623EC 0C0324F4 */ jal alSynAddPlayer /* 062FF0 800623F0 02002825 */ move $a1, $s0 /* 062FF4 800623F4 8FBF0024 */ lw $ra, 0x24($sp) diff --git a/asm/non_matchings/unknown_064830/func_80064884.s b/asm/non_matchings/unknown_064830/_doModFunc.s similarity index 99% rename from asm/non_matchings/unknown_064830/func_80064884.s rename to asm/non_matchings/unknown_064830/_doModFunc.s index d8420fd1..fa902ff8 100644 --- a/asm/non_matchings/unknown_064830/func_80064884.s +++ b/asm/non_matchings/unknown_064830/_doModFunc.s @@ -1,4 +1,4 @@ -glabel func_80064884 +glabel _doModFunc /* 065484 80064884 44853000 */ mtc1 $a1, $f6 /* 065488 80064888 C4840010 */ lwc1 $f4, 0x10($a0) /* 06548C 8006488C 46803220 */ cvt.s.w $f8, $f6 diff --git a/asm/non_matchings/unknown_064830/func_800647D0.s b/asm/non_matchings/unknown_064830/_filterBuffer.s similarity index 99% rename from asm/non_matchings/unknown_064830/func_800647D0.s rename to asm/non_matchings/unknown_064830/_filterBuffer.s index e2884c70..2a76ae02 100644 --- a/asm/non_matchings/unknown_064830/func_800647D0.s +++ b/asm/non_matchings/unknown_064830/_filterBuffer.s @@ -1,4 +1,4 @@ -glabel func_800647D0 +glabel _filterBuffer /* 0653D0 800647D0 27BDFFD0 */ addiu $sp, $sp, -0x30 /* 0653D4 800647D4 AFB00018 */ sw $s0, 0x18($sp) /* 0653D8 800647D8 AFBF001C */ sw $ra, 0x1c($sp) diff --git a/asm/non_matchings/unknown_064830/func_800644A0.s b/asm/non_matchings/unknown_064830/_loadBuffer.s similarity index 99% rename from asm/non_matchings/unknown_064830/func_800644A0.s rename to asm/non_matchings/unknown_064830/_loadBuffer.s index a44eab87..bd49e065 100644 --- a/asm/non_matchings/unknown_064830/func_800644A0.s +++ b/asm/non_matchings/unknown_064830/_loadBuffer.s @@ -1,4 +1,4 @@ -glabel func_800644A0 +glabel _loadBuffer /* 0650A0 800644A0 27BDFFA0 */ addiu $sp, $sp, -0x60 /* 0650A4 800644A4 AFBF001C */ sw $ra, 0x1c($sp) /* 0650A8 800644A8 AFB00018 */ sw $s0, 0x18($sp) diff --git a/asm/non_matchings/unknown_064830/func_80064224.s b/asm/non_matchings/unknown_064830/_loadOutputBuffer.s similarity index 97% rename from asm/non_matchings/unknown_064830/func_80064224.s rename to asm/non_matchings/unknown_064830/_loadOutputBuffer.s index e488bd18..7d8acda3 100644 --- a/asm/non_matchings/unknown_064830/func_80064224.s +++ b/asm/non_matchings/unknown_064830/_loadOutputBuffer.s @@ -1,4 +1,4 @@ -glabel func_80064224 +glabel _loadOutputBuffer /* 064E24 80064224 27BDFF98 */ addiu $sp, $sp, -0x68 /* 064E28 80064228 AFBF002C */ sw $ra, 0x2c($sp) /* 064E2C 8006422C AFB20028 */ sw $s2, 0x28($sp) @@ -15,7 +15,7 @@ glabel func_80064224 /* 064E58 80064258 00A02025 */ move $a0, $a1 /* 064E5C 8006425C 01F8C823 */ subu $t9, $t7, $t8 /* 064E60 80064260 AFB90040 */ sw $t9, 0x40($sp) -/* 064E64 80064264 0C019221 */ jal func_80064884 +/* 064E64 80064264 0C019221 */ jal _doModFunc /* 064E68 80064268 00E02825 */ move $a1, $a3 /* 064E6C 8006426C 8FAA0040 */ lw $t2, 0x40($sp) /* 064E70 80064270 3C014700 */ li $at, 0x47000000 # 32768.000000 @@ -85,7 +85,7 @@ glabel func_80064224 /* 064F70 80064370 01801825 */ move $v1, $t4 /* 064F74 80064374 010C3821 */ addu $a3, $t0, $t4 /* 064F78 80064378 AFA80034 */ sw $t0, 0x34($sp) -/* 064F7C 8006437C 0C019128 */ jal func_800644A0 +/* 064F7C 8006437C 0C019128 */ jal _loadBuffer /* 064F80 80064380 AFAD0010 */ sw $t5, 0x10($sp) /* 064F84 80064384 8FA90030 */ lw $t1, 0x30($sp) /* 064F88 80064388 3C010800 */ lui $at, 0x800 @@ -149,7 +149,7 @@ glabel func_80064224 /* 06506C 8006446C 8FA60070 */ lw $a2, 0x70($sp) /* 065070 80064470 02403825 */ move $a3, $s2 /* 065074 80064474 AFAD0010 */ sw $t5, 0x10($sp) -/* 065078 80064478 0C019128 */ jal func_800644A0 +/* 065078 80064478 0C019128 */ jal _loadBuffer /* 06507C 8006447C 030A2821 */ addu $a1, $t8, $t2 /* 065080 80064480 00408825 */ move $s1, $v0 .L80064484: diff --git a/asm/non_matchings/unknown_064830/func_80064638.s b/asm/non_matchings/unknown_064830/_saveBuffer.s similarity index 99% rename from asm/non_matchings/unknown_064830/func_80064638.s rename to asm/non_matchings/unknown_064830/_saveBuffer.s index 56878836..be3e1aad 100644 --- a/asm/non_matchings/unknown_064830/func_80064638.s +++ b/asm/non_matchings/unknown_064830/_saveBuffer.s @@ -1,4 +1,4 @@ -glabel func_80064638 +glabel _saveBuffer /* 065238 80064638 27BDFFA0 */ addiu $sp, $sp, -0x60 /* 06523C 8006463C AFBF001C */ sw $ra, 0x1c($sp) /* 065240 80064640 AFB00018 */ sw $s0, 0x18($sp) diff --git a/asm/non_matchings/unknown_064830/func_80064A08.s b/asm/non_matchings/unknown_064830/alFxNew.s similarity index 95% rename from asm/non_matchings/unknown_064830/func_80064A08.s rename to asm/non_matchings/unknown_064830/alFxNew.s index 0aebd3c4..e690b30d 100644 --- a/asm/non_matchings/unknown_064830/func_80064A08.s +++ b/asm/non_matchings/unknown_064830/alFxNew.s @@ -1,4 +1,4 @@ -glabel func_80064A08 +glabel alFxNew /* 065608 80064A08 27BDFFA0 */ addiu $sp, $sp, -0x60 /* 06560C 80064A0C AFB00038 */ sw $s0, 0x38($sp) /* 065610 80064A10 00068400 */ sll $s0, $a2, 0x10 @@ -8,7 +8,7 @@ glabel func_80064A08 /* 065620 80064A20 AFB60050 */ sw $s6, 0x50($sp) /* 065624 80064A24 AFA50064 */ sw $a1, 0x64($sp) /* 065628 80064A28 AFA7006C */ sw $a3, 0x6c($sp) -/* 06562C 80064A2C 3C068006 */ lui $a2, %hi(D_80063F94) # $a2, 0x8006 +/* 06562C 80064A2C 3C068006 */ lui $a2, %hi(alFxParam) # $a2, 0x8006 /* 065630 80064A30 0080B025 */ move $s6, $a0 /* 065634 80064A34 01C08025 */ move $s0, $t6 /* 065638 80064A38 AFBE0058 */ sw $fp, 0x58($sp) @@ -26,15 +26,15 @@ glabel func_80064A08 /* 065668 80064A68 E7B60024 */ swc1 $f22, 0x24($sp) /* 06566C 80064A6C E7B50018 */ swc1 $f21, 0x18($sp) /* 065670 80064A70 E7B4001C */ swc1 $f20, 0x1c($sp) -/* 065674 80064A74 24C63F94 */ addiu $a2, %lo(D_80063F94) # addiu $a2, $a2, 0x3f94 +/* 065674 80064A74 24C63F94 */ addiu $a2, %lo(alFxParam) # addiu $a2, $a2, 0x3f94 /* 065678 80064A78 24070005 */ li $a3, 5 -/* 06567C 80064A7C 0C03282C */ jal func_800CA0B0 +/* 06567C 80064A7C 0C03282C */ jal alFilterNew /* 065680 80064A80 00002825 */ move $a1, $zero /* 065684 80064A84 8FA20064 */ lw $v0, 0x64($sp) -/* 065688 80064A88 3C0F8006 */ lui $t7, %hi(D_80063C30) # $t7, 0x8006 -/* 06568C 80064A8C 3C188006 */ lui $t8, %hi(D_80063FAC) # $t8, 0x8006 -/* 065690 80064A90 25EF3C30 */ addiu $t7, %lo(D_80063C30) # addiu $t7, $t7, 0x3c30 -/* 065694 80064A94 27183FAC */ addiu $t8, %lo(D_80063FAC) # addiu $t8, $t8, 0x3fac +/* 065688 80064A88 3C0F8006 */ lui $t7, %hi(alFxPull) # $t7, 0x8006 +/* 06568C 80064A8C 3C188006 */ lui $t8, %hi(alFxParamHdl) # $t8, 0x8006 +/* 065690 80064A90 25EF3C30 */ addiu $t7, %lo(alFxPull) # addiu $t7, $t7, 0x3c30 +/* 065694 80064A94 27183FAC */ addiu $t8, %lo(alFxParamHdl) # addiu $t8, $t8, 0x3fac /* 065698 80064A98 AECF0004 */ sw $t7, 4($s6) /* 06569C 80064A9C AED80028 */ sw $t8, 0x28($s6) /* 0656A0 80064AA0 0050C821 */ addu $t9, $v0, $s0 @@ -248,7 +248,7 @@ glabel func_80064A08 /* 0659C0 80064DC0 3239FFFF */ andi $t9, $s1, 0xffff /* 0659C4 80064DC4 A70F0000 */ sh $t7, ($t8) /* 0659C8 80064DC8 8E040020 */ lw $a0, 0x20($s0) -/* 0659CC 80064DCC 0C019254 */ jal func_80064950 +/* 0659CC 80064DCC 0C019254 */ jal init_lpfilter /* 0659D0 80064DD0 03208825 */ move $s1, $t9 /* 0659D4 80064DD4 10000006 */ b .L80064DF0 /* 0659D8 80064DD8 92CA0024 */ lbu $t2, 0x24($s6) diff --git a/asm/non_matchings/unknown_064830/D_80063FAC.s b/asm/non_matchings/unknown_064830/alFxParamHdl.s similarity index 97% rename from asm/non_matchings/unknown_064830/D_80063FAC.s rename to asm/non_matchings/unknown_064830/alFxParamHdl.s index fcea7f0b..9519152d 100644 --- a/asm/non_matchings/unknown_064830/D_80063FAC.s +++ b/asm/non_matchings/unknown_064830/alFxParamHdl.s @@ -1,4 +1,4 @@ -glabel D_80063FAC +glabel alFxParamHdl /* 064BAC 80063FAC 27BDFFE8 */ addiu $sp, $sp, -0x18 /* 064BB0 80063FB0 24A3FFFE */ addiu $v1, $a1, -2 /* 064BB4 80063FB4 AFBF0014 */ sw $ra, 0x14($sp) @@ -82,9 +82,9 @@ glabel D_80063FAC /* 064CD8 800640D8 3C01447A */ li $at, 0x447A0000 # 1000.000000 /* 064CDC 800640DC 468021A0 */ cvt.s.w $f6, $f4 /* 064CE0 800640E0 44814000 */ mtc1 $at, $f8 -/* 064CE4 800640E4 3C0A800E */ lui $t2, %hi(D_800E3780) # $t2, 0x800e +/* 064CE4 800640E4 3C0A800E */ lui $t2, %hi(alGlobals) # $t2, 0x800e /* 064CE8 800640E8 46083283 */ div.s $f10, $f6, $f8 -/* 064CEC 800640EC 8D4A3780 */ lw $t2, %lo(D_800E3780)($t2) +/* 064CEC 800640EC 8D4A3780 */ lw $t2, %lo(alGlobals)($t2) /* 064CF0 800640F0 8CED0020 */ lw $t5, 0x20($a3) /* 064CF4 800640F4 8D4C0044 */ lw $t4, 0x44($t2) /* 064CF8 800640F8 00000000 */ nop @@ -160,7 +160,7 @@ glabel D_80063FAC /* 064E00 80064200 00000000 */ nop /* 064E04 80064204 030DC821 */ addu $t9, $t8, $t5 /* 064E08 80064208 8F240020 */ lw $a0, 0x20($t9) -/* 064E0C 8006420C 0C019254 */ jal func_80064950 +/* 064E0C 8006420C 0C019254 */ jal init_lpfilter /* 064E10 80064210 00000000 */ nop .L80064214: /* 064E14 80064214 8FBF0014 */ lw $ra, 0x14($sp) diff --git a/asm/non_matchings/unknown_064830/D_80063C30.s b/asm/non_matchings/unknown_064830/alFxPull.s similarity index 96% rename from asm/non_matchings/unknown_064830/D_80063C30.s rename to asm/non_matchings/unknown_064830/alFxPull.s index f58fea2f..456dd2d2 100644 --- a/asm/non_matchings/unknown_064830/D_80063C30.s +++ b/asm/non_matchings/unknown_064830/alFxPull.s @@ -1,4 +1,4 @@ -glabel D_80063C30 +glabel alFxPull /* 064830 80063C30 27BDFF60 */ addiu $sp, $sp, -0xa0 /* 064834 80063C34 AFB3002C */ sw $s3, 0x2c($sp) /* 064838 80063C38 00809825 */ move $s3, $a0 @@ -57,7 +57,7 @@ glabel D_80063C30 /* 064908 80063D08 AFA3007C */ sw $v1, 0x7c($sp) /* 06490C 80063D0C 02602025 */ move $a0, $s3 /* 064910 80063D10 240606C0 */ li $a2, 1728 -/* 064914 80063D14 0C01918E */ jal func_80064638 +/* 064914 80063D14 0C01918E */ jal _saveBuffer /* 064918 80063D18 02C03825 */ move $a3, $s6 /* 06491C 80063D1C 8FA3007C */ lw $v1, 0x7c($sp) /* 064920 80063D20 3C0F0200 */ lui $t7, (0x02000800 >> 16) # lui $t7, 0x200 @@ -98,7 +98,7 @@ glabel D_80063C30 /* 0649A4 80063DA4 02802825 */ move $a1, $s4 /* 0649A8 80063DA8 02A03025 */ move $a2, $s5 /* 0649AC 80063DAC 02C03825 */ move $a3, $s6 -/* 0649B0 80063DB0 0C019128 */ jal func_800644A0 +/* 0649B0 80063DB0 0C019128 */ jal _loadBuffer /* 0649B4 80063DB4 AFB00010 */ sw $s0, 0x10($sp) /* 0649B8 80063DB8 00408025 */ move $s0, $v0 .L80063DBC: @@ -106,7 +106,7 @@ glabel D_80063C30 /* 0649C0 80063DC0 02202825 */ move $a1, $s1 /* 0649C4 80063DC4 02403025 */ move $a2, $s2 /* 0649C8 80063DC8 02C03825 */ move $a3, $s6 -/* 0649CC 80063DCC 0C019089 */ jal func_80064224 +/* 0649CC 80063DCC 0C019089 */ jal _loadOutputBuffer /* 0649D0 80063DD0 AFB00010 */ sw $s0, 0x10($sp) /* 0649D4 80063DD4 86240008 */ lh $a0, 8($s1) /* 0649D8 80063DD8 00408025 */ move $s0, $v0 @@ -129,7 +129,7 @@ glabel D_80063C30 /* 064A1C 80063E1C 03C02825 */ move $a1, $fp /* 064A20 80063E20 02403025 */ move $a2, $s2 /* 064A24 80063E24 02C03825 */ move $a3, $s6 -/* 064A28 80063E28 0C01918E */ jal func_80064638 +/* 064A28 80063E28 0C01918E */ jal _saveBuffer /* 064A2C 80063E2C AFB00010 */ sw $s0, 0x10($sp) /* 064A30 80063E30 00408025 */ move $s0, $v0 .L80063E34: @@ -149,7 +149,7 @@ glabel D_80063C30 /* 064A68 80063E68 02602025 */ move $a0, $s3 /* 064A6C 80063E6C 02802825 */ move $a1, $s4 /* 064A70 80063E70 02A03025 */ move $a2, $s5 -/* 064A74 80063E74 0C01918E */ jal func_80064638 +/* 064A74 80063E74 0C01918E */ jal _saveBuffer /* 064A78 80063E78 02C03825 */ move $a3, $s6 /* 064A7C 80063E7C 00408025 */ move $s0, $v0 .L80063E80: @@ -157,7 +157,7 @@ glabel D_80063C30 /* 064A84 80063E84 02402825 */ move $a1, $s2 /* 064A88 80063E88 10800004 */ beqz $a0, .L80063E9C /* 064A8C 80063E8C 02C03025 */ move $a2, $s6 -/* 064A90 80063E90 0C0191F4 */ jal func_800647D0 +/* 064A90 80063E90 0C0191F4 */ jal _filterBuffer /* 064A94 80063E94 02003825 */ move $a3, $s0 /* 064A98 80063E98 00408025 */ move $s0, $v0 .L80063E9C: @@ -167,7 +167,7 @@ glabel D_80063C30 /* 064AA8 80063EA8 03C02825 */ move $a1, $fp /* 064AAC 80063EAC 02403025 */ move $a2, $s2 /* 064AB0 80063EB0 02C03825 */ move $a3, $s6 -/* 064AB4 80063EB4 0C01918E */ jal func_80064638 +/* 064AB4 80063EB4 0C01918E */ jal _saveBuffer /* 064AB8 80063EB8 AFB00010 */ sw $s0, 0x10($sp) /* 064ABC 80063EBC 00408025 */ move $s0, $v0 .L80063EC0: diff --git a/asm/non_matchings/unknown_064830/func_80064950.s b/asm/non_matchings/unknown_064830/init_lpfilter.s similarity index 99% rename from asm/non_matchings/unknown_064830/func_80064950.s rename to asm/non_matchings/unknown_064830/init_lpfilter.s index 650d0ee4..432f8fc0 100644 --- a/asm/non_matchings/unknown_064830/func_80064950.s +++ b/asm/non_matchings/unknown_064830/init_lpfilter.s @@ -1,4 +1,4 @@ -glabel func_80064950 +glabel init_lpfilter /* 065550 80064950 84820000 */ lh $v0, ($a0) /* 065554 80064954 24194000 */ li $t9, 16384 /* 065558 80064958 00027380 */ sll $t6, $v0, 0xe diff --git a/asm/non_matchings/unknown_065D30/func_80065668.s b/asm/non_matchings/unknown_065D30/__allocParam.s similarity index 77% rename from asm/non_matchings/unknown_065D30/func_80065668.s rename to asm/non_matchings/unknown_065D30/__allocParam.s index 17416ce8..096cc1d7 100644 --- a/asm/non_matchings/unknown_065D30/func_80065668.s +++ b/asm/non_matchings/unknown_065D30/__allocParam.s @@ -1,6 +1,6 @@ -glabel func_80065668 -/* 066268 80065668 3C02800E */ lui $v0, %hi(D_800E3780) # $v0, 0x800e -/* 06626C 8006566C 8C423780 */ lw $v0, %lo(D_800E3780)($v0) +glabel __allocParam +/* 066268 80065668 3C02800E */ lui $v0, %hi(alGlobals) # $v0, 0x800e +/* 06626C 8006566C 8C423780 */ lw $v0, %lo(alGlobals)($v0) /* 066270 80065670 00001825 */ move $v1, $zero /* 066274 80065674 8C44002C */ lw $a0, 0x2c($v0) /* 066278 80065678 00000000 */ nop diff --git a/asm/non_matchings/unknown_065D30/func_800656BC.s b/asm/non_matchings/unknown_065D30/__collectPVoices.s similarity index 98% rename from asm/non_matchings/unknown_065D30/func_800656BC.s rename to asm/non_matchings/unknown_065D30/__collectPVoices.s index 3b17c5ec..e43cb395 100644 --- a/asm/non_matchings/unknown_065D30/func_800656BC.s +++ b/asm/non_matchings/unknown_065D30/__collectPVoices.s @@ -1,4 +1,4 @@ -glabel func_800656BC +glabel __collectPVoices /* 0662BC 800656BC 27BDFFD8 */ addiu $sp, $sp, -0x28 /* 0662C0 800656C0 AFBF0024 */ sw $ra, 0x24($sp) /* 0662C4 800656C4 AFB20020 */ sw $s2, 0x20($sp) diff --git a/asm/non_matchings/unknown_065D30/func_8006571C.s b/asm/non_matchings/unknown_065D30/__freePVoices.s similarity index 97% rename from asm/non_matchings/unknown_065D30/func_8006571C.s rename to asm/non_matchings/unknown_065D30/__freePVoices.s index eb370e19..1e2d0855 100644 --- a/asm/non_matchings/unknown_065D30/func_8006571C.s +++ b/asm/non_matchings/unknown_065D30/__freePVoices.s @@ -1,4 +1,4 @@ -glabel func_8006571C +glabel __freePVoices /* 06631C 8006571C 27BDFFE8 */ addiu $sp, $sp, -0x18 /* 066320 80065720 AFBF0014 */ sw $ra, 0x14($sp) /* 066324 80065724 AFA40018 */ sw $a0, 0x18($sp) diff --git a/asm/non_matchings/unknown_065D30/func_8006569C.s b/asm/non_matchings/unknown_065D30/__freeParam.s similarity index 63% rename from asm/non_matchings/unknown_065D30/func_8006569C.s rename to asm/non_matchings/unknown_065D30/__freeParam.s index 8d73da97..d3c77f41 100644 --- a/asm/non_matchings/unknown_065D30/func_8006569C.s +++ b/asm/non_matchings/unknown_065D30/__freeParam.s @@ -1,6 +1,6 @@ -glabel func_8006569C -/* 06629C 8006569C 3C02800E */ lui $v0, %hi(D_800E3780) # $v0, 0x800e -/* 0662A0 800656A0 8C423780 */ lw $v0, %lo(D_800E3780)($v0) +glabel __freeParam +/* 06629C 8006569C 3C02800E */ lui $v0, %hi(alGlobals) # $v0, 0x800e +/* 0662A0 800656A0 8C423780 */ lw $v0, %lo(alGlobals)($v0) /* 0662A4 800656A4 00000000 */ nop /* 0662A8 800656A8 8C4E002C */ lw $t6, 0x2c($v0) /* 0662AC 800656AC 00000000 */ nop diff --git a/asm/non_matchings/unknown_065D30/func_800657EC.s b/asm/non_matchings/unknown_065D30/__nextSampleTime.s similarity index 98% rename from asm/non_matchings/unknown_065D30/func_800657EC.s rename to asm/non_matchings/unknown_065D30/__nextSampleTime.s index b1c08b13..3567a321 100644 --- a/asm/non_matchings/unknown_065D30/func_800657EC.s +++ b/asm/non_matchings/unknown_065D30/__nextSampleTime.s @@ -1,4 +1,4 @@ -glabel func_800657EC +glabel __nextSampleTime /* 0663EC 800657EC ACA00000 */ sw $zero, ($a1) /* 0663F0 800657F0 8C830000 */ lw $v1, ($a0) /* 0663F4 800657F4 3C027FFF */ lui $v0, (0x7FFFFFFF >> 16) # lui $v0, 0x7fff diff --git a/asm/non_matchings/unknown_065D30/func_800657C4.s b/asm/non_matchings/unknown_065D30/__timeToSamples.s similarity index 84% rename from asm/non_matchings/unknown_065D30/func_800657C4.s rename to asm/non_matchings/unknown_065D30/__timeToSamples.s index 9d438e06..2a142dc4 100644 --- a/asm/non_matchings/unknown_065D30/func_800657C4.s +++ b/asm/non_matchings/unknown_065D30/__timeToSamples.s @@ -1,7 +1,7 @@ -glabel func_800657C4 +glabel __timeToSamples /* 0663C4 800657C4 27BDFFE8 */ addiu $sp, $sp, -0x18 /* 0663C8 800657C8 AFBF0014 */ sw $ra, 0x14($sp) -/* 0663CC 800657CC 0C0195D5 */ jal func_80065754 +/* 0663CC 800657CC 0C0195D5 */ jal __timeToSamplesNoRound /* 0663D0 800657D0 00000000 */ nop /* 0663D4 800657D4 8FBF0014 */ lw $ra, 0x14($sp) /* 0663D8 800657D8 2401FFF0 */ li $at, -16 diff --git a/asm/non_matchings/unknown_065D30/func_80065754.s b/asm/non_matchings/unknown_065D30/__timeToSamplesNoRound.s similarity index 97% rename from asm/non_matchings/unknown_065D30/func_80065754.s rename to asm/non_matchings/unknown_065D30/__timeToSamplesNoRound.s index 28a72802..bf5dba42 100644 --- a/asm/non_matchings/unknown_065D30/func_80065754.s +++ b/asm/non_matchings/unknown_065D30/__timeToSamplesNoRound.s @@ -1,4 +1,4 @@ -glabel func_80065754 +glabel __timeToSamplesNoRound /* 066354 80065754 8C8E0044 */ lw $t6, 0x44($a0) /* 066358 80065758 44852000 */ mtc1 $a1, $f4 /* 06635C 8006575C 448E4000 */ mtc1 $t6, $f8 diff --git a/asm/non_matchings/unknown_065D30/func_80065494.s b/asm/non_matchings/unknown_065D30/alAudioFrame.s similarity index 93% rename from asm/non_matchings/unknown_065D30/func_80065494.s rename to asm/non_matchings/unknown_065D30/alAudioFrame.s index 0717b5ed..d5a72ed5 100644 --- a/asm/non_matchings/unknown_065D30/func_80065494.s +++ b/asm/non_matchings/unknown_065D30/alAudioFrame.s @@ -1,8 +1,8 @@ -glabel func_80065494 +glabel alAudioFrame /* 066094 80065494 27BDFF90 */ addiu $sp, $sp, -0x70 /* 066098 80065498 AFB20024 */ sw $s2, 0x24($sp) -/* 06609C 8006549C 3C12800E */ lui $s2, %hi(D_800E3780) # $s2, 0x800e -/* 0660A0 800654A0 8E523780 */ lw $s2, %lo(D_800E3780)($s2) +/* 06609C 8006549C 3C12800E */ lui $s2, %hi(alGlobals) # $s2, 0x800e +/* 0660A0 800654A0 8E523780 */ lw $s2, %lo(alGlobals)($s2) /* 0660A4 800654A4 AFBF003C */ sw $ra, 0x3c($sp) /* 0660A8 800654A8 AFB70038 */ sw $s7, 0x38($sp) /* 0660AC 800654AC AFB60034 */ sw $s6, 0x34($sp) @@ -26,7 +26,7 @@ glabel func_80065494 /* 0660F0 800654F0 27B0006C */ addiu $s0, $sp, 0x6c /* 0660F4 800654F4 02002825 */ move $a1, $s0 /* 0660F8 800654F8 02402025 */ move $a0, $s2 -/* 0660FC 800654FC 0C0195FB */ jal func_800657EC +/* 0660FC 800654FC 0C0195FB */ jal __nextSampleTime /* 066100 80065500 AFB10070 */ sw $s1, 0x70($sp) /* 066104 80065504 8E580020 */ lw $t8, 0x20($s2) /* 066108 80065508 AE42001C */ sw $v0, 0x1c($s2) @@ -46,14 +46,14 @@ glabel func_80065494 /* 06613C 8006553C 0320F809 */ jalr $t9 /* 066140 80065540 00000000 */ nop /* 066144 80065544 02402025 */ move $a0, $s2 -/* 066148 80065548 0C0195D5 */ jal func_80065754 +/* 066148 80065548 0C0195D5 */ jal __timeToSamplesNoRound /* 06614C 8006554C 00402825 */ move $a1, $v0 /* 066150 80065550 8FAB006C */ lw $t3, 0x6c($sp) /* 066154 80065554 02402025 */ move $a0, $s2 /* 066158 80065558 8D6C0010 */ lw $t4, 0x10($t3) /* 06615C 8006555C 02002825 */ move $a1, $s0 /* 066160 80065560 01826821 */ addu $t5, $t4, $v0 -/* 066164 80065564 0C0195FB */ jal func_800657EC +/* 066164 80065564 0C0195FB */ jal __nextSampleTime /* 066168 80065568 AD6D0010 */ sw $t5, 0x10($t3) /* 06616C 8006556C 8E4E0020 */ lw $t6, 0x20($s2) /* 066170 80065570 AE42001C */ sw $v0, 0x1c($s2) @@ -108,7 +108,7 @@ glabel func_80065494 /* 066224 80065624 028E7823 */ subu $t7, $s4, $t6 /* 066228 80065628 000FC0C3 */ sra $t8, $t7, 3 /* 06622C 8006562C 02402025 */ move $a0, $s2 -/* 066230 80065630 0C0195AF */ jal func_800656BC +/* 066230 80065630 0C0195AF */ jal __collectPVoices /* 066234 80065634 AD180000 */ sw $t8, ($t0) /* 066238 80065638 02801025 */ move $v0, $s4 .L8006563C: diff --git a/asm/non_matchings/unknown_065D30/alSynNew.s b/asm/non_matchings/unknown_065D30/alSynNew.s index 463bd294..b266a0b0 100644 --- a/asm/non_matchings/unknown_065D30/alSynNew.s +++ b/asm/non_matchings/unknown_065D30/alSynNew.s @@ -99,7 +99,7 @@ glabel alSynNew /* 065EB0 800652B0 0005CC03 */ sra $t9, $a1, 0x10 /* 065EB4 800652B4 03202825 */ move $a1, $t9 /* 065EB8 800652B8 03C03025 */ move $a2, $fp -/* 065EBC 800652BC 0C019618 */ jal func_80065860 +/* 065EBC 800652BC 0C019618 */ jal alSynAllocFX /* 065EC0 800652C0 02E03825 */ move $a3, $s7 /* 065EC4 800652C4 1000000A */ b .L800652F0 /* 065EC8 800652C8 26100001 */ addiu $s0, $s0, 1 @@ -110,7 +110,7 @@ glabel alSynNew /* 065ED8 800652D8 24050002 */ li $a1, 2 /* 065EDC 800652DC 00004812 */ mflo $t1 /* 065EE0 800652E0 01093021 */ addu $a2, $t0, $t1 -/* 065EE4 800652E4 0C0330E4 */ jal D_800CC390 +/* 065EE4 800652E4 0C0330E4 */ jal alMainBusParam /* 065EE8 800652E8 00000000 */ nop /* 065EEC 800652EC 26100001 */ addiu $s0, $s0, 1 .L800652F0: diff --git a/asm/non_matchings/unknown_066460/func_80065860.s b/asm/non_matchings/unknown_066460/alSynAllocFX.s similarity index 91% rename from asm/non_matchings/unknown_066460/func_80065860.s rename to asm/non_matchings/unknown_066460/alSynAllocFX.s index faf7683e..86452f31 100644 --- a/asm/non_matchings/unknown_066460/func_80065860.s +++ b/asm/non_matchings/unknown_066460/alSynAllocFX.s @@ -1,4 +1,4 @@ -glabel func_80065860 +glabel alSynAllocFX /* 066460 80065860 27BDFFE0 */ addiu $sp, $sp, -0x20 /* 066464 80065864 AFA50024 */ sw $a1, 0x24($sp) /* 066468 80065868 AFA60028 */ sw $a2, 0x28($sp) @@ -15,18 +15,18 @@ glabel func_80065860 /* 066494 80065894 00118880 */ sll $s1, $s1, 2 /* 066498 80065898 8FA50028 */ lw $a1, 0x28($sp) /* 06649C 8006589C 01D12021 */ addu $a0, $t6, $s1 -/* 0664A0 800658A0 0C019282 */ jal func_80064A08 +/* 0664A0 800658A0 0C019282 */ jal alFxNew /* 0664A4 800658A4 24840020 */ addiu $a0, $a0, 0x20 /* 0664A8 800658A8 8E0F0034 */ lw $t7, 0x34($s0) /* 0664AC 800658AC 24050001 */ li $a1, 1 /* 0664B0 800658B0 01F13021 */ addu $a2, $t7, $s1 -/* 0664B4 800658B4 0C018FE5 */ jal D_80063F94 +/* 0664B4 800658B4 0C018FE5 */ jal alFxParam /* 0664B8 800658B8 24C40020 */ addiu $a0, $a2, 0x20 /* 0664BC 800658BC 8E180034 */ lw $t8, 0x34($s0) /* 0664C0 800658C0 8E040030 */ lw $a0, 0x30($s0) /* 0664C4 800658C4 03113021 */ addu $a2, $t8, $s1 /* 0664C8 800658C8 24C60020 */ addiu $a2, $a2, 0x20 -/* 0664CC 800658CC 0C0330E4 */ jal D_800CC390 +/* 0664CC 800658CC 0C0330E4 */ jal alMainBusParam /* 0664D0 800658D0 24050002 */ li $a1, 2 /* 0664D4 800658D4 8E190034 */ lw $t9, 0x34($s0) /* 0664D8 800658D8 8FBF001C */ lw $ra, 0x1c($sp) diff --git a/asm/non_matchings/unknown_066500/D_80065900.s b/asm/non_matchings/unknown_066500/alAuxBusPull.s similarity index 99% rename from asm/non_matchings/unknown_066500/D_80065900.s rename to asm/non_matchings/unknown_066500/alAuxBusPull.s index 11427a8e..5479817b 100644 --- a/asm/non_matchings/unknown_066500/D_80065900.s +++ b/asm/non_matchings/unknown_066500/alAuxBusPull.s @@ -1,4 +1,4 @@ -glabel D_80065900 +glabel alAuxBusPull /* 066500 80065900 27BDFFC0 */ addiu $sp, $sp, -0x40 /* 066504 80065904 AFB10024 */ sw $s1, 0x24($sp) /* 066508 80065908 8FB10050 */ lw $s1, 0x50($sp) diff --git a/asm/non_matchings/unknown_066500/func_80065B20.s b/asm/non_matchings/unknown_066500/alSynSetPan.s similarity index 96% rename from asm/non_matchings/unknown_066500/func_80065B20.s rename to asm/non_matchings/unknown_066500/alSynSetPan.s index 4e7bc375..91652705 100644 --- a/asm/non_matchings/unknown_066500/func_80065B20.s +++ b/asm/non_matchings/unknown_066500/alSynSetPan.s @@ -1,4 +1,4 @@ -glabel func_80065B20 +glabel alSynSetPan /* 066720 80065B20 27BDFFE0 */ addiu $sp, $sp, -0x20 /* 066724 80065B24 AFBF0014 */ sw $ra, 0x14($sp) /* 066728 80065B28 AFA40020 */ sw $a0, 0x20($sp) @@ -8,7 +8,7 @@ glabel func_80065B20 /* 066738 80065B38 00000000 */ nop /* 06673C 80065B3C 11E0001F */ beqz $t7, .L80065BBC /* 066740 80065B40 8FBF0014 */ lw $ra, 0x14($sp) -/* 066744 80065B44 0C01959A */ jal func_80065668 +/* 066744 80065B44 0C01959A */ jal __allocParam /* 066748 80065B48 00000000 */ nop /* 06674C 80065B4C 1040001A */ beqz $v0, .L80065BB8 /* 066750 80065B50 240C000C */ li $t4, 12 diff --git a/asm/non_matchings/unknown_0667D0/func_80065C38.s b/asm/non_matchings/unknown_0667D0/alSynStartVoiceParams.s similarity index 93% rename from asm/non_matchings/unknown_0667D0/func_80065C38.s rename to asm/non_matchings/unknown_0667D0/alSynStartVoiceParams.s index ae821636..100a6b6a 100644 --- a/asm/non_matchings/unknown_0667D0/func_80065C38.s +++ b/asm/non_matchings/unknown_0667D0/alSynStartVoiceParams.s @@ -1,4 +1,4 @@ -glabel func_80065C38 +glabel alSynStartVoiceParams /* 066838 80065C38 27BDFFE0 */ addiu $sp, $sp, -0x20 /* 06683C 80065C3C AFBF0014 */ sw $ra, 0x14($sp) /* 066840 80065C40 AFA40020 */ sw $a0, 0x20($sp) @@ -9,7 +9,7 @@ glabel func_80065C38 /* 066854 80065C54 00000000 */ nop /* 066858 80065C58 11E00036 */ beqz $t7, .L80065D34 /* 06685C 80065C5C 8FBF0014 */ lw $ra, 0x14($sp) -/* 066860 80065C60 0C01959A */ jal func_80065668 +/* 066860 80065C60 0C01959A */ jal __allocParam /* 066864 80065C64 00000000 */ nop /* 066868 80065C68 10400031 */ beqz $v0, .L80065D30 /* 06686C 80065C6C 00403025 */ move $a2, $v0 @@ -43,7 +43,7 @@ glabel func_80065C38 /* 0668DC 80065CDC E4C4000C */ swc1 $f4, 0xc($a2) /* 0668E0 80065CE0 8FA5003C */ lw $a1, 0x3c($sp) /* 0668E4 80065CE4 8FA40020 */ lw $a0, 0x20($sp) -/* 0668E8 80065CE8 0C0195F1 */ jal func_800657C4 +/* 0668E8 80065CE8 0C0195F1 */ jal __timeToSamples /* 0668EC 80065CEC 00000000 */ nop /* 0668F0 80065CF0 8FA6001C */ lw $a2, 0x1c($sp) /* 0668F4 80065CF4 24050003 */ li $a1, 3 diff --git a/data/dkr.data.s b/data/dkr.data.s index b7d1503d..277a6d90 100644 --- a/data/dkr.data.s +++ b/data/dkr.data.s @@ -8120,7 +8120,7 @@ glabel D_800E3778 glabel D_800E377C .word 0x00000000 -glabel D_800E3780 +glabel alGlobals .word 0x00000000 .word 0x00000000 .word 0x00000000 diff --git a/lib/asm/non_matchings/unknown_0C86A0/func_800C7D04.s b/lib/asm/non_matchings/unknown_0C86A0/__alCSeqGetTrackEvent.s similarity index 93% rename from lib/asm/non_matchings/unknown_0C86A0/func_800C7D04.s rename to lib/asm/non_matchings/unknown_0C86A0/__alCSeqGetTrackEvent.s index d01e737d..d77492ca 100644 --- a/lib/asm/non_matchings/unknown_0C86A0/func_800C7D04.s +++ b/lib/asm/non_matchings/unknown_0C86A0/__alCSeqGetTrackEvent.s @@ -1,4 +1,4 @@ -glabel func_800C7D04 +glabel __alCSeqGetTrackEvent /* 0C8904 800C7D04 27BDFFD0 */ addiu $sp, $sp, -0x30 /* 0C8908 800C7D08 AFB00018 */ sw $s0, 0x18($sp) /* 0C890C 800C7D0C 00A08025 */ move $s0, $a1 @@ -35,14 +35,14 @@ glabel func_800C7D04 /* 0C897C 800C7D7C 5445FFEC */ bnel $v0, $a1, .L800C7D30 /* 0C8980 800C7D80 8D8E0004 */ lw $t6, 4($t4) /* 0C8984 800C7D84 01802025 */ move $a0, $t4 -/* 0C8988 800C7D88 0C031EF8 */ jal func_800C7BE0 +/* 0C8988 800C7D88 0C031EF8 */ jal __getTrackByte /* 0C898C 800C7D8C 01602825 */ move $a1, $t3 /* 0C8990 800C7D90 240100FF */ li $at, 255 /* 0C8994 800C7D94 304A00FF */ andi $t2, $v0, 0xff /* 0C8998 800C7D98 1441005A */ bne $v0, $at, .L800C7F04 /* 0C899C 800C7D9C 00401825 */ move $v1, $v0 /* 0C89A0 800C7DA0 01802025 */ move $a0, $t4 -/* 0C89A4 800C7DA4 0C031EF8 */ jal func_800C7BE0 +/* 0C89A4 800C7DA4 0C031EF8 */ jal __getTrackByte /* 0C89A8 800C7DA8 01602825 */ move $a1, $t3 /* 0C89AC 800C7DAC 24010051 */ li $at, 81 /* 0C89B0 800C7DB0 304600FF */ andi $a2, $v0, 0xff @@ -53,15 +53,15 @@ glabel func_800C7D04 /* 0C89C4 800C7DC4 A20A0008 */ sb $t2, 8($s0) /* 0C89C8 800C7DC8 A2060009 */ sb $a2, 9($s0) /* 0C89CC 800C7DCC 01802025 */ move $a0, $t4 -/* 0C89D0 800C7DD0 0C031EF8 */ jal func_800C7BE0 +/* 0C89D0 800C7DD0 0C031EF8 */ jal __getTrackByte /* 0C89D4 800C7DD4 01602825 */ move $a1, $t3 /* 0C89D8 800C7DD8 A202000B */ sb $v0, 0xb($s0) /* 0C89DC 800C7DDC 01802025 */ move $a0, $t4 -/* 0C89E0 800C7DE0 0C031EF8 */ jal func_800C7BE0 +/* 0C89E0 800C7DE0 0C031EF8 */ jal __getTrackByte /* 0C89E4 800C7DE4 01602825 */ move $a1, $t3 /* 0C89E8 800C7DE8 A202000C */ sb $v0, 0xc($s0) /* 0C89EC 800C7DEC 01802025 */ move $a0, $t4 -/* 0C89F0 800C7DF0 0C031EF8 */ jal func_800C7BE0 +/* 0C89F0 800C7DF0 0C031EF8 */ jal __getTrackByte /* 0C89F4 800C7DF4 01602825 */ move $a1, $t3 /* 0C89F8 800C7DF8 A202000D */ sb $v0, 0xd($s0) /* 0C89FC 800C7DFC 018B7021 */ addu $t6, $t4, $t3 @@ -88,10 +88,10 @@ glabel func_800C7D04 .L800C7E48: /* 0C8A48 800C7E48 1461000B */ bne $v1, $at, .L800C7E78 /* 0C8A4C 800C7E4C 01802025 */ move $a0, $t4 -/* 0C8A50 800C7E50 0C031EF8 */ jal func_800C7BE0 +/* 0C8A50 800C7E50 0C031EF8 */ jal __getTrackByte /* 0C8A54 800C7E54 01602825 */ move $a1, $t3 /* 0C8A58 800C7E58 01802025 */ move $a0, $t4 -/* 0C8A5C 800C7E5C 0C031EF8 */ jal func_800C7BE0 +/* 0C8A5C 800C7E5C 0C031EF8 */ jal __getTrackByte /* 0C8A60 800C7E60 01602825 */ move $a1, $t3 /* 0C8A64 800C7E64 018B7021 */ addu $t6, $t4, $t3 /* 0C8A68 800C7E68 A1C000A8 */ sb $zero, 0xa8($t6) @@ -144,7 +144,7 @@ glabel func_800C7D04 /* 0C8B10 800C7F10 A60F0000 */ sh $t7, ($s0) /* 0C8B14 800C7F14 A20A0008 */ sb $t2, 8($s0) /* 0C8B18 800C7F18 01802025 */ move $a0, $t4 -/* 0C8B1C 800C7F1C 0C031EF8 */ jal func_800C7BE0 +/* 0C8B1C 800C7F1C 0C031EF8 */ jal __getTrackByte /* 0C8B20 800C7F20 01602825 */ move $a1, $t3 /* 0C8B24 800C7F24 A2020009 */ sb $v0, 9($s0) /* 0C8B28 800C7F28 018B7021 */ addu $t6, $t4, $t3 @@ -163,7 +163,7 @@ glabel func_800C7D04 /* 0C8B54 800C7F54 240100D0 */ li $at, 208 /* 0C8B58 800C7F58 13210010 */ beq $t9, $at, .L800C7F9C /* 0C8B5C 800C7F5C 01802025 */ move $a0, $t4 -/* 0C8B60 800C7F60 0C031EF8 */ jal func_800C7BE0 +/* 0C8B60 800C7F60 0C031EF8 */ jal __getTrackByte /* 0C8B64 800C7F64 01602825 */ move $a1, $t3 /* 0C8B68 800C7F68 920E0008 */ lbu $t6, 8($s0) /* 0C8B6C 800C7F6C 24010090 */ li $at, 144 @@ -172,7 +172,7 @@ glabel func_800C7D04 /* 0C8B78 800C7F78 17010009 */ bne $t8, $at, .L800C7FA0 /* 0C8B7C 800C7F7C 01805025 */ move $t2, $t4 /* 0C8B80 800C7F80 AFA90028 */ sw $t1, 0x28($sp) -/* 0C8B84 800C7F84 0C031F29 */ jal func_800C7CA4 +/* 0C8B84 800C7F84 0C031F29 */ jal __readVarLen /* 0C8B88 800C7F88 AFAB0024 */ sw $t3, 0x24($sp) /* 0C8B8C 800C7F8C 8FA90028 */ lw $t1, 0x28($sp) /* 0C8B90 800C7F90 8FAB0024 */ lw $t3, 0x24($sp) @@ -192,7 +192,7 @@ glabel func_800C7D04 /* 0C8BC0 800C7FC0 000BC080 */ sll $t8, $t3, 2 /* 0C8BC4 800C7FC4 51C10007 */ beql $t6, $at, .L800C7FE4 /* 0C8BC8 800C7FC8 240E0001 */ li $t6, 1 -/* 0C8BCC 800C7FCC 0C031F29 */ jal func_800C7CA4 +/* 0C8BCC 800C7FCC 0C031F29 */ jal __readVarLen /* 0C8BD0 800C7FD0 01986821 */ addu $t5, $t4, $t8 /* 0C8BD4 800C7FD4 8DAF00B8 */ lw $t7, 0xb8($t5) /* 0C8BD8 800C7FD8 01E2C821 */ addu $t9, $t7, $v0 diff --git a/lib/asm/non_matchings/unknown_0C86A0/func_800C83EC.s b/lib/asm/non_matchings/unknown_0C86A0/__alCSeqNextDelta.s similarity index 99% rename from lib/asm/non_matchings/unknown_0C86A0/func_800C83EC.s rename to lib/asm/non_matchings/unknown_0C86A0/__alCSeqNextDelta.s index a8c10ee2..f0516ee5 100644 --- a/lib/asm/non_matchings/unknown_0C86A0/func_800C83EC.s +++ b/lib/asm/non_matchings/unknown_0C86A0/__alCSeqNextDelta.s @@ -1,4 +1,4 @@ -glabel func_800C83EC +glabel __alCSeqNextDelta /* 0C8FEC 800C83EC 8C8E0004 */ lw $t6, 4($a0) /* 0C8FF0 800C83F0 00A04825 */ move $t1, $a1 /* 0C8FF4 800C83F4 2403FFFF */ li $v1, -1 diff --git a/lib/asm/non_matchings/unknown_0C86A0/func_800C7BE0.s b/lib/asm/non_matchings/unknown_0C86A0/__getTrackByte.s similarity index 99% rename from lib/asm/non_matchings/unknown_0C86A0/func_800C7BE0.s rename to lib/asm/non_matchings/unknown_0C86A0/__getTrackByte.s index d7b2a9f4..b36e43b5 100644 --- a/lib/asm/non_matchings/unknown_0C86A0/func_800C7BE0.s +++ b/lib/asm/non_matchings/unknown_0C86A0/__getTrackByte.s @@ -1,4 +1,4 @@ -glabel func_800C7BE0 +glabel __getTrackByte /* 0C87E0 800C7BE0 00851021 */ addu $v0, $a0, $a1 /* 0C87E4 800C7BE4 904E0098 */ lbu $t6, 0x98($v0) /* 0C87E8 800C7BE8 00057880 */ sll $t7, $a1, 2 diff --git a/lib/asm/non_matchings/unknown_0C86A0/func_800C7CA4.s b/lib/asm/non_matchings/unknown_0C86A0/__readVarLen.s similarity index 89% rename from lib/asm/non_matchings/unknown_0C86A0/func_800C7CA4.s rename to lib/asm/non_matchings/unknown_0C86A0/__readVarLen.s index fb684df6..7a195458 100644 --- a/lib/asm/non_matchings/unknown_0C86A0/func_800C7CA4.s +++ b/lib/asm/non_matchings/unknown_0C86A0/__readVarLen.s @@ -1,8 +1,8 @@ -glabel func_800C7CA4 +glabel __readVarLen /* 0C88A4 800C7CA4 27BDFFE8 */ addiu $sp, $sp, -0x18 /* 0C88A8 800C7CA8 AFBF0014 */ sw $ra, 0x14($sp) /* 0C88AC 800C7CAC 01402025 */ move $a0, $t2 -/* 0C88B0 800C7CB0 0C031EF8 */ jal func_800C7BE0 +/* 0C88B0 800C7CB0 0C031EF8 */ jal __getTrackByte /* 0C88B4 800C7CB4 01602825 */ move $a1, $t3 /* 0C88B8 800C7CB8 304E0080 */ andi $t6, $v0, 0x80 /* 0C88BC 800C7CBC 11C0000A */ beqz $t6, .L800C7CE8 @@ -10,7 +10,7 @@ glabel func_800C7CA4 /* 0C88C4 800C7CC4 3049007F */ andi $t1, $v0, 0x7f .L800C7CC8: /* 0C88C8 800C7CC8 01402025 */ move $a0, $t2 -/* 0C88CC 800C7CCC 0C031EF8 */ jal func_800C7BE0 +/* 0C88CC 800C7CCC 0C031EF8 */ jal __getTrackByte /* 0C88D0 800C7CD0 01602825 */ move $a1, $t3 /* 0C88D4 800C7CD4 000979C0 */ sll $t7, $t1, 7 /* 0C88D8 800C7CD8 3058007F */ andi $t8, $v0, 0x7f diff --git a/lib/asm/non_matchings/unknown_0C86A0/func_800C7FFC.s b/lib/asm/non_matchings/unknown_0C86A0/func_800C7FFC.s index d27084bc..6d4dc5e7 100644 --- a/lib/asm/non_matchings/unknown_0C86A0/func_800C7FFC.s +++ b/lib/asm/non_matchings/unknown_0C86A0/func_800C7FFC.s @@ -35,7 +35,7 @@ glabel func_800C7FFC /* 0C8C7C 800C807C 01A05825 */ move $t3, $t5 /* 0C8C80 800C8080 032FC025 */ or $t8, $t9, $t7 /* 0C8C84 800C8084 AE180004 */ sw $t8, 4($s0) -/* 0C8C88 800C8088 0C031F29 */ jal func_800C7CA4 +/* 0C8C88 800C8088 0C031F29 */ jal __readVarLen /* 0C8C8C 800C808C AD8E0018 */ sw $t6, 0x18($t4) /* 0C8C90 800C8090 10000002 */ b .L800C809C /* 0C8C94 800C8094 AD8200B8 */ sw $v0, 0xb8($t4) @@ -149,7 +149,7 @@ glabel func_800C7FFC /* 0C8E2C 800C822C 1490FFD4 */ bne $a0, $s0, .L800C8180 /* 0C8E30 800C8230 AC5900A8 */ sw $t9, 0xa8($v0) /* 0C8E34 800C8234 02602025 */ move $a0, $s3 -/* 0C8E38 800C8238 0C031F41 */ jal func_800C7D04 +/* 0C8E38 800C8238 0C031F41 */ jal __alCSeqGetTrackEvent /* 0C8E3C 800C823C 02802825 */ move $a1, $s4 /* 0C8E40 800C8240 87A80140 */ lh $t0, 0x140($sp) /* 0C8E44 800C8244 8FA90054 */ lw $t1, 0x54($sp) diff --git a/lib/asm/non_matchings/unknown_0C91A0/func_800C87B4.s b/lib/asm/non_matchings/unknown_0C91A0/alClose.s similarity index 57% rename from lib/asm/non_matchings/unknown_0C91A0/func_800C87B4.s rename to lib/asm/non_matchings/unknown_0C91A0/alClose.s index 5055484f..534b9d7e 100644 --- a/lib/asm/non_matchings/unknown_0C91A0/func_800C87B4.s +++ b/lib/asm/non_matchings/unknown_0C91A0/alClose.s @@ -1,14 +1,14 @@ -glabel func_800C87B4 -/* 0C93B4 800C87B4 3C0E800E */ lui $t6, %hi(D_800E3780) # $t6, 0x800e -/* 0C93B8 800C87B8 8DCE3780 */ lw $t6, %lo(D_800E3780)($t6) +glabel alClose +/* 0C93B4 800C87B4 3C0E800E */ lui $t6, %hi(alGlobals) # $t6, 0x800e +/* 0C93B8 800C87B8 8DCE3780 */ lw $t6, %lo(alGlobals)($t6) /* 0C93BC 800C87BC 27BDFFE8 */ addiu $sp, $sp, -0x18 /* 0C93C0 800C87C0 AFBF0014 */ sw $ra, 0x14($sp) /* 0C93C4 800C87C4 51C00006 */ beql $t6, $zero, .L800C87E0 /* 0C93C8 800C87C8 8FBF0014 */ lw $ra, 0x14($sp) -/* 0C93CC 800C87CC 0C034B18 */ jal func_800D2C60 +/* 0C93CC 800C87CC 0C034B18 */ jal alSynDelete /* 0C93D0 800C87D0 00000000 */ nop -/* 0C93D4 800C87D4 3C01800E */ lui $at, %hi(D_800E3780) # $at, 0x800e -/* 0C93D8 800C87D8 AC203780 */ sw $zero, %lo(D_800E3780)($at) +/* 0C93D4 800C87D4 3C01800E */ lui $at, %hi(alGlobals) # $at, 0x800e +/* 0C93D8 800C87D8 AC203780 */ sw $zero, %lo(alGlobals)($at) /* 0C93DC 800C87DC 8FBF0014 */ lw $ra, 0x14($sp) .L800C87E0: /* 0C93E0 800C87E0 27BD0018 */ addiu $sp, $sp, 0x18 diff --git a/lib/asm/non_matchings/unknown_0C91A0/func_800C87EC.s b/lib/asm/non_matchings/unknown_0C91A0/alInit.s similarity index 75% rename from lib/asm/non_matchings/unknown_0C91A0/func_800C87EC.s rename to lib/asm/non_matchings/unknown_0C91A0/alInit.s index 358218ea..2a30533a 100644 --- a/lib/asm/non_matchings/unknown_0C91A0/func_800C87EC.s +++ b/lib/asm/non_matchings/unknown_0C91A0/alInit.s @@ -1,6 +1,6 @@ -glabel func_800C87EC -/* 0C93EC 800C87EC 3C02800E */ lui $v0, %hi(D_800E3780) # $v0, 0x800e -/* 0C93F0 800C87F0 24423780 */ addiu $v0, %lo(D_800E3780) # addiu $v0, $v0, 0x3780 +glabel alInit +/* 0C93EC 800C87EC 3C02800E */ lui $v0, %hi(alGlobals) # $v0, 0x800e +/* 0C93F0 800C87F0 24423780 */ addiu $v0, %lo(alGlobals) # addiu $v0, $v0, 0x3780 /* 0C93F4 800C87F4 8C4E0000 */ lw $t6, ($v0) /* 0C93F8 800C87F8 27BDFFE8 */ addiu $sp, $sp, -0x18 /* 0C93FC 800C87FC AFBF0014 */ sw $ra, 0x14($sp) diff --git a/lib/asm/non_matchings/unknown_0C9C90/func_800C9420.s b/lib/asm/non_matchings/unknown_0C9C90/_allocatePVoice.s similarity index 99% rename from lib/asm/non_matchings/unknown_0C9C90/func_800C9420.s rename to lib/asm/non_matchings/unknown_0C9C90/_allocatePVoice.s index 70a5fdae..73fe79a9 100644 --- a/lib/asm/non_matchings/unknown_0C9C90/func_800C9420.s +++ b/lib/asm/non_matchings/unknown_0C9C90/_allocatePVoice.s @@ -1,4 +1,4 @@ -glabel func_800C9420 +glabel _allocatePVoice /* 0CA020 800C9420 27BDFFD8 */ addiu $sp, $sp, -0x28 /* 0CA024 800C9424 AFBF0014 */ sw $ra, 0x14($sp) /* 0CA028 800C9428 AFA60030 */ sw $a2, 0x30($sp) diff --git a/lib/asm/non_matchings/unknown_0C9C90/func_800C9090.s b/lib/asm/non_matchings/unknown_0C9C90/alEvtqFlushType.s similarity index 99% rename from lib/asm/non_matchings/unknown_0C9C90/func_800C9090.s rename to lib/asm/non_matchings/unknown_0C9C90/alEvtqFlushType.s index e7548973..4e630fbe 100644 --- a/lib/asm/non_matchings/unknown_0C9C90/func_800C9090.s +++ b/lib/asm/non_matchings/unknown_0C9C90/alEvtqFlushType.s @@ -1,4 +1,4 @@ -glabel func_800C9090 +glabel alEvtqFlushType /* 0C9C90 800C9090 27BDFFC0 */ addiu $sp, $sp, -0x40 /* 0C9C94 800C9094 AFB30020 */ sw $s3, 0x20($sp) /* 0C9C98 800C9098 00059C00 */ sll $s3, $a1, 0x10 diff --git a/lib/asm/non_matchings/unknown_0C9C90/func_800C9508.s b/lib/asm/non_matchings/unknown_0C9C90/alSynAllocVoice.s similarity index 95% rename from lib/asm/non_matchings/unknown_0C9C90/func_800C9508.s rename to lib/asm/non_matchings/unknown_0C9C90/alSynAllocVoice.s index 6bc646d9..6d92682b 100644 --- a/lib/asm/non_matchings/unknown_0C9C90/func_800C9508.s +++ b/lib/asm/non_matchings/unknown_0C9C90/alSynAllocVoice.s @@ -1,4 +1,4 @@ -glabel func_800C9508 +glabel alSynAllocVoice /* 0CA108 800C9508 27BDFFD0 */ addiu $sp, $sp, -0x30 /* 0CA10C 800C950C AFBF001C */ sw $ra, 0x1c($sp) /* 0CA110 800C9510 AFB00018 */ sw $s0, 0x18($sp) @@ -16,7 +16,7 @@ glabel func_800C9508 /* 0CA140 800C9540 A4B80018 */ sh $t8, 0x18($a1) /* 0CA144 800C9544 84C60000 */ lh $a2, ($a2) /* 0CA148 800C9548 8FA40030 */ lw $a0, 0x30($sp) -/* 0CA14C 800C954C 0C032508 */ jal func_800C9420 +/* 0CA14C 800C954C 0C032508 */ jal _allocatePVoice /* 0CA150 800C9550 27A5002C */ addiu $a1, $sp, 0x2c /* 0CA154 800C9554 8FB9002C */ lw $t9, 0x2c($sp) /* 0CA158 800C9558 53200035 */ beql $t9, $zero, .L800C9630 @@ -28,7 +28,7 @@ glabel func_800C9508 /* 0CA170 800C9570 8FA9002C */ lw $t1, 0x2c($sp) /* 0CA174 800C9574 8D2A0008 */ lw $t2, 8($t1) /* 0CA178 800C9578 AD400008 */ sw $zero, 8($t2) -/* 0CA17C 800C957C 0C01959A */ jal func_80065668 +/* 0CA17C 800C957C 0C01959A */ jal __allocParam /* 0CA180 800C9580 AFA40028 */ sw $a0, 0x28($sp) /* 0CA184 800C9584 8FAB0030 */ lw $t3, 0x30($sp) /* 0CA188 800C9588 8FA40028 */ lw $a0, 0x28($sp) @@ -46,7 +46,7 @@ glabel func_800C9508 /* 0CA1B8 800C95B8 8C990008 */ lw $t9, 8($a0) /* 0CA1BC 800C95BC 0320F809 */ jalr $t9 /* 0CA1C0 800C95C0 00000000 */ nop -/* 0CA1C4 800C95C4 0C01959A */ jal func_80065668 +/* 0CA1C4 800C95C4 0C01959A */ jal __allocParam /* 0CA1C8 800C95C8 00000000 */ nop /* 0CA1CC 800C95CC 8FA40028 */ lw $a0, 0x28($sp) /* 0CA1D0 800C95D0 10400012 */ beqz $v0, .L800C961C diff --git a/lib/asm/non_matchings/unknown_0CA250/func_800C9650.s b/lib/asm/non_matchings/unknown_0CA250/alSynSetVol.s similarity index 93% rename from lib/asm/non_matchings/unknown_0CA250/func_800C9650.s rename to lib/asm/non_matchings/unknown_0CA250/alSynSetVol.s index 7fb052bb..53b83844 100644 --- a/lib/asm/non_matchings/unknown_0CA250/func_800C9650.s +++ b/lib/asm/non_matchings/unknown_0CA250/alSynSetVol.s @@ -1,4 +1,4 @@ -glabel func_800C9650 +glabel alSynSetVol /* 0CA250 800C9650 27BDFFE0 */ addiu $sp, $sp, -0x20 /* 0CA254 800C9654 AFBF0014 */ sw $ra, 0x14($sp) /* 0CA258 800C9658 AFA50024 */ sw $a1, 0x24($sp) @@ -7,7 +7,7 @@ glabel func_800C9650 /* 0CA264 800C9664 8CAF0008 */ lw $t7, 8($a1) /* 0CA268 800C9668 51E0001D */ beql $t7, $zero, .L800C96E0 /* 0CA26C 800C966C 8FBF0014 */ lw $ra, 0x14($sp) -/* 0CA270 800C9670 0C01959A */ jal func_80065668 +/* 0CA270 800C9670 0C01959A */ jal __allocParam /* 0CA274 800C9674 AFA40020 */ sw $a0, 0x20($sp) /* 0CA278 800C9678 10400018 */ beqz $v0, .L800C96DC /* 0CA27C 800C967C 8FA40020 */ lw $a0, 0x20($sp) @@ -22,7 +22,7 @@ glabel func_800C9650 /* 0CA2A0 800C96A0 87AC002A */ lh $t4, 0x2a($sp) /* 0CA2A4 800C96A4 AC4C000C */ sw $t4, 0xc($v0) /* 0CA2A8 800C96A8 AFA2001C */ sw $v0, 0x1c($sp) -/* 0CA2AC 800C96AC 0C0195F1 */ jal func_800657C4 +/* 0CA2AC 800C96AC 0C0195F1 */ jal __timeToSamples /* 0CA2B0 800C96B0 8FA5002C */ lw $a1, 0x2c($sp) /* 0CA2B4 800C96B4 8FA6001C */ lw $a2, 0x1c($sp) /* 0CA2B8 800C96B8 24050003 */ li $a1, 3 diff --git a/lib/asm/non_matchings/unknown_0CA2F0/func_800C96F0.s b/lib/asm/non_matchings/unknown_0CA2F0/func_800C96F0.s index 24a64656..9f1e7387 100644 --- a/lib/asm/non_matchings/unknown_0CA2F0/func_800C96F0.s +++ b/lib/asm/non_matchings/unknown_0CA2F0/func_800C96F0.s @@ -6,7 +6,7 @@ glabel func_800C96F0 /* 0CA300 800C9700 8CAE0008 */ lw $t6, 8($a1) /* 0CA304 800C9704 51C0001A */ beql $t6, $zero, .L800C9770 /* 0CA308 800C9708 8FBF0014 */ lw $ra, 0x14($sp) -/* 0CA30C 800C970C 0C01959A */ jal func_80065668 +/* 0CA30C 800C970C 0C01959A */ jal __allocParam /* 0CA310 800C9710 AFA5001C */ sw $a1, 0x1c($sp) /* 0CA314 800C9714 8FA7001C */ lw $a3, 0x1c($sp) /* 0CA318 800C9718 10400014 */ beqz $v0, .L800C976C diff --git a/lib/asm/non_matchings/unknown_0CA380/func_800C9780.s b/lib/asm/non_matchings/unknown_0CA380/alSynSetPitch.s similarity index 96% rename from lib/asm/non_matchings/unknown_0CA380/func_800C9780.s rename to lib/asm/non_matchings/unknown_0CA380/alSynSetPitch.s index 465ce432..372bb67c 100644 --- a/lib/asm/non_matchings/unknown_0CA380/func_800C9780.s +++ b/lib/asm/non_matchings/unknown_0CA380/alSynSetPitch.s @@ -1,4 +1,4 @@ -glabel func_800C9780 +glabel alSynSetPitch /* 0CA380 800C9780 27BDFFE8 */ addiu $sp, $sp, -0x18 /* 0CA384 800C9784 AFBF0014 */ sw $ra, 0x14($sp) /* 0CA388 800C9788 AFA40018 */ sw $a0, 0x18($sp) @@ -6,7 +6,7 @@ glabel func_800C9780 /* 0CA390 800C9790 8CAE0008 */ lw $t6, 8($a1) /* 0CA394 800C9794 51C00018 */ beql $t6, $zero, .L800C97F8 /* 0CA398 800C9798 8FBF0014 */ lw $ra, 0x14($sp) -/* 0CA39C 800C979C 0C01959A */ jal func_80065668 +/* 0CA39C 800C979C 0C01959A */ jal __allocParam /* 0CA3A0 800C97A0 AFA5001C */ sw $a1, 0x1c($sp) /* 0CA3A4 800C97A4 8FA7001C */ lw $a3, 0x1c($sp) /* 0CA3A8 800C97A8 10400012 */ beqz $v0, .L800C97F4 diff --git a/lib/asm/non_matchings/unknown_0CA410/func_800C9810.s b/lib/asm/non_matchings/unknown_0CA410/func_800C9810.s index d195056a..8057c32e 100644 --- a/lib/asm/non_matchings/unknown_0CA410/func_800C9810.s +++ b/lib/asm/non_matchings/unknown_0CA410/func_800C9810.s @@ -6,7 +6,7 @@ glabel func_800C9810 /* 0CA420 800C9820 8CAE0008 */ lw $t6, 8($a1) /* 0CA424 800C9824 51C0001C */ beql $t6, $zero, .L800C9898 /* 0CA428 800C9828 8FBF0014 */ lw $ra, 0x14($sp) -/* 0CA42C 800C982C 0C01959A */ jal func_80065668 +/* 0CA42C 800C982C 0C01959A */ jal __allocParam /* 0CA430 800C9830 AFA5001C */ sw $a1, 0x1c($sp) /* 0CA434 800C9834 8FA7001C */ lw $a3, 0x1c($sp) /* 0CA438 800C9838 10400016 */ beqz $v0, .L800C9894 diff --git a/lib/asm/non_matchings/unknown_0CA4B0/func_800C98B0.s b/lib/asm/non_matchings/unknown_0CA4B0/alSynStopVoice.s similarity index 95% rename from lib/asm/non_matchings/unknown_0CA4B0/func_800C98B0.s rename to lib/asm/non_matchings/unknown_0CA4B0/alSynStopVoice.s index 9b899fd7..25ba8c4e 100644 --- a/lib/asm/non_matchings/unknown_0CA4B0/func_800C98B0.s +++ b/lib/asm/non_matchings/unknown_0CA4B0/alSynStopVoice.s @@ -1,11 +1,11 @@ -glabel func_800C98B0 +glabel alSynStopVoice /* 0CA4B0 800C98B0 27BDFFE8 */ addiu $sp, $sp, -0x18 /* 0CA4B4 800C98B4 AFBF0014 */ sw $ra, 0x14($sp) /* 0CA4B8 800C98B8 AFA40018 */ sw $a0, 0x18($sp) /* 0CA4BC 800C98BC 8CAE0008 */ lw $t6, 8($a1) /* 0CA4C0 800C98C0 51C00016 */ beql $t6, $zero, .L800C991C /* 0CA4C4 800C98C4 8FBF0014 */ lw $ra, 0x14($sp) -/* 0CA4C8 800C98C8 0C01959A */ jal func_80065668 +/* 0CA4C8 800C98C8 0C01959A */ jal __allocParam /* 0CA4CC 800C98CC AFA5001C */ sw $a1, 0x1c($sp) /* 0CA4D0 800C98D0 8FA7001C */ lw $a3, 0x1c($sp) /* 0CA4D4 800C98D4 10400010 */ beqz $v0, .L800C9918 diff --git a/lib/asm/non_matchings/unknown_0CA530/func_800C99E0.s b/lib/asm/non_matchings/unknown_0CA530/alCents2Ratio.s similarity index 98% rename from lib/asm/non_matchings/unknown_0CA530/func_800C99E0.s rename to lib/asm/non_matchings/unknown_0CA530/alCents2Ratio.s index a89a04ed..a0bde7af 100644 --- a/lib/asm/non_matchings/unknown_0CA530/func_800C99E0.s +++ b/lib/asm/non_matchings/unknown_0CA530/alCents2Ratio.s @@ -1,4 +1,4 @@ -glabel func_800C99E0 +glabel alCents2Ratio /* 0CA5E0 800C99E0 3C013F80 */ li $at, 0x3F800000 # 1.000000 /* 0CA5E4 800C99E4 44811000 */ mtc1 $at, $f2 /* 0CA5E8 800C99E8 04800004 */ bltz $a0, .L800C99FC diff --git a/lib/asm/non_matchings/unknown_0CA530/func_800C9930.s b/lib/asm/non_matchings/unknown_0CA530/alSynFreeVoice.s similarity index 94% rename from lib/asm/non_matchings/unknown_0CA530/func_800C9930.s rename to lib/asm/non_matchings/unknown_0CA530/alSynFreeVoice.s index ea651ecc..a2abd84c 100644 --- a/lib/asm/non_matchings/unknown_0CA530/func_800C9930.s +++ b/lib/asm/non_matchings/unknown_0CA530/alSynFreeVoice.s @@ -1,4 +1,4 @@ -glabel func_800C9930 +glabel alSynFreeVoice /* 0CA530 800C9930 27BDFFE8 */ addiu $sp, $sp, -0x18 /* 0CA534 800C9934 AFBF0014 */ sw $ra, 0x14($sp) /* 0CA538 800C9938 8CA60008 */ lw $a2, 8($a1) @@ -10,7 +10,7 @@ glabel func_800C9930 /* 0CA550 800C9950 51C0001A */ beql $t6, $zero, .L800C99BC /* 0CA554 800C9954 01002025 */ move $a0, $t0 /* 0CA558 800C9958 AFA5001C */ sw $a1, 0x1c($sp) -/* 0CA55C 800C995C 0C01959A */ jal func_80065668 +/* 0CA55C 800C995C 0C01959A */ jal __allocParam /* 0CA560 800C9960 AFA40018 */ sw $a0, 0x18($sp) /* 0CA564 800C9964 8FA7001C */ lw $a3, 0x1c($sp) /* 0CA568 800C9968 8FA80018 */ lw $t0, 0x18($sp) @@ -36,7 +36,7 @@ glabel func_800C9930 /* 0CA5B8 800C99B8 01002025 */ move $a0, $t0 .L800C99BC: /* 0CA5BC 800C99BC 00C02825 */ move $a1, $a2 -/* 0CA5C0 800C99C0 0C0195C7 */ jal func_8006571C +/* 0CA5C0 800C99C0 0C0195C7 */ jal __freePVoices /* 0CA5C4 800C99C4 AFA7001C */ sw $a3, 0x1c($sp) /* 0CA5C8 800C99C8 8FA7001C */ lw $a3, 0x1c($sp) .L800C99CC: diff --git a/lib/asm/non_matchings/unknown_0CA6E0/func_800C9AE0.s b/lib/asm/non_matchings/unknown_0CA6E0/alSynSetPriority.s similarity index 97% rename from lib/asm/non_matchings/unknown_0CA6E0/func_800C9AE0.s rename to lib/asm/non_matchings/unknown_0CA6E0/alSynSetPriority.s index a29735ad..b906121c 100644 --- a/lib/asm/non_matchings/unknown_0CA6E0/func_800C9AE0.s +++ b/lib/asm/non_matchings/unknown_0CA6E0/alSynSetPriority.s @@ -1,4 +1,4 @@ -glabel func_800C9AE0 +glabel alSynSetPriority /* 0CA6E0 800C9AE0 AFA40000 */ sw $a0, ($sp) /* 0CA6E4 800C9AE4 AFA60008 */ sw $a2, 8($sp) /* 0CA6E8 800C9AE8 03E00008 */ jr $ra diff --git a/lib/asm/non_matchings/unknown_0CA9A0/D_800CA0D0.s b/lib/asm/non_matchings/unknown_0CA9A0/alEnvMixerPull.s similarity index 99% rename from lib/asm/non_matchings/unknown_0CA9A0/D_800CA0D0.s rename to lib/asm/non_matchings/unknown_0CA9A0/alEnvMixerPull.s index bb0e956c..58539f14 100644 --- a/lib/asm/non_matchings/unknown_0CA9A0/D_800CA0D0.s +++ b/lib/asm/non_matchings/unknown_0CA9A0/alEnvMixerPull.s @@ -1,4 +1,4 @@ -glabel D_800CA0D0 +glabel alEnvMixerPull /* 0CACD0 800CA0D0 27BDFFA0 */ addiu $sp, $sp, -0x60 /* 0CACD4 800CA0D4 AFBF001C */ sw $ra, 0x1c($sp) /* 0CACD8 800CA0D8 AFA40060 */ sw $a0, 0x60($sp) @@ -507,8 +507,8 @@ glabel D_800CA0D0 /* 0CB464 800CA864 01802025 */ move $a0, $t4 /* 0CB468 800CA868 10000030 */ b .L800CA92C /* 0CB46C 800CA86C 00000000 */ nop -/* 0CB470 800CA870 3C0A800E */ lui $t2, %hi(D_800E3780) # $t2, 0x800e -/* 0CB474 800CA874 8D4A3780 */ lw $t2, %lo(D_800E3780)($t2) +/* 0CB470 800CA870 3C0A800E */ lui $t2, %hi(alGlobals) # $t2, 0x800e +/* 0CB474 800CA874 8D4A3780 */ lw $t2, %lo(alGlobals)($t2) /* 0CB478 800CA878 00000000 */ nop /* 0CB47C 800CA87C AFAA0024 */ sw $t2, 0x24($sp) /* 0CB480 800CA880 8FB80058 */ lw $t8, 0x58($sp) @@ -524,7 +524,7 @@ glabel D_800CA0D0 /* 0CB4A8 800CA8A8 8FA80020 */ lw $t0, 0x20($sp) /* 0CB4AC 800CA8AC 8FA40024 */ lw $a0, 0x24($sp) /* 0CB4B0 800CA8B0 8D05000C */ lw $a1, 0xc($t0) -/* 0CB4B4 800CA8B4 0C0195C7 */ jal func_8006571C +/* 0CB4B4 800CA8B4 0C0195C7 */ jal __freePVoices /* 0CB4B8 800CA8B8 00000000 */ nop /* 0CB4BC 800CA8BC 1000001B */ b .L800CA92C /* 0CB4C0 800CA8C0 00000000 */ nop @@ -589,7 +589,7 @@ glabel D_800CA0D0 /* 0CB5A4 800CA9A4 AD400040 */ sw $zero, 0x40($t2) .L800CA9A8: /* 0CB5A8 800CA9A8 8FA4003C */ lw $a0, 0x3c($sp) -/* 0CB5AC 800CA9AC 0C0195A7 */ jal func_8006569C +/* 0CB5AC 800CA9AC 0C0195A7 */ jal __freeParam /* 0CB5B0 800CA9B0 00000000 */ nop /* 0CB5B4 800CA9B4 8FB80058 */ lw $t8, 0x58($sp) /* 0CB5B8 800CA9B8 00000000 */ nop diff --git a/lib/asm/non_matchings/unknown_0CA9A0/func_800CA0B0.s b/lib/asm/non_matchings/unknown_0CA9A0/alFilterNew.s similarity index 94% rename from lib/asm/non_matchings/unknown_0CA9A0/func_800CA0B0.s rename to lib/asm/non_matchings/unknown_0CA9A0/alFilterNew.s index 90f712ba..174cba8b 100644 --- a/lib/asm/non_matchings/unknown_0CA9A0/func_800CA0B0.s +++ b/lib/asm/non_matchings/unknown_0CA9A0/alFilterNew.s @@ -1,4 +1,4 @@ -glabel func_800CA0B0 +glabel alFilterNew /* 0CACB0 800CA0B0 AC800000 */ sw $zero, ($a0) /* 0CACB4 800CA0B4 AC850004 */ sw $a1, 4($a0) /* 0CACB8 800CA0B8 AC860008 */ sw $a2, 8($a0) diff --git a/lib/asm/non_matchings/unknown_0CA9A0/alLoadParam.s b/lib/asm/non_matchings/unknown_0CA9A0/alLoadParam.s index 2f3c7f52..801b7b1d 100644 --- a/lib/asm/non_matchings/unknown_0CA9A0/alLoadParam.s +++ b/lib/asm/non_matchings/unknown_0CA9A0/alLoadParam.s @@ -10,7 +10,7 @@ glabel alLoadParam /* 0CC160 800CB560 AC860028 */ sw $a2, 0x28($a0) /* 0CC164 800CB564 8CCE0000 */ lw $t6, ($a2) /* 0CC168 800CB568 AC800038 */ sw $zero, 0x38($a0) -/* 0CC16C 800CB56C 3C0F800D */ lui $t7, %hi(D_800CBBEC) # $t7, 0x800d +/* 0CC16C 800CB56C 3C0F800D */ lui $t7, %hi(alLoadPull) # $t7, 0x800d /* 0CC170 800CB570 AC8E0044 */ sw $t6, 0x44($a0) /* 0CC174 800CB574 90C20008 */ lbu $v0, 8($a2) /* 0CC178 800CB578 50400007 */ beql $v0, $zero, .L800CB598 @@ -22,7 +22,7 @@ glabel alLoadParam /* 0CC190 800CB590 8FBF0014 */ lw $ra, 0x14($sp) /* 0CC194 800CB594 8CE20028 */ lw $v0, 0x28($a3) .L800CB598: -/* 0CC198 800CB598 25EFBBEC */ addiu $t7, %lo(D_800CBBEC) # addiu $t7, $t7, -0x4414 +/* 0CC198 800CB598 25EFBBEC */ addiu $t7, %lo(alLoadPull) # addiu $t7, $t7, -0x4414 /* 0CC19C 800CB59C ACEF0004 */ sw $t7, 4($a3) /* 0CC1A0 800CB5A0 8C580004 */ lw $t8, 4($v0) /* 0CC1A4 800CB5A4 24050009 */ li $a1, 9 diff --git a/lib/asm/non_matchings/unknown_0CA9A0/D_800CBBEC.s b/lib/asm/non_matchings/unknown_0CA9A0/alLoadPull.s similarity index 99% rename from lib/asm/non_matchings/unknown_0CA9A0/D_800CBBEC.s rename to lib/asm/non_matchings/unknown_0CA9A0/alLoadPull.s index 2d4be883..be1ca25e 100644 --- a/lib/asm/non_matchings/unknown_0CA9A0/D_800CBBEC.s +++ b/lib/asm/non_matchings/unknown_0CA9A0/alLoadPull.s @@ -1,4 +1,4 @@ -glabel D_800CBBEC +glabel alLoadPull /* 0CC7EC 800CBBEC 27BDFF50 */ addiu $sp, $sp, -0xb0 /* 0CC7F0 800CBBF0 AFB70044 */ sw $s7, 0x44($sp) /* 0CC7F4 800CBBF4 AFA700BC */ sw $a3, 0xbc($sp) diff --git a/lib/asm/non_matchings/unknown_0CA9A0/D_800CC17C.s b/lib/asm/non_matchings/unknown_0CA9A0/alResamplePull.s similarity index 99% rename from lib/asm/non_matchings/unknown_0CA9A0/D_800CC17C.s rename to lib/asm/non_matchings/unknown_0CA9A0/alResamplePull.s index 0e68fdfb..c9b3a3ea 100644 --- a/lib/asm/non_matchings/unknown_0CA9A0/D_800CC17C.s +++ b/lib/asm/non_matchings/unknown_0CA9A0/alResamplePull.s @@ -1,4 +1,4 @@ -glabel D_800CC17C +glabel alResamplePull /* 0CCD7C 800CC17C 27BDFFB0 */ addiu $sp, $sp, -0x50 /* 0CCD80 800CC180 AFBF001C */ sw $ra, 0x1c($sp) /* 0CCD84 800CC184 AFA50054 */ sw $a1, 0x54($sp) diff --git a/lib/asm/non_matchings/unknown_0CCF90/D_800CC390.s b/lib/asm/non_matchings/unknown_0CCF90/alMainBusParam.s similarity index 96% rename from lib/asm/non_matchings/unknown_0CCF90/D_800CC390.s rename to lib/asm/non_matchings/unknown_0CCF90/alMainBusParam.s index c59eedd0..66fb4732 100644 --- a/lib/asm/non_matchings/unknown_0CCF90/D_800CC390.s +++ b/lib/asm/non_matchings/unknown_0CCF90/alMainBusParam.s @@ -1,4 +1,4 @@ -glabel D_800CC390 +glabel alMainBusParam /* 0CCF90 800CC390 24010002 */ li $at, 2 /* 0CCF94 800CC394 14A10008 */ bne $a1, $at, .L800CC3B8 /* 0CCF98 800CC398 8C82001C */ lw $v0, 0x1c($a0) diff --git a/lib/asm/non_matchings/unknown_0CCF90/D_800CC3C0.s b/lib/asm/non_matchings/unknown_0CCF90/alMainBusPull.s similarity index 99% rename from lib/asm/non_matchings/unknown_0CCF90/D_800CC3C0.s rename to lib/asm/non_matchings/unknown_0CCF90/alMainBusPull.s index 016018b3..856ef231 100644 --- a/lib/asm/non_matchings/unknown_0CCF90/D_800CC3C0.s +++ b/lib/asm/non_matchings/unknown_0CCF90/alMainBusPull.s @@ -1,4 +1,4 @@ -glabel D_800CC3C0 +glabel alMainBusPull /* 0CCFC0 800CC3C0 27BDFFB8 */ addiu $sp, $sp, -0x48 /* 0CCFC4 800CC3C4 8FA80058 */ lw $t0, 0x58($sp) /* 0CCFC8 800CC3C8 AFBF0044 */ sw $ra, 0x44($sp) diff --git a/lib/asm/non_matchings/unknown_0CCF90/D_800CC514.s b/lib/asm/non_matchings/unknown_0CCF90/alSavePull.s similarity index 99% rename from lib/asm/non_matchings/unknown_0CCF90/D_800CC514.s rename to lib/asm/non_matchings/unknown_0CCF90/alSavePull.s index 402a26ff..3f38f50b 100644 --- a/lib/asm/non_matchings/unknown_0CCF90/D_800CC514.s +++ b/lib/asm/non_matchings/unknown_0CCF90/alSavePull.s @@ -1,4 +1,4 @@ -glabel D_800CC514 +glabel alSavePull /* 0CD114 800CC514 27BDFFE0 */ addiu $sp, $sp, -0x20 /* 0CD118 800CC518 AFBF001C */ sw $ra, 0x1c($sp) /* 0CD11C 800CC51C AFA40020 */ sw $a0, 0x20($sp) diff --git a/lib/asm/non_matchings/unknown_0D3160/func_800D2C60.s b/lib/asm/non_matchings/unknown_0D3160/alSynDelete.s similarity index 89% rename from lib/asm/non_matchings/unknown_0D3160/func_800D2C60.s rename to lib/asm/non_matchings/unknown_0D3160/alSynDelete.s index a0e21b27..78681ef1 100644 --- a/lib/asm/non_matchings/unknown_0D3160/func_800D2C60.s +++ b/lib/asm/non_matchings/unknown_0D3160/alSynDelete.s @@ -1,4 +1,4 @@ -glabel func_800D2C60 +glabel alSynDelete /* 0D3860 800D2C60 03E00008 */ jr $ra /* 0D3864 800D2C64 AC800000 */ sw $zero, ($a0) diff --git a/lib/src/unknown_0C86A0.c b/lib/src/unknown_0C86A0.c index b489ba82..ee6958e2 100644 --- a/lib/src/unknown_0C86A0.c +++ b/lib/src/unknown_0C86A0.c @@ -6,8 +6,8 @@ GLOBAL_ASM("lib/asm/non_matchings/unknown_0C86A0/func_800C7AA0.s") GLOBAL_ASM("lib/asm/non_matchings/unknown_0C86A0/func_800C7B40.s") -GLOBAL_ASM("lib/asm/non_matchings/unknown_0C86A0/func_800C7BE0.s") -GLOBAL_ASM("lib/asm/non_matchings/unknown_0C86A0/func_800C7CA4.s") -GLOBAL_ASM("lib/asm/non_matchings/unknown_0C86A0/func_800C7D04.s") +GLOBAL_ASM("lib/asm/non_matchings/unknown_0C86A0/__getTrackByte.s") +GLOBAL_ASM("lib/asm/non_matchings/unknown_0C86A0/__readVarLen.s") +GLOBAL_ASM("lib/asm/non_matchings/unknown_0C86A0/__alCSeqGetTrackEvent.s") GLOBAL_ASM("lib/asm/non_matchings/unknown_0C86A0/func_800C7FFC.s") -GLOBAL_ASM("lib/asm/non_matchings/unknown_0C86A0/func_800C83EC.s") +GLOBAL_ASM("lib/asm/non_matchings/unknown_0C86A0/__alCSeqNextDelta.s") diff --git a/lib/src/unknown_0C91A0.c b/lib/src/unknown_0C91A0.c index 38b3a023..af7f01cc 100644 --- a/lib/src/unknown_0C91A0.c +++ b/lib/src/unknown_0C91A0.c @@ -10,8 +10,8 @@ GLOBAL_ASM("lib/asm/non_matchings/unknown_0C91A0/func_800C85D0.s") GLOBAL_ASM("lib/asm/non_matchings/unknown_0C91A0/func_800C8600.s") GLOBAL_ASM("lib/asm/non_matchings/unknown_0C91A0/alUnlink.s") GLOBAL_ASM("lib/asm/non_matchings/unknown_0C91A0/alLink.s") -GLOBAL_ASM("lib/asm/non_matchings/unknown_0C91A0/func_800C87B4.s") -GLOBAL_ASM("lib/asm/non_matchings/unknown_0C91A0/func_800C87EC.s") +GLOBAL_ASM("lib/asm/non_matchings/unknown_0C91A0/alClose.s") +GLOBAL_ASM("lib/asm/non_matchings/unknown_0C91A0/alInit.s") extern OSThread __osThreadTail; void osCreateMesgQueue(OSMesgQueue *mq, OSMesg *msg, s32 msgCount) diff --git a/lib/src/unknown_0C9C90.c b/lib/src/unknown_0C9C90.c index 3ec10ecf..4665ec56 100644 --- a/lib/src/unknown_0C9C90.c +++ b/lib/src/unknown_0C9C90.c @@ -4,10 +4,10 @@ #include "types.h" #include "macros.h" -GLOBAL_ASM("lib/asm/non_matchings/unknown_0C9C90/func_800C9090.s") +GLOBAL_ASM("lib/asm/non_matchings/unknown_0C9C90/alEvtqFlushType.s") GLOBAL_ASM("lib/asm/non_matchings/unknown_0C9C90/alEvtqPostEvent.s") GLOBAL_ASM("lib/asm/non_matchings/unknown_0C9C90/alEvtqNextEvent.s") GLOBAL_ASM("lib/asm/non_matchings/unknown_0C9C90/alEvtqNew.s") GLOBAL_ASM("lib/asm/non_matchings/unknown_0C9C90/alSynAddPlayer.s") -GLOBAL_ASM("lib/asm/non_matchings/unknown_0C9C90/func_800C9420.s") -GLOBAL_ASM("lib/asm/non_matchings/unknown_0C9C90/func_800C9508.s") +GLOBAL_ASM("lib/asm/non_matchings/unknown_0C9C90/_allocatePVoice.s") +GLOBAL_ASM("lib/asm/non_matchings/unknown_0C9C90/alSynAllocVoice.s") diff --git a/lib/src/unknown_0CA250.c b/lib/src/unknown_0CA250.c index 9ef488df..be109428 100644 --- a/lib/src/unknown_0CA250.c +++ b/lib/src/unknown_0CA250.c @@ -4,4 +4,4 @@ #include "types.h" #include "macros.h" -GLOBAL_ASM("lib/asm/non_matchings/unknown_0CA250/func_800C9650.s") +GLOBAL_ASM("lib/asm/non_matchings/unknown_0CA250/alSynSetVol.s") diff --git a/lib/src/unknown_0CA380.c b/lib/src/unknown_0CA380.c index dbba8637..8cd8f15c 100644 --- a/lib/src/unknown_0CA380.c +++ b/lib/src/unknown_0CA380.c @@ -4,4 +4,4 @@ #include "types.h" #include "macros.h" -GLOBAL_ASM("lib/asm/non_matchings/unknown_0CA380/func_800C9780.s") +GLOBAL_ASM("lib/asm/non_matchings/unknown_0CA380/alSynSetPitch.s") diff --git a/lib/src/unknown_0CA4B0.c b/lib/src/unknown_0CA4B0.c index d19cd0b4..021db36d 100644 --- a/lib/src/unknown_0CA4B0.c +++ b/lib/src/unknown_0CA4B0.c @@ -4,4 +4,4 @@ #include "types.h" #include "macros.h" -GLOBAL_ASM("lib/asm/non_matchings/unknown_0CA4B0/func_800C98B0.s") +GLOBAL_ASM("lib/asm/non_matchings/unknown_0CA4B0/alSynStopVoice.s") diff --git a/lib/src/unknown_0CA530.c b/lib/src/unknown_0CA530.c index 5217cc2f..0c6bbb03 100644 --- a/lib/src/unknown_0CA530.c +++ b/lib/src/unknown_0CA530.c @@ -4,7 +4,7 @@ #include "types.h" #include "macros.h" -GLOBAL_ASM("lib/asm/non_matchings/unknown_0CA530/func_800C9930.s") -GLOBAL_ASM("lib/asm/non_matchings/unknown_0CA530/func_800C99E0.s") +GLOBAL_ASM("lib/asm/non_matchings/unknown_0CA530/alSynFreeVoice.s") +GLOBAL_ASM("lib/asm/non_matchings/unknown_0CA530/alCents2Ratio.s") GLOBAL_ASM("lib/asm/non_matchings/unknown_0CA530/osSetIntMask.s") GLOBAL_ASM("lib/asm/non_matchings/unknown_0CA530/sqrtf.s") diff --git a/lib/src/unknown_0CA6E0.c b/lib/src/unknown_0CA6E0.c index 83cd4c5b..443a8058 100644 --- a/lib/src/unknown_0CA6E0.c +++ b/lib/src/unknown_0CA6E0.c @@ -4,4 +4,4 @@ #include "types.h" #include "macros.h" -GLOBAL_ASM("lib/asm/non_matchings/unknown_0CA6E0/func_800C9AE0.s") +GLOBAL_ASM("lib/asm/non_matchings/unknown_0CA6E0/alSynSetPriority.s") diff --git a/lib/src/unknown_0CA9A0.c b/lib/src/unknown_0CA9A0.c index f1db61e5..38ba6f31 100644 --- a/lib/src/unknown_0CA9A0.c +++ b/lib/src/unknown_0CA9A0.c @@ -4,8 +4,8 @@ #include "types.h" #include "macros.h" -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/alFilterNew.s") +GLOBAL_ASM("lib/asm/non_matchings/unknown_0CA9A0/alEnvMixerPull.s") GLOBAL_ASM("lib/asm/non_matchings/unknown_0CA9A0/alEnvmixerParam.s") GLOBAL_ASM("lib/asm/non_matchings/unknown_0CA9A0/func_800CAC5C.s") GLOBAL_ASM("lib/asm/non_matchings/unknown_0CA9A0/func_800CB2D4.s") @@ -13,6 +13,6 @@ GLOBAL_ASM("lib/asm/non_matchings/unknown_0CA9A0/func_800CB498.s") GLOBAL_ASM("lib/asm/non_matchings/unknown_0CA9A0/alLoadParam.s") GLOBAL_ASM("lib/asm/non_matchings/unknown_0CA9A0/D_800CB714.s") GLOBAL_ASM("lib/asm/non_matchings/unknown_0CA9A0/func_800CBAC0.s") -GLOBAL_ASM("lib/asm/non_matchings/unknown_0CA9A0/D_800CBBEC.s") +GLOBAL_ASM("lib/asm/non_matchings/unknown_0CA9A0/alLoadPull.s") GLOBAL_ASM("lib/asm/non_matchings/unknown_0CA9A0/alResampleParam.s") -GLOBAL_ASM("lib/asm/non_matchings/unknown_0CA9A0/D_800CC17C.s") +GLOBAL_ASM("lib/asm/non_matchings/unknown_0CA9A0/alResamplePull.s") diff --git a/lib/src/unknown_0CCF90.c b/lib/src/unknown_0CCF90.c index 812bc4f2..e35b6c53 100644 --- a/lib/src/unknown_0CCF90.c +++ b/lib/src/unknown_0CCF90.c @@ -4,10 +4,10 @@ #include "types.h" #include "macros.h" -GLOBAL_ASM("lib/asm/non_matchings/unknown_0CCF90/D_800CC390.s") -GLOBAL_ASM("lib/asm/non_matchings/unknown_0CCF90/D_800CC3C0.s") +GLOBAL_ASM("lib/asm/non_matchings/unknown_0CCF90/alMainBusParam.s") +GLOBAL_ASM("lib/asm/non_matchings/unknown_0CCF90/alMainBusPull.s") GLOBAL_ASM("lib/asm/non_matchings/unknown_0CCF90/alSaveParam.s") -GLOBAL_ASM("lib/asm/non_matchings/unknown_0CCF90/D_800CC514.s") +GLOBAL_ASM("lib/asm/non_matchings/unknown_0CCF90/alSavePull.s") GLOBAL_ASM("lib/asm/non_matchings/unknown_0CCF90/osInitialize.s") GLOBAL_ASM("lib/asm/non_matchings/unknown_0CCF90/osSetThreadPri.s") GLOBAL_ASM("lib/asm/non_matchings/unknown_0CCF90/guPerspectiveF.s") diff --git a/lib/src/unknown_0D3160.c b/lib/src/unknown_0D3160.c index b9db571d..3804eb00 100644 --- a/lib/src/unknown_0D3160.c +++ b/lib/src/unknown_0D3160.c @@ -38,7 +38,7 @@ s32 osPiRawStartDma(s32 direction, u32 devAddr, void *dramAddr, u32 size) GLOBAL_ASM("lib/asm/non_matchings/unknown_0D3160/osEPiRawStartDma.s") GLOBAL_ASM("lib/asm/non_matchings/unknown_0D3160/__osDevMgrMain.s") GLOBAL_ASM("lib/asm/non_matchings/unknown_0D3160/__osViInit.s") -GLOBAL_ASM("lib/asm/non_matchings/unknown_0D3160/func_800D2C60.s") +GLOBAL_ASM("lib/asm/non_matchings/unknown_0D3160/alSynDelete.s") void __osDequeueThread(OSThread **queue, OSThread *t) { diff --git a/src/unknown_003260.c b/src/unknown_003260.c index 369abc3f..df405f20 100644 --- a/src/unknown_003260.c +++ b/src/unknown_003260.c @@ -54,8 +54,8 @@ void func_8000318C(s32 arg0) { } GLOBAL_ASM("asm/non_matchings/unknown_003260/alSndpNew.s") -GLOBAL_ASM("asm/non_matchings/unknown_003260/D_800033C8.s") -GLOBAL_ASM("asm/non_matchings/unknown_003260/func_80003470.s") +GLOBAL_ASM("asm/non_matchings/unknown_003260/_sndpVoiceHandler.s") +GLOBAL_ASM("asm/non_matchings/unknown_003260/_handleEvent.s") GLOBAL_ASM("asm/non_matchings/unknown_003260/func_8000410C.s") GLOBAL_ASM("asm/non_matchings/unknown_003260/func_8000418C.s") GLOBAL_ASM("asm/non_matchings/unknown_003260/func_800041FC.s") diff --git a/src/unknown_005740.c b/src/unknown_005740.c index e4d6432b..c220f990 100644 --- a/src/unknown_005740.c +++ b/src/unknown_005740.c @@ -39,20 +39,20 @@ GLOBAL_ASM("asm/non_matchings/unknown_005740/func_80009B7C.s") GLOBAL_ASM("asm/non_matchings/unknown_005740/func_80009D6C.s") GLOBAL_ASM("asm/non_matchings/unknown_005740/func_8000A2E8.s") GLOBAL_ASM("asm/non_matchings/unknown_005740/func_8000A414.s") -GLOBAL_ASM("asm/non_matchings/unknown_005740/func_8000A71C.s") -GLOBAL_ASM("asm/non_matchings/unknown_005740/func_8000A7C4.s") -GLOBAL_ASM("asm/non_matchings/unknown_005740/func_8000A84C.s") -GLOBAL_ASM("asm/non_matchings/unknown_005740/func_8000A8D0.s") -GLOBAL_ASM("asm/non_matchings/unknown_005740/func_8000A9F8.s") -GLOBAL_ASM("asm/non_matchings/unknown_005740/func_8000AA88.s") -GLOBAL_ASM("asm/non_matchings/unknown_005740/func_8000AAAC.s") -GLOBAL_ASM("asm/non_matchings/unknown_005740/func_8000AB00.s") -GLOBAL_ASM("asm/non_matchings/unknown_005740/func_8000AC34.s") -GLOBAL_ASM("asm/non_matchings/unknown_005740/func_8000ACE0.s") -GLOBAL_ASM("asm/non_matchings/unknown_005740/func_8000AD98.s") -GLOBAL_ASM("asm/non_matchings/unknown_005740/func_8000ADF4.s") +GLOBAL_ASM("asm/non_matchings/unknown_005740/__mapVoice.s") +GLOBAL_ASM("asm/non_matchings/unknown_005740/__unmapVoice.s") +GLOBAL_ASM("asm/non_matchings/unknown_005740/__lookupVoice.s") +GLOBAL_ASM("asm/non_matchings/unknown_005740/__lookupSoundQuick.s") +GLOBAL_ASM("asm/non_matchings/unknown_005740/__vsVol.s") +GLOBAL_ASM("asm/non_matchings/unknown_005740/__vsDelta.s") +GLOBAL_ASM("asm/non_matchings/unknown_005740/__vsPan.s") +GLOBAL_ASM("asm/non_matchings/unknown_005740/__seqpReleaseVoice.s") +GLOBAL_ASM("asm/non_matchings/unknown_005740/__voiceNeedsNoteKill.s") +GLOBAL_ASM("asm/non_matchings/unknown_005740/__initFromBank.s") +GLOBAL_ASM("asm/non_matchings/unknown_005740/__setInstChanState.s") +GLOBAL_ASM("asm/non_matchings/unknown_005740/__resetPerfChanState.s") GLOBAL_ASM("asm/non_matchings/unknown_005740/__initChanState.s") -GLOBAL_ASM("asm/non_matchings/unknown_005740/func_8000AEFC.s") +GLOBAL_ASM("asm/non_matchings/unknown_005740/__seqpStopOsc.s") /* Unknown Size */ typedef struct unk8000B010 { diff --git a/src/unknown_061D30.c b/src/unknown_061D30.c index ce2c3a94..2268bc29 100644 --- a/src/unknown_061D30.c +++ b/src/unknown_061D30.c @@ -4,11 +4,11 @@ #include "types.h" #include "macros.h" -GLOBAL_ASM("asm/non_matchings/unknown_061D30/func_80062290.s") -GLOBAL_ASM("asm/non_matchings/unknown_061D30/D_80062408.s") -GLOBAL_ASM("asm/non_matchings/unknown_061D30/func_800629CC.s") -GLOBAL_ASM("asm/non_matchings/unknown_061D30/func_80062A3C.s") -GLOBAL_ASM("asm/non_matchings/unknown_061D30/func_80062B00.s") -GLOBAL_ASM("asm/non_matchings/unknown_061D30/func_800637EC.s") -GLOBAL_ASM("asm/non_matchings/unknown_061D30/func_80063984.s") -GLOBAL_ASM("asm/non_matchings/unknown_061D30/func_80063A34.s") +GLOBAL_ASM("asm/non_matchings/unknown_061D30/alCSPNew.s") +GLOBAL_ASM("asm/non_matchings/unknown_061D30/__CSPVoiceHandler.s") +GLOBAL_ASM("asm/non_matchings/unknown_061D30/__CSPPostNextSeqEvent.s") +GLOBAL_ASM("asm/non_matchings/unknown_061D30/__CSPHandleNextSeqEvent.s") +GLOBAL_ASM("asm/non_matchings/unknown_061D30/__CSPHandleMIDIMsg.s") +GLOBAL_ASM("asm/non_matchings/unknown_061D30/__CSPHandleMetaMsg.s") +GLOBAL_ASM("asm/non_matchings/unknown_061D30/__CSPRepostEvent.s") +GLOBAL_ASM("asm/non_matchings/unknown_061D30/__setUsptFromTempo.s") diff --git a/src/unknown_064830.c b/src/unknown_064830.c index fee4cbbb..c205b154 100644 --- a/src/unknown_064830.c +++ b/src/unknown_064830.c @@ -3,38 +3,39 @@ #include "types.h" #include "macros.h" +#include "libultra_internal.h" -extern s32 D_80065900; +extern s32 alAuxBusPull; extern s32 alAuxBusParam; -extern s32 D_800CA0D0; +extern s32 alEnvMixerPull; extern s32 alEnvmixerParam; extern s32 alLoadParam; -extern s32 D_800CBBEC; +extern s32 alLoadPull; extern s32 alResampleParam; -extern s32 D_800CC17C; -extern s32 D_800CC390; -extern s32 D_800CC3C0; +extern s32 alResamplePull; +extern s32 alMainBusParam; +extern s32 alMainBusPull; extern s32 alSaveParam; -extern s32 D_800CC514; +extern s32 alSavePull; -GLOBAL_ASM("asm/non_matchings/unknown_064830/D_80063C30.s") +GLOBAL_ASM("asm/non_matchings/unknown_064830/alFxPull.s") -s32 D_80063F94(s32* arg0, s32 arg1, s32 arg2) { +s32 alFxParam(s32* arg0, s32 arg1, s32 arg2) { if (arg1 == 1) { *arg0 = arg2; } return 0; } -GLOBAL_ASM("asm/non_matchings/unknown_064830/D_80063FAC.s") -GLOBAL_ASM("asm/non_matchings/unknown_064830/func_80064224.s") -GLOBAL_ASM("asm/non_matchings/unknown_064830/func_800644A0.s") -GLOBAL_ASM("asm/non_matchings/unknown_064830/func_80064638.s") -GLOBAL_ASM("asm/non_matchings/unknown_064830/func_800647D0.s") -GLOBAL_ASM("asm/non_matchings/unknown_064830/func_80064884.s") +GLOBAL_ASM("asm/non_matchings/unknown_064830/alFxParamHdl.s") +GLOBAL_ASM("asm/non_matchings/unknown_064830/_loadOutputBuffer.s") +GLOBAL_ASM("asm/non_matchings/unknown_064830/_loadBuffer.s") +GLOBAL_ASM("asm/non_matchings/unknown_064830/_saveBuffer.s") +GLOBAL_ASM("asm/non_matchings/unknown_064830/_filterBuffer.s") +GLOBAL_ASM("asm/non_matchings/unknown_064830/_doModFunc.s") GLOBAL_ASM("asm/non_matchings/unknown_064830/func_8006492C.s") -GLOBAL_ASM("asm/non_matchings/unknown_064830/func_80064950.s") -GLOBAL_ASM("asm/non_matchings/unknown_064830/func_80064A08.s") +GLOBAL_ASM("asm/non_matchings/unknown_064830/init_lpfilter.s") +GLOBAL_ASM("asm/non_matchings/unknown_064830/alFxNew.s") typedef struct unk80064E54 { u8 unk00[0x14]; // unknown @@ -60,7 +61,7 @@ typedef struct unk80064E54 { } unk80064E54; void alEnvmixerNew(unk80064E54* arg0, s32 arg1) { - func_800CA0B0(arg0, &D_800CA0D0, &alEnvmixerParam, 4); + alFilterNew(arg0, &alEnvMixerPull, &alEnvmixerParam, 4); arg0->unk14 = alHeapDBAlloc(0, 0, arg1, 1, 0x50); arg0->unk38 = 1; arg0->unk48 = 0; @@ -81,7 +82,7 @@ void alEnvmixerNew(unk80064E54* arg0, s32 arg1) { arg0->unk44 = 0; } -typedef struct unk80064EF8 { +typedef struct ALFilter_s { u8 unk00[0x14]; // unknown s32 unk14; s32 unk18; @@ -92,10 +93,10 @@ typedef struct unk80064EF8 { s32 unk3C; s32 unk40; s32 unk44; -} unk80064EF8; +} ALFilter; -void alLoadNew(unk80064EF8* arg0, s32 (*arg1)(s32*), s32 arg2) { - func_800CA0B0(arg0, &D_800CBBEC, &alLoadParam, 0); +void alLoadNew(ALFilter* arg0, s32 (*arg1)(s32*), s32 arg2) { + alFilterNew(arg0, &alLoadPull, &alLoadParam, 0); arg0->unk14 = alHeapDBAlloc(0, 0, arg2, 1, 0x20); arg0->unk18 = alHeapDBAlloc(0, 0, arg2, 1, 0x20); arg0->unk30 = arg1(&arg0->unk34); @@ -117,7 +118,7 @@ typedef struct unk80064F9C { } unk80064F9C; void alResampleNew(unk80064F9C* arg0, s32 arg1) { - func_800CA0B0(arg0, &D_800CC17C, &alResampleParam, 1); + alFilterNew(arg0, &alResamplePull, &alResampleParam, 1); arg0->unk14 = alHeapDBAlloc(0, 0, arg1, 1, 0x20); arg0->unk24 = 1; arg0->unk30 = 0; @@ -136,7 +137,7 @@ typedef struct unk80065024 { } unk80065024; void alAuxBusNew(unk80065024* arg0, s32 arg1, s32 arg2) { - func_800CA0B0(arg0, &D_80065900, &alAuxBusParam, 6); + alFilterNew(arg0, &alAuxBusPull, &alAuxBusParam, 6); arg0->unk14 = 0; arg0->unk18 = arg2; arg0->unk1C = arg1; @@ -150,7 +151,7 @@ typedef struct unk80065084 { } unk80065084; void alMainBusNew(unk80065084* arg0, s32 arg1, s32 arg2) { - func_800CA0B0(arg0, &D_800CC3C0, &D_800CC390, 7); + alFilterNew(arg0, &alMainBusPull, &alMainBusParam, 7); arg0->unk14 = 0; arg0->unk18 = arg2; arg0->unk1C = arg1; @@ -163,7 +164,7 @@ typedef struct unk800650E4 { } unk800650E4; void alSaveNew(unk800650E4* arg0) { - func_800CA0B0(arg0, &D_800CC514, &alSaveParam, 3); + alFilterNew(arg0, &alSavePull, &alSaveParam, 3); arg0->unk14 = 0; arg0->unk18 = 1; } diff --git a/src/unknown_065D30.c b/src/unknown_065D30.c index dcca369d..7d56eca1 100644 --- a/src/unknown_065D30.c +++ b/src/unknown_065D30.c @@ -5,11 +5,11 @@ #include "macros.h" GLOBAL_ASM("asm/non_matchings/unknown_065D30/alSynNew.s") -GLOBAL_ASM("asm/non_matchings/unknown_065D30/func_80065494.s") -GLOBAL_ASM("asm/non_matchings/unknown_065D30/func_80065668.s") -GLOBAL_ASM("asm/non_matchings/unknown_065D30/func_8006569C.s") -GLOBAL_ASM("asm/non_matchings/unknown_065D30/func_800656BC.s") -GLOBAL_ASM("asm/non_matchings/unknown_065D30/func_8006571C.s") -GLOBAL_ASM("asm/non_matchings/unknown_065D30/func_80065754.s") -GLOBAL_ASM("asm/non_matchings/unknown_065D30/func_800657C4.s") -GLOBAL_ASM("asm/non_matchings/unknown_065D30/func_800657EC.s") +GLOBAL_ASM("asm/non_matchings/unknown_065D30/alAudioFrame.s") +GLOBAL_ASM("asm/non_matchings/unknown_065D30/__allocParam.s") +GLOBAL_ASM("asm/non_matchings/unknown_065D30/__freeParam.s") +GLOBAL_ASM("asm/non_matchings/unknown_065D30/__collectPVoices.s") +GLOBAL_ASM("asm/non_matchings/unknown_065D30/__freePVoices.s") +GLOBAL_ASM("asm/non_matchings/unknown_065D30/__timeToSamplesNoRound.s") +GLOBAL_ASM("asm/non_matchings/unknown_065D30/__timeToSamples.s") +GLOBAL_ASM("asm/non_matchings/unknown_065D30/__nextSampleTime.s") diff --git a/src/unknown_066460.c b/src/unknown_066460.c index 953fc8d4..dbf5ae34 100644 --- a/src/unknown_066460.c +++ b/src/unknown_066460.c @@ -4,4 +4,4 @@ #include "types.h" #include "macros.h" -GLOBAL_ASM("asm/non_matchings/unknown_066460/func_80065860.s") +GLOBAL_ASM("asm/non_matchings/unknown_066460/alSynAllocFX.s") diff --git a/src/unknown_066500.c b/src/unknown_066500.c index e0db5877..a604123d 100644 --- a/src/unknown_066500.c +++ b/src/unknown_066500.c @@ -4,7 +4,7 @@ #include "types.h" #include "macros.h" -GLOBAL_ASM("asm/non_matchings/unknown_066500/D_80065900.s") +GLOBAL_ASM("asm/non_matchings/unknown_066500/alAuxBusPull.s") GLOBAL_ASM("asm/non_matchings/unknown_066500/alAuxBusParam.s") GLOBAL_ASM("asm/non_matchings/unknown_066500/func_80065A80.s") -GLOBAL_ASM("asm/non_matchings/unknown_066500/func_80065B20.s") +GLOBAL_ASM("asm/non_matchings/unknown_066500/alSynSetPan.s") diff --git a/src/unknown_0667D0.c b/src/unknown_0667D0.c index 46094138..7d8c591a 100644 --- a/src/unknown_0667D0.c +++ b/src/unknown_0667D0.c @@ -34,7 +34,7 @@ s32 func_80065BEC(s32 arg0) { } } -GLOBAL_ASM("asm/non_matchings/unknown_0667D0/func_80065C38.s") +GLOBAL_ASM("asm/non_matchings/unknown_0667D0/alSynStartVoiceParams.s") void func_80065D40(void) { osInitialize(); diff --git a/undefined_syms.txt b/undefined_syms.txt index 16b32cac..77b290c0 100755 --- a/undefined_syms.txt +++ b/undefined_syms.txt @@ -30,14 +30,14 @@ osAppNMIBuffer = 0x8000031C; D_80002A98 = 0x80002A98; D_80002E38 = 0x80002E38; D_80003008 = 0x80003008; -D_800033C8 = 0x800033C8; +_sndpVoiceHandler = 0x800033C8; D_80019808 = 0x80019808; D_80024D54 = 0x80024D54; -D_80062408 = 0x80062408; -D_80063C30 = 0x80063C30; -D_80063F94 = 0x80063F94; -D_80063FAC = 0x80063FAC; -D_80065900 = 0x80065900; +__CSPVoiceHandler = 0x80062408; +alFxPull = 0x80063C30; +alFxParam = 0x80063F94; +alFxParamHdl = 0x80063FAC; +alAuxBusPull = 0x80065900; alAuxBusParam = 0x800659D4; D_80065D40 = 0x80065D40; D_80065D98 = 0x80065D98; @@ -48,17 +48,17 @@ D_800B6FC4 = 0x800B6FC4; D_800C7340 = 0x800C7340; D_800C74A0 = 0x800C74A0; D_800C9D40 = 0x800C9D40; -D_800CA0D0 = 0x800CA0D0; +alEnvMixerPull = 0x800CA0D0; alEnvmixerParam = 0x800CAA7C; alLoadParam = 0x800CB540; D_800CB714 = 0x800CB714; -D_800CBBEC = 0x800CBBEC; +alLoadPull = 0x800CBBEC; alResampleParam = 0x800CC090; -D_800CC17C = 0x800CC17C; -D_800CC390 = 0x800CC390; -D_800CC3C0 = 0x800CC3C0; +alResamplePull = 0x800CC17C; +alMainBusParam = 0x800CC390; +alMainBusPull = 0x800CC3C0; alSaveParam = 0x800CC4E0; -D_800CC514 = 0x800CC514; +alSavePull = 0x800CC514; viMgrMain = 0x800D1B08; osPiRawStartDma = 0x800D25A0; osEPiRawStartDma = 0x800D2680; @@ -763,7 +763,7 @@ D_800E3770 = 0x800E3770; D_800E3774 = 0x800E3774; D_800E3778 = 0x800E3778; D_800E377C = 0x800E377C; -D_800E3780 = 0x800E3780; +alGlobals = 0x800E3780; D_800E3790 = 0x800E3790; D_800E38A0 = 0x800E38A0; D_800E38A4 = 0x800E38A4;