mirror of
https://github.com/pmret/papermario.git
synced 2024-09-18 23:42:35 +02:00
some libultra organization
This commit is contained in:
parent
bad7a2ceac
commit
e1626030ff
1
.vscode/settings.json
vendored
1
.vscode/settings.json
vendored
@ -15,4 +15,5 @@
|
|||||||
"build": true,
|
"build": true,
|
||||||
"docs/doxygen": true,
|
"docs/doxygen": true,
|
||||||
},
|
},
|
||||||
|
"python.pythonPath": "/usr/bin/python3",
|
||||||
}
|
}
|
||||||
|
@ -1,14 +0,0 @@
|
|||||||
.set noat # allow manual use of $at
|
|
||||||
.set noreorder # don't insert nops after branches
|
|
||||||
|
|
||||||
glabel func_80120000
|
|
||||||
/* B6700 80120000 2402F7FF */ addiu $v0, $zero, -0x801
|
|
||||||
/* B6704 80120004 00822024 */ and $a0, $a0, $v0
|
|
||||||
/* B6708 80120008 3C028015 */ lui $v0, %hi(gCurrentAnimMeshListPtr)
|
|
||||||
/* B670C 8012000C 8C423A40 */ lw $v0, %lo(gCurrentAnimMeshListPtr)($v0)
|
|
||||||
/* B6710 80120010 00042080 */ sll $a0, $a0, 2
|
|
||||||
/* B6714 80120014 00822021 */ addu $a0, $a0, $v0
|
|
||||||
/* B6718 80120018 8C820000 */ lw $v0, ($a0)
|
|
||||||
/* B671C 8012001C AC4602D4 */ sw $a2, 0x2d4($v0)
|
|
||||||
/* B6720 80120020 03E00008 */ jr $ra
|
|
||||||
/* B6724 80120024 AC4502D8 */ sw $a1, 0x2d8($v0)
|
|
@ -24,5 +24,5 @@ glabel osEPiWriteIo
|
|||||||
/* 3C1AC 80060DAC 8FB00010 */ lw $s0, 0x10($sp)
|
/* 3C1AC 80060DAC 8FB00010 */ lw $s0, 0x10($sp)
|
||||||
/* 3C1B0 80060DB0 03E00008 */ jr $ra
|
/* 3C1B0 80060DB0 03E00008 */ jr $ra
|
||||||
/* 3C1B4 80060DB4 27BD0020 */ addiu $sp, $sp, 0x20
|
/* 3C1B4 80060DB4 27BD0020 */ addiu $sp, $sp, 0x20
|
||||||
/* 3C1B8 80060DB8 00000000 */ nop
|
/* 3C1B8 80060DB8 00000000 */ nop
|
||||||
/* 3C1BC 80060DBC 00000000 */ nop
|
/* 3C1BC 80060DBC 00000000 */ nop
|
@ -1,5 +1,11 @@
|
|||||||
|
.include "macro.inc"
|
||||||
|
|
||||||
|
# assembler directives
|
||||||
.set noat # allow manual use of $at
|
.set noat # allow manual use of $at
|
||||||
.set noreorder # don't insert nops after branches
|
.set noreorder # don't insert nops after branches
|
||||||
|
.set gp=64 # allow use of 64-bit general purpose registers
|
||||||
|
|
||||||
|
.section .text, "ax"
|
||||||
|
|
||||||
glabel osSetIntMask
|
glabel osSetIntMask
|
||||||
/* 3BD40 80060940 400C6000 */ mfc0 $t4, $12
|
/* 3BD40 80060940 400C6000 */ mfc0 $t4, $12
|
||||||
@ -39,7 +45,7 @@ glabel osSetIntMask
|
|||||||
/* 3BDC4 800609C4 01816024 */ and $t4, $t4, $at
|
/* 3BDC4 800609C4 01816024 */ and $t4, $t4, $at
|
||||||
/* 3BDC8 800609C8 01886025 */ or $t4, $t4, $t0
|
/* 3BDC8 800609C8 01886025 */ or $t4, $t4, $t0
|
||||||
/* 3BDCC 800609CC 408C6000 */ mtc0 $t4, $12
|
/* 3BDCC 800609CC 408C6000 */ mtc0 $t4, $12
|
||||||
/* 3BDD0 800609D0 00000000 */ nop
|
/* 3BDD0 800609D0 00000000 */ nop
|
||||||
/* 3BDD4 800609D4 00000000 */ nop
|
/* 3BDD4 800609D4 00000000 */ nop
|
||||||
/* 3BDD8 800609D8 03E00008 */ jr $ra
|
/* 3BDD8 800609D8 03E00008 */ jr $ra
|
||||||
/* 3BDDC 800609DC 00000000 */ nop
|
/* 3BDDC 800609DC 00000000 */ nop
|
@ -713,7 +713,10 @@ typedef struct AnimatedMesh {
|
|||||||
/* 0x098 */ struct Matrix4s mtx;
|
/* 0x098 */ struct Matrix4s mtx;
|
||||||
/* 0x0D8 */ char unk_D8[500];
|
/* 0x0D8 */ char unk_D8[500];
|
||||||
/* 0x2CC */ s32 time;
|
/* 0x2CC */ s32 time;
|
||||||
/* 0x2D0 */ char unk_2D0[16];
|
/* 0x2D0 */ char unk_2D0[4];
|
||||||
|
/* 0x2D4 */ s32 unk_2D4;
|
||||||
|
/* 0x2D8 */ s32 unk_2D8;
|
||||||
|
/* 0x2DC */ char unk_2DC[4];
|
||||||
} AnimatedMesh; // size = 0x2E0
|
} AnimatedMesh; // size = 0x2E0
|
||||||
|
|
||||||
typedef AnimatedMesh* AnimatedMeshList[MAX_ANIMATED_MESHES];
|
typedef AnimatedMesh* AnimatedMeshList[MAX_ANIMATED_MESHES];
|
||||||
|
@ -391,7 +391,13 @@ AnimatedMesh* get_anim_mesh(s32 animModelID) {
|
|||||||
return (*gCurrentAnimMeshListPtr)[animModelID & ~0x800];
|
return (*gCurrentAnimMeshListPtr)[animModelID & ~0x800];
|
||||||
}
|
}
|
||||||
|
|
||||||
INCLUDE_ASM(s32, "code_a5dd0_len_114e0", func_80120000);
|
AnimatedMesh* func_80120000(s32 animModelID, s32 arg1, s32 arg2) {
|
||||||
|
AnimatedMesh* ret = (*gCurrentAnimMeshListPtr)[animModelID & ~0x800];
|
||||||
|
|
||||||
|
ret->unk_2D4 = arg2;
|
||||||
|
ret->unk_2D8 = arg1;
|
||||||
|
return ret;
|
||||||
|
}
|
||||||
|
|
||||||
INCLUDE_ASM(s32, "code_a5dd0_len_114e0", func_80120028);
|
INCLUDE_ASM(s32, "code_a5dd0_len_114e0", func_80120028);
|
||||||
|
|
||||||
|
@ -1,5 +1,3 @@
|
|||||||
#include "common.h"
|
#include "common.h"
|
||||||
|
|
||||||
INCLUDE_ASM(s32, "os/code_3bd20_len_c0", nuContQueryRead);
|
INCLUDE_ASM(s32, "os/code_3bd20_len_c0", nuContQueryRead);
|
||||||
|
|
||||||
INCLUDE_ASM(OSIntMask, "os/code_3bd20_len_c0", osSetIntMask, OSIntMask mask);
|
|
||||||
|
@ -3,5 +3,3 @@
|
|||||||
INCLUDE_ASM(void, "os/code_3bde0_len_3e0", osCreatePiManager, OSPri prio, OSMesgQueue* queue, OSMesg* mesg, s32 unk);
|
INCLUDE_ASM(void, "os/code_3bde0_len_3e0", osCreatePiManager, OSPri prio, OSMesgQueue* queue, OSMesg* mesg, s32 unk);
|
||||||
|
|
||||||
INCLUDE_ASM(s32, "os/code_3bde0_len_3e0", osEPiRawStartDma);
|
INCLUDE_ASM(s32, "os/code_3bde0_len_3e0", osEPiRawStartDma);
|
||||||
|
|
||||||
INCLUDE_ASM(s32, "os/code_3bde0_len_3e0", osEPiWriteIo, OSPiHandle* handle, u32 unk1, u32 unk2);
|
|
||||||
|
15
src/os/osEPiWriteIo.c
Normal file
15
src/os/osEPiWriteIo.c
Normal file
@ -0,0 +1,15 @@
|
|||||||
|
#include "common.h"
|
||||||
|
|
||||||
|
#ifdef MOVE_ISSUE
|
||||||
|
s32 osEPiWriteIo(OSPiHandle* handle, u32 devAddr, u32 data) {
|
||||||
|
register s32 ret;
|
||||||
|
|
||||||
|
osPiGetAccess();
|
||||||
|
ret = osEPiRawWriteIo(handle, devAddr, data);
|
||||||
|
osPiRelAccess();
|
||||||
|
|
||||||
|
return ret;
|
||||||
|
}
|
||||||
|
#else
|
||||||
|
INCLUDE_ASM(s32, "os/osEPiWriteIo", osEPiWriteIo, OSPiHandle* handle, u32 devAddr, u32 data);
|
||||||
|
#endif
|
@ -110,9 +110,9 @@ def diff_syms(qb, tb):
|
|||||||
else:
|
else:
|
||||||
larger = tb
|
larger = tb
|
||||||
smaller = qb
|
smaller = qb
|
||||||
|
|
||||||
len_ratio = len(smaller) / len(larger)
|
len_ratio = len(smaller) / len(larger)
|
||||||
|
|
||||||
if abs(len(larger) - len(smaller)) < 16 and is_zeros(larger[len(smaller):]):
|
if abs(len(larger) - len(smaller)) < 16 and is_zeros(larger[len(smaller):]):
|
||||||
len_ratio = 1
|
len_ratio = 1
|
||||||
|
|
||||||
|
2366
tools/splat.yaml
2366
tools/splat.yaml
File diff suppressed because it is too large
Load Diff
Loading…
Reference in New Issue
Block a user