You've already forked Microtransactions64
mirror of
https://github.com/Print-and-Panic/Microtransactions64.git
synced 2026-01-21 10:17:19 -08:00
Refresh 10
This commit is contained in:
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
File diff suppressed because it is too large
Load Diff
11
lib/asm/sqrtf.s
Normal file
11
lib/asm/sqrtf.s
Normal file
@@ -0,0 +1,11 @@
|
||||
.set noat # allow manual use of $at
|
||||
.set noreorder # don't insert nops after branches
|
||||
.set gp=64
|
||||
|
||||
.include "macros.inc"
|
||||
|
||||
.section .text, "ax"
|
||||
|
||||
glabel sqrtf
|
||||
jr $ra
|
||||
sqrt.s $f0, $f12
|
||||
Binary file not shown.
|
Before Width: | Height: | Size: 2.2 KiB |
28
lib/rsp.s
28
lib/rsp.s
@@ -5,22 +5,14 @@
|
||||
|
||||
.balign 16
|
||||
glabel rspF3DBootStart
|
||||
.ifndef VERSION_EU
|
||||
.incbin "lib/PR/boot/F3D_boot.bin"
|
||||
.else
|
||||
.incbin "lib/PR/boot/F3D_boot_eu.bin"
|
||||
.half 0
|
||||
.endif
|
||||
.incbin "rsp/rspboot.bin"
|
||||
.balign 16
|
||||
glabel rspF3DBootEnd
|
||||
|
||||
.balign 16
|
||||
.ifndef F3DEX_GBI_SHARED
|
||||
glabel rspF3DStart /* Use regular Fast3D bins (default) */
|
||||
.ifndef F3D_OLD
|
||||
.incbin "lib/PR/f3d/new/F3D.bin" /* OS 2.0H (J2 and IQ) */
|
||||
.else
|
||||
.incbin "lib/PR/f3d/old/F3D.bin" /* OS 2.0D (US and JP) */
|
||||
.endif
|
||||
.incbin "rsp/fast3d.bin"
|
||||
glabel rspF3DEnd
|
||||
|
||||
.else /* Use one of the Fast3DEX series grucodes. */
|
||||
@@ -39,7 +31,7 @@ glabel rspF3DEnd
|
||||
|
||||
.balign 16
|
||||
glabel rspAspMainStart
|
||||
.incbin "lib/PR/audio/aspMain.bin"
|
||||
.incbin "rsp/audio.bin"
|
||||
glabel rspAspMainEnd
|
||||
|
||||
/*
|
||||
@@ -135,15 +127,7 @@ glabel rspS2DEXEnd
|
||||
.balign 16
|
||||
.ifndef F3DEX_GBI_SHARED /* Use regular Fast3D data (default) */
|
||||
glabel rspF3DDataStart
|
||||
.ifndef F3D_OLD /* OS 2.0H (J2 and IQ) */
|
||||
.ifdef VERSION_EU
|
||||
.incbin "lib/PR/f3d/new/F3D_data_EU.bin"
|
||||
.else
|
||||
.incbin "lib/PR/f3d/new/F3D_data.bin"
|
||||
.endif
|
||||
.else /* OS 2.0D (US and JP) */
|
||||
.incbin "lib/PR/f3d/old/F3D_data.bin"
|
||||
.endif
|
||||
.incbin "rsp/fast3d_data.bin"
|
||||
glabel rspF3DDataEnd
|
||||
|
||||
.else /* Using one of the Fast3DEX series grucodes */
|
||||
@@ -162,7 +146,7 @@ glabel rspF3DDataEnd
|
||||
|
||||
.balign 16
|
||||
glabel rspAspMainDataStart
|
||||
.incbin "lib/PR/audio/aspMain_data.bin"
|
||||
.incbin "rsp/audio_data.bin"
|
||||
glabel rspAspMainDataEnd
|
||||
|
||||
/* LESS COMMON MICROCODES */
|
||||
|
||||
@@ -3,7 +3,7 @@
|
||||
// an array of pointers to functions taking no arguments and returning u32...
|
||||
// this is only referenced in the exception handler and here. this function is called with a0=1 and
|
||||
// then the same memory address is loaded. it's definitely an array access though..
|
||||
extern u32 (*D_80334920[8])() ;
|
||||
extern u32 (*D_80334920[8])(void) ;
|
||||
|
||||
void EU_D_802f4330(u32 a0, u32 a1(void)) {
|
||||
register u32 int_disabled = __osDisableInt();
|
||||
|
||||
@@ -6,13 +6,13 @@ OSMesg osPiMesgBuff[PIAccessQueueSize];
|
||||
OSMesgQueue gOsPiMessageQueue;
|
||||
u32 gOsPiAccessQueueCreated = 0;
|
||||
|
||||
void __osPiCreateAccessQueue() {
|
||||
void __osPiCreateAccessQueue(void) {
|
||||
gOsPiAccessQueueCreated = 1;
|
||||
osCreateMesgQueue(&gOsPiMessageQueue, &osPiMesgBuff[0], PIAccessQueueSize - 1);
|
||||
osSendMesg(&gOsPiMessageQueue, NULL, OS_MESG_NOBLOCK);
|
||||
}
|
||||
|
||||
void __osPiGetAccess() {
|
||||
void __osPiGetAccess(void) {
|
||||
OSMesg sp1c;
|
||||
if (!gOsPiAccessQueueCreated) {
|
||||
__osPiCreateAccessQueue();
|
||||
@@ -20,6 +20,6 @@ void __osPiGetAccess() {
|
||||
osRecvMesg(&gOsPiMessageQueue, &sp1c, OS_MESG_BLOCK);
|
||||
}
|
||||
|
||||
void __osPiRelAccess() {
|
||||
void __osPiRelAccess(void) {
|
||||
osSendMesg(&gOsPiMessageQueue, NULL, OS_MESG_NOBLOCK);
|
||||
}
|
||||
|
||||
@@ -57,7 +57,7 @@ static void _bnkfPatchBank(ALInstrument *inst, ALBankFile *f, u8 *table) {
|
||||
|
||||
// Force adding another jr $ra. Has to be called or it doesn't get put in the
|
||||
// right place.
|
||||
static void unused() {
|
||||
static void unused(void) {
|
||||
}
|
||||
|
||||
void alBnkfNew(ALBankFile *f, u8 *table) {
|
||||
|
||||
@@ -1,82 +1,16 @@
|
||||
#include "new_func.h"
|
||||
|
||||
void func_802F4A20() {
|
||||
void func_802F4A20(void) {
|
||||
__OSTranxInfo *sp1c;
|
||||
volatile u32 sp18;
|
||||
// lui $t6, %hi(__osDiskHandle) # $t6, 0x8033
|
||||
// lw $t6, %lo(__osDiskHandle)($t6)
|
||||
// addiu $sp, $sp, -0x20
|
||||
// sw $ra, 0x14($sp)
|
||||
// addiu $t7, $t6, 0x14
|
||||
// sw $t7, 0x1c($sp)
|
||||
sp1c = &__osDiskHandle->transferInfo;
|
||||
// lui $t8, %hi(PI_STATUS_REG) # $t8, 0xa460
|
||||
// lw $t9, %lo(PI_STATUS_REG)($t8)
|
||||
// sw $t9, 0x18($sp)
|
||||
// sp18 = HW_REG(PI_STATUS_REG, u32);
|
||||
// while(sp18 & 0x2) sp18 = HW_REG(PI_STATUS_REG, u32);
|
||||
WAIT_ON_IOBUSY(sp18);
|
||||
// lw $t0, 0x18($sp)
|
||||
// andi $t1, $t0, 2
|
||||
// beqz $t1, .L802F4A70
|
||||
// nop
|
||||
// L802F4A54:
|
||||
// lui $t2, %hi(PI_STATUS_REG) # $t2, 0xa460
|
||||
// lw $t3, %lo(PI_STATUS_REG)($t2)
|
||||
// sw $t3, 0x18($sp)
|
||||
// lw $t4, 0x18($sp)
|
||||
// andi $t5, $t4, 2
|
||||
// bnez $t5, .L802F4A54
|
||||
// nop
|
||||
|
||||
// L802F4A70:
|
||||
// lw $t6, 0x1c($sp)
|
||||
// lui $at, 0x1000
|
||||
// lui $t9, %hi(D_A5000510) # $t9, 0xa500
|
||||
// lw $t7, 0x14($t6)
|
||||
// lui $t0, %hi(PI_STATUS_REG) # $t0, 0xa460
|
||||
// or $t8, $t7, $at
|
||||
// sw $t8, %lo(D_A5000510)($t9)
|
||||
HW_REG(ASIC_BM_CTL, u32) = BUFFER_MANAGER_RESET | sp1c->bmCtlShadow; //should be unk10??
|
||||
// lw $t1, %lo(PI_STATUS_REG)($t0)
|
||||
// sw $t1, 0x18($sp)
|
||||
// lw $t2, 0x18($sp)
|
||||
// andi $t3, $t2, 2
|
||||
// beqz $t3, .L802F4AC0
|
||||
// nop
|
||||
WAIT_ON_IOBUSY(sp18);
|
||||
// L802F4AA4:
|
||||
// lui $t4, %hi(PI_STATUS_REG) # $t4, 0xa460
|
||||
// lw $t5, %lo(PI_STATUS_REG)($t4)
|
||||
// sw $t5, 0x18($sp)
|
||||
// lw $t6, 0x18($sp)
|
||||
// andi $t7, $t6, 2
|
||||
// bnez $t7, .L802F4AA4
|
||||
// nop
|
||||
// L802F4AC0:
|
||||
|
||||
// lw $t8, 0x1c($sp)
|
||||
// lui $t0, %hi(D_A5000510) # $t0, 0xa500
|
||||
// lw $t9, 0x14($t8)
|
||||
// jal func_802F4B08
|
||||
// sw $t9, %lo(D_A5000510)($t0)
|
||||
HW_REG(ASIC_BM_CTL, u32) = sp1c->bmCtlShadow;
|
||||
func_802F4B08();
|
||||
// li $t1, 2
|
||||
// lui $t2, %hi(PI_STATUS_REG) # $t2, 0xa460
|
||||
// sw $t1, %lo(PI_STATUS_REG)($t2)
|
||||
HW_REG(PI_STATUS_REG, u32) = PI_STATUS_CLEAR_INTR;
|
||||
// lui $t3, %hi(D_8030208C) # $t3, 0x8030
|
||||
// lw $t3, %lo(D_8030208C)($t3)
|
||||
// lui $at, (0x00100401 >> 16) # lui $at, 0x10
|
||||
// lw $ra, 0x14($sp)
|
||||
// ori $at, (0x00100401 & 0xFFFF) # ori $at, $at, 0x401
|
||||
// or $t4, $t3, $at
|
||||
// lui $at, %hi(D_8030208C) # $at, 0x8030
|
||||
// sw $t4, %lo(D_8030208C)($at)
|
||||
D_8030208C |= 0x00100401; //TODO: fix magic numbers
|
||||
// jr $ra
|
||||
// addiu $sp, $sp, 0x20
|
||||
}
|
||||
|
||||
typedef struct OSEventMessageStruct_0_s {
|
||||
@@ -85,86 +19,21 @@ typedef struct OSEventMessageStruct_0_s {
|
||||
} OSEventMessageStruct_0;
|
||||
|
||||
extern OSEventMessageStruct_0 D_80363830[16]; // should be OS_NUM_EVENTS + 1 I think
|
||||
void func_802F4B08() {
|
||||
|
||||
void func_802F4B08(void) {
|
||||
OSEventMessageStruct_0 *sp2c;
|
||||
OSMesgQueue *sp28;
|
||||
u32 sp24;
|
||||
register OSThread *s0;
|
||||
// addiu $sp, $sp, -0x30
|
||||
// lui $t6, %hi(D_80363830) # $t6, 0x8033
|
||||
// addiu $t6, %lo(D_80363830) # addiu $t6, $t6, 0x36d0
|
||||
// addiu $t7, $t6, 0x40
|
||||
// sw $ra, 0x1c($sp)
|
||||
// sw $s0, 0x18($sp)
|
||||
// sw $t7, 0x2c($sp)
|
||||
sp2c = &D_80363830[OS_EVENT_PI];
|
||||
// lw $t8, 0x40($t6)
|
||||
// beqz $t8, .L802F4BE0
|
||||
// sw $t8, 0x28($sp)
|
||||
sp28 = sp2c->queue;
|
||||
// lw $t9, 8($t8)
|
||||
// lw $t0, 0x10($t8)
|
||||
// slt $at, $t9, $t0
|
||||
// beqz $at, .L802F4BE0
|
||||
// nop
|
||||
if (!sp28 || sp28->validCount >= sp28->msgCount)
|
||||
return;
|
||||
// lw $t1, 0x28($sp)
|
||||
// lw $t6, 0x2c($sp)
|
||||
// lw $t2, 0xc($t1)
|
||||
// lw $t3, 8($t1)
|
||||
// lw $t5, 0x10($t1)
|
||||
// addu $t4, $t2, $t3
|
||||
// div $zero, $t4, $t5
|
||||
// mfhi $t7
|
||||
// sw $t7, 0x24($sp)
|
||||
sp24 = (sp28->first + sp28->validCount) % sp28->msgCount;
|
||||
// lw $t0, 0x14($t1)
|
||||
// lw $t8, 4($t6)
|
||||
// sll $t9, $t7, 2
|
||||
// addu $t2, $t0, $t9
|
||||
// sw $t8, ($t2)
|
||||
sp28->msg[sp24] = sp2c->msg;
|
||||
// lw $t3, 0x28($sp)
|
||||
// bnez $t5, .L802F4B8C
|
||||
// nop
|
||||
// break 7
|
||||
// L802F4B8C:
|
||||
// li $at, -1
|
||||
// bne $t5, $at, .L802F4BA4
|
||||
// lui $at, 0x8000
|
||||
// bne $t4, $at, .L802F4BA4
|
||||
// nop
|
||||
// break 6
|
||||
// L802F4BA4:
|
||||
// lw $t4, 8($t3)
|
||||
// addiu $t5, $t4, 1
|
||||
// sw $t5, 8($t3)
|
||||
sp28->validCount += 1;
|
||||
// lw $t6, 0x28($sp)
|
||||
// lw $t7, ($t6)
|
||||
// lw $t1, ($t7)
|
||||
// beqz $t1, .L802F4BE0
|
||||
// nop
|
||||
// jal __osPopThread
|
||||
// move $a0, $t6
|
||||
if (sp28->mtqueue->next != NULL) {
|
||||
s0 = __osPopThread(&sp28->mtqueue);
|
||||
// move $s0, $v0
|
||||
// lui $a0, %hi(D_80334898) # $a0, 0x8030
|
||||
// addiu $a0, %lo(D_80334898) # addiu $a0, $a0, 0x2ef8
|
||||
// jal __osEnqueueThread
|
||||
// move $a1, $s0
|
||||
__osEnqueueThread(&D_80334898, s0);
|
||||
}
|
||||
// L802F4BE0:
|
||||
// lw $ra, 0x1c($sp)
|
||||
// lw $s0, 0x18($sp)
|
||||
// addiu $sp, $sp, 0x30
|
||||
// jr $ra
|
||||
// nop
|
||||
|
||||
// nop
|
||||
// nop
|
||||
// nop
|
||||
}
|
||||
|
||||
@@ -1,31 +1,9 @@
|
||||
#include "libultra_internal.h"
|
||||
extern u32 D_8030208C;
|
||||
#include "new_func.h"
|
||||
|
||||
void func_802F7140(u32 a0) {
|
||||
register u32 s0;
|
||||
s0 = __osDisableInt();
|
||||
D_8030208C &= ~(-0x402 & a0);
|
||||
__osRestoreInt(s0);
|
||||
}
|
||||
/*
|
||||
/ 0B6940 802F7140 27BDFFD8 / addiu $sp, $sp, -0x28
|
||||
/ 0B6944 802F7144 AFBF001C / sw $ra, 0x1c($sp)
|
||||
/ 0B6948 802F7148 AFA40028 / sw $a0, 0x28($sp)
|
||||
/ 0B694C 802F714C 0C0BD400 / jal __osDisableInt
|
||||
/ 0B6950 802F7150 AFB00018 / sw $s0, 0x18($sp)
|
||||
/ 0B6954 802F7154 8FAF0028 / lw $t7, 0x28($sp)
|
||||
/ 0B6958 802F7158 3C0E8030 / lui $t6, %hi(D_8030208C) # $t6, 0x8030
|
||||
/ 0B695C 802F715C 8DCE208C / lw $t6, %lo(D_8030208C)($t6)
|
||||
/ 0B6960 802F7160 2401FBFE / li $at, -1026
|
||||
/ 0B6964 802F7164 01E1C024 / and $t8, $t7, $at
|
||||
/ 0B6968 802F7168 0300C827 / not $t9, $t8
|
||||
/ 0B696C 802F716C 00408025 / move $s0, $v0
|
||||
/ 0B6970 802F7170 3C018030 / lui $at, %hi(D_8030208C) # $at, 0x8030
|
||||
/ 0B6974 802F7174 01D94024 / and $t0, $t6, $t9
|
||||
/ 0B6978 802F7178 AC28208C / sw $t0, %lo(D_8030208C)($at)
|
||||
/ 0B697C 802F717C 0C0BD408 / jal __osRestoreInt
|
||||
/ 0B6980 802F7180 02002025 / move $a0, $s0
|
||||
/ 0B6984 802F7184 8FBF001C / lw $ra, 0x1c($sp)
|
||||
/ 0B6988 802F7188 8FB00018 / lw $s0, 0x18($sp)
|
||||
/ 0B698C 802F718C 27BD0028 / addiu $sp, $sp, 0x28
|
||||
/ 0B6990 802F7190 03E00008 / jr $ra
|
||||
/ 0B6994 802F7194 00000000 / nop */
|
||||
|
||||
@@ -1,31 +1,8 @@
|
||||
#include "libultra_internal.h"
|
||||
|
||||
void func_802F71F0() {
|
||||
void func_802F71F0(void) {
|
||||
register u32 s0 = __osDisableInt();
|
||||
D_803348A0->state = OS_STATE_RUNNABLE;
|
||||
__osEnqueueAndYield(&D_80334898);
|
||||
__osRestoreInt(s0);
|
||||
}
|
||||
/*
|
||||
/ 0B69F0 802F71F0 27BDFFD8 / addiu $sp, $sp, -0x28
|
||||
/ 0B69F4 802F71F4 AFBF001C / sw $ra, 0x1c($sp)
|
||||
/ 0B69F8 802F71F8 0C0BD400 / jal __osDisableInt
|
||||
/ 0B69FC 802F71FC AFB00018 / sw $s0, 0x18($sp)
|
||||
/ 0B6A00 802F7200 3C0F8030 / lui $t7, %hi(D_803348A0) # $t7, 0x8030
|
||||
/ 0B6A04 802F7204 8DEF2F00 / lw $t7, %lo(D_803348A0)($t7)
|
||||
/ 0B6A08 802F7208 240E0002 / li $t6, 2
|
||||
/ 0B6A0C 802F720C 3C048030 / lui $a0, %hi(D_80334898) # $a0, 0x8030
|
||||
/ 0B6A10 802F7210 00408025 / move $s0, $v0
|
||||
/ 0B6A14 802F7214 24842EF8 / addiu $a0, %lo(D_80334898) # addiu $a0, $a0, 0x2ef8
|
||||
/ 0B6A18 802F7218 0C0BCFC3 / jal __osEnqueueAndYield
|
||||
/ 0B6A1C 802F721C A5EE0010 / sh $t6, 0x10($t7)
|
||||
|
||||
/ 0B6A20 802F7220 0C0BD408 / jal __osRestoreInt
|
||||
/ 0B6A24 802F7224 02002025 / move $a0, $s0
|
||||
/ 0B6A28 802F7228 8FBF001C / lw $ra, 0x1c($sp)
|
||||
/ 0B6A2C 802F722C 8FB00018 / lw $s0, 0x18($sp)
|
||||
/ 0B6A30 802F7230 27BD0028 / addiu $sp, $sp, 0x28
|
||||
/ 0B6A34 802F7234 03E00008 / jr $ra
|
||||
/ 0B6A38 802F7238 00000000 / nop
|
||||
|
||||
/ 0B6A3C 802F723C 00000000 / nop */
|
||||
|
||||
@@ -1,5 +1,9 @@
|
||||
#include "libultra_internal.h"
|
||||
#ifdef GBI_FLOATS
|
||||
#include <string.h>
|
||||
#endif
|
||||
|
||||
#ifndef GBI_FLOATS
|
||||
void guMtxF2L(float mf[4][4], Mtx *m) {
|
||||
int r, c;
|
||||
s32 tmp1;
|
||||
@@ -35,6 +39,11 @@ void guMtxL2F(float mf[4][4], Mtx *m) {
|
||||
}
|
||||
}
|
||||
}
|
||||
#else
|
||||
void guMtxF2L(float mf[4][4], Mtx *m) {
|
||||
memcpy(m, mf, sizeof(Mtx));
|
||||
}
|
||||
#endif
|
||||
|
||||
void guMtxIdentF(float mf[4][4]) {
|
||||
int r, c;
|
||||
@@ -49,7 +58,11 @@ void guMtxIdentF(float mf[4][4]) {
|
||||
}
|
||||
}
|
||||
void guMtxIdent(Mtx *m) {
|
||||
#ifndef GBI_FLOATS
|
||||
float mf[4][4];
|
||||
guMtxIdentF(mf);
|
||||
guMtxF2L(mf, m);
|
||||
#else
|
||||
guMtxIdentF(m->m);
|
||||
#endif
|
||||
}
|
||||
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user