diff --git a/src/game/bondmove.c b/src/game/bondmove.c index 6ffde7ea8..53f9e0408 100644 --- a/src/game/bondmove.c +++ b/src/game/bondmove.c @@ -638,8 +638,8 @@ void bmoveProcessInput(bool allowc1x, bool allowc1y, bool allowc1buttons, bool i canmanualzoom = weaponHasClassFlag(weaponnum, WEAPONCLASSFLAG_MANUALZOOM); contpad1 = optionsGetContpadNum1(g_Vars.currentplayerstats->mpindex); - c1stickx = allowc1x ? (s8) joyGetStickX(contpad1) : 0; - c1sticky = allowc1y ? (s8) joyGetStickY(contpad1) : 0; + c1stickx = allowc1x ? joyGetStickX(contpad1) : 0; + c1sticky = allowc1y ? joyGetStickY(contpad1) : 0; c1buttons = allowc1buttons ? joyGetButtons(contpad1, 0xffff) : 0; c1buttonsthisframe = allowc1buttons ? joyGetButtonsPressedThisFrame(contpad1, 0xffff) : 0; @@ -717,7 +717,7 @@ void bmoveProcessInput(bool allowc1x, bool allowc1y, bool allowc1buttons, bool i // 2.4: ctrl1 stick = look, z = aim, ctrl2 stick = walk/strafe, z = fire contpad2 = (s8) optionsGetContpadNum2(g_Vars.currentplayerstats->mpindex); c2stickx = (s8) joyGetStickX(contpad2); - c2sticky = (s8) joyGetStickY(contpad2); + c2sticky = (joyGetStickY(contpad2) << 24) >> 24; c2buttons = joyGetButtons(contpad2, 0xffff); c2buttonsthisframe = joyGetButtonsPressedThisFrame(contpad2, 0xffff); diff --git a/src/include/lib/joy.h b/src/include/lib/joy.h index cd8b803d0..8afe1da75 100644 --- a/src/include/lib/joy.h +++ b/src/include/lib/joy.h @@ -33,8 +33,8 @@ s32 joyGetStickYOnSampleIndex(s32 samplenum, s8 contpadnum); u16 joyGetButtonsOnSample(s32 samplenum, s8 contpadnum, u16 mask); u16 joyGetButtonsPressedOnSample(s32 samplenum, s8 contpadnum, u16 mask); s32 joyCountButtonsOnSpecificSamples(u32 *arg0, s8 contpadnum, u16 mask); -s32 joyGetStickX(s8 contpadnum); -s32 joyGetStickY(s8 contpadnum); +s8 joyGetStickX(s8 contpadnum); +s8 joyGetStickY(s8 contpadnum); u16 joyGetButtons(s8 contpadnum, u16 mask); u16 joyGetButtonsPressedThisFrame(s8 contpadnum, u16 mask); bool joyIsCyclicPollingEnabled(void); diff --git a/src/lib/joy.c b/src/lib/joy.c index 59c962691..e7f7baa18 100644 --- a/src/lib/joy.c +++ b/src/lib/joy.c @@ -1107,7 +1107,7 @@ s32 joyCountButtonsOnSpecificSamples(u32 *checksamples, s8 contpadnum, u16 mask) return count; } -s32 joyGetStickX(s8 contpadnum) +s8 joyGetStickX(s8 contpadnum) { if (g_JoyDataPtr->unk200 < 0 && (g_JoyConnectedControllers >> contpadnum & 1) == 0) { g_JoyBadReadsStickX[contpadnum]++; @@ -1121,7 +1121,7 @@ s32 joyGetStickX(s8 contpadnum) return g_JoyDataPtr->samples[g_JoyDataPtr->curlast].pads[contpadnum].stick_x; } -s32 joyGetStickY(s8 contpadnum) +s8 joyGetStickY(s8 contpadnum) { if (g_JoyDataPtr->unk200 < 0 && (g_JoyConnectedControllers >> contpadnum & 1) == 0) { g_JoyBadReadsStickY[contpadnum]++; diff --git a/src/lib/main.c b/src/lib/main.c index fe908a677..c2f8abcb7 100644 --- a/src/lib/main.c +++ b/src/lib/main.c @@ -48,6 +48,7 @@ #include "lib/fault.h" #include "lib/crash.h" #include "lib/dma.h" +#include "lib/joy.h" #include "lib/main.h" #include "lib/snd.h" #include "lib/memp.h" @@ -3418,896 +3419,6 @@ glabel mainLoop ); #endif -#if VERSION == VERSION_PAL_BETA -u32 var8005f690nb[] = { - 0x00020000, 0x00000000, 0x00000000, 0x00000000, - 0x00000000, 0x00000000, 0x00000000, 0x00000000, -}; - -GLOBAL_ASM( -glabel mainTick -/* e114: 27bdff68 */ addiu $sp,$sp,-152 -/* e118: 3c0f8006 */ lui $t7,0x8006 -/* e11c: afbf001c */ sw $ra,0x1c($sp) -/* e120: afb10018 */ sw $s1,0x18($sp) -/* e124: afb00014 */ sw $s0,0x14($sp) -/* e128: 25efe88c */ addiu $t7,$t7,-6004 -/* e12c: 8de10000 */ lw $at,0x0($t7) -/* e130: 8de80004 */ lw $t0,0x4($t7) -/* e134: 27ae0070 */ addiu $t6,$sp,0x70 -/* e138: adc10000 */ sw $at,0x0($t6) -/* e13c: adc80004 */ sw $t0,0x4($t6) -/* e140: 8de8000c */ lw $t0,0xc($t7) -/* e144: 8de10008 */ lw $at,0x8($t7) -/* e148: 3c098006 */ lui $t1,0x8006 -/* e14c: adc8000c */ sw $t0,0xc($t6) -/* e150: adc10008 */ sw $at,0x8($t6) -/* e154: 8de10010 */ lw $at,0x10($t7) -/* e158: 8de80014 */ lw $t0,0x14($t7) -/* e15c: 3c0a8006 */ lui $t2,0x8006 -/* e160: adc10010 */ sw $at,0x10($t6) -/* e164: adc80014 */ sw $t0,0x14($t6) -/* e168: 8de8001c */ lw $t0,0x1c($t7) -/* e16c: 8de10018 */ lw $at,0x18($t7) -/* e170: adc8001c */ sw $t0,0x1c($t6) -/* e174: adc10018 */ sw $at,0x18($t6) -/* e178: 8d29e864 */ lw $t1,-0x179c($t1) -/* e17c: 0523014a */ bgezl $t1,.PB0000e6a8 -/* e180: 8fbf001c */ lw $ra,0x1c($sp) -/* e184: 8d4ae4dc */ lw $t2,-0x1b24($t2) -/* e188: 2d410002 */ sltiu $at,$t2,0x2 -/* e18c: 50200146 */ beqzl $at,.PB0000e6a8 -/* e190: 8fbf001c */ lw $ra,0x1c($sp) -/* e194: 0fc5b9fd */ jal frametimeCalculate -/* e198: 00000000 */ nop -/* e19c: 0c002662 */ jal profile00009a98 -/* e1a0: 00000000 */ nop -/* e1a4: 0c002660 */ jal profileReset -/* e1a8: 00000000 */ nop -/* e1ac: 0c002664 */ jal profileSetMarker -/* e1b0: 3c040002 */ lui $a0,0x2 -/* e1b4: 0c000d2a */ jal func000034d8 -/* e1b8: 00000000 */ nop -/* e1bc: 0c00534e */ jal joyDebugJoy -/* e1c0: 00000000 */ nop -/* e1c4: 0c0006ca */ jal schedSetCrashEnable2 -/* e1c8: 00002025 */ move $a0,$zero -/* e1cc: 3c048006 */ lui $a0,0x8006 -/* e1d0: 8c84e4d8 */ lw $a0,-0x1b28($a0) -/* e1d4: 1080011c */ beqz $a0,.PB0000e648 -/* e1d8: 00000000 */ nop -/* e1dc: 0fc5a3eb */ jal gfxGetMasterDisplayList -/* e1e0: 00000000 */ nop -/* e1e4: 244b0008 */ addiu $t3,$v0,0x8 -/* e1e8: afa20090 */ sw $v0,0x90($sp) -/* e1ec: afab0094 */ sw $t3,0x94($sp) -/* e1f0: 3c0cf510 */ lui $t4,0xf510 -/* e1f4: 3c0d0700 */ lui $t5,0x700 -/* e1f8: ac4d0004 */ sw $t5,0x4($v0) -/* e1fc: ac4c0000 */ sw $t4,0x0($v0) -/* e200: 8fb90094 */ lw $t9,0x94($sp) -/* e204: 3c0ef500 */ lui $t6,0xf500 -/* e208: 35ce0100 */ ori $t6,$t6,0x100 -/* e20c: 27380008 */ addiu $t8,$t9,0x8 -/* e210: afb80094 */ sw $t8,0x94($sp) -/* e214: 3c0f0600 */ lui $t7,0x600 -/* e218: 3c088006 */ lui $t0,0x8006 -/* e21c: af2f0004 */ sw $t7,0x4($t9) -/* e220: af2e0000 */ sw $t6,0x0($t9) -/* e224: 8d08e868 */ lw $t0,-0x1798($t0) -/* e228: 15000006 */ bnez $t0,.PB0000e244 -/* e22c: 00002025 */ move $a0,$zero -/* e230: 0c00566a */ jal joyGetButtons -/* e234: 2405000c */ li $a1,0xc -/* e238: 2401000c */ li $at,0xc -/* e23c: 1441001a */ bne $v0,$at,.PB0000e2a8 -/* e240: 00002025 */ move $a0,$zero -.PB0000e244: -/* e244: 0c005616 */ jal joyGetStickX -/* e248: 00002025 */ move $a0,$zero -/* e24c: 00028e00 */ sll $s1,$v0,0x18 -/* e250: 00114e03 */ sra $t1,$s1,0x18 -/* e254: 01208825 */ move $s1,$t1 -/* e258: 0c005640 */ jal joyGetStickY -/* e25c: 00002025 */ move $a0,$zero -/* e260: a3a2003b */ sb $v0,0x3b($sp) -/* e264: 00002025 */ move $a0,$zero -/* e268: 0c00566a */ jal joyGetButtons -/* e26c: 3405ffff */ li $a1,0xffff -/* e270: 3050ffff */ andi $s0,$v0,0xffff -/* e274: 00002025 */ move $a0,$zero -/* e278: 0c00569a */ jal joyGetButtonsPressedThisFrame -/* e27c: 3405ffff */ li $a1,0xffff -/* e280: 00112600 */ sll $a0,$s1,0x18 -/* e284: 00045603 */ sra $t2,$a0,0x18 -/* e288: 01402025 */ move $a0,$t2 -/* e28c: 83a5003b */ lb $a1,0x3b($sp) -/* e290: 3206ffff */ andi $a2,$s0,0xffff -/* e294: 0fc47f67 */ jal debugProcessInput -/* e298: 3047ffff */ andi $a3,$v0,0xffff -/* e29c: 3c018006 */ lui $at,0x8006 -/* e2a0: 10000021 */ b .PB0000e328 -/* e2a4: ac22e868 */ sw $v0,-0x1798($at) -.PB0000e2a8: -/* e2a8: 0c00566a */ jal joyGetButtons -/* e2ac: 24051000 */ li $a1,0x1000 -/* e2b0: 14400005 */ bnez $v0,.PB0000e2c8 -/* e2b4: 3c0b8007 */ lui $t3,0x8007 -/* e2b8: 8d6b7b7c */ lw $t3,0x7b7c($t3) -/* e2bc: 3c018007 */ lui $at,0x8007 -/* e2c0: 10000019 */ b .PB0000e328 -/* e2c4: ac2b7b78 */ sw $t3,0x7b78($at) -.PB0000e2c8: -/* e2c8: 0c005616 */ jal joyGetStickX -/* e2cc: 00002025 */ move $a0,$zero -/* e2d0: 00028e00 */ sll $s1,$v0,0x18 -/* e2d4: 00116603 */ sra $t4,$s1,0x18 -/* e2d8: 01808825 */ move $s1,$t4 -/* e2dc: 0c005640 */ jal joyGetStickY -/* e2e0: 00002025 */ move $a0,$zero -/* e2e4: a3a2003b */ sb $v0,0x3b($sp) -/* e2e8: 00002025 */ move $a0,$zero -/* e2ec: 0c00566a */ jal joyGetButtons -/* e2f0: 3405ffff */ li $a1,0xffff -/* e2f4: 3050ffff */ andi $s0,$v0,0xffff -/* e2f8: 00002025 */ move $a0,$zero -/* e2fc: 0c00569a */ jal joyGetButtonsPressedThisFrame -/* e300: 3405ffff */ li $a1,0xffff -/* e304: 00112600 */ sll $a0,$s1,0x18 -/* e308: 00046e03 */ sra $t5,$a0,0x18 -/* e30c: 01a02025 */ move $a0,$t5 -/* e310: 83a5003b */ lb $a1,0x3b($sp) -/* e314: 3206ffff */ andi $a2,$s0,0xffff -/* e318: 0fc47f67 */ jal debugProcessInput -/* e31c: 3047ffff */ andi $a3,$v0,0xffff -/* e320: 3c018006 */ lui $at,0x8006 -/* e324: ac22e868 */ sw $v0,-0x1798($at) -.PB0000e328: -/* e328: 0fc5b487 */ jal lvTick -/* e32c: 00000000 */ nop -/* e330: 0fc4a8a7 */ jal playermgrShuffle -/* e334: 00000000 */ nop -/* e338: 3c198006 */ lui $t9,0x8006 -/* e33c: 8f39e4c4 */ lw $t9,-0x1b3c($t9) -/* e340: 3c10800a */ lui $s0,0x800a -/* e344: 2610e4d0 */ addiu $s0,$s0,-6960 -/* e348: 2b21005a */ slti $at,$t9,0x5a -/* e34c: 10200055 */ beqz $at,.PB0000e4a4 -/* e350: 00000000 */ nop -/* e354: 8e18006c */ lw $t8,0x6c($s0) -/* e358: 00008825 */ move $s1,$zero -/* e35c: 00002825 */ move $a1,$zero -/* e360: 13000003 */ beqz $t8,.PB0000e370 -/* e364: 00002025 */ move $a0,$zero -/* e368: 10000001 */ b .PB0000e370 -/* e36c: 24050001 */ li $a1,0x1 -.PB0000e370: -/* e370: 8e0e0068 */ lw $t6,0x68($s0) -/* e374: 00001825 */ move $v1,$zero -/* e378: 00001025 */ move $v0,$zero -/* e37c: 11c00003 */ beqz $t6,.PB0000e38c -/* e380: 00000000 */ nop -/* e384: 10000001 */ b .PB0000e38c -/* e388: 24040001 */ li $a0,0x1 -.PB0000e38c: -/* e38c: 8e0f0064 */ lw $t7,0x64($s0) -/* e390: 11e00003 */ beqz $t7,.PB0000e3a0 -/* e394: 00000000 */ nop -/* e398: 10000001 */ b .PB0000e3a0 -/* e39c: 24030001 */ li $v1,0x1 -.PB0000e3a0: -/* e3a0: 8e080070 */ lw $t0,0x70($s0) -/* e3a4: 11000003 */ beqz $t0,.PB0000e3b4 -/* e3a8: 00000000 */ nop -/* e3ac: 10000001 */ b .PB0000e3b4 -/* e3b0: 24020001 */ li $v0,0x1 -.PB0000e3b4: -/* e3b4: 00434821 */ addu $t1,$v0,$v1 -/* e3b8: 01245021 */ addu $t2,$t1,$a0 -/* e3bc: 01455821 */ addu $t3,$t2,$a1 -/* e3c0: 19600038 */ blez $t3,.PB0000e4a4 -/* e3c4: 00000000 */ nop -.PB0000e3c8: -/* e3c8: 0fc4a8ea */ jal playermgrGetPlayerAtOrder -/* e3cc: 02202025 */ move $a0,$s1 -/* e3d0: 0fc4a783 */ jal setCurrentPlayerNum -/* e3d4: 00402025 */ move $a0,$v0 -/* e3d8: 3c0c8006 */ lui $t4,0x8006 -/* e3dc: 8d8ce4c4 */ lw $t4,-0x1b3c($t4) -/* e3e0: 2401004e */ li $at,0x4e -/* e3e4: 55810006 */ bnel $t4,$at,.PB0000e400 -/* e3e8: 8e020284 */ lw $v0,0x284($s0) -/* e3ec: 0fc06b11 */ jal titleIsKeepingMode -/* e3f0: 00000000 */ nop -/* e3f4: 1440000b */ bnez $v0,.PB0000e424 -/* e3f8: 00000000 */ nop -/* e3fc: 8e020284 */ lw $v0,0x284($s0) -.PB0000e400: -/* e400: 84440634 */ lh $a0,0x634($v0) -/* e404: 0c002e75 */ jal viSetViewPosition -/* e408: 84450636 */ lh $a1,0x636($v0) -/* e40c: 8e020284 */ lw $v0,0x284($s0) -/* e410: c44c1854 */ lwc1 $f12,0x1854($v0) -/* e414: c44e1858 */ lwc1 $f14,0x1858($v0) -/* e418: 84460630 */ lh $a2,0x630($v0) -/* e41c: 0c002ec1 */ jal viSetFovAspectAndSize -/* e420: 84470632 */ lh $a3,0x632($v0) -.PB0000e424: -/* e424: 0fc5b915 */ jal lvTickPlayer -/* e428: 00000000 */ nop -/* e42c: 8e0d006c */ lw $t5,0x6c($s0) -/* e430: 26310001 */ addiu $s1,$s1,0x1 -/* e434: 00002825 */ move $a1,$zero -/* e438: 11a00003 */ beqz $t5,.PB0000e448 -/* e43c: 00002025 */ move $a0,$zero -/* e440: 10000001 */ b .PB0000e448 -/* e444: 24050001 */ li $a1,0x1 -.PB0000e448: -/* e448: 8e190068 */ lw $t9,0x68($s0) -/* e44c: 00001825 */ move $v1,$zero -/* e450: 00001025 */ move $v0,$zero -/* e454: 13200003 */ beqz $t9,.PB0000e464 -/* e458: 00000000 */ nop -/* e45c: 10000001 */ b .PB0000e464 -/* e460: 24040001 */ li $a0,0x1 -.PB0000e464: -/* e464: 8e180064 */ lw $t8,0x64($s0) -/* e468: 13000003 */ beqz $t8,.PB0000e478 -/* e46c: 00000000 */ nop -/* e470: 10000001 */ b .PB0000e478 -/* e474: 24030001 */ li $v1,0x1 -.PB0000e478: -/* e478: 8e0e0070 */ lw $t6,0x70($s0) -/* e47c: 11c00003 */ beqz $t6,.PB0000e48c -/* e480: 00000000 */ nop -/* e484: 10000001 */ b .PB0000e48c -/* e488: 24020001 */ li $v0,0x1 -.PB0000e48c: -/* e48c: 00437821 */ addu $t7,$v0,$v1 -/* e490: 01e44021 */ addu $t0,$t7,$a0 -/* e494: 01054821 */ addu $t1,$t0,$a1 -/* e498: 0229082a */ slt $at,$s1,$t1 -/* e49c: 1420ffca */ bnez $at,.PB0000e3c8 -/* e4a0: 00000000 */ nop -.PB0000e4a4: -/* e4a4: 0fc5ab7d */ jal lvRender -/* e4a8: 8fa40094 */ lw $a0,0x94($sp) -/* e4ac: afa20094 */ sw $v0,0x94($sp) -/* e4b0: 0c000d2c */ jal func000034e0 -/* e4b4: 27a40094 */ addiu $a0,$sp,0x94 -/* e4b8: 0fc4808c */ jal debugIsLineModeEnabled -/* e4bc: 00000000 */ nop -/* e4c0: 1040003e */ beqz $v0,.PB0000e5bc -/* e4c4: 2407ffff */ li $a3,-1 -/* e4c8: 8faa0094 */ lw $t2,0x94($sp) -/* e4cc: 3c0ce700 */ lui $t4,0xe700 -/* e4d0: 3c18ba00 */ lui $t8,0xba00 -/* e4d4: 254b0008 */ addiu $t3,$t2,0x8 -/* e4d8: afab0094 */ sw $t3,0x94($sp) -/* e4dc: ad400004 */ sw $zero,0x4($t2) -/* e4e0: ad4c0000 */ sw $t4,0x0($t2) -/* e4e4: 8fad0094 */ lw $t5,0x94($sp) -/* e4e8: 37181402 */ ori $t8,$t8,0x1402 -/* e4ec: 3c08f900 */ lui $t0,0xf900 -/* e4f0: 25b90008 */ addiu $t9,$t5,0x8 -/* e4f4: afb90094 */ sw $t9,0x94($sp) -/* e4f8: ada00004 */ sw $zero,0x4($t5) -/* e4fc: adb80000 */ sw $t8,0x0($t5) -/* e500: 8fae0094 */ lw $t6,0x94($sp) -/* e504: 3c0bee00 */ lui $t3,0xee00 -/* e508: 3c19b900 */ lui $t9,0xb900 -/* e50c: 25cf0008 */ addiu $t7,$t6,0x8 -/* e510: afaf0094 */ sw $t7,0x94($sp) -/* e514: adc70004 */ sw $a3,0x4($t6) -/* e518: adc80000 */ sw $t0,0x0($t6) -/* e51c: 8fa90094 */ lw $t1,0x94($sp) -/* e520: 37390201 */ ori $t9,$t9,0x201 -/* e524: 24180004 */ li $t8,0x4 -/* e528: 252a0008 */ addiu $t2,$t1,0x8 -/* e52c: afaa0094 */ sw $t2,0x94($sp) -/* e530: ad270004 */ sw $a3,0x4($t1) -/* e534: ad2b0000 */ sw $t3,0x0($t1) -/* e538: 8fac0094 */ lw $t4,0x94($sp) -/* e53c: 3c090fa5 */ lui $t1,0xfa5 -/* e540: 3c08b900 */ lui $t0,0xb900 -/* e544: 258d0008 */ addiu $t5,$t4,0x8 -/* e548: afad0094 */ sw $t5,0x94($sp) -/* e54c: ad980004 */ sw $t8,0x4($t4) -/* e550: ad990000 */ sw $t9,0x0($t4) -/* e554: 8fae0094 */ lw $t6,0x94($sp) -/* e558: 3508031d */ ori $t0,$t0,0x31d -/* e55c: 35294040 */ ori $t1,$t1,0x4040 -/* e560: 25cf0008 */ addiu $t7,$t6,0x8 -/* e564: afaf0094 */ sw $t7,0x94($sp) -/* e568: adc90004 */ sw $t1,0x4($t6) -/* e56c: adc80000 */ sw $t0,0x0($t6) -/* e570: 8fb00094 */ lw $s0,0x94($sp) -/* e574: 260b0008 */ addiu $t3,$s0,0x8 -/* e578: 0c002e4d */ jal viGetWidth -/* e57c: afab0094 */ sw $t3,0x94($sp) -/* e580: 00028c00 */ sll $s1,$v0,0x10 -/* e584: 00116403 */ sra $t4,$s1,0x10 -/* e588: 0c002e51 */ jal viGetHeight -/* e58c: 01808825 */ move $s1,$t4 -/* e590: 244dffff */ addiu $t5,$v0,-1 -/* e594: 31b903ff */ andi $t9,$t5,0x3ff -/* e598: 262fffff */ addiu $t7,$s1,-1 -/* e59c: 31e803ff */ andi $t0,$t7,0x3ff -/* e5a0: 0019c080 */ sll $t8,$t9,0x2 -/* e5a4: 3c01f600 */ lui $at,0xf600 -/* e5a8: 03017025 */ or $t6,$t8,$at -/* e5ac: 00084b80 */ sll $t1,$t0,0xe -/* e5b0: 01c95025 */ or $t2,$t6,$t1 -/* e5b4: ae0a0000 */ sw $t2,0x0($s0) -/* e5b8: ae000004 */ sw $zero,0x4($s0) -.PB0000e5bc: -/* e5bc: 0c004fd8 */ jal dhudRender -/* e5c0: 8fa40094 */ lw $a0,0x94($sp) -/* e5c4: 0c004f11 */ jal dhudClear -/* e5c8: afa20094 */ sw $v0,0x94($sp) -/* e5cc: 0fc4806b */ jal debug0f11ed70 -/* e5d0: 00000000 */ nop -/* e5d4: 28410002 */ slti $at,$v0,0x2 -/* e5d8: 14200004 */ bnez $at,.PB0000e5ec -/* e5dc: 00000000 */ nop -/* e5e0: 0c002666 */ jal profileRender -/* e5e4: 8fa40094 */ lw $a0,0x94($sp) -/* e5e8: afa20094 */ sw $v0,0x94($sp) -.PB0000e5ec: -/* e5ec: 3c0b8006 */ lui $t3,0x8006 -/* e5f0: 8d6be868 */ lw $t3,-0x1798($t3) -/* e5f4: 51600007 */ beqzl $t3,.PB0000e614 -/* e5f8: 8fac0094 */ lw $t4,0x94($sp) -/* e5fc: 0fc47ee8 */ jal debugUpdateMenu -/* e600: 00000000 */ nop -/* e604: 0fc47d89 */ jal dmenuRender -/* e608: 8fa40094 */ lw $a0,0x94($sp) -/* e60c: afa20094 */ sw $v0,0x94($sp) -/* e610: 8fac0094 */ lw $t4,0x94($sp) -.PB0000e614: -/* e614: 3c19e900 */ lui $t9,0xe900 -/* e618: 3c08b800 */ lui $t0,0xb800 -/* e61c: 258d0008 */ addiu $t5,$t4,0x8 -/* e620: afad0094 */ sw $t5,0x94($sp) -/* e624: ad800004 */ sw $zero,0x4($t4) -/* e628: ad990000 */ sw $t9,0x0($t4) -/* e62c: 8fb80094 */ lw $t8,0x94($sp) -/* e630: 3c048006 */ lui $a0,0x8006 -/* e634: 270f0008 */ addiu $t7,$t8,0x8 -/* e638: afaf0094 */ sw $t7,0x94($sp) -/* e63c: af000004 */ sw $zero,0x4($t8) -/* e640: af080000 */ sw $t0,0x0($t8) -/* e644: 8c84e4d8 */ lw $a0,-0x1b28($a0) -.PB0000e648: -/* e648: 50800006 */ beqzl $a0,.PB0000e664 -/* e64c: 8fa40090 */ lw $a0,0x90($sp) -/* e650: 0fc5a422 */ jal gfxSwapBuffers -/* e654: 00000000 */ nop -/* e658: 0c0027d3 */ jal viUpdateMode -/* e65c: 00000000 */ nop -/* e660: 8fa40090 */ lw $a0,0x90($sp) -.PB0000e664: -/* e664: 8fa50094 */ lw $a1,0x94($sp) -/* e668: 00003025 */ move $a2,$zero -/* e66c: 0c00bfad */ jal rdpCreateTask -/* e670: 27a70070 */ addiu $a3,$sp,0x70 -/* e674: 3c028006 */ lui $v0,0x8006 -/* e678: 2442e4dc */ addiu $v0,$v0,-6948 -/* e67c: 8c4e0000 */ lw $t6,0x0($v0) -/* e680: 25c90001 */ addiu $t1,$t6,0x1 -/* e684: 0c004ad2 */ jal memaPrint -/* e688: ac490000 */ sw $t1,0x0($v0) -/* e68c: 0fc5ba3d */ jal func0f16cf94 -/* e690: 00000000 */ nop -/* e694: 0c002664 */ jal profileSetMarker -/* e698: 3c040001 */ lui $a0,0x1 -/* e69c: 0fc480d1 */ jal debug0f119a80nb -/* e6a0: 00000000 */ nop -/* e6a4: 8fbf001c */ lw $ra,0x1c($sp) -.PB0000e6a8: -/* e6a8: 8fb00014 */ lw $s0,0x14($sp) -/* e6ac: 8fb10018 */ lw $s1,0x18($sp) -/* e6b0: 03e00008 */ jr $ra -/* e6b4: 27bd0098 */ addiu $sp,$sp,0x98 -); -#elif VERSION == VERSION_NTSC_BETA -GLOBAL_ASM( -glabel mainTick -/* e8ec: 27bdff68 */ addiu $sp,$sp,-152 -/* e8f0: 3c0f8006 */ lui $t7,0x8006 -/* e8f4: afbf001c */ sw $ra,0x1c($sp) -/* e8f8: afb10018 */ sw $s1,0x18($sp) -/* e8fc: afb00014 */ sw $s0,0x14($sp) -/* e900: 25eff69c */ addiu $t7,$t7,-2404 -/* e904: 8de10000 */ lw $at,0x0($t7) -/* e908: 8de80004 */ lw $t0,0x4($t7) -/* e90c: 27ae0070 */ addiu $t6,$sp,0x70 -/* e910: adc10000 */ sw $at,0x0($t6) -/* e914: adc80004 */ sw $t0,0x4($t6) -/* e918: 8de8000c */ lw $t0,0xc($t7) -/* e91c: 8de10008 */ lw $at,0x8($t7) -/* e920: 3c098006 */ lui $t1,0x8006 -/* e924: adc8000c */ sw $t0,0xc($t6) -/* e928: adc10008 */ sw $at,0x8($t6) -/* e92c: 8de10010 */ lw $at,0x10($t7) -/* e930: 8de80014 */ lw $t0,0x14($t7) -/* e934: 3c0a8006 */ lui $t2,0x8006 -/* e938: adc10010 */ sw $at,0x10($t6) -/* e93c: adc80014 */ sw $t0,0x14($t6) -/* e940: 8de8001c */ lw $t0,0x1c($t7) -/* e944: 8de10018 */ lw $at,0x18($t7) -/* e948: adc8001c */ sw $t0,0x1c($t6) -/* e94c: adc10018 */ sw $at,0x18($t6) -/* e950: 8d29f674 */ lw $t1,-0x98c($t1) -/* e954: 05230148 */ bgezl $t1,.NB0000ee78 -/* e958: 8fbf001c */ lw $ra,0x1c($sp) -/* e95c: 8d4af2ec */ lw $t2,-0xd14($t2) -/* e960: 2d410002 */ sltiu $at,$t2,0x2 -/* e964: 50200144 */ beqzl $at,.NB0000ee78 -/* e968: 8fbf001c */ lw $ra,0x1c($sp) -/* e96c: 0fc59f11 */ jal frametimeCalculate -/* e970: 00000000 */ sll $zero,$zero,0x0 -/* e974: 0c00270e */ jal profile00009a98 -/* e978: 00000000 */ sll $zero,$zero,0x0 -/* e97c: 0c00270c */ jal profileReset -/* e980: 00000000 */ sll $zero,$zero,0x0 -/* e984: 0c002710 */ jal profileSetMarker -/* e988: 3c040002 */ lui $a0,0x2 -/* e98c: 0c000dbe */ jal func000034d8 -/* e990: 00000000 */ sll $zero,$zero,0x0 -/* e994: 0c005477 */ jal joyDebugJoy -/* e998: 00000000 */ sll $zero,$zero,0x0 -/* e99c: 0c00073e */ jal schedSetCrashEnable2 -/* e9a0: 00002025 */ or $a0,$zero,$zero -/* e9a4: 3c048006 */ lui $a0,0x8006 -/* e9a8: 8c84f2e8 */ lw $a0,-0xd18($a0) -/* e9ac: 1080011c */ beqz $a0,.NB0000ee20 -/* e9b0: 00000000 */ sll $zero,$zero,0x0 -/* e9b4: 0fc5889f */ jal gfxGetMasterDisplayList -/* e9b8: 00000000 */ sll $zero,$zero,0x0 -/* e9bc: 244b0008 */ addiu $t3,$v0,0x8 -/* e9c0: afa20090 */ sw $v0,0x90($sp) -/* e9c4: afab0094 */ sw $t3,0x94($sp) -/* e9c8: 3c0cf510 */ lui $t4,0xf510 -/* e9cc: 3c0d0700 */ lui $t5,0x700 -/* e9d0: ac4d0004 */ sw $t5,0x4($v0) -/* e9d4: ac4c0000 */ sw $t4,0x0($v0) -/* e9d8: 8fb90094 */ lw $t9,0x94($sp) -/* e9dc: 3c0ef500 */ lui $t6,0xf500 -/* e9e0: 35ce0100 */ ori $t6,$t6,0x100 -/* e9e4: 27380008 */ addiu $t8,$t9,0x8 -/* e9e8: afb80094 */ sw $t8,0x94($sp) -/* e9ec: 3c0f0600 */ lui $t7,0x600 -/* e9f0: 3c088006 */ lui $t0,0x8006 -/* e9f4: af2f0004 */ sw $t7,0x4($t9) -/* e9f8: af2e0000 */ sw $t6,0x0($t9) -/* e9fc: 8d08f678 */ lw $t0,-0x988($t0) -/* ea00: 15000006 */ bnez $t0,.NB0000ea1c -/* ea04: 00002025 */ or $a0,$zero,$zero -/* ea08: 0c005790 */ jal joyGetButtons -/* ea0c: 2405000c */ addiu $a1,$zero,0xc -/* ea10: 2401000c */ addiu $at,$zero,0xc -/* ea14: 1441001a */ bne $v0,$at,.NB0000ea80 -/* ea18: 00002025 */ or $a0,$zero,$zero -.NB0000ea1c: -/* ea1c: 0c00573c */ jal joyGetStickX -/* ea20: 00002025 */ or $a0,$zero,$zero -/* ea24: 00028e00 */ sll $s1,$v0,0x18 -/* ea28: 00114e03 */ sra $t1,$s1,0x18 -/* ea2c: 01208825 */ or $s1,$t1,$zero -/* ea30: 0c005766 */ jal joyGetStickY -/* ea34: 00002025 */ or $a0,$zero,$zero -/* ea38: a3a2003b */ sb $v0,0x3b($sp) -/* ea3c: 00002025 */ or $a0,$zero,$zero -/* ea40: 0c005790 */ jal joyGetButtons -/* ea44: 3405ffff */ dli $a1,0xffff -/* ea48: 3050ffff */ andi $s0,$v0,0xffff -/* ea4c: 00002025 */ or $a0,$zero,$zero -/* ea50: 0c0057c0 */ jal joyGetButtonsPressedThisFrame -/* ea54: 3405ffff */ dli $a1,0xffff -/* ea58: 00112600 */ sll $a0,$s1,0x18 -/* ea5c: 00045603 */ sra $t2,$a0,0x18 -/* ea60: 01402025 */ or $a0,$t2,$zero -/* ea64: 83a5003b */ lb $a1,0x3b($sp) -/* ea68: 3206ffff */ andi $a2,$s0,0xffff -/* ea6c: 0fc4651b */ jal debugProcessInput -/* ea70: 3047ffff */ andi $a3,$v0,0xffff -/* ea74: 3c018006 */ lui $at,0x8006 -/* ea78: 10000021 */ beqz $zero,.NB0000eb00 -/* ea7c: ac22f678 */ sw $v0,-0x988($at) -.NB0000ea80: -/* ea80: 0c005790 */ jal joyGetButtons -/* ea84: 24051000 */ addiu $a1,$zero,0x1000 -/* ea88: 14400005 */ bnez $v0,.NB0000eaa0 -/* ea8c: 3c0b8008 */ lui $t3,0x8008 -/* ea90: 8d6b86f4 */ lw $t3,-0x790c($t3) -/* ea94: 3c018008 */ lui $at,0x8008 -/* ea98: 10000019 */ beqz $zero,.NB0000eb00 -/* ea9c: ac2b86f0 */ sw $t3,-0x7910($at) -.NB0000eaa0: -/* eaa0: 0c00573c */ jal joyGetStickX -/* eaa4: 00002025 */ or $a0,$zero,$zero -/* eaa8: 00028e00 */ sll $s1,$v0,0x18 -/* eaac: 00116603 */ sra $t4,$s1,0x18 -/* eab0: 01808825 */ or $s1,$t4,$zero -/* eab4: 0c005766 */ jal joyGetStickY -/* eab8: 00002025 */ or $a0,$zero,$zero -/* eabc: a3a2003b */ sb $v0,0x3b($sp) -/* eac0: 00002025 */ or $a0,$zero,$zero -/* eac4: 0c005790 */ jal joyGetButtons -/* eac8: 3405ffff */ dli $a1,0xffff -/* eacc: 3050ffff */ andi $s0,$v0,0xffff -/* ead0: 00002025 */ or $a0,$zero,$zero -/* ead4: 0c0057c0 */ jal joyGetButtonsPressedThisFrame -/* ead8: 3405ffff */ dli $a1,0xffff -/* eadc: 00112600 */ sll $a0,$s1,0x18 -/* eae0: 00046e03 */ sra $t5,$a0,0x18 -/* eae4: 01a02025 */ or $a0,$t5,$zero -/* eae8: 83a5003b */ lb $a1,0x3b($sp) -/* eaec: 3206ffff */ andi $a2,$s0,0xffff -/* eaf0: 0fc4651b */ jal debugProcessInput -/* eaf4: 3047ffff */ andi $a3,$v0,0xffff -/* eaf8: 3c018006 */ lui $at,0x8006 -/* eafc: ac22f678 */ sw $v0,-0x988($at) -.NB0000eb00: -/* eb00: 0fc599c9 */ jal lvTick -/* eb04: 00000000 */ sll $zero,$zero,0x0 -/* eb08: 0fc48e7f */ jal playermgrShuffle -/* eb0c: 00000000 */ sll $zero,$zero,0x0 -/* eb10: 3c198006 */ lui $t9,0x8006 -/* eb14: 8f39f2d4 */ lw $t9,-0xd2c($t9) -/* eb18: 3c10800a */ lui $s0,0x800a -/* eb1c: 2610e6c0 */ addiu $s0,$s0,-6464 -/* eb20: 2b21005a */ slti $at,$t9,0x5a -/* eb24: 10200055 */ beqz $at,.NB0000ec7c -/* eb28: 00000000 */ sll $zero,$zero,0x0 -/* eb2c: 8e18006c */ lw $t8,0x6c($s0) -/* eb30: 00008825 */ or $s1,$zero,$zero -/* eb34: 00002825 */ or $a1,$zero,$zero -/* eb38: 13000003 */ beqz $t8,.NB0000eb48 -/* eb3c: 00002025 */ or $a0,$zero,$zero -/* eb40: 10000001 */ beqz $zero,.NB0000eb48 -/* eb44: 24050001 */ addiu $a1,$zero,0x1 -.NB0000eb48: -/* eb48: 8e0e0068 */ lw $t6,0x68($s0) -/* eb4c: 00001825 */ or $v1,$zero,$zero -/* eb50: 00001025 */ or $v0,$zero,$zero -/* eb54: 11c00003 */ beqz $t6,.NB0000eb64 -/* eb58: 00000000 */ sll $zero,$zero,0x0 -/* eb5c: 10000001 */ beqz $zero,.NB0000eb64 -/* eb60: 24040001 */ addiu $a0,$zero,0x1 -.NB0000eb64: -/* eb64: 8e0f0064 */ lw $t7,0x64($s0) -/* eb68: 11e00003 */ beqz $t7,.NB0000eb78 -/* eb6c: 00000000 */ sll $zero,$zero,0x0 -/* eb70: 10000001 */ beqz $zero,.NB0000eb78 -/* eb74: 24030001 */ addiu $v1,$zero,0x1 -.NB0000eb78: -/* eb78: 8e080070 */ lw $t0,0x70($s0) -/* eb7c: 11000003 */ beqz $t0,.NB0000eb8c -/* eb80: 00000000 */ sll $zero,$zero,0x0 -/* eb84: 10000001 */ beqz $zero,.NB0000eb8c -/* eb88: 24020001 */ addiu $v0,$zero,0x1 -.NB0000eb8c: -/* eb8c: 00434821 */ addu $t1,$v0,$v1 -/* eb90: 01245021 */ addu $t2,$t1,$a0 -/* eb94: 01455821 */ addu $t3,$t2,$a1 -/* eb98: 19600038 */ blez $t3,.NB0000ec7c -/* eb9c: 00000000 */ sll $zero,$zero,0x0 -.NB0000eba0: -/* eba0: 0fc48ec2 */ jal playermgrGetPlayerAtOrder -/* eba4: 02202025 */ or $a0,$s1,$zero -/* eba8: 0fc48d5b */ jal setCurrentPlayerNum -/* ebac: 00402025 */ or $a0,$v0,$zero -/* ebb0: 3c0c8006 */ lui $t4,0x8006 -/* ebb4: 8d8cf2d4 */ lw $t4,-0xd2c($t4) -/* ebb8: 2401004e */ addiu $at,$zero,0x4e -/* ebbc: 55810006 */ bnel $t4,$at,.NB0000ebd8 -/* ebc0: 8e020284 */ lw $v0,0x284($s0) -/* ebc4: 0fc06a36 */ jal titleIsKeepingMode -/* ebc8: 00000000 */ sll $zero,$zero,0x0 -/* ebcc: 1440000b */ bnez $v0,.NB0000ebfc -/* ebd0: 00000000 */ sll $zero,$zero,0x0 -/* ebd4: 8e020284 */ lw $v0,0x284($s0) -.NB0000ebd8: -/* ebd8: 84440634 */ lh $a0,0x634($v0) -/* ebdc: 0c002f9f */ jal viSetViewPosition -/* ebe0: 84450636 */ lh $a1,0x636($v0) -/* ebe4: 8e020284 */ lw $v0,0x284($s0) -/* ebe8: c44c1854 */ lwc1 $f12,0x1854($v0) -/* ebec: c44e1858 */ lwc1 $f14,0x1858($v0) -/* ebf0: 84460630 */ lh $a2,0x630($v0) -/* ebf4: 0c002feb */ jal viSetFovAspectAndSize -/* ebf8: 84470632 */ lh $a3,0x632($v0) -.NB0000ebfc: -/* ebfc: 0fc59e2f */ jal lvTickPlayer -/* ec00: 00000000 */ sll $zero,$zero,0x0 -/* ec04: 8e0d006c */ lw $t5,0x6c($s0) -/* ec08: 26310001 */ addiu $s1,$s1,0x1 -/* ec0c: 00002825 */ or $a1,$zero,$zero -/* ec10: 11a00003 */ beqz $t5,.NB0000ec20 -/* ec14: 00002025 */ or $a0,$zero,$zero -/* ec18: 10000001 */ beqz $zero,.NB0000ec20 -/* ec1c: 24050001 */ addiu $a1,$zero,0x1 -.NB0000ec20: -/* ec20: 8e190068 */ lw $t9,0x68($s0) -/* ec24: 00001825 */ or $v1,$zero,$zero -/* ec28: 00001025 */ or $v0,$zero,$zero -/* ec2c: 13200003 */ beqz $t9,.NB0000ec3c -/* ec30: 00000000 */ sll $zero,$zero,0x0 -/* ec34: 10000001 */ beqz $zero,.NB0000ec3c -/* ec38: 24040001 */ addiu $a0,$zero,0x1 -.NB0000ec3c: -/* ec3c: 8e180064 */ lw $t8,0x64($s0) -/* ec40: 13000003 */ beqz $t8,.NB0000ec50 -/* ec44: 00000000 */ sll $zero,$zero,0x0 -/* ec48: 10000001 */ beqz $zero,.NB0000ec50 -/* ec4c: 24030001 */ addiu $v1,$zero,0x1 -.NB0000ec50: -/* ec50: 8e0e0070 */ lw $t6,0x70($s0) -/* ec54: 11c00003 */ beqz $t6,.NB0000ec64 -/* ec58: 00000000 */ sll $zero,$zero,0x0 -/* ec5c: 10000001 */ beqz $zero,.NB0000ec64 -/* ec60: 24020001 */ addiu $v0,$zero,0x1 -.NB0000ec64: -/* ec64: 00437821 */ addu $t7,$v0,$v1 -/* ec68: 01e44021 */ addu $t0,$t7,$a0 -/* ec6c: 01054821 */ addu $t1,$t0,$a1 -/* ec70: 0229082a */ slt $at,$s1,$t1 -/* ec74: 1420ffca */ bnez $at,.NB0000eba0 -/* ec78: 00000000 */ sll $zero,$zero,0x0 -.NB0000ec7c: -/* ec7c: 0fc59012 */ jal lvRender -/* ec80: 8fa40094 */ lw $a0,0x94($sp) -/* ec84: afa20094 */ sw $v0,0x94($sp) -/* ec88: 0c000dc0 */ jal func000034e0 -/* ec8c: 27a40094 */ addiu $a0,$sp,0x94 -/* ec90: 0fc4665b */ jal debugIsLineModeEnabled -/* ec94: 00000000 */ sll $zero,$zero,0x0 -/* ec98: 1040003e */ beqz $v0,.NB0000ed94 -/* ec9c: 2407ffff */ addiu $a3,$zero,-1 -/* eca0: 8faa0094 */ lw $t2,0x94($sp) -/* eca4: 3c0ce700 */ lui $t4,0xe700 -/* eca8: 3c18ba00 */ lui $t8,0xba00 -/* ecac: 254b0008 */ addiu $t3,$t2,0x8 -/* ecb0: afab0094 */ sw $t3,0x94($sp) -/* ecb4: ad400004 */ sw $zero,0x4($t2) -/* ecb8: ad4c0000 */ sw $t4,0x0($t2) -/* ecbc: 8fad0094 */ lw $t5,0x94($sp) -/* ecc0: 37181402 */ ori $t8,$t8,0x1402 -/* ecc4: 3c08f900 */ lui $t0,0xf900 -/* ecc8: 25b90008 */ addiu $t9,$t5,0x8 -/* eccc: afb90094 */ sw $t9,0x94($sp) -/* ecd0: ada00004 */ sw $zero,0x4($t5) -/* ecd4: adb80000 */ sw $t8,0x0($t5) -/* ecd8: 8fae0094 */ lw $t6,0x94($sp) -/* ecdc: 3c0bee00 */ lui $t3,0xee00 -/* ece0: 3c19b900 */ lui $t9,0xb900 -/* ece4: 25cf0008 */ addiu $t7,$t6,0x8 -/* ece8: afaf0094 */ sw $t7,0x94($sp) -/* ecec: adc70004 */ sw $a3,0x4($t6) -/* ecf0: adc80000 */ sw $t0,0x0($t6) -/* ecf4: 8fa90094 */ lw $t1,0x94($sp) -/* ecf8: 37390201 */ ori $t9,$t9,0x201 -/* ecfc: 24180004 */ addiu $t8,$zero,0x4 -/* ed00: 252a0008 */ addiu $t2,$t1,0x8 -/* ed04: afaa0094 */ sw $t2,0x94($sp) -/* ed08: ad270004 */ sw $a3,0x4($t1) -/* ed0c: ad2b0000 */ sw $t3,0x0($t1) -/* ed10: 8fac0094 */ lw $t4,0x94($sp) -/* ed14: 3c090fa5 */ lui $t1,0xfa5 -/* ed18: 3c08b900 */ lui $t0,0xb900 -/* ed1c: 258d0008 */ addiu $t5,$t4,0x8 -/* ed20: afad0094 */ sw $t5,0x94($sp) -/* ed24: ad980004 */ sw $t8,0x4($t4) -/* ed28: ad990000 */ sw $t9,0x0($t4) -/* ed2c: 8fae0094 */ lw $t6,0x94($sp) -/* ed30: 3508031d */ ori $t0,$t0,0x31d -/* ed34: 35294040 */ ori $t1,$t1,0x4040 -/* ed38: 25cf0008 */ addiu $t7,$t6,0x8 -/* ed3c: afaf0094 */ sw $t7,0x94($sp) -/* ed40: adc90004 */ sw $t1,0x4($t6) -/* ed44: adc80000 */ sw $t0,0x0($t6) -/* ed48: 8fb00094 */ lw $s0,0x94($sp) -/* ed4c: 260b0008 */ addiu $t3,$s0,0x8 -/* ed50: 0c002f77 */ jal viGetWidth -/* ed54: afab0094 */ sw $t3,0x94($sp) -/* ed58: 00028c00 */ sll $s1,$v0,0x10 -/* ed5c: 00116403 */ sra $t4,$s1,0x10 -/* ed60: 0c002f7b */ jal viGetHeight -/* ed64: 01808825 */ or $s1,$t4,$zero -/* ed68: 244dffff */ addiu $t5,$v0,-1 -/* ed6c: 31b903ff */ andi $t9,$t5,0x3ff -/* ed70: 262fffff */ addiu $t7,$s1,-1 -/* ed74: 31e803ff */ andi $t0,$t7,0x3ff -/* ed78: 0019c080 */ sll $t8,$t9,0x2 -/* ed7c: 3c01f600 */ lui $at,0xf600 -/* ed80: 03017025 */ or $t6,$t8,$at -/* ed84: 00084b80 */ sll $t1,$t0,0xe -/* ed88: 01c95025 */ or $t2,$t6,$t1 -/* ed8c: ae0a0000 */ sw $t2,0x0($s0) -/* ed90: ae000004 */ sw $zero,0x4($s0) -.NB0000ed94: -/* ed94: 0c0051a1 */ jal dhudRender -/* ed98: 8fa40094 */ lw $a0,0x94($sp) -/* ed9c: 0c0050b5 */ jal dhudClear -/* eda0: afa20094 */ sw $v0,0x94($sp) -/* eda4: 0fc4663a */ jal debug0f11ed70 -/* eda8: 00000000 */ sll $zero,$zero,0x0 -/* edac: 28410002 */ slti $at,$v0,0x2 -/* edb0: 14200004 */ bnez $at,.NB0000edc4 -/* edb4: 00000000 */ sll $zero,$zero,0x0 -/* edb8: 0c002712 */ jal profileRender -/* edbc: 8fa40094 */ lw $a0,0x94($sp) -/* edc0: afa20094 */ sw $v0,0x94($sp) -.NB0000edc4: -/* edc4: 3c0b8006 */ lui $t3,0x8006 -/* edc8: 8d6bf678 */ lw $t3,-0x988($t3) -/* edcc: 51600007 */ beqzl $t3,.NB0000edec -/* edd0: 8fac0094 */ lw $t4,0x94($sp) -/* edd4: 0fc4649c */ jal debugUpdateMenu -/* edd8: 00000000 */ sll $zero,$zero,0x0 -/* eddc: 0fc4633d */ jal dmenuRender -/* ede0: 8fa40094 */ lw $a0,0x94($sp) -/* ede4: afa20094 */ sw $v0,0x94($sp) -/* ede8: 8fac0094 */ lw $t4,0x94($sp) -.NB0000edec: -/* edec: 3c19e900 */ lui $t9,0xe900 -/* edf0: 3c08b800 */ lui $t0,0xb800 -/* edf4: 258d0008 */ addiu $t5,$t4,0x8 -/* edf8: afad0094 */ sw $t5,0x94($sp) -/* edfc: ad800004 */ sw $zero,0x4($t4) -/* ee00: ad990000 */ sw $t9,0x0($t4) -/* ee04: 8fb80094 */ lw $t8,0x94($sp) -/* ee08: 3c048006 */ lui $a0,0x8006 -/* ee0c: 270f0008 */ addiu $t7,$t8,0x8 -/* ee10: afaf0094 */ sw $t7,0x94($sp) -/* ee14: af000004 */ sw $zero,0x4($t8) -/* ee18: af080000 */ sw $t0,0x0($t8) -/* ee1c: 8c84f2e8 */ lw $a0,-0xd18($a0) -.NB0000ee20: -/* ee20: 50800006 */ beqzl $a0,.NB0000ee3c -/* ee24: 8fa40090 */ lw $a0,0x90($sp) -/* ee28: 0fc588d6 */ jal gfxSwapBuffers -/* ee2c: 00000000 */ sll $zero,$zero,0x0 -/* ee30: 0c002871 */ jal viUpdateMode -/* ee34: 00000000 */ sll $zero,$zero,0x0 -/* ee38: 8fa40090 */ lw $a0,0x90($sp) -.NB0000ee3c: -/* ee3c: 8fa50094 */ lw $a1,0x94($sp) -/* ee40: 00003025 */ or $a2,$zero,$zero -/* ee44: 0c00c411 */ jal rdpCreateTask -/* ee48: 27a70070 */ addiu $a3,$sp,0x70 -/* ee4c: 3c028006 */ lui $v0,0x8006 -/* ee50: 2442f2ec */ addiu $v0,$v0,-3348 -/* ee54: 8c4e0000 */ lw $t6,0x0($v0) -/* ee58: 25c90001 */ addiu $t1,$t6,0x1 -/* ee5c: 0c004c0a */ jal memaPrint -/* ee60: ac490000 */ sw $t1,0x0($v0) -/* ee64: 0fc59f51 */ jal func0f16cf94 -/* ee68: 00000000 */ sll $zero,$zero,0x0 -/* ee6c: 0c002710 */ jal profileSetMarker -/* ee70: 3c040001 */ lui $a0,0x1 -/* ee74: 8fbf001c */ lw $ra,0x1c($sp) -.NB0000ee78: -/* ee78: 8fb00014 */ lw $s0,0x14($sp) -/* ee7c: 8fb10018 */ lw $s1,0x18($sp) -/* ee80: 03e00008 */ jr $ra -/* ee84: 27bd0098 */ addiu $sp,$sp,0x98 -); - -u32 var8005f690nb[] = { - 0x00020000, 0x00000000, 0x00000000, 0x00000000, - 0x00000000, 0x00000000, 0x00000000, 0x00000000, -}; - -// Mismatch: sticky needs to be stored much lower in the stack. -// Stack is used by line mode GBI macros -//void mainTick(void) -//{ -// Gfx *gdl; -// Gfx *gdlstart; -// OSScMsg msg = {OS_SC_DONE_MSG}; -// s32 i; -// s8 stickx; -// s8 sticky; -// u16 buttons; -// u16 buttonsthisframe; -// -// if (g_MainChangeToStageNum < 0 && g_MainNumGfxTasks < 2) { -// frametimeCalculate(); -// profile00009a98(); -// profileReset(); -// profileSetMarker(PROFILE_MAINTICK_START); -// func000034d8(); -// joyDebugJoy(); -// schedSetCrashEnable2(false); -// -// if (g_MainGameLogicEnabled) { -// gdl = gdlstart = gfxGetMasterDisplayList(); -// -// gDPSetTile(gdl++, G_IM_FMT_RGBA, G_IM_SIZ_16b, 0, 0x0000, G_TX_LOADTILE, 0, G_TX_NOMIRROR | G_TX_WRAP, G_TX_NOMASK, G_TX_NOLOD, G_TX_NOMIRROR | G_TX_WRAP, G_TX_NOMASK, G_TX_NOLOD); -// gDPSetTile(gdl++, G_IM_FMT_RGBA, G_IM_SIZ_4b, 0, 0x0100, 6, 0, G_TX_NOMIRROR | G_TX_WRAP, G_TX_NOMASK, G_TX_NOLOD, G_TX_NOMIRROR | G_TX_WRAP, G_TX_NOMASK, G_TX_NOLOD); -// -// // If menu is open (?) or player has pressed C down + C up -// if (g_MainIsDebugMenuOpen || joyGetButtons(0, U_CBUTTONS | D_CBUTTONS) == (U_CBUTTONS | D_CBUTTONS)) { -// stickx = joyGetStickX(0); -// sticky = joyGetStickY(0); -// buttons = joyGetButtons(0, 0xffff); -// buttonsthisframe = joyGetButtonsPressedThisFrame(0, 0xffff); -// -// g_MainIsDebugMenuOpen = debugProcessInput(stickx, sticky, buttons, buttonsthisframe); -// } else if (joyGetButtons(0, START_BUTTON) == 0) { -// var80075d68 = var800786f4nb; -// } else { -// stickx = joyGetStickX(0); -// sticky = joyGetStickY(0); -// buttons = joyGetButtons(0, 0xffff); -// buttonsthisframe = joyGetButtonsPressedThisFrame(0, 0xffff); -// -// g_MainIsDebugMenuOpen = debugProcessInput(stickx, sticky, buttons, buttonsthisframe); -// } -// -// lvTick(); -// playermgrShuffle(); -// -// if (g_StageNum < STAGE_TITLE) { -// for (i = 0; i < PLAYERCOUNT(); i++) { -// setCurrentPlayerNum(playermgrGetPlayerAtOrder(i)); -// -// if (g_StageNum != STAGE_TEST_OLD || !titleIsKeepingMode()) { -// viSetViewPosition(g_Vars.currentplayer->viewleft, g_Vars.currentplayer->viewtop); -// viSetFovAspectAndSize( -// g_Vars.currentplayer->fovy, g_Vars.currentplayer->aspect, -// g_Vars.currentplayer->viewwidth, g_Vars.currentplayer->viewheight); -// } -// -// lvTickPlayer(); -// } -// } -// -// gdl = lvRender(gdl); -// func000034e0(&gdl); -// -// if (debugIsLineModeEnabled()) { -// gDPPipeSync(gdl++); -// gDPSetCycleType(gdl++, G_CYC_1CYCLE); -// gDPSetBlendColor(gdl++, 0xff, 0xff, 0xff, 0xff); -// gDPSetPrimDepth(gdl++, 0xffff, 0xffff); -// gDPSetDepthSource(gdl++, G_ZS_PRIM); -// gDPSetRenderMode(gdl++, G_RM_VISCVG, G_RM_VISCVG2); -// gDPFillRectangle(gdl++, 0, 0, viGetWidth() - 1, viGetHeight() - 1); -// } -// -// gdl = dhudRender(gdl); -// dhudClear(); -// -// if (debug0f11ed70() >= 2) { -// gdl = profileRender(gdl); -// } -// -// if (g_MainIsDebugMenuOpen) { -// debugUpdateMenu(); -// gdl = dmenuRender(gdl); -// } -// -// gDPFullSync(gdl++); -// gSPEndDisplayList(gdl++); -// } -// -// if (g_MainGameLogicEnabled) { -// gfxSwapBuffers(); -// viUpdateMode(); -// } -// -// rdpCreateTask(gdlstart, gdl, 0, &msg); -// g_MainNumGfxTasks++; -// memaPrint(); -// func0f16cf94(); -// profileSetMarker(PROFILE_MAINTICK_END); -// } -//} -#else void mainTick(void) { Gfx *gdl; @@ -4330,6 +3441,16 @@ void mainTick(void) gDPSetTile(gdl++, G_IM_FMT_RGBA, G_IM_SIZ_16b, 0, 0x0000, G_TX_LOADTILE, 0, G_TX_NOMIRROR | G_TX_WRAP, G_TX_NOMASK, G_TX_NOLOD, G_TX_NOMIRROR | G_TX_WRAP, G_TX_NOMASK, G_TX_NOLOD); gDPSetTile(gdl++, G_IM_FMT_RGBA, G_IM_SIZ_4b, 0, 0x0100, 6, 0, G_TX_NOMIRROR | G_TX_WRAP, G_TX_NOMASK, G_TX_NOLOD, G_TX_NOMIRROR | G_TX_WRAP, G_TX_NOMASK, G_TX_NOLOD); +#if VERSION == VERSION_NTSC_BETA || VERSION == VERSION_PAL_BETA + if (g_MainIsDebugMenuOpen || joyGetButtons(0, U_CBUTTONS | D_CBUTTONS) == (U_CBUTTONS | D_CBUTTONS)) { + g_MainIsDebugMenuOpen = debugProcessInput(joyGetStickX(0), joyGetStickY(0), joyGetButtons(0, 0xffff), joyGetButtonsPressedThisFrame(0, 0xffff)); + } else if (joyGetButtons(0, START_BUTTON) == 0) { + var80075d68 = var800786f4nb; + } else { + g_MainIsDebugMenuOpen = debugProcessInput(joyGetStickX(0), joyGetStickY(0), joyGetButtons(0, 0xffff), joyGetButtonsPressedThisFrame(0, 0xffff)); + } +#endif + lvTick(); playermgrShuffle(); @@ -4351,10 +3472,32 @@ void mainTick(void) gdl = lvRender(gdl); func000034e0(&gdl); +#if VERSION == VERSION_NTSC_BETA || VERSION == VERSION_PAL_BETA + if (debugIsLineModeEnabled()) { + gDPPipeSync(gdl++); + gDPSetCycleType(gdl++, G_CYC_1CYCLE); + gDPSetBlendColor(gdl++, 0xff, 0xff, 0xff, 0xff); + gDPSetPrimDepth(gdl++, 0xffff, 0xffff); + gDPSetDepthSource(gdl++, G_ZS_PRIM); + gDPSetRenderMode(gdl++, G_RM_VISCVG, G_RM_VISCVG2); + gDPFillRectangle(gdl++, 0, 0, viGetWidth() - 1, viGetHeight() - 1); + } + + gdl = dhudRender(gdl); + dhudClear(); +#endif + if (debug0f11ed70() >= 2) { gdl = profileRender(gdl); } +#if VERSION == VERSION_NTSC_BETA || VERSION == VERSION_PAL_BETA + if (g_MainIsDebugMenuOpen) { + debugUpdateMenu(); + gdl = dmenuRender(gdl); + } +#endif + gDPFullSync(gdl++); gSPEndDisplayList(gdl++); } @@ -4369,9 +3512,12 @@ void mainTick(void) memaPrint(); func0f16cf94(); profileSetMarker(PROFILE_MAINTICK_END); + +#if VERSION == VERSION_PAL_BETA + debug0f119a80nb(); +#endif } } -#endif void mainEndStage(void) {