mirror of
https://github.com/pmret/papermario.git
synced 2024-11-18 17:02:46 +01:00
123 lines
5.4 KiB
ArmAsm
123 lines
5.4 KiB
ArmAsm
.set noat # allow manual use of $at
|
|
.set noreorder # don't insert nops after branches
|
|
|
|
|
|
glabel viMgrMain
|
|
/* 042010 80066C10 27BDFFD0 */ addiu $sp, $sp, -0x30
|
|
/* 042014 80066C14 AFB00018 */ sw $s0, 0x18($sp)
|
|
/* 042018 80066C18 00808021 */ addu $s0, $a0, $zero
|
|
/* 04201C 80066C1C AFBF002C */ sw $ra, 0x2c($sp)
|
|
/* 042020 80066C20 AFB40028 */ sw $s4, 0x28($sp)
|
|
/* 042024 80066C24 AFB30024 */ sw $s3, 0x24($sp)
|
|
/* 042028 80066C28 AFB20020 */ sw $s2, 0x20($sp)
|
|
/* 04202C 80066C2C AFB1001C */ sw $s1, 0x1c($sp)
|
|
/* 042030 80066C30 0C01B2E8 */ jal osViGetCurrentContext
|
|
/* 042034 80066C34 AFA00010 */ sw $zero, 0x10($sp)
|
|
/* 042038 80066C38 94420002 */ lhu $v0, 2($v0)
|
|
/* 04203C 80066C3C 3C01800B */ lui $at, 0x800b
|
|
/* 042040 80066C40 A422F910 */ sh $v0, -0x6f0($at)
|
|
/* 042044 80066C44 14400004 */ bnez $v0, .L80066C58
|
|
/* 042048 80066C48 00008821 */ addu $s1, $zero, $zero
|
|
/* 04204C 80066C4C 24020001 */ addiu $v0, $zero, 1
|
|
/* 042050 80066C50 3C01800B */ lui $at, 0x800b
|
|
/* 042054 80066C54 A422F910 */ sh $v0, -0x6f0($at)
|
|
.L80066C58:
|
|
/* 042058 80066C58 02009021 */ addu $s2, $s0, $zero
|
|
/* 04205C 80066C5C 2414000D */ addiu $s4, $zero, 0xd
|
|
/* 042060 80066C60 2413000E */ addiu $s3, $zero, 0xe
|
|
.L80066C64:
|
|
/* 042064 80066C64 8E44000C */ lw $a0, 0xc($s2)
|
|
/* 042068 80066C68 27A50010 */ addiu $a1, $sp, 0x10
|
|
/* 04206C 80066C6C 0C0195BC */ jal osRecvMesg
|
|
/* 042070 80066C70 24060001 */ addiu $a2, $zero, 1
|
|
/* 042074 80066C74 8FA20010 */ lw $v0, 0x10($sp)
|
|
/* 042078 80066C78 94420000 */ lhu $v0, ($v0)
|
|
/* 04207C 80066C7C 10540005 */ beq $v0, $s4, .L80066C94
|
|
/* 042080 80066C80 00000000 */ nop
|
|
/* 042084 80066C84 1053003C */ beq $v0, $s3, .L80066D78
|
|
/* 042088 80066C88 00000000 */ nop
|
|
/* 04208C 80066C8C 08019B19 */ j .L80066C64
|
|
/* 042090 80066C90 00000000 */ nop
|
|
|
|
.L80066C94:
|
|
/* 042094 80066C94 0C019C1C */ jal osViSwapContext
|
|
/* 042098 80066C98 00000000 */ nop
|
|
/* 04209C 80066C9C 3C02800B */ lui $v0, 0x800b
|
|
/* 0420A0 80066CA0 9442F910 */ lhu $v0, -0x6f0($v0)
|
|
/* 0420A4 80066CA4 2442FFFF */ addiu $v0, $v0, -1
|
|
/* 0420A8 80066CA8 3C01800B */ lui $at, 0x800b
|
|
/* 0420AC 80066CAC A422F910 */ sh $v0, -0x6f0($at)
|
|
/* 0420B0 80066CB0 3042FFFF */ andi $v0, $v0, 0xffff
|
|
/* 0420B4 80066CB4 1440000C */ bnez $v0, .L80066CE8
|
|
/* 0420B8 80066CB8 00000000 */ nop
|
|
/* 0420BC 80066CBC 0C01B2E8 */ jal osViGetCurrentContext
|
|
/* 0420C0 80066CC0 00000000 */ nop
|
|
/* 0420C4 80066CC4 8C440010 */ lw $a0, 0x10($v0)
|
|
/* 0420C8 80066CC8 10800004 */ beqz $a0, .L80066CDC
|
|
/* 0420CC 80066CCC 00408021 */ addu $s0, $v0, $zero
|
|
/* 0420D0 80066CD0 8E050014 */ lw $a1, 0x14($s0)
|
|
/* 0420D4 80066CD4 0C019608 */ jal osSendMesg
|
|
/* 0420D8 80066CD8 00003021 */ addu $a2, $zero, $zero
|
|
.L80066CDC:
|
|
/* 0420DC 80066CDC 96020002 */ lhu $v0, 2($s0)
|
|
/* 0420E0 80066CE0 3C01800B */ lui $at, 0x800b
|
|
/* 0420E4 80066CE4 A422F910 */ sh $v0, -0x6f0($at)
|
|
.L80066CE8:
|
|
/* 0420E8 80066CE8 3C02800A */ lui $v0, 0x800a
|
|
/* 0420EC 80066CEC 8C42A5E4 */ lw $v0, -0x5a1c($v0)
|
|
/* 0420F0 80066CF0 24420001 */ addiu $v0, $v0, 1
|
|
/* 0420F4 80066CF4 3C01800A */ lui $at, 0x800a
|
|
/* 0420F8 80066CF8 1220000A */ beqz $s1, .L80066D24
|
|
/* 0420FC 80066CFC AC22A5E4 */ sw $v0, -0x5a1c($at)
|
|
/* 042100 80066D00 0C019680 */ jal osGetCount
|
|
/* 042104 80066D04 00008821 */ addu $s1, $zero, $zero
|
|
/* 042108 80066D08 00408021 */ addu $s0, $v0, $zero
|
|
/* 04210C 80066D0C 02001821 */ addu $v1, $s0, $zero
|
|
/* 042110 80066D10 00001021 */ addu $v0, $zero, $zero
|
|
/* 042114 80066D14 3C01800A */ lui $at, 0x800a
|
|
/* 042118 80066D18 AC22A608 */ sw $v0, -0x59f8($at)
|
|
/* 04211C 80066D1C 3C01800A */ lui $at, 0x800a
|
|
/* 042120 80066D20 AC23A60C */ sw $v1, -0x59f4($at)
|
|
.L80066D24:
|
|
/* 042124 80066D24 3C10800A */ lui $s0, 0x800a
|
|
/* 042128 80066D28 0C019680 */ jal osGetCount
|
|
/* 04212C 80066D2C 8E10A5C8 */ lw $s0, -0x5a38($s0)
|
|
/* 042130 80066D30 3C01800A */ lui $at, 0x800a
|
|
/* 042134 80066D34 AC22A5C8 */ sw $v0, -0x5a38($at)
|
|
/* 042138 80066D38 00508023 */ subu $s0, $v0, $s0
|
|
/* 04213C 80066D3C 3C02800A */ lui $v0, 0x800a
|
|
/* 042140 80066D40 8C42A608 */ lw $v0, -0x59f8($v0)
|
|
/* 042144 80066D44 3C03800A */ lui $v1, 0x800a
|
|
/* 042148 80066D48 8C63A60C */ lw $v1, -0x59f4($v1)
|
|
/* 04214C 80066D4C 02002821 */ addu $a1, $s0, $zero
|
|
/* 042150 80066D50 00002021 */ addu $a0, $zero, $zero
|
|
/* 042154 80066D54 00651821 */ addu $v1, $v1, $a1
|
|
/* 042158 80066D58 0065302B */ sltu $a2, $v1, $a1
|
|
/* 04215C 80066D5C 00441021 */ addu $v0, $v0, $a0
|
|
/* 042160 80066D60 00461021 */ addu $v0, $v0, $a2
|
|
/* 042164 80066D64 3C01800A */ lui $at, 0x800a
|
|
/* 042168 80066D68 AC22A608 */ sw $v0, -0x59f8($at)
|
|
/* 04216C 80066D6C 3C01800A */ lui $at, 0x800a
|
|
/* 042170 80066D70 08019B19 */ j .L80066C64
|
|
/* 042174 80066D74 AC23A60C */ sw $v1, -0x59f4($at)
|
|
|
|
.L80066D78:
|
|
/* 042178 80066D78 0C019935 */ jal osTimerInterrupt
|
|
/* 04217C 80066D7C 00000000 */ nop
|
|
/* 042180 80066D80 08019B19 */ j .L80066C64
|
|
/* 042184 80066D84 00000000 */ nop
|
|
|
|
/* 042188 80066D88 8FBF002C */ lw $ra, 0x2c($sp)
|
|
/* 04218C 80066D8C 8FB40028 */ lw $s4, 0x28($sp)
|
|
/* 042190 80066D90 8FB30024 */ lw $s3, 0x24($sp)
|
|
/* 042194 80066D94 8FB20020 */ lw $s2, 0x20($sp)
|
|
/* 042198 80066D98 8FB1001C */ lw $s1, 0x1c($sp)
|
|
/* 04219C 80066D9C 8FB00018 */ lw $s0, 0x18($sp)
|
|
/* 0421A0 80066DA0 03E00008 */ jr $ra
|
|
/* 0421A4 80066DA4 27BD0030 */ addiu $sp, $sp, 0x30
|
|
|
|
/* 0421A8 80066DA8 00000000 */ nop
|
|
/* 0421AC 80066DAC 00000000 */ nop
|
|
|
|
|