mirror of
https://github.com/pmret/papermario.git
synced 2024-11-08 12:02:30 +01:00
hi
This commit is contained in:
parent
2de4001186
commit
ed816c640f
@ -1,24 +0,0 @@
|
||||
.set noat # allow manual use of $at
|
||||
.set noreorder # don't insert nops after branches
|
||||
|
||||
|
||||
glabel nuGfxFuncSet
|
||||
/* 03A650 8005F250 27BDFFE8 */ addiu $sp, $sp, -0x18
|
||||
/* 03A654 8005F254 AFB00010 */ sw $s0, 0x10($sp)
|
||||
/* 03A658 8005F258 AFBF0014 */ sw $ra, 0x14($sp)
|
||||
/* 03A65C 8005F25C 0C017CB4 */ jal nuGfxTaskAllEndWait
|
||||
/* 03A660 8005F260 0080802D */ daddu $s0, $a0, $zero
|
||||
/* 03A664 8005F264 0C018250 */ jal osSetIntMask
|
||||
/* 03A668 8005F268 24040001 */ addiu $a0, $zero, 1
|
||||
/* 03A66C 8005F26C 3C018009 */ lui $at, 0x8009
|
||||
/* 03A670 8005F270 AC303D10 */ sw $s0, 0x3d10($at)
|
||||
/* 03A674 8005F274 0C018250 */ jal osSetIntMask
|
||||
/* 03A678 8005F278 0040202D */ daddu $a0, $v0, $zero
|
||||
/* 03A67C 8005F27C 8FBF0014 */ lw $ra, 0x14($sp)
|
||||
/* 03A680 8005F280 8FB00010 */ lw $s0, 0x10($sp)
|
||||
/* 03A684 8005F284 03E00008 */ jr $ra
|
||||
/* 03A688 8005F288 27BD0018 */ addiu $sp, $sp, 0x18
|
||||
|
||||
/* 03A68C 8005F28C 00000000 */ nop
|
||||
|
||||
|
@ -1,24 +0,0 @@
|
||||
.set noat # allow manual use of $at
|
||||
.set noreorder # don't insert nops after branches
|
||||
|
||||
|
||||
glabel nuGfxPreNMIFuncSet
|
||||
/* 03A690 8005F290 27BDFFE8 */ addiu $sp, $sp, -0x18
|
||||
/* 03A694 8005F294 AFB00010 */ sw $s0, 0x10($sp)
|
||||
/* 03A698 8005F298 0080802D */ daddu $s0, $a0, $zero
|
||||
/* 03A69C 8005F29C AFBF0014 */ sw $ra, 0x14($sp)
|
||||
/* 03A6A0 8005F2A0 0C018250 */ jal osSetIntMask
|
||||
/* 03A6A4 8005F2A4 24040001 */ addiu $a0, $zero, 1
|
||||
/* 03A6A8 8005F2A8 3C018009 */ lui $at, 0x8009
|
||||
/* 03A6AC 8005F2AC AC303D14 */ sw $s0, 0x3d14($at)
|
||||
/* 03A6B0 8005F2B0 0C018250 */ jal osSetIntMask
|
||||
/* 03A6B4 8005F2B4 0040202D */ daddu $a0, $v0, $zero
|
||||
/* 03A6B8 8005F2B8 8FBF0014 */ lw $ra, 0x14($sp)
|
||||
/* 03A6BC 8005F2BC 8FB00010 */ lw $s0, 0x10($sp)
|
||||
/* 03A6C0 8005F2C0 03E00008 */ jr $ra
|
||||
/* 03A6C4 8005F2C4 27BD0018 */ addiu $sp, $sp, 0x18
|
||||
|
||||
/* 03A6C8 8005F2C8 00000000 */ nop
|
||||
/* 03A6CC 8005F2CC 00000000 */ nop
|
||||
|
||||
|
@ -1,17 +0,0 @@
|
||||
.set noat # allow manual use of $at
|
||||
.set noreorder # don't insert nops after branches
|
||||
|
||||
|
||||
glabel nuGfxTaskAllEndWait
|
||||
.L8005F2D0:
|
||||
/* 03A6D0 8005F2D0 3C02800A */ lui $v0, 0x800a
|
||||
/* 03A6D4 8005F2D4 8C42A618 */ lw $v0, -0x59e8($v0)
|
||||
/* 03A6D8 8005F2D8 1440FFFD */ bnez $v0, .L8005F2D0
|
||||
/* 03A6DC 8005F2DC 00000000 */ nop
|
||||
/* 03A6E0 8005F2E0 03E00008 */ jr $ra
|
||||
/* 03A6E4 8005F2E4 00000000 */ nop
|
||||
|
||||
/* 03A6E8 8005F2E8 00000000 */ nop
|
||||
/* 03A6EC 8005F2EC 00000000 */ nop
|
||||
|
||||
|
@ -1,20 +0,0 @@
|
||||
.set noat # allow manual use of $at
|
||||
.set noreorder # don't insert nops after branches
|
||||
|
||||
|
||||
glabel nuGfxDisplayOff
|
||||
/* 03A800 8005F400 27BDFFE8 */ addiu $sp, $sp, -0x18
|
||||
/* 03A804 8005F404 AFBF0010 */ sw $ra, 0x10($sp)
|
||||
/* 03A808 8005F408 3C01800A */ lui $at, 0x800a
|
||||
/* 03A80C 8005F40C AC20A5F8 */ sw $zero, -0x5a08($at)
|
||||
/* 03A810 8005F410 0C019CE0 */ jal osViBlack
|
||||
/* 03A814 8005F414 24040001 */ addiu $a0, $zero, 1
|
||||
/* 03A818 8005F418 8FBF0010 */ lw $ra, 0x10($sp)
|
||||
/* 03A81C 8005F41C 03E00008 */ jr $ra
|
||||
/* 03A820 8005F420 27BD0018 */ addiu $sp, $sp, 0x18
|
||||
|
||||
/* 03A824 8005F424 00000000 */ nop
|
||||
/* 03A828 8005F428 00000000 */ nop
|
||||
/* 03A82C 8005F42C 00000000 */ nop
|
||||
|
||||
|
@ -1,16 +0,0 @@
|
||||
.set noat # allow manual use of $at
|
||||
.set noreorder # don't insert nops after branches
|
||||
|
||||
|
||||
glabel nuGfxDisplayOn
|
||||
/* 03A830 8005F430 24020080 */ addiu $v0, $zero, 0x80
|
||||
/* 03A834 8005F434 3C01800A */ lui $at, 0x800a
|
||||
/* 03A838 8005F438 AC22A5F8 */ sw $v0, -0x5a08($at)
|
||||
/* 03A83C 8005F43C 03E00008 */ jr $ra
|
||||
/* 03A840 8005F440 00000000 */ nop
|
||||
|
||||
/* 03A844 8005F444 00000000 */ nop
|
||||
/* 03A848 8005F448 00000000 */ nop
|
||||
/* 03A84C 8005F44C 00000000 */ nop
|
||||
|
||||
|
@ -1,22 +0,0 @@
|
||||
.set noat # allow manual use of $at
|
||||
.set noreorder # don't insert nops after branches
|
||||
|
||||
|
||||
glabel contPakFileDelete
|
||||
/* 03AC64 8005F864 27BDFFE0 */ addiu $sp, $sp, -0x20
|
||||
/* 03AC68 8005F868 AFBF0018 */ sw $ra, 0x18($sp)
|
||||
/* 03AC6C 8005F86C 8C82000C */ lw $v0, 0xc($a0)
|
||||
/* 03AC70 8005F870 3C058009 */ lui $a1, 0x8009
|
||||
/* 03AC74 8005F874 94A53CA0 */ lhu $a1, 0x3ca0($a1)
|
||||
/* 03AC78 8005F878 3C068009 */ lui $a2, 0x8009
|
||||
/* 03AC7C 8005F87C 8CC63CA4 */ lw $a2, 0x3ca4($a2)
|
||||
/* 03AC80 8005F880 8C430008 */ lw $v1, 8($v0)
|
||||
/* 03AC84 8005F884 8C440000 */ lw $a0, ($v0)
|
||||
/* 03AC88 8005F888 AFA30010 */ sw $v1, 0x10($sp)
|
||||
/* 03AC8C 8005F88C 8C840000 */ lw $a0, ($a0)
|
||||
/* 03AC90 8005F890 0C01A170 */ jal osPfsDeleteFile
|
||||
/* 03AC94 8005F894 8C470004 */ lw $a3, 4($v0)
|
||||
/* 03AC98 8005F898 8FBF0018 */ lw $ra, 0x18($sp)
|
||||
/* 03AC9C 8005F89C 03E00008 */ jr $ra
|
||||
/* 03ACA0 8005F8A0 27BD0020 */ addiu $sp, $sp, 0x20
|
||||
|
@ -1,17 +0,0 @@
|
||||
.set noat # allow manual use of $at
|
||||
.set noreorder # don't insert nops after branches
|
||||
|
||||
|
||||
glabel contPakFileNum
|
||||
/* 03ACD0 8005F8D0 27BDFFE8 */ addiu $sp, $sp, -0x18
|
||||
/* 03ACD4 8005F8D4 AFBF0010 */ sw $ra, 0x10($sp)
|
||||
/* 03ACD8 8005F8D8 8C82000C */ lw $v0, 0xc($a0)
|
||||
/* 03ACDC 8005F8DC 8C430000 */ lw $v1, ($v0)
|
||||
/* 03ACE0 8005F8E0 8C450004 */ lw $a1, 4($v0)
|
||||
/* 03ACE4 8005F8E4 8C460008 */ lw $a2, 8($v0)
|
||||
/* 03ACE8 8005F8E8 0C01A424 */ jal osPfsNumFiles
|
||||
/* 03ACEC 8005F8EC 8C640000 */ lw $a0, ($v1)
|
||||
/* 03ACF0 8005F8F0 8FBF0010 */ lw $ra, 0x10($sp)
|
||||
/* 03ACF4 8005F8F4 03E00008 */ jr $ra
|
||||
/* 03ACF8 8005F8F8 27BD0018 */ addiu $sp, $sp, 0x18
|
||||
|
@ -1,52 +0,0 @@
|
||||
.set noat # allow manual use of $at
|
||||
.set noreorder # don't insert nops after branches
|
||||
|
||||
|
||||
glabel contPakFileOpen
|
||||
/* 03ABB0 8005F7B0 27BDFFD0 */ addiu $sp, $sp, -0x30
|
||||
/* 03ABB4 8005F7B4 AFBF002C */ sw $ra, 0x2c($sp)
|
||||
/* 03ABB8 8005F7B8 AFB20028 */ sw $s2, 0x28($sp)
|
||||
/* 03ABBC 8005F7BC AFB10024 */ sw $s1, 0x24($sp)
|
||||
/* 03ABC0 8005F7C0 AFB00020 */ sw $s0, 0x20($sp)
|
||||
/* 03ABC4 8005F7C4 8C90000C */ lw $s0, 0xc($a0)
|
||||
/* 03ABC8 8005F7C8 3C058009 */ lui $a1, 0x8009
|
||||
/* 03ABCC 8005F7CC 94A53CA0 */ lhu $a1, 0x3ca0($a1)
|
||||
/* 03ABD0 8005F7D0 3C068009 */ lui $a2, 0x8009
|
||||
/* 03ABD4 8005F7D4 8CC63CA4 */ lw $a2, 0x3ca4($a2)
|
||||
/* 03ABD8 8005F7D8 8E110000 */ lw $s1, ($s0)
|
||||
/* 03ABDC 8005F7DC 8E020008 */ lw $v0, 8($s0)
|
||||
/* 03ABE0 8005F7E0 26320004 */ addiu $s2, $s1, 4
|
||||
/* 03ABE4 8005F7E4 AFA20010 */ sw $v0, 0x10($sp)
|
||||
/* 03ABE8 8005F7E8 AFB20014 */ sw $s2, 0x14($sp)
|
||||
/* 03ABEC 8005F7EC 8E240000 */ lw $a0, ($s1)
|
||||
/* 03ABF0 8005F7F0 0C01A370 */ jal osPfsFindFile
|
||||
/* 03ABF4 8005F7F4 8E070004 */ lw $a3, 4($s0)
|
||||
/* 03ABF8 8005F7F8 0040202D */ daddu $a0, $v0, $zero
|
||||
/* 03ABFC 8005F7FC 24020005 */ addiu $v0, $zero, 5
|
||||
/* 03AC00 8005F800 14820011 */ bne $a0, $v0, .L8005F848
|
||||
/* 03AC04 8005F804 24020001 */ addiu $v0, $zero, 1
|
||||
/* 03AC08 8005F808 8E030010 */ lw $v1, 0x10($s0)
|
||||
/* 03AC0C 8005F80C 1462000E */ bne $v1, $v0, .L8005F848
|
||||
/* 03AC10 8005F810 00000000 */ nop
|
||||
/* 03AC14 8005F814 8E020008 */ lw $v0, 8($s0)
|
||||
/* 03AC18 8005F818 3C058009 */ lui $a1, 0x8009
|
||||
/* 03AC1C 8005F81C 94A53CA0 */ lhu $a1, 0x3ca0($a1)
|
||||
/* 03AC20 8005F820 3C068009 */ lui $a2, 0x8009
|
||||
/* 03AC24 8005F824 8CC63CA4 */ lw $a2, 0x3ca4($a2)
|
||||
/* 03AC28 8005F828 AFA20010 */ sw $v0, 0x10($sp)
|
||||
/* 03AC2C 8005F82C 8E02000C */ lw $v0, 0xc($s0)
|
||||
/* 03AC30 8005F830 AFB20018 */ sw $s2, 0x18($sp)
|
||||
/* 03AC34 8005F834 AFA20014 */ sw $v0, 0x14($sp)
|
||||
/* 03AC38 8005F838 8E240000 */ lw $a0, ($s1)
|
||||
/* 03AC3C 8005F83C 0C01A064 */ jal osPfsAllocateFile
|
||||
/* 03AC40 8005F840 8E070004 */ lw $a3, 4($s0)
|
||||
/* 03AC44 8005F844 0040202D */ daddu $a0, $v0, $zero
|
||||
.L8005F848:
|
||||
/* 03AC48 8005F848 8FBF002C */ lw $ra, 0x2c($sp)
|
||||
/* 03AC4C 8005F84C 8FB20028 */ lw $s2, 0x28($sp)
|
||||
/* 03AC50 8005F850 8FB10024 */ lw $s1, 0x24($sp)
|
||||
/* 03AC54 8005F854 8FB00020 */ lw $s0, 0x20($sp)
|
||||
/* 03AC58 8005F858 0080102D */ daddu $v0, $a0, $zero
|
||||
/* 03AC5C 8005F85C 03E00008 */ jr $ra
|
||||
/* 03AC60 8005F860 27BD0030 */ addiu $sp, $sp, 0x30
|
||||
|
@ -1,22 +0,0 @@
|
||||
.set noat # allow manual use of $at
|
||||
.set noreorder # don't insert nops after branches
|
||||
|
||||
|
||||
glabel contPakFileReadWrite
|
||||
/* 03AB70 8005F770 27BDFFE0 */ addiu $sp, $sp, -0x20
|
||||
/* 03AB74 8005F774 AFBF0018 */ sw $ra, 0x18($sp)
|
||||
/* 03AB78 8005F778 8C83000C */ lw $v1, 0xc($a0)
|
||||
/* 03AB7C 8005F77C 8C620008 */ lw $v0, 8($v1)
|
||||
/* 03AB80 8005F780 8C650000 */ lw $a1, ($v1)
|
||||
/* 03AB84 8005F784 9066000C */ lbu $a2, 0xc($v1)
|
||||
/* 03AB88 8005F788 AFA20010 */ sw $v0, 0x10($sp)
|
||||
/* 03AB8C 8005F78C 8C620010 */ lw $v0, 0x10($v1)
|
||||
/* 03AB90 8005F790 AFA20014 */ sw $v0, 0x14($sp)
|
||||
/* 03AB94 8005F794 8CA40000 */ lw $a0, ($a1)
|
||||
/* 03AB98 8005F798 8CA50004 */ lw $a1, 4($a1)
|
||||
/* 03AB9C 8005F79C 0C01A1F8 */ jal osPfsReadWriteFile
|
||||
/* 03ABA0 8005F7A0 8C670004 */ lw $a3, 4($v1)
|
||||
/* 03ABA4 8005F7A4 8FBF0018 */ lw $ra, 0x18($sp)
|
||||
/* 03ABA8 8005F7A8 03E00008 */ jr $ra
|
||||
/* 03ABAC 8005F7AC 27BD0020 */ addiu $sp, $sp, 0x20
|
||||
|
@ -1,17 +0,0 @@
|
||||
.set noat # allow manual use of $at
|
||||
.set noreorder # don't insert nops after branches
|
||||
|
||||
|
||||
glabel contPakFileState
|
||||
/* 03ACA4 8005F8A4 27BDFFE8 */ addiu $sp, $sp, -0x18
|
||||
/* 03ACA8 8005F8A8 AFBF0010 */ sw $ra, 0x10($sp)
|
||||
/* 03ACAC 8005F8AC 8C83000C */ lw $v1, 0xc($a0)
|
||||
/* 03ACB0 8005F8B0 8C620000 */ lw $v0, ($v1)
|
||||
/* 03ACB4 8005F8B4 8C660004 */ lw $a2, 4($v1)
|
||||
/* 03ACB8 8005F8B8 8C440000 */ lw $a0, ($v0)
|
||||
/* 03ACBC 8005F8BC 0C01A308 */ jal osPfsFileState
|
||||
/* 03ACC0 8005F8C0 8C450004 */ lw $a1, 4($v0)
|
||||
/* 03ACC4 8005F8C4 8FBF0010 */ lw $ra, 0x10($sp)
|
||||
/* 03ACC8 8005F8C8 03E00008 */ jr $ra
|
||||
/* 03ACCC 8005F8CC 27BD0018 */ addiu $sp, $sp, 0x18
|
||||
|
@ -1,16 +0,0 @@
|
||||
.set noat # allow manual use of $at
|
||||
.set noreorder # don't insert nops after branches
|
||||
|
||||
|
||||
glabel contPakFree
|
||||
/* 03AB48 8005F748 27BDFFE8 */ addiu $sp, $sp, -0x18
|
||||
/* 03AB4C 8005F74C AFBF0010 */ sw $ra, 0x10($sp)
|
||||
/* 03AB50 8005F750 8C85000C */ lw $a1, 0xc($a0)
|
||||
/* 03AB54 8005F754 8CA20000 */ lw $v0, ($a1)
|
||||
/* 03AB58 8005F758 8C440000 */ lw $a0, ($v0)
|
||||
/* 03AB5C 8005F75C 0C01A3E0 */ jal osPfsFreeBlocks
|
||||
/* 03AB60 8005F760 24A50004 */ addiu $a1, $a1, 4
|
||||
/* 03AB64 8005F764 8FBF0010 */ lw $ra, 0x10($sp)
|
||||
/* 03AB68 8005F768 03E00008 */ jr $ra
|
||||
/* 03AB6C 8005F76C 27BD0018 */ addiu $sp, $sp, 0x18
|
||||
|
@ -1,27 +0,0 @@
|
||||
.set noat # allow manual use of $at
|
||||
.set noreorder # don't insert nops after branches
|
||||
|
||||
|
||||
glabel contPakOpen
|
||||
/* 03AAF8 8005F6F8 27BDFFE8 */ addiu $sp, $sp, -0x18
|
||||
/* 03AAFC 8005F6FC AFBF0014 */ sw $ra, 0x14($sp)
|
||||
/* 03AB00 8005F700 AFB00010 */ sw $s0, 0x10($sp)
|
||||
/* 03AB04 8005F704 8C90000C */ lw $s0, 0xc($a0)
|
||||
/* 03AB08 8005F708 8E050000 */ lw $a1, ($s0)
|
||||
/* 03AB0C 8005F70C AE00000C */ sw $zero, 0xc($s0)
|
||||
/* 03AB10 8005F710 8CA60008 */ lw $a2, 8($a1)
|
||||
/* 03AB14 8005F714 3C04800E */ lui $a0, 0x800e
|
||||
/* 03AB18 8005F718 2484AC78 */ addiu $a0, $a0, -0x5388
|
||||
/* 03AB1C 8005F71C 0C01A464 */ jal osPfsInitPak
|
||||
/* 03AB20 8005F720 00000000 */ nop
|
||||
/* 03AB24 8005F724 0040182D */ daddu $v1, $v0, $zero
|
||||
/* 03AB28 8005F728 14600002 */ bnez $v1, .L8005F734
|
||||
/* 03AB2C 8005F72C 24020001 */ addiu $v0, $zero, 1
|
||||
/* 03AB30 8005F730 AE02000C */ sw $v0, 0xc($s0)
|
||||
.L8005F734:
|
||||
/* 03AB34 8005F734 8FBF0014 */ lw $ra, 0x14($sp)
|
||||
/* 03AB38 8005F738 8FB00010 */ lw $s0, 0x10($sp)
|
||||
/* 03AB3C 8005F73C 0060102D */ daddu $v0, $v1, $zero
|
||||
/* 03AB40 8005F740 03E00008 */ jr $ra
|
||||
/* 03AB44 8005F744 27BD0018 */ addiu $sp, $sp, 0x18
|
||||
|
@ -1,15 +0,0 @@
|
||||
.set noat # allow manual use of $at
|
||||
.set noreorder # don't insert nops after branches
|
||||
|
||||
|
||||
glabel contPakRepairId
|
||||
/* 03ACFC 8005F8FC 27BDFFE8 */ addiu $sp, $sp, -0x18
|
||||
/* 03AD00 8005F900 AFBF0010 */ sw $ra, 0x10($sp)
|
||||
/* 03AD04 8005F904 8C82000C */ lw $v0, 0xc($a0)
|
||||
/* 03AD08 8005F908 0C01A518 */ jal osPfsRepairId
|
||||
/* 03AD0C 8005F90C 8C440000 */ lw $a0, ($v0)
|
||||
/* 03AD10 8005F910 8FBF0010 */ lw $ra, 0x10($sp)
|
||||
/* 03AD14 8005F914 03E00008 */ jr $ra
|
||||
/* 03AD18 8005F918 27BD0018 */ addiu $sp, $sp, 0x18
|
||||
|
||||
/* 03AD1C 8005F91C 00000000 */ nop
|
@ -1,30 +0,0 @@
|
||||
.set noat # allow manual use of $at
|
||||
.set noreorder # don't insert nops after branches
|
||||
|
||||
|
||||
glabel nuContDataGet
|
||||
/* 03AA50 8005F650 27BDFFE0 */ addiu $sp, $sp, -0x20
|
||||
/* 03AA54 8005F654 AFB10014 */ sw $s1, 0x14($sp)
|
||||
/* 03AA58 8005F658 0080882D */ daddu $s1, $a0, $zero
|
||||
/* 03AA5C 8005F65C AFB00010 */ sw $s0, 0x10($sp)
|
||||
/* 03AA60 8005F660 AFBF0018 */ sw $ra, 0x18($sp)
|
||||
/* 03AA64 8005F664 0C018183 */ jal nuContDataClose
|
||||
/* 03AA68 8005F668 00A0802D */ daddu $s0, $a1, $zero
|
||||
/* 03AA6C 8005F66C 00102040 */ sll $a0, $s0, 1
|
||||
/* 03AA70 8005F670 00902021 */ addu $a0, $a0, $s0
|
||||
/* 03AA74 8005F674 00042040 */ sll $a0, $a0, 1
|
||||
/* 03AA78 8005F678 3C02800B */ lui $v0, 0x800b
|
||||
/* 03AA7C 8005F67C 24421D68 */ addiu $v0, $v0, 0x1d68
|
||||
/* 03AA80 8005F680 00822021 */ addu $a0, $a0, $v0
|
||||
/* 03AA84 8005F684 0220282D */ daddu $a1, $s1, $zero
|
||||
/* 03AA88 8005F688 0C019194 */ jal bcopy
|
||||
/* 03AA8C 8005F68C 24060006 */ addiu $a2, $zero, 6
|
||||
/* 03AA90 8005F690 0C01818D */ jal nuContDataOpen
|
||||
/* 03AA94 8005F694 00000000 */ nop
|
||||
/* 03AA98 8005F698 8FBF0018 */ lw $ra, 0x18($sp)
|
||||
/* 03AA9C 8005F69C 8FB10014 */ lw $s1, 0x14($sp)
|
||||
/* 03AAA0 8005F6A0 8FB00010 */ lw $s0, 0x10($sp)
|
||||
/* 03AAA4 8005F6A4 03E00008 */ jr $ra
|
||||
/* 03AAA8 8005F6A8 27BD0020 */ addiu $sp, $sp, 0x20
|
||||
|
||||
/* 03AAAC 8005F6AC 00000000 */ nop
|
@ -1,22 +0,0 @@
|
||||
.set noat # allow manual use of $at
|
||||
.set noreorder # don't insert nops after branches
|
||||
|
||||
|
||||
glabel nuContInit
|
||||
/* 03AA10 8005F610 27BDFFE8 */ addiu $sp, $sp, -0x18
|
||||
/* 03AA14 8005F614 AFBF0014 */ sw $ra, 0x14($sp)
|
||||
/* 03AA18 8005F618 0C00B38C */ jal nuSiMgrInit
|
||||
/* 03AA1C 8005F61C AFB00010 */ sw $s0, 0x10($sp)
|
||||
/* 03AA20 8005F620 0C018144 */ jal nuContMgrInit
|
||||
/* 03AA24 8005F624 0040802D */ daddu $s0, $v0, $zero
|
||||
/* 03AA28 8005F628 0C017DAC */ jal nuContPakMgrInit
|
||||
/* 03AA2C 8005F62C 00000000 */ nop
|
||||
/* 03AA30 8005F630 0C017F23 */ jal nuContRmbMgrInit
|
||||
/* 03AA34 8005F634 00000000 */ nop
|
||||
/* 03AA38 8005F638 320200FF */ andi $v0, $s0, 0xff
|
||||
/* 03AA3C 8005F63C 8FBF0014 */ lw $ra, 0x14($sp)
|
||||
/* 03AA40 8005F640 8FB00010 */ lw $s0, 0x10($sp)
|
||||
/* 03AA44 8005F644 03E00008 */ jr $ra
|
||||
/* 03AA48 8005F648 27BD0018 */ addiu $sp, $sp, 0x18
|
||||
|
||||
/* 03AA4C 8005F64C 00000000 */ nop
|
@ -1,15 +0,0 @@
|
||||
.set noat # allow manual use of $at
|
||||
.set noreorder # don't insert nops after branches
|
||||
|
||||
|
||||
glabel nuContPakMgrInit
|
||||
/* 03AAB0 8005F6B0 27BDFFE8 */ addiu $sp, $sp, -0x18
|
||||
/* 03AAB4 8005F6B4 3C048009 */ lui $a0, 0x8009
|
||||
/* 03AAB8 8005F6B8 24843CD0 */ addiu $a0, $a0, 0x3cd0
|
||||
/* 03AABC 8005F6BC AFBF0010 */ sw $ra, 0x10($sp)
|
||||
/* 03AAC0 8005F6C0 0C0180FC */ jal nuSiCallBackAdd
|
||||
/* 03AAC4 8005F6C4 00000000 */ nop
|
||||
/* 03AAC8 8005F6C8 8FBF0010 */ lw $ra, 0x10($sp)
|
||||
/* 03AACC 8005F6CC 03E00008 */ jr $ra
|
||||
/* 03AAD0 8005F6D0 27BD0018 */ addiu $sp, $sp, 0x18
|
||||
|
@ -1,15 +0,0 @@
|
||||
.set noat # allow manual use of $at
|
||||
.set noreorder # don't insert nops after branches
|
||||
|
||||
|
||||
glabel nuContPakMgrRemove
|
||||
/* 03AAD4 8005F6D4 27BDFFE8 */ addiu $sp, $sp, -0x18
|
||||
/* 03AAD8 8005F6D8 3C048009 */ lui $a0, 0x8009
|
||||
/* 03AADC 8005F6DC 24843CD0 */ addiu $a0, $a0, 0x3cd0
|
||||
/* 03AAE0 8005F6E0 AFBF0010 */ sw $ra, 0x10($sp)
|
||||
/* 03AAE4 8005F6E4 0C018124 */ jal nuSiCallBackRemove
|
||||
/* 03AAE8 8005F6E8 00000000 */ nop
|
||||
/* 03AAEC 8005F6EC 8FBF0010 */ lw $ra, 0x10($sp)
|
||||
/* 03AAF0 8005F6F0 03E00008 */ jr $ra
|
||||
/* 03AAF4 8005F6F4 27BD0018 */ addiu $sp, $sp, 0x18
|
||||
|
@ -1,50 +0,0 @@
|
||||
.set noat # allow manual use of $at
|
||||
.set noreorder # don't insert nops after branches
|
||||
|
||||
|
||||
glabel nuGfxInit
|
||||
/* 03A960 8005F560 27BDF7E8 */ addiu $sp, $sp, -0x818
|
||||
/* 03A964 8005F564 AFBF0810 */ sw $ra, 0x810($sp)
|
||||
/* 03A968 8005F568 0C01807C */ jal nuGfxThreadStart
|
||||
/* 03A96C 8005F56C 00000000 */ nop
|
||||
/* 03A970 8005F570 3C048009 */ lui $a0, 0x8009
|
||||
/* 03A974 8005F574 24843BA8 */ addiu $a0, $a0, 0x3ba8
|
||||
/* 03A978 8005F578 0C017CBC */ jal nuGfxSetCfb
|
||||
/* 03A97C 8005F57C 24050003 */ addiu $a1, $zero, 3
|
||||
/* 03A980 8005F580 3C028000 */ lui $v0, 0x8000
|
||||
/* 03A984 8005F584 34420400 */ ori $v0, $v0, 0x400
|
||||
/* 03A988 8005F588 3C048006 */ lui $a0, 0x8006
|
||||
/* 03A98C 8005F58C 24840350 */ addiu $a0, $a0, 0x350
|
||||
/* 03A990 8005F590 3C01800A */ lui $at, 0x800a
|
||||
/* 03A994 8005F594 AC22A5DC */ sw $v0, -0x5a24($at)
|
||||
/* 03A998 8005F598 0C0180C4 */ jal nuGfxSwapCfbFuncSet
|
||||
/* 03A99C 8005F59C 00000000 */ nop
|
||||
/* 03A9A0 8005F5A0 3C028009 */ lui $v0, 0x8009
|
||||
/* 03A9A4 8005F5A4 24423BA0 */ addiu $v0, $v0, 0x3ba0
|
||||
/* 03A9A8 8005F5A8 3C01800A */ lui $at, 0x800a
|
||||
/* 03A9AC 8005F5AC AC22A610 */ sw $v0, -0x59f0($at)
|
||||
/* 03A9B0 8005F5B0 0C00B2CE */ jal nuGfxTaskMgrInit
|
||||
/* 03A9B4 8005F5B4 00000000 */ nop
|
||||
/* 03A9B8 8005F5B8 27A40010 */ addiu $a0, $sp, 0x10
|
||||
/* 03A9BC 8005F5BC 27A50028 */ addiu $a1, $sp, 0x28
|
||||
/* 03A9C0 8005F5C0 00A42823 */ subu $a1, $a1, $a0
|
||||
/* 03A9C4 8005F5C4 3C02DE00 */ lui $v0, 0xde00
|
||||
/* 03A9C8 8005F5C8 AFA20010 */ sw $v0, 0x10($sp)
|
||||
/* 03A9CC 8005F5CC 3C020009 */ lui $v0, 9
|
||||
/* 03A9D0 8005F5D0 24423BB8 */ addiu $v0, $v0, 0x3bb8
|
||||
/* 03A9D4 8005F5D4 AC820004 */ sw $v0, 4($a0)
|
||||
/* 03A9D8 8005F5D8 3C02E900 */ lui $v0, 0xe900
|
||||
/* 03A9DC 8005F5DC AFA20018 */ sw $v0, 0x18($sp)
|
||||
/* 03A9E0 8005F5E0 3C02DF00 */ lui $v0, 0xdf00
|
||||
/* 03A9E4 8005F5E4 0000302D */ daddu $a2, $zero, $zero
|
||||
/* 03A9E8 8005F5E8 00C0382D */ daddu $a3, $a2, $zero
|
||||
/* 03A9EC 8005F5EC AFA0001C */ sw $zero, 0x1c($sp)
|
||||
/* 03A9F0 8005F5F0 AFA20020 */ sw $v0, 0x20($sp)
|
||||
/* 03A9F4 8005F5F4 0C00B331 */ jal nuGfxTaskStart
|
||||
/* 03A9F8 8005F5F8 AFA00024 */ sw $zero, 0x24($sp)
|
||||
/* 03A9FC 8005F5FC 0C017CB4 */ jal nuGfxTaskAllEndWait
|
||||
/* 03AA00 8005F600 00000000 */ nop
|
||||
/* 03AA04 8005F604 8FBF0810 */ lw $ra, 0x810($sp)
|
||||
/* 03AA08 8005F608 03E00008 */ jr $ra
|
||||
/* 03AA0C 8005F60C 27BD0818 */ addiu $sp, $sp, 0x818
|
||||
|
@ -1,22 +0,0 @@
|
||||
.set noat # allow manual use of $at
|
||||
.set noreorder # don't insert nops after branches
|
||||
|
||||
|
||||
glabel nuPiInit
|
||||
/* 03A850 8005F450 27BDFFE8 */ addiu $sp, $sp, -0x18
|
||||
/* 03A854 8005F454 24040096 */ addiu $a0, $zero, 0x96
|
||||
/* 03A858 8005F458 3C05800B */ lui $a1, 0x800b
|
||||
/* 03A85C 8005F45C 24A5C5D0 */ addiu $a1, $a1, -0x3a30
|
||||
/* 03A860 8005F460 3C06800B */ lui $a2, 0x800b
|
||||
/* 03A864 8005F464 24C6C5E8 */ addiu $a2, $a2, -0x3a18
|
||||
/* 03A868 8005F468 AFBF0010 */ sw $ra, 0x10($sp)
|
||||
/* 03A86C 8005F46C 0C018278 */ jal osCreatePiManager
|
||||
/* 03A870 8005F470 24070032 */ addiu $a3, $zero, 0x32
|
||||
/* 03A874 8005F474 0C0183C4 */ jal osCartRomInit
|
||||
/* 03A878 8005F478 00000000 */ nop
|
||||
/* 03A87C 8005F47C 8FBF0010 */ lw $ra, 0x10($sp)
|
||||
/* 03A880 8005F480 3C01800A */ lui $at, 0x800a
|
||||
/* 03A884 8005F484 AC22A638 */ sw $v0, -0x59c8($at)
|
||||
/* 03A888 8005F488 03E00008 */ jr $ra
|
||||
/* 03A88C 8005F48C 27BD0018 */ addiu $sp, $sp, 0x18
|
||||
|
@ -1,61 +0,0 @@
|
||||
.set noat # allow manual use of $at
|
||||
.set noreorder # don't insert nops after branches
|
||||
|
||||
|
||||
glabel nuPiReadRom
|
||||
/* 03A890 8005F490 27BDFFA0 */ addiu $sp, $sp, -0x60
|
||||
/* 03A894 8005F494 AFB30054 */ sw $s3, 0x54($sp)
|
||||
/* 03A898 8005F498 0080982D */ daddu $s3, $a0, $zero
|
||||
/* 03A89C 8005F49C AFB20050 */ sw $s2, 0x50($sp)
|
||||
/* 03A8A0 8005F4A0 00A0902D */ daddu $s2, $a1, $zero
|
||||
/* 03A8A4 8005F4A4 AFB1004C */ sw $s1, 0x4c($sp)
|
||||
/* 03A8A8 8005F4A8 00C0882D */ daddu $s1, $a2, $zero
|
||||
/* 03A8AC 8005F4AC AFB00048 */ sw $s0, 0x48($sp)
|
||||
/* 03A8B0 8005F4B0 27B00028 */ addiu $s0, $sp, 0x28
|
||||
/* 03A8B4 8005F4B4 0200202D */ daddu $a0, $s0, $zero
|
||||
/* 03A8B8 8005F4B8 27A50040 */ addiu $a1, $sp, 0x40
|
||||
/* 03A8BC 8005F4BC AFBF0058 */ sw $ra, 0x58($sp)
|
||||
/* 03A8C0 8005F4C0 0C019560 */ jal osCreateMesgQueue
|
||||
/* 03A8C4 8005F4C4 24060001 */ addiu $a2, $zero, 1
|
||||
/* 03A8C8 8005F4C8 0240202D */ daddu $a0, $s2, $zero
|
||||
/* 03A8CC 8005F4CC 0220282D */ daddu $a1, $s1, $zero
|
||||
/* 03A8D0 8005F4D0 A3A00012 */ sb $zero, 0x12($sp)
|
||||
/* 03A8D4 8005F4D4 0C0185C8 */ jal osInvalDCache
|
||||
/* 03A8D8 8005F4D8 AFB00014 */ sw $s0, 0x14($sp)
|
||||
/* 03A8DC 8005F4DC 0240202D */ daddu $a0, $s2, $zero
|
||||
/* 03A8E0 8005F4E0 0C0185F4 */ jal osInvalICache
|
||||
/* 03A8E4 8005F4E4 0220282D */ daddu $a1, $s1, $zero
|
||||
/* 03A8E8 8005F4E8 12200015 */ beqz $s1, .L8005F540
|
||||
/* 03A8EC 8005F4EC 00000000 */ nop
|
||||
.L8005F4F0:
|
||||
/* 03A8F0 8005F4F0 2E224001 */ sltiu $v0, $s1, 0x4001
|
||||
/* 03A8F4 8005F4F4 14400002 */ bnez $v0, .L8005F500
|
||||
/* 03A8F8 8005F4F8 0220802D */ daddu $s0, $s1, $zero
|
||||
/* 03A8FC 8005F4FC 24104000 */ addiu $s0, $zero, 0x4000
|
||||
.L8005F500:
|
||||
/* 03A900 8005F500 27A50010 */ addiu $a1, $sp, 0x10
|
||||
/* 03A904 8005F504 3C04800A */ lui $a0, 0x800a
|
||||
/* 03A908 8005F508 8C84A638 */ lw $a0, -0x59c8($a0)
|
||||
/* 03A90C 8005F50C 0000302D */ daddu $a2, $zero, $zero
|
||||
/* 03A910 8005F510 AFB20018 */ sw $s2, 0x18($sp)
|
||||
/* 03A914 8005F514 AFB3001C */ sw $s3, 0x1c($sp)
|
||||
/* 03A918 8005F518 0C018388 */ jal osEPiStartDma
|
||||
/* 03A91C 8005F51C AFB00020 */ sw $s0, 0x20($sp)
|
||||
/* 03A920 8005F520 27A40028 */ addiu $a0, $sp, 0x28
|
||||
/* 03A924 8005F524 27A50040 */ addiu $a1, $sp, 0x40
|
||||
/* 03A928 8005F528 0C0195BC */ jal osRecvMesg
|
||||
/* 03A92C 8005F52C 24060001 */ addiu $a2, $zero, 1
|
||||
/* 03A930 8005F530 02709821 */ addu $s3, $s3, $s0
|
||||
/* 03A934 8005F534 02308823 */ subu $s1, $s1, $s0
|
||||
/* 03A938 8005F538 1620FFED */ bnez $s1, .L8005F4F0
|
||||
/* 03A93C 8005F53C 02509021 */ addu $s2, $s2, $s0
|
||||
.L8005F540:
|
||||
/* 03A940 8005F540 8FBF0058 */ lw $ra, 0x58($sp)
|
||||
/* 03A944 8005F544 8FB30054 */ lw $s3, 0x54($sp)
|
||||
/* 03A948 8005F548 8FB20050 */ lw $s2, 0x50($sp)
|
||||
/* 03A94C 8005F54C 8FB1004C */ lw $s1, 0x4c($sp)
|
||||
/* 03A950 8005F550 8FB00048 */ lw $s0, 0x48($sp)
|
||||
/* 03A954 8005F554 03E00008 */ jr $ra
|
||||
/* 03A958 8005F558 27BD0060 */ addiu $sp, $sp, 0x60
|
||||
|
||||
/* 03A95C 8005F55C 00000000 */ nop
|
1052
include/nu/nusys.h
Normal file
1052
include/nu/nusys.h
Normal file
File diff suppressed because it is too large
Load Diff
@ -91,4 +91,7 @@ extern UNK_TYPE D_80108558;
|
||||
extern UNK_TYPE D_8010F250; // play_sound state struct?
|
||||
extern s8 D_8010EBB0;
|
||||
|
||||
//nusys
|
||||
extern OSPiHandle* carthandle;
|
||||
|
||||
#endif
|
||||
|
@ -52,12 +52,18 @@ SECTIONS
|
||||
build/src/code_39210_len_aa0.o(.text);
|
||||
build/src/os/code_39cb0_len_100.o(.text);
|
||||
build/src/os/code_39db0_len_8a0.o(.text);
|
||||
build/src/os/code_3a650_len_40.o(.text);
|
||||
build/src/os/code_3a690_len_40.o(.text);
|
||||
build/src/os/code_3a6d0_len_20.o(.text);
|
||||
build/src/os/code_3a6f0_len_110.o(.text);
|
||||
build/src/os/code_3a800_len_30.o(.text);
|
||||
build/src/os/code_3a830_len_20.o(.text);
|
||||
build/src/os/nuGfxFuncSet.o(.text);
|
||||
build/src/os/nuGfxPreNMIFuncSet.o(.text);
|
||||
build/src/os/nuGfxTaskAllEndWait.o(.text);
|
||||
build/src/os/nuGfxSetCfb.o(.text);
|
||||
build/src/os/nuGfxDisplayOff.o(.text);
|
||||
build/src/os/nuGfxDisplayOn.o(.text);
|
||||
build/src/os/nuPiInit.o(.text);
|
||||
build/src/os/nuPiReadRom.o(.text);
|
||||
build/src/os/nuGfxInit.o(.text);
|
||||
build/src/os/nuContInit.o(.text);
|
||||
build/src/os/nuContDataGet.o(.text);
|
||||
build/src/os/nuContPakMgr.o(.text);
|
||||
build/src/os/code_3a850_le_a40.o(.text);
|
||||
build/src/os/code_3b290_len_100.o(.text);
|
||||
build/src/os/code_3b390_len_110.o(.text);
|
||||
|
@ -1,3 +0,0 @@
|
||||
#include "common.h"
|
||||
|
||||
INCLUDE_API_ASM("os/code_3a650_len_40", nuGfxFuncSet);
|
@ -1,3 +0,0 @@
|
||||
#include "common.h"
|
||||
|
||||
INCLUDE_API_ASM("os/code_3a690_len_40", nuGfxPreNMIFuncSet);
|
@ -1,3 +0,0 @@
|
||||
#include "common.h"
|
||||
|
||||
INCLUDE_API_ASM("os/code_3a6d0_len_20", nuGfxTaskAllEndWait);
|
@ -1,3 +0,0 @@
|
||||
#include "common.h"
|
||||
|
||||
INCLUDE_API_ASM("os/code_3a6f0_len_110", nuGfxSetCfb);
|
@ -1,3 +0,0 @@
|
||||
#include "common.h"
|
||||
|
||||
INCLUDE_API_ASM("os/code_3a800_len_30", nuGfxDisplayOff);
|
@ -1,3 +0,0 @@
|
||||
#include "common.h"
|
||||
|
||||
INCLUDE_API_ASM("os/code_3a830_len_20", nuGfxDisplayOn);
|
@ -1,35 +1,5 @@
|
||||
#include "common.h"
|
||||
|
||||
INCLUDE_API_ASM("os/code_3a850_le_a40", nuPiInit);
|
||||
|
||||
INCLUDE_API_ASM("os/code_3a850_le_a40", nuPiReadRom);
|
||||
|
||||
INCLUDE_API_ASM("os/code_3a850_le_a40", nuGfxInit);
|
||||
|
||||
INCLUDE_API_ASM("os/code_3a850_le_a40", nuContInit);
|
||||
|
||||
INCLUDE_API_ASM("os/code_3a850_le_a40", nuContDataGet);
|
||||
|
||||
INCLUDE_API_ASM("os/code_3a850_le_a40", nuContPakMgrInit);
|
||||
|
||||
INCLUDE_API_ASM("os/code_3a850_le_a40", nuContPakMgrRemove);
|
||||
|
||||
INCLUDE_API_ASM("os/code_3a850_le_a40", contPakOpen);
|
||||
|
||||
INCLUDE_API_ASM("os/code_3a850_le_a40", contPakFree);
|
||||
|
||||
INCLUDE_API_ASM("os/code_3a850_le_a40", contPakFileReadWrite);
|
||||
|
||||
INCLUDE_API_ASM("os/code_3a850_le_a40", contPakFileOpen);
|
||||
|
||||
INCLUDE_API_ASM("os/code_3a850_le_a40", contPakFileDelete);
|
||||
|
||||
INCLUDE_API_ASM("os/code_3a850_le_a40", contPakFileState);
|
||||
|
||||
INCLUDE_API_ASM("os/code_3a850_le_a40", contPakFileNum);
|
||||
|
||||
INCLUDE_API_ASM("os/code_3a850_le_a40", contPakRepairId);
|
||||
|
||||
#undef osMotorStop
|
||||
s32 INCLUDE_ASM("os/code_3a850_le_a40", osMotorStop, OSPfs* unk);
|
||||
|
||||
|
8
src/os/nuContDataGet.c
Normal file
8
src/os/nuContDataGet.c
Normal file
@ -0,0 +1,8 @@
|
||||
#include "common.h"
|
||||
#include "nu/nusys.h"
|
||||
|
||||
void nuContDataGet(OSContPad* contdata, u32 padno) {
|
||||
nuContDataClose();
|
||||
bcopy(&nuContData[padno], contdata, sizeof(OSContPad));
|
||||
nuContDataOpen();
|
||||
}
|
12
src/os/nuContInit.c
Normal file
12
src/os/nuContInit.c
Normal file
@ -0,0 +1,12 @@
|
||||
#include "common.h"
|
||||
#include "nu/nusys.h"
|
||||
|
||||
u8 nuContInit(void) {
|
||||
u8 contBits;
|
||||
|
||||
contBits = nuSiMgrInit();
|
||||
nuContMgrInit();
|
||||
nuContPakMgrInit();
|
||||
nuContRmbMgrInit();
|
||||
return contBits;
|
||||
}
|
81
src/os/nuContPakMgr.c
Normal file
81
src/os/nuContPakMgr.c
Normal file
@ -0,0 +1,81 @@
|
||||
#include "common.h"
|
||||
#include "nu/nusys.h"
|
||||
|
||||
void nuContPakMgrInit(void) {
|
||||
nuSiCallBackAdd(&nuContCallBack);
|
||||
}
|
||||
|
||||
void nuContPakMgrRemove(void) {
|
||||
nuSiCallBackRemove(&nuContCallBack);
|
||||
}
|
||||
|
||||
// TODO: Determine what this is.
|
||||
extern OSMesgQueue D_800DAC78;
|
||||
|
||||
static s32 contPakOpen(NUSiCommonMesg* mesg) {
|
||||
s32 err;
|
||||
NUContPakFile* file = (NUContPakFile*) mesg->dataPtr;
|
||||
|
||||
file->type = NU_CONT_PAK_TYPE_NONE;
|
||||
err = osPfsInitPak(&D_800DAC78, file->pfs, file->pfs->channel);
|
||||
|
||||
if (err == 0) {
|
||||
file->type = NU_CONT_PAK_TYPE_PAK;
|
||||
}
|
||||
|
||||
return err;
|
||||
}
|
||||
|
||||
static s32 contPakFree(NUSiCommonMesg* mesg) {
|
||||
NUContPakFreeMesg* freeMesg = (NUContPakFreeMesg*) mesg->dataPtr;
|
||||
|
||||
return osPfsFreeBlocks(freeMesg->file->pfs, &freeMesg->size);
|
||||
}
|
||||
|
||||
static s32 contPakFileReadWrite(NUSiCommonMesg* mesg) {
|
||||
NUContPakFileRWMesg* rwMesg = (NUContPakFileRWMesg*) mesg->dataPtr;
|
||||
|
||||
return osPfsReadWriteFile(rwMesg->file->pfs, rwMesg->file->file_no, rwMesg->mode, rwMesg->offset, rwMesg->size,
|
||||
rwMesg->buf);
|
||||
}
|
||||
|
||||
static s32 contPakFileOpen(NUSiCommonMesg* mesg) {
|
||||
NUContPakFileOpenMesg* openMesg = mesg->dataPtr;
|
||||
NUContPakFile* file = openMesg->file;
|
||||
s32 err;
|
||||
|
||||
err = osPfsFindFile(file->pfs, nuContPakCompanyCode, nuContPakGameCode, openMesg->noteName, openMesg->extName,
|
||||
&file->file_no);
|
||||
if (err == PFS_ERR_INVALID) {
|
||||
if (openMesg->mode == NU_CONT_PAK_MODE_CREATE) {
|
||||
err = osPfsAllocateFile(file->pfs, nuContPakCompanyCode, nuContPakGameCode, openMesg->noteName, openMesg->extName,
|
||||
openMesg->size, &file->file_no);
|
||||
}
|
||||
}
|
||||
return err;
|
||||
}
|
||||
|
||||
static s32 contPakFileDelete(NUSiCommonMesg* mesg) {
|
||||
NUContPakFileOpenMesg* openMesg = (NUContPakFileOpenMesg*) mesg->dataPtr;
|
||||
|
||||
return osPfsDeleteFile(openMesg->file->pfs, nuContPakCompanyCode, nuContPakGameCode, openMesg->noteName,
|
||||
openMesg->extName);
|
||||
}
|
||||
|
||||
static s32 contPakFileState(NUSiCommonMesg* mesg) {
|
||||
NUContPakFileStateMesg* state = (NUContPakFileStateMesg*) mesg->dataPtr;
|
||||
|
||||
return osPfsFileState(state->file->pfs, state->file->file_no, state->state);
|
||||
}
|
||||
|
||||
static s32 contPakFileNum(NUSiCommonMesg* mesg) {
|
||||
NUContPakFileNumMesg* fileNum = (NUContPakFileNumMesg*) mesg->dataPtr;
|
||||
|
||||
return osPfsNumFiles(fileNum->file->pfs, fileNum->max_files, fileNum->used_files);
|
||||
}
|
||||
|
||||
static s32 contPakRepairId(NUSiCommonMesg* mesg) {
|
||||
NUContPakFile* file = (NUContPakFile*) mesg->dataPtr;
|
||||
|
||||
return osPfsRepairId(file->pfs);
|
||||
}
|
7
src/os/nuGfxDisplayOff.c
Normal file
7
src/os/nuGfxDisplayOff.c
Normal file
@ -0,0 +1,7 @@
|
||||
#include "common.h"
|
||||
#include "nu/nusys.h"
|
||||
|
||||
void nuGfxDisplayOff(void) {
|
||||
nuGfxDisplay = NU_GFX_DISPLAY_OFF;
|
||||
osViBlack(TRUE);
|
||||
}
|
6
src/os/nuGfxDisplayOn.c
Normal file
6
src/os/nuGfxDisplayOn.c
Normal file
@ -0,0 +1,6 @@
|
||||
#include "common.h"
|
||||
#include "nu/nusys.h"
|
||||
|
||||
void nuGfxDisplayOn(void) {
|
||||
nuGfxDisplay = NU_GFX_DISPLAY_ON_TRIGGER;
|
||||
}
|
11
src/os/nuGfxFuncSet.c
Normal file
11
src/os/nuGfxFuncSet.c
Normal file
@ -0,0 +1,11 @@
|
||||
#include "common.h"
|
||||
#include "nu/nusys.h"
|
||||
|
||||
void nuGfxFuncSet(NUGfxFunc func) {
|
||||
OSIntMask intMask;
|
||||
|
||||
nuGfxTaskAllEndWait();
|
||||
intMask = osSetIntMask(OS_IM_NONE);
|
||||
nuGfxFunc = func;
|
||||
osSetIntMask(intMask);
|
||||
}
|
28
src/os/nuGfxInit.c
Normal file
28
src/os/nuGfxInit.c
Normal file
@ -0,0 +1,28 @@
|
||||
#include "common.h"
|
||||
#include "nu/nusys.h"
|
||||
|
||||
extern u16* FrameBuf[3];
|
||||
extern UNK_PTR D_8009A610;
|
||||
extern UNK_PTR D_80093BA0;
|
||||
extern Gfx rdpstateinit_dl[];
|
||||
|
||||
void nuGfxInit(void) {
|
||||
Gfx gfx[0x100];
|
||||
Gfx* ptr;
|
||||
|
||||
nuGfxThreadStart();
|
||||
nuGfxSetCfb(FrameBuf, NU_GFX_FRAMEBUFFER_NUM);
|
||||
nuGfxSetZBuffer((u16*) NU_GFX_ZBUFFER_ADDR);
|
||||
nuGfxSwapCfbFuncSet(nuGfxSwapCfb);
|
||||
D_8009A610 = &D_80093BA0;
|
||||
nuGfxTaskMgrInit();
|
||||
|
||||
ptr = gfx;
|
||||
// TODO: Verify that this macro call works in PM64.
|
||||
gSPDisplayList(ptr++, OS_K0_TO_PHYSICAL(&rdpstateinit_dl));
|
||||
gDPFullSync(ptr++);
|
||||
gSPEndDisplayList(ptr++);
|
||||
|
||||
nuGfxTaskStart(&gfx, (s32)(ptr - gfx) * sizeof(Gfx), NU_GFX_UCODE_F3DEX, NU_SC_NOSWAPBUFFER);
|
||||
nuGfxTaskAllEndWait();
|
||||
}
|
10
src/os/nuGfxPreNMIFuncSet.c
Normal file
10
src/os/nuGfxPreNMIFuncSet.c
Normal file
@ -0,0 +1,10 @@
|
||||
#include "common.h"
|
||||
#include "nu/nusys.h"
|
||||
|
||||
void nuGfxPreNMIFuncSet(NUGfxPreNMIFunc func) {
|
||||
OSIntMask intMask;
|
||||
|
||||
intMask = osSetIntMask(OS_IM_NONE);
|
||||
nuGfxPreNMIFunc = func;
|
||||
osSetIntMask(intMask);
|
||||
}
|
3
src/os/nuGfxSetCfb.c
Normal file
3
src/os/nuGfxSetCfb.c
Normal file
@ -0,0 +1,3 @@
|
||||
#include "common.h"
|
||||
|
||||
INCLUDE_API_ASM("os/nuGfxSetCfb", nuGfxSetCfb);
|
7
src/os/nuGfxTaskAllEndWait.c
Normal file
7
src/os/nuGfxTaskAllEndWait.c
Normal file
@ -0,0 +1,7 @@
|
||||
#include "common.h"
|
||||
#include "nu/nusys.h"
|
||||
|
||||
void nuGfxTaskAllEndWait(void) {
|
||||
while (nuGfxTaskSpool) {
|
||||
}
|
||||
}
|
10
src/os/nuPiInit.c
Normal file
10
src/os/nuPiInit.c
Normal file
@ -0,0 +1,10 @@
|
||||
#include "common.h"
|
||||
#include "nu/nusys.h"
|
||||
|
||||
extern OSMesgQueue D_800AC5D0;
|
||||
extern OSMesg D_800AC5E8[NU_PI_MESG_NUM];
|
||||
|
||||
void nuPiInit(void) {
|
||||
osCreatePiManager(OS_PRIORITY_PIMGR, &D_800AC5D0, D_800AC5E8, NU_PI_MESG_NUM);
|
||||
carthandle = osCartRomInit();
|
||||
}
|
35
src/os/nuPiReadRom.c
Normal file
35
src/os/nuPiReadRom.c
Normal file
@ -0,0 +1,35 @@
|
||||
#include "common.h"
|
||||
#include "nu/nusys.h"
|
||||
|
||||
void nuPiReadRom(u32 rom_addr, void* buf_ptr, u32 size) {
|
||||
OSIoMesg ioMesg;
|
||||
OSMesg mesg;
|
||||
OSMesgQueue queue;
|
||||
u32 mesgSize;
|
||||
|
||||
osCreateMesgQueue(&queue, &mesg, 1);
|
||||
|
||||
ioMesg.hdr.pri = OS_MESG_PRI_NORMAL;
|
||||
ioMesg.hdr.retQueue = &queue;
|
||||
osInvalDCache(buf_ptr, size);
|
||||
osInvalICache(buf_ptr, size);
|
||||
|
||||
while (size != 0) {
|
||||
mesgSize = size;
|
||||
|
||||
if (size > 0x4000) {
|
||||
mesgSize = 0x4000;
|
||||
}
|
||||
|
||||
ioMesg.dramAddr = buf_ptr;
|
||||
ioMesg.devAddr = rom_addr;
|
||||
ioMesg.size = mesgSize;
|
||||
|
||||
osEPiStartDma(carthandle, &ioMesg, OS_READ);
|
||||
osRecvMesg(&queue, &mesg, OS_MESG_BLOCK);
|
||||
|
||||
rom_addr += mesgSize;
|
||||
buf_ptr += mesgSize;
|
||||
size -= mesgSize;
|
||||
}
|
||||
}
|
@ -39,14 +39,35 @@ D_00102610_end = 0x0010CC10;
|
||||
D_0010CC10 = 0x0010CC10;
|
||||
D_0010CC10_end = 0x0010F1B0;
|
||||
D_80074021 = 0x80074021;
|
||||
|
||||
D_80093BA0 = 0x80093BA0;
|
||||
FrameBuf = 0x80093BA8;
|
||||
rdpstateinit_dl = 0x80093BB8;
|
||||
nuContPakCompanyCode = 0x80093CA0;
|
||||
nuContPakGameCode = 0x80093CA4;
|
||||
nuContCallBack = 0x80093CD0;
|
||||
nuGfxFunc = 0x80093D10;
|
||||
nuGfxPreNMIFunc = 0x80093D14;
|
||||
|
||||
D_800959D4 = 0x800959D4;
|
||||
D_8009A5D8 = 0x8009A5D8;
|
||||
nuGfxZBuffer = 0x8009A5DC;
|
||||
nuGfxDisplay = 0x8009A5F8;
|
||||
gGameState = 0x8009A600;
|
||||
D_8009A610 = 0x8009A610;
|
||||
|
||||
nuGfxTaskSpool = 0x8009A618;
|
||||
carthandle = 0x8009A638;
|
||||
|
||||
D_8009A650 = 0x8009A650;
|
||||
D_800A0900 = 0x800A0900;
|
||||
D_800AC5D0 = 0x800AC5D0;
|
||||
D_800AC5E8 = 0x800AC5E8;
|
||||
gCurrentEncounter = 0x800B0F10;
|
||||
nuContData = 0x800B1D68;
|
||||
gCameras = 0x800B1D80;
|
||||
gCurrentCameraID = 0x80077410;
|
||||
D_800DAC78 = 0x800DAC78;
|
||||
D_800DC500 = 0x800DC500;
|
||||
D_8010F6D0 = 0x8010F6D0;
|
||||
gBackgroundImage = 0x80200000;
|
||||
|
Loading…
Reference in New Issue
Block a user