1
0
Fork 0
mirror of https://github.com/zeldaret/oot.git synced 2024-11-11 03:39:59 +00:00

Match the last 2 functions in graph.c (#328)

* Match the last 2 functions in graph.c

* Minor graph improvements
This commit is contained in:
Roman971 2020-08-16 23:59:55 +02:00 committed by GitHub
parent 46f8eee4fe
commit 2826421c98
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
3 changed files with 102 additions and 944 deletions

View file

@ -1,300 +0,0 @@
.rdata
glabel D_80145240
.asciz "\x1b[31m"
.balign 4
glabel D_80145248
.asciz "RCP"
.balign 4
glabel D_80145264
.asciz "\x1b[m"
.balign 4
glabel D_80145268
.asciz "RCP is HUNG UP!!"
.balign 4
glabel D_8014527C
.asciz "Oh! MY GOD!!"
.balign 4
glabel D_8014528C
.asciz "../graph.c"
.balign 4
glabel D_80145298
.asciz "../graph.c"
.balign 4
.text
glabel Graph_TaskSet00
/* B3CF60 800C5DC0 27BDFF68 */ addiu $sp, $sp, -0x98
/* B3CF64 800C5DC4 AFBF002C */ sw $ra, 0x2c($sp)
/* B3CF68 800C5DC8 AFB10028 */ sw $s1, 0x28($sp)
/* B3CF6C 800C5DCC 00808825 */ move $s1, $a0
/* B3CF70 800C5DD0 0C001A78 */ jal osGetTime
/* B3CF74 800C5DD4 AFB00024 */ sw $s0, 0x24($sp)
/* B3CF78 800C5DD8 3C0E8016 */ lui $t6, %hi(sGraphSetTaskTime) # $t6, 0x8016
/* B3CF7C 800C5DDC 3C0F8016 */ lui $t7, %hi(sGraphSetTaskTime+4) # $t7, 0x8016
/* B3CF80 800C5DE0 8DEF65DC */ lw $t7, %lo(sGraphSetTaskTime+4)($t7)
/* B3CF84 800C5DE4 8DCE65D8 */ lw $t6, %lo(sGraphSetTaskTime)($t6)
/* B3CF88 800C5DE8 3C108017 */ lui $s0, %hi(D_8016A558) # $s0, 0x8017
/* B3CF8C 800C5DEC 2610A558 */ addiu $s0, %lo(D_8016A558) # addiu $s0, $s0, -0x5aa8
/* B3CF90 800C5DF0 8E080000 */ lw $t0, ($s0)
/* B3CF94 800C5DF4 8E090004 */ lw $t1, 4($s0)
/* B3CF98 800C5DF8 006F082B */ sltu $at, $v1, $t7
/* B3CF9C 800C5DFC 004EC023 */ subu $t8, $v0, $t6
/* B3CFA0 800C5E00 0301C023 */ subu $t8, $t8, $at
/* B3CFA4 800C5E04 006FC823 */ subu $t9, $v1, $t7
/* B3CFA8 800C5E08 3C0C8017 */ lui $t4, %hi(D_8016A528) # $t4, 0x8017
/* B3CFAC 800C5E0C 03085023 */ subu $t2, $t8, $t0
/* B3CFB0 800C5E10 0329082B */ sltu $at, $t9, $t1
/* B3CFB4 800C5E14 01415023 */ subu $t2, $t2, $at
/* B3CFB8 800C5E18 258CA528 */ addiu $t4, %lo(D_8016A528) # addiu $t4, $t4, -0x5ad8
/* B3CFBC 800C5E1C AD8A0000 */ sw $t2, ($t4)
/* B3CFC0 800C5E20 03295823 */ subu $t3, $t9, $t1
/* B3CFC4 800C5E24 AD8B0004 */ sw $t3, 4($t4)
/* B3CFC8 800C5E28 240F0000 */ li $t7, 0
/* B3CFCC 800C5E2C 240E0000 */ li $t6, 0
/* B3CFD0 800C5E30 3C070861 */ lui $a3, (0x0861C468 >> 16) # lui $a3, 0x861
/* B3CFD4 800C5E34 2625005C */ addiu $a1, $s1, 0x5c
/* B3CFD8 800C5E38 240D029A */ li $t5, 666
/* B3CFDC 800C5E3C AFAD001C */ sw $t5, 0x1c($sp)
/* B3CFE0 800C5E40 AFA50018 */ sw $a1, 0x18($sp)
/* B3CFE4 800C5E44 AFA50038 */ sw $a1, 0x38($sp)
/* B3CFE8 800C5E48 34E7C468 */ ori $a3, (0x0861C468 & 0xFFFF) # ori $a3, $a3, 0xc468
/* B3CFEC 800C5E4C AFAE0010 */ sw $t6, 0x10($sp)
/* B3CFF0 800C5E50 AFAF0014 */ sw $t7, 0x14($sp)
/* B3CFF4 800C5E54 27A40070 */ addiu $a0, $sp, 0x70
/* B3CFF8 800C5E58 0C0418B8 */ jal osSetTimer
/* B3CFFC 800C5E5C 24060000 */ li $a2, 0
/* B3D000 800C5E60 8FA40038 */ lw $a0, 0x38($sp)
/* B3D004 800C5E64 27A5006C */ addiu $a1, $sp, 0x6c
/* B3D008 800C5E68 0C000CA0 */ jal osRecvMesg
/* B3D00C 800C5E6C 24060001 */ li $a2, 1
/* B3D010 800C5E70 0C0408CC */ jal osStopTimer
/* B3D014 800C5E74 27A40070 */ addiu $a0, $sp, 0x70
/* B3D018 800C5E78 8FB8006C */ lw $t8, 0x6c($sp)
/* B3D01C 800C5E7C 2401029A */ li $at, 666
/* B3D020 800C5E80 1701002C */ bne $t8, $at, .L800C5F34
/* B3D024 800C5E84 3C048014 */ lui $a0, %hi(D_80145240) # $a0, 0x8014
/* B3D028 800C5E88 0C00084C */ jal osSyncPrintf
/* B3D02C 800C5E8C 24845240 */ addiu $a0, %lo(D_80145240) # addiu $a0, $a0, 0x5240
/* B3D030 800C5E90 3C048014 */ lui $a0, %hi(D_80145248) # $a0, 0x8014
/* B3D034 800C5E94 0C00084C */ jal osSyncPrintf
/* B3D038 800C5E98 24845248 */ addiu $a0, %lo(D_80145248) # addiu $a0, $a0, 0x5248
/* B3D03C 800C5E9C 3C048014 */ lui $a0, %hi(D_80145264) # $a0, 0x8014
/* B3D040 800C5EA0 0C00084C */ jal osSyncPrintf
/* B3D044 800C5EA4 24845264 */ addiu $a0, %lo(D_80145264) # addiu $a0, $a0, 0x5264
/* B3D048 800C5EA8 3C04A404 */ lui $a0, 0xa404
/* B3D04C 800C5EAC 0C000AC4 */ jal LogUtils_LogHexDump
/* B3D050 800C5EB0 24050020 */ li $a1, 32
/* B3D054 800C5EB4 3C04A410 */ lui $a0, 0xa410
/* B3D058 800C5EB8 0C000AC4 */ jal LogUtils_LogHexDump
/* B3D05C 800C5EBC 24050020 */ li $a1, 32
/* B3D060 800C5EC0 3C04801B */ lui $a0, %hi(gGfxSPTaskYieldBuffer) # $a0, 0x801b
/* B3D064 800C5EC4 248431C0 */ addiu $a0, %lo(gGfxSPTaskYieldBuffer) # addiu $a0, $a0, 0x31c0
/* B3D068 800C5EC8 0C000AC4 */ jal LogUtils_LogHexDump
/* B3D06C 800C5ECC 24050C00 */ li $a1, 3072
/* B3D070 800C5ED0 3C028016 */ lui $v0, %hi(gGameInfo) # $v0, 0x8016
/* B3D074 800C5ED4 3C048013 */ lui $a0, %hi(D_8012D260) # $a0, 0x8013
/* B3D078 800C5ED8 8C84D260 */ lw $a0, %lo(D_8012D260)($a0)
/* B3D07C 800C5EDC 2442FA90 */ addiu $v0, %lo(gGameInfo) # addiu $v0, $v0, -0x570
/* B3D080 800C5EE0 8C480000 */ lw $t0, ($v0)
/* B3D084 800C5EE4 2419FFFF */ li $t9, -1
/* B3D088 800C5EE8 1080000D */ beqz $a0, .L800C5F20
/* B3D08C 800C5EEC A51900E0 */ sh $t9, 0xe0($t0)
/* B3D090 800C5EF0 8C4A0000 */ lw $t2, ($v0)
/* B3D094 800C5EF4 24090007 */ li $t1, 7
/* B3D098 800C5EF8 240B0001 */ li $t3, 1
/* B3D09C 800C5EFC A5491074 */ sh $t1, 0x1074($t2)
/* B3D0A0 800C5F00 8C4C0000 */ lw $t4, ($v0)
/* B3D0A4 800C5F04 240E0002 */ li $t6, 2
/* B3D0A8 800C5F08 3C018013 */ lui $at, %hi(D_8012D260) # $at, 0x8013
/* B3D0AC 800C5F0C A58B1076 */ sh $t3, 0x1076($t4)
/* B3D0B0 800C5F10 8C4F0000 */ lw $t7, ($v0)
/* B3D0B4 800C5F14 A5EE107A */ sh $t6, 0x107a($t7)
/* B3D0B8 800C5F18 0C03162F */ jal Graph_DisassembleUCode
/* B3D0BC 800C5F1C AC24D260 */ sw $a0, %lo(D_8012D260)($at)
.L800C5F20:
/* B3D0C0 800C5F20 3C048014 */ lui $a0, %hi(D_80145268) # $a0, 0x8014
/* B3D0C4 800C5F24 3C058014 */ lui $a1, %hi(D_8014527C) # $a1, 0x8014
/* B3D0C8 800C5F28 24A5527C */ addiu $a1, %lo(D_8014527C) # addiu $a1, $a1, 0x527c
/* B3D0CC 800C5F2C 0C0359AD */ jal Fault_AddHungupAndCrashImpl
/* B3D0D0 800C5F30 24845268 */ addiu $a0, %lo(D_80145268) # addiu $a0, $a0, 0x5268
.L800C5F34:
/* B3D0D4 800C5F34 8FA40038 */ lw $a0, 0x38($sp)
/* B3D0D8 800C5F38 27A5006C */ addiu $a1, $sp, 0x6c
/* B3D0DC 800C5F3C 0C000CA0 */ jal osRecvMesg
/* B3D0E0 800C5F40 00003025 */ move $a2, $zero
/* B3D0E4 800C5F44 8E2602EC */ lw $a2, 0x2ec($s1)
/* B3D0E8 800C5F48 8E2401B0 */ lw $a0, 0x1b0($s1)
/* B3D0EC 800C5F4C 3C018013 */ lui $at, %hi(D_8012D260) # $at, 0x8013
/* B3D0F0 800C5F50 10C00004 */ beqz $a2, .L800C5F64
/* B3D0F4 800C5F54 AC24D260 */ sw $a0, %lo(D_8012D260)($at)
/* B3D0F8 800C5F58 02202025 */ move $a0, $s1
/* B3D0FC 800C5F5C 00C0F809 */ jalr $a2
/* B3D100 800C5F60 8E2502F0 */ lw $a1, 0x2f0($s1)
.L800C5F64:
/* B3D104 800C5F64 0C001A78 */ jal osGetTime
/* B3D108 800C5F68 00000000 */ nop
/* B3D10C 800C5F6C 3C048017 */ lui $a0, %hi(D_8016A550) # $a0, 0x8017
/* B3D110 800C5F70 2484A550 */ addiu $a0, %lo(D_8016A550) # addiu $a0, $a0, -0x5ab0
/* B3D114 800C5F74 8C980000 */ lw $t8, ($a0)
/* B3D118 800C5F78 8C990004 */ lw $t9, 4($a0)
/* B3D11C 800C5F7C 57000004 */ bnezl $t8, .L800C5F90
/* B3D120 800C5F80 8E080000 */ lw $t0, ($s0)
/* B3D124 800C5F84 53200012 */ beql $t9, $zero, .L800C5FD0
/* B3D128 800C5F88 8E180000 */ lw $t8, ($s0)
/* B3D12C 800C5F8C 8E080000 */ lw $t0, ($s0)
.L800C5F90:
/* B3D130 800C5F90 8E090004 */ lw $t1, 4($s0)
/* B3D134 800C5F94 8C8C0000 */ lw $t4, ($a0)
/* B3D138 800C5F98 8C8D0004 */ lw $t5, 4($a0)
/* B3D13C 800C5F9C 01235821 */ addu $t3, $t1, $v1
/* B3D140 800C5FA0 0163082B */ sltu $at, $t3, $v1
/* B3D144 800C5FA4 00285021 */ addu $t2, $at, $t0
/* B3D148 800C5FA8 01425021 */ addu $t2, $t2, $v0
/* B3D14C 800C5FAC 014C7023 */ subu $t6, $t2, $t4
/* B3D150 800C5FB0 016D082B */ sltu $at, $t3, $t5
/* B3D154 800C5FB4 01C17023 */ subu $t6, $t6, $at
/* B3D158 800C5FB8 AE0E0000 */ sw $t6, ($s0)
/* B3D15C 800C5FBC 016D7823 */ subu $t7, $t3, $t5
/* B3D160 800C5FC0 AE0F0004 */ sw $t7, 4($s0)
/* B3D164 800C5FC4 AC820000 */ sw $v0, ($a0)
/* B3D168 800C5FC8 AC830004 */ sw $v1, 4($a0)
/* B3D16C 800C5FCC 8E180000 */ lw $t8, ($s0)
.L800C5FD0:
/* B3D170 800C5FD0 8E190004 */ lw $t9, 4($s0)
/* B3D174 800C5FD4 3C088017 */ lui $t0, %hi(D_8016A520) # $t0, 0x8017
/* B3D178 800C5FD8 2508A520 */ addiu $t0, %lo(D_8016A520) # addiu $t0, $t0, -0x5ae0
/* B3D17C 800C5FDC AD180000 */ sw $t8, ($t0)
/* B3D180 800C5FE0 240A0000 */ li $t2, 0
/* B3D184 800C5FE4 AD190004 */ sw $t9, 4($t0)
/* B3D188 800C5FE8 AE0A0000 */ sw $t2, ($s0)
/* B3D18C 800C5FEC 240B0000 */ li $t3, 0
/* B3D190 800C5FF0 0C001A78 */ jal osGetTime
/* B3D194 800C5FF4 AE0B0004 */ sw $t3, 4($s0)
/* B3D198 800C5FF8 3C018016 */ lui $at, %hi(sGraphSetTaskTime+4) # $at, 0x8016
/* B3D19C 800C5FFC AC2265D8 */ sw $v0, %lo(sGraphSetTaskTime)($at)
/* B3D1A0 800C6000 AC2365DC */ sw $v1, %lo(sGraphSetTaskTime+4)($at)
/* B3D1A4 800C6004 26300088 */ addiu $s0, $s1, 0x88
/* B3D1A8 800C6008 24090001 */ li $t1, 1
/* B3D1AC 800C600C 240C0004 */ li $t4, 4
/* B3D1B0 800C6010 AE090000 */ sw $t1, ($s0)
/* B3D1B4 800C6014 0C034B7C */ jal SysUcode_GetUCodeBoot
/* B3D1B8 800C6018 AE0C0004 */ sw $t4, 4($s0)
/* B3D1BC 800C601C 0C034B7F */ jal SysUcode_GetUCodeBootSize
/* B3D1C0 800C6020 AE020008 */ sw $v0, 8($s0)
/* B3D1C4 800C6024 0C034B85 */ jal SysUcode_GetUCode
/* B3D1C8 800C6028 AE02000C */ sw $v0, 0xc($s0)
/* B3D1CC 800C602C 0C034B88 */ jal SysUcode_GetUCodeData
/* B3D1D0 800C6030 AE020010 */ sw $v0, 0x10($s0)
/* B3D1D4 800C6034 3C0F801B */ lui $t7, %hi(gGfxSPTaskStack) # $t7, 0x801b
/* B3D1D8 800C6038 3C19801A */ lui $t9, %hi(gGfxSPTaskOutputBuffer) # $t9, 0x801a
/* B3D1DC 800C603C 3C08801B */ lui $t0, %hi(gGfxSPTaskYieldBuffer) # $t0, 0x801b
/* B3D1E0 800C6040 240D1000 */ li $t5, 4096
/* B3D1E4 800C6044 240E0800 */ li $t6, 2048
/* B3D1E8 800C6048 25EF3DC0 */ addiu $t7, %lo(gGfxSPTaskStack) # addiu $t7, $t7, 0x3dc0
/* B3D1EC 800C604C 24180400 */ li $t8, 1024
/* B3D1F0 800C6050 2739B1C0 */ addiu $t9, %lo(gGfxSPTaskOutputBuffer) # addiu $t9, $t9, -0x4e40
/* B3D1F4 800C6054 250831C0 */ addiu $t0, %lo(gGfxSPTaskYieldBuffer) # addiu $t0, $t0, 0x31c0
/* B3D1F8 800C6058 AE020018 */ sw $v0, 0x18($s0)
/* B3D1FC 800C605C AE0D0014 */ sw $t5, 0x14($s0)
/* B3D200 800C6060 AE0E001C */ sw $t6, 0x1c($s0)
/* B3D204 800C6064 AE0F0020 */ sw $t7, 0x20($s0)
/* B3D208 800C6068 AE180024 */ sw $t8, 0x24($s0)
/* B3D20C 800C606C AE190028 */ sw $t9, 0x28($s0)
/* B3D210 800C6070 AE08002C */ sw $t0, 0x2c($s0)
/* B3D214 800C6074 8E2A01B0 */ lw $t2, 0x1b0($s1)
/* B3D218 800C6078 3C068014 */ lui $a2, %hi(D_8014528C) # $a2, 0x8014
/* B3D21C 800C607C 24C6528C */ addiu $a2, %lo(D_8014528C) # addiu $a2, $a2, 0x528c
/* B3D220 800C6080 27A40048 */ addiu $a0, $sp, 0x48
/* B3D224 800C6084 02202825 */ move $a1, $s1
/* B3D228 800C6088 2407033C */ li $a3, 828
/* B3D22C 800C608C 0C031AB1 */ jal Graph_OpenDisps
/* B3D230 800C6090 AE0A0030 */ sw $t2, 0x30($s0)
/* B3D234 800C6094 8E2B01BC */ lw $t3, 0x1bc($s1)
/* B3D238 800C6098 8E2901B0 */ lw $t1, 0x1b0($s1)
/* B3D23C 800C609C 3C068014 */ lui $a2, %hi(D_80145298) # $a2, 0x8014
/* B3D240 800C60A0 24C65298 */ addiu $a2, %lo(D_80145298) # addiu $a2, $a2, 0x5298
/* B3D244 800C60A4 01696023 */ subu $t4, $t3, $t1
/* B3D248 800C60A8 AE0C0034 */ sw $t4, 0x34($s0)
/* B3D24C 800C60AC 27A40048 */ addiu $a0, $sp, 0x48
/* B3D250 800C60B0 02202825 */ move $a1, $s1
/* B3D254 800C60B4 0C031AD5 */ jal Graph_CloseDisps
/* B3D258 800C60B8 2407033E */ li $a3, 830
/* B3D25C 800C60BC 3C0D801B */ lui $t5, %hi(gGfxSPTaskYieldBuffer) # $t5, 0x801b
/* B3D260 800C60C0 25AD31C0 */ addiu $t5, %lo(gGfxSPTaskYieldBuffer) # addiu $t5, $t5, 0x31c0
/* B3D264 800C60C4 240E0C00 */ li $t6, 3072
/* B3D268 800C60C8 AE0D0038 */ sw $t5, 0x38($s0)
/* B3D26C 800C60CC AE0E003C */ sw $t6, 0x3c($s0)
/* B3D270 800C60D0 26250078 */ addiu $a1, $s1, 0x78
/* B3D274 800C60D4 240F0063 */ li $t7, 99
/* B3D278 800C60D8 ACA00000 */ sw $zero, ($a1)
/* B3D27C 800C60DC ACAF0008 */ sw $t7, 8($a1)
/* B3D280 800C60E0 3C028016 */ lui $v0, %hi(gGameInfo) # $v0, 0x8016
/* B3D284 800C60E4 8C42FA90 */ lw $v0, %lo(gGameInfo)($v0)
/* B3D288 800C60E8 3C0E8016 */ lui $t6, %hi(sGraphCfbInfos) # $t6, 0x8016
/* B3D28C 800C60EC 25CE65F0 */ addiu $t6, %lo(sGraphCfbInfos) # addiu $t6, $t6, 0x65f0
/* B3D290 800C60F0 84430116 */ lh $v1, 0x116($v0)
/* B3D294 800C60F4 30780001 */ andi $t8, $v1, 1
/* B3D298 800C60F8 13000009 */ beqz $t8, .L800C6120
/* B3D29C 800C60FC 3079FFFE */ andi $t9, $v1, 0xfffe
/* B3D2A0 800C6100 A4590116 */ sh $t9, 0x116($v0)
/* B3D2A4 800C6104 8CA80008 */ lw $t0, 8($a1)
/* B3D2A8 800C6108 2401FFBF */ li $at, -65
/* B3D2AC 800C610C 01015024 */ and $t2, $t0, $at
/* B3D2B0 800C6110 ACAA0008 */ sw $t2, 8($a1)
/* B3D2B4 800C6114 8E2B02E8 */ lw $t3, 0x2e8($s1)
/* B3D2B8 800C6118 2569FFFF */ addiu $t1, $t3, -1
/* B3D2BC 800C611C AE2902E8 */ sw $t1, 0x2e8($s1)
.L800C6120:
/* B3D2C0 800C6120 3C038013 */ lui $v1, %hi(sGraphCfbInfoIdx) # $v1, 0x8013
/* B3D2C4 800C6124 8C63D264 */ lw $v1, %lo(sGraphCfbInfoIdx)($v1)
/* B3D2C8 800C6128 24010003 */ li $at, 3
/* B3D2CC 800C612C 8FAC0038 */ lw $t4, 0x38($sp)
/* B3D2D0 800C6130 000368C0 */ sll $t5, $v1, 3
/* B3D2D4 800C6134 01A36823 */ subu $t5, $t5, $v1
/* B3D2D8 800C6138 24630001 */ addiu $v1, $v1, 1
/* B3D2DC 800C613C 0061001A */ div $zero, $v1, $at
/* B3D2E0 800C6140 ACA00054 */ sw $zero, 0x54($a1)
/* B3D2E4 800C6144 ACAC0050 */ sw $t4, 0x50($a1)
/* B3D2E8 800C6148 8E2F02DC */ lw $t7, 0x2dc($s1)
/* B3D2EC 800C614C 000D6880 */ sll $t5, $t5, 2
/* B3D2F0 800C6150 01AE1021 */ addu $v0, $t5, $t6
/* B3D2F4 800C6154 AC4F0000 */ sw $t7, ($v0)
/* B3D2F8 800C6158 8E3802DC */ lw $t8, 0x2dc($s1)
/* B3D2FC 800C615C 3C0A8016 */ lui $t2, %hi(gGameInfo) # $t2, 0x8016
/* B3D300 800C6160 00001810 */ mfhi $v1
/* B3D304 800C6164 AC580004 */ sw $t8, 4($v0)
/* B3D308 800C6168 8E390284 */ lw $t9, 0x284($s1)
/* B3D30C 800C616C 3C018013 */ lui $at, %hi(sGraphCfbInfoIdx) # $at, 0x8013
/* B3D310 800C6170 3C048016 */ lui $a0, %hi(gSchedContext+0x38) # $a0, 0x8016
/* B3D314 800C6174 AC590008 */ sw $t9, 8($v0)
/* B3D318 800C6178 8E2802E4 */ lw $t0, 0x2e4($s1)
/* B3D31C 800C617C 248466A0 */ addiu $a0, %lo(gSchedContext+0x38) # addiu $a0, $a0, 0x66a0
/* B3D320 800C6180 24060001 */ li $a2, 1
/* B3D324 800C6184 AC48000C */ sw $t0, 0xc($v0)
/* B3D328 800C6188 C62402F4 */ lwc1 $f4, 0x2f4($s1)
/* B3D32C 800C618C E4440014 */ swc1 $f4, 0x14($v0)
/* B3D330 800C6190 C62602F8 */ lwc1 $f6, 0x2f8($s1)
/* B3D334 800C6194 A0400010 */ sb $zero, 0x10($v0)
/* B3D338 800C6198 E4460018 */ swc1 $f6, 0x18($v0)
/* B3D33C 800C619C 8D4AFA90 */ lw $t2, %lo(gGameInfo)($t2)
/* B3D340 800C61A0 854B0110 */ lh $t3, 0x110($t2)
/* B3D344 800C61A4 A04B0011 */ sb $t3, 0x11($v0)
/* B3D348 800C61A8 ACA2000C */ sw $v0, 0xc($a1)
/* B3D34C 800C61AC AC23D264 */ sw $v1, %lo(sGraphCfbInfoIdx)($at)
/* B3D350 800C61B0 0C000C18 */ jal osSendMesg
/* B3D354 800C61B4 AE240058 */ sw $a0, 0x58($s1)
/* B3D358 800C61B8 3C048016 */ lui $a0, %hi(gSchedContext) # $a0, 0x8016
/* B3D35C 800C61BC 0C03257E */ jal Sched_SendEntryMsg
/* B3D360 800C61C0 24846668 */ addiu $a0, %lo(gSchedContext) # addiu $a0, $a0, 0x6668
/* B3D364 800C61C4 8FBF002C */ lw $ra, 0x2c($sp)
/* B3D368 800C61C8 8FB00024 */ lw $s0, 0x24($sp)
/* B3D36C 800C61CC 8FB10028 */ lw $s1, 0x28($sp)
/* B3D370 800C61D0 03E00008 */ jr $ra
/* B3D374 800C61D4 27BD0098 */ addiu $sp, $sp, 0x98

View file

@ -1,556 +0,0 @@
.rdata
glabel D_801452A4
.asciz "../graph.c"
.balign 4
glabel D_801452B0
.asciz "WORK_DISP "
# EUC-JP: | Start
.balign 4
glabel D_801452C0
.asciz "POLY_OPA_DISP "
# EUC-JP: | Start
.balign 4
glabel D_801452D4
.asciz "POLY_XLU_DISP "
# EUC-JP: | Start
.balign 4
glabel D_801452E8
.asciz "OVERLAY_DISP "
# EUC-JP: | Start
.balign 4
glabel D_801452FC
.asciz "../graph.c"
.balign 4
glabel D_80145308
.asciz "../graph.c"
.balign 4
glabel D_80145314
.asciz "WORK_DISP "
# EUC-JP: | End
.balign 4
glabel D_80145324
.asciz "POLY_OPA_DISP "
# EUC-JP: | End
.balign 4
glabel D_80145338
.asciz "POLY_XLU_DISP "
# EUC-JP: | End
.balign 4
glabel D_8014534C
.asciz "OVERLAY_DISP "
# EUC-JP: | End
.balign 4
glabel D_80145360
.asciz "../graph.c"
.balign 4
glabel D_8014536C
.asciz "../graph.c"
.balign 4
glabel D_80145378
.asciz "../graph.c"
.balign 4
glabel D_80145384
.asciz "do_count_fault"
.balign 4
glabel D_80145394
.asciz "%c"
.balign 4
glabel D_80145398
.asciz "\x1b[41;37mダイナミック領域先頭が破壊されています\n\x1b[m"
# | Dynamic area head is destroyed
.balign 4
glabel D_801453CC
.asciz "../graph.c"
.balign 4
glabel D_801453D8
.asciz "%c"
.balign 4
glabel D_801453DC
.asciz "\x1b[41;37mダイナミック領域末尾が破壊されています\n\x1b[m"
# EUC-JP: | Dynamic region tail is destroyed
.balign 4
glabel D_80145410
.asciz "../graph.c"
.balign 4
glabel D_8014541C
.asciz "%c"
.balign 4
glabel D_80145420
.asciz "\x1b[41;37mゼルダ0は死んでしまった(graph_alloc is empty)\n\x1b[m"
# EUC-JP: 0 | 'Zelda 0 is dead'?
.balign 4
glabel D_8014545C
.asciz "%c"
.balign 4
glabel D_80145460
.asciz "\x1b[41;37mゼルダ1は死んでしまった(graph_alloc is empty)\n\x1b[m"
# EUC-JP: 1 | 'Zelda 1 is dead'?
.balign 4
glabel D_8014549C
.asciz "%c"
.balign 4
glabel D_801454A0
.asciz "\x1b[41;37mゼルダ4は死んでしまった(graph_alloc is empty)\n\x1b[m"
# EUC-JP: 4 | 'Zelda 4 is dead'?
.balign 4
glabel D_801454DC
.asciz "\x1b[43;30mPRE-NMIによりリセットモードに移行します\n\x1b[m"
# EUC-JP: | To reset mode
.balign 4
.text
glabel Graph_Update
/* B3D378 800C61D8 27BDFF38 */ addiu $sp, $sp, -0xc8
/* B3D37C 800C61DC AFBF001C */ sw $ra, 0x1c($sp)
/* B3D380 800C61E0 AFB00018 */ sw $s0, 0x18($sp)
/* B3D384 800C61E4 AFA500CC */ sw $a1, 0xcc($sp)
/* B3D388 800C61E8 00808025 */ move $s0, $a0
/* B3D38C 800C61EC 0C0316C5 */ jal Graph_InitTHGA
/* B3D390 800C61F0 ACA000A0 */ sw $zero, 0xa0($a1)
/* B3D394 800C61F4 3C068014 */ lui $a2, %hi(D_801452A4) # $a2, 0x8014
/* B3D398 800C61F8 24C652A4 */ addiu $a2, %lo(D_801452A4) # addiu $a2, $a2, 0x52a4
/* B3D39C 800C61FC 27A400B0 */ addiu $a0, $sp, 0xb0
/* B3D3A0 800C6200 02002825 */ move $a1, $s0
/* B3D3A4 800C6204 0C031AB1 */ jal Graph_OpenDisps
/* B3D3A8 800C6208 240703C6 */ li $a3, 966
/* B3D3AC 800C620C 8E0201BC */ lw $v0, 0x1bc($s0)
/* B3D3B0 800C6210 3C188014 */ lui $t8, %hi(D_801452B0) # $t8, 0x8014
/* B3D3B4 800C6214 271852B0 */ addiu $t8, %lo(D_801452B0) # addiu $t8, $t8, 0x52b0
/* B3D3B8 800C6218 244F0008 */ addiu $t7, $v0, 8
/* B3D3BC 800C621C AE0F01BC */ sw $t7, 0x1bc($s0)
/* B3D3C0 800C6220 3C080002 */ lui $t0, 2
/* B3D3C4 800C6224 AC480000 */ sw $t0, ($v0)
/* B3D3C8 800C6228 AC580004 */ sw $t8, 4($v0)
/* B3D3CC 800C622C 8E0202C0 */ lw $v0, 0x2c0($s0)
/* B3D3D0 800C6230 3C098014 */ lui $t1, %hi(D_801452C0) # $t1, 0x8014
/* B3D3D4 800C6234 252952C0 */ addiu $t1, %lo(D_801452C0) # addiu $t1, $t1, 0x52c0
/* B3D3D8 800C6238 24590008 */ addiu $t9, $v0, 8
/* B3D3DC 800C623C AE1902C0 */ sw $t9, 0x2c0($s0)
/* B3D3E0 800C6240 AC490004 */ sw $t1, 4($v0)
/* B3D3E4 800C6244 AC480000 */ sw $t0, ($v0)
/* B3D3E8 800C6248 8E0202D0 */ lw $v0, 0x2d0($s0)
/* B3D3EC 800C624C 3C0B8014 */ lui $t3, %hi(D_801452D4) # $t3, 0x8014
/* B3D3F0 800C6250 256B52D4 */ addiu $t3, %lo(D_801452D4) # addiu $t3, $t3, 0x52d4
/* B3D3F4 800C6254 244A0008 */ addiu $t2, $v0, 8
/* B3D3F8 800C6258 AE0A02D0 */ sw $t2, 0x2d0($s0)
/* B3D3FC 800C625C AC4B0004 */ sw $t3, 4($v0)
/* B3D400 800C6260 AC480000 */ sw $t0, ($v0)
/* B3D404 800C6264 8E0202B0 */ lw $v0, 0x2b0($s0)
/* B3D408 800C6268 3C0D8014 */ lui $t5, %hi(D_801452E8) # $t5, 0x8014
/* B3D40C 800C626C 25AD52E8 */ addiu $t5, %lo(D_801452E8) # addiu $t5, $t5, 0x52e8
/* B3D410 800C6270 244C0008 */ addiu $t4, $v0, 8
/* B3D414 800C6274 AE0C02B0 */ sw $t4, 0x2b0($s0)
/* B3D418 800C6278 3C068014 */ lui $a2, %hi(D_801452FC) # $a2, 0x8014
/* B3D41C 800C627C 24C652FC */ addiu $a2, %lo(D_801452FC) # addiu $a2, $a2, 0x52fc
/* B3D420 800C6280 27A400B0 */ addiu $a0, $sp, 0xb0
/* B3D424 800C6284 02002825 */ move $a1, $s0
/* B3D428 800C6288 240703CF */ li $a3, 975
/* B3D42C 800C628C AC4D0004 */ sw $t5, 4($v0)
/* B3D430 800C6290 0C031AD5 */ jal Graph_CloseDisps
/* B3D434 800C6294 AC480000 */ sw $t0, ($v0)
/* B3D438 800C6298 0C0312A6 */ jal GameState_ReqPadData
/* B3D43C 800C629C 8FA400CC */ lw $a0, 0xcc($sp)
/* B3D440 800C62A0 0C0312B2 */ jal GameState_Update
/* B3D444 800C62A4 8FA400CC */ lw $a0, 0xcc($sp)
/* B3D448 800C62A8 3C068014 */ lui $a2, %hi(D_80145308) # $a2, 0x8014
/* B3D44C 800C62AC 24C65308 */ addiu $a2, %lo(D_80145308) # addiu $a2, $a2, 0x5308
/* B3D450 800C62B0 27A4008C */ addiu $a0, $sp, 0x8c
/* B3D454 800C62B4 02002825 */ move $a1, $s0
/* B3D458 800C62B8 0C031AB1 */ jal Graph_OpenDisps
/* B3D45C 800C62BC 240703DB */ li $a3, 987
/* B3D460 800C62C0 8E0201BC */ lw $v0, 0x1bc($s0)
/* B3D464 800C62C4 3C0F8014 */ lui $t7, %hi(D_80145314) # $t7, 0x8014
/* B3D468 800C62C8 3C080002 */ lui $t0, 2
/* B3D46C 800C62CC 244E0008 */ addiu $t6, $v0, 8
/* B3D470 800C62D0 AE0E01BC */ sw $t6, 0x1bc($s0)
/* B3D474 800C62D4 25EF5314 */ addiu $t7, %lo(D_80145314) # addiu $t7, $t7, 0x5314
/* B3D478 800C62D8 AC4F0004 */ sw $t7, 4($v0)
/* B3D47C 800C62DC AC480000 */ sw $t0, ($v0)
/* B3D480 800C62E0 8E0202C0 */ lw $v0, 0x2c0($s0)
/* B3D484 800C62E4 3C198014 */ lui $t9, %hi(D_80145324) # $t9, 0x8014
/* B3D488 800C62E8 27395324 */ addiu $t9, %lo(D_80145324) # addiu $t9, $t9, 0x5324
/* B3D48C 800C62EC 24580008 */ addiu $t8, $v0, 8
/* B3D490 800C62F0 AE1802C0 */ sw $t8, 0x2c0($s0)
/* B3D494 800C62F4 AC590004 */ sw $t9, 4($v0)
/* B3D498 800C62F8 AC480000 */ sw $t0, ($v0)
/* B3D49C 800C62FC 8E0202D0 */ lw $v0, 0x2d0($s0)
/* B3D4A0 800C6300 3C0A8014 */ lui $t2, %hi(D_80145338) # $t2, 0x8014
/* B3D4A4 800C6304 254A5338 */ addiu $t2, %lo(D_80145338) # addiu $t2, $t2, 0x5338
/* B3D4A8 800C6308 24490008 */ addiu $t1, $v0, 8
/* B3D4AC 800C630C AE0902D0 */ sw $t1, 0x2d0($s0)
/* B3D4B0 800C6310 AC4A0004 */ sw $t2, 4($v0)
/* B3D4B4 800C6314 AC480000 */ sw $t0, ($v0)
/* B3D4B8 800C6318 8E0202B0 */ lw $v0, 0x2b0($s0)
/* B3D4BC 800C631C 3C0C8014 */ lui $t4, %hi(D_8014534C) # $t4, 0x8014
/* B3D4C0 800C6320 258C534C */ addiu $t4, %lo(D_8014534C) # addiu $t4, $t4, 0x534c
/* B3D4C4 800C6324 244B0008 */ addiu $t3, $v0, 8
/* B3D4C8 800C6328 AE0B02B0 */ sw $t3, 0x2b0($s0)
/* B3D4CC 800C632C 3C068014 */ lui $a2, %hi(D_80145360) # $a2, 0x8014
/* B3D4D0 800C6330 24C65360 */ addiu $a2, %lo(D_80145360) # addiu $a2, $a2, 0x5360
/* B3D4D4 800C6334 27A4008C */ addiu $a0, $sp, 0x8c
/* B3D4D8 800C6338 02002825 */ move $a1, $s0
/* B3D4DC 800C633C 240703E4 */ li $a3, 996
/* B3D4E0 800C6340 AC4C0004 */ sw $t4, 4($v0)
/* B3D4E4 800C6344 0C031AD5 */ jal Graph_CloseDisps
/* B3D4E8 800C6348 AC480000 */ sw $t0, ($v0)
/* B3D4EC 800C634C 3C068014 */ lui $a2, %hi(D_8014536C) # $a2, 0x8014
/* B3D4F0 800C6350 24C6536C */ addiu $a2, %lo(D_8014536C) # addiu $a2, $a2, 0x536c
/* B3D4F4 800C6354 27A40068 */ addiu $a0, $sp, 0x68
/* B3D4F8 800C6358 02002825 */ move $a1, $s0
/* B3D4FC 800C635C 0C031AB1 */ jal Graph_OpenDisps
/* B3D500 800C6360 240703E7 */ li $a3, 999
/* B3D504 800C6364 8E0201BC */ lw $v0, 0x1bc($s0)
/* B3D508 800C6368 3C04DE01 */ lui $a0, 0xde01
/* B3D50C 800C636C 3C0BE700 */ lui $t3, 0xe700
/* B3D510 800C6370 244D0008 */ addiu $t5, $v0, 8
/* B3D514 800C6374 AE0D01BC */ sw $t5, 0x1bc($s0)
/* B3D518 800C6378 AC440000 */ sw $a0, ($v0)
/* B3D51C 800C637C 8E0E0000 */ lw $t6, ($s0)
/* B3D520 800C6380 3C0DE900 */ lui $t5, 0xe900
/* B3D524 800C6384 3C068014 */ lui $a2, %hi(D_80145378) # $a2, 0x8014
/* B3D528 800C6388 AC4E0004 */ sw $t6, 4($v0)
/* B3D52C 800C638C 8E0202C0 */ lw $v0, 0x2c0($s0)
/* B3D530 800C6390 24C65378 */ addiu $a2, %lo(D_80145378) # addiu $a2, $a2, 0x5378
/* B3D534 800C6394 02002825 */ move $a1, $s0
/* B3D538 800C6398 244F0008 */ addiu $t7, $v0, 8
/* B3D53C 800C639C AE0F02C0 */ sw $t7, 0x2c0($s0)
/* B3D540 800C63A0 AC440000 */ sw $a0, ($v0)
/* B3D544 800C63A4 8E180004 */ lw $t8, 4($s0)
/* B3D548 800C63A8 3C0FDF00 */ lui $t7, 0xdf00
/* B3D54C 800C63AC 24070404 */ li $a3, 1028
/* B3D550 800C63B0 AC580004 */ sw $t8, 4($v0)
/* B3D554 800C63B4 8E0202D0 */ lw $v0, 0x2d0($s0)
/* B3D558 800C63B8 24590008 */ addiu $t9, $v0, 8
/* B3D55C 800C63BC AE1902D0 */ sw $t9, 0x2d0($s0)
/* B3D560 800C63C0 AC440000 */ sw $a0, ($v0)
/* B3D564 800C63C4 8E090010 */ lw $t1, 0x10($s0)
/* B3D568 800C63C8 27A40068 */ addiu $a0, $sp, 0x68
/* B3D56C 800C63CC AC490004 */ sw $t1, 4($v0)
/* B3D570 800C63D0 8E0202B0 */ lw $v0, 0x2b0($s0)
/* B3D574 800C63D4 244A0008 */ addiu $t2, $v0, 8
/* B3D578 800C63D8 AE0A02B0 */ sw $t2, 0x2b0($s0)
/* B3D57C 800C63DC AC400004 */ sw $zero, 4($v0)
/* B3D580 800C63E0 AC4B0000 */ sw $t3, ($v0)
/* B3D584 800C63E4 8E0202B0 */ lw $v0, 0x2b0($s0)
/* B3D588 800C63E8 244C0008 */ addiu $t4, $v0, 8
/* B3D58C 800C63EC AE0C02B0 */ sw $t4, 0x2b0($s0)
/* B3D590 800C63F0 AC400004 */ sw $zero, 4($v0)
/* B3D594 800C63F4 AC4D0000 */ sw $t5, ($v0)
/* B3D598 800C63F8 8E0202B0 */ lw $v0, 0x2b0($s0)
/* B3D59C 800C63FC 244E0008 */ addiu $t6, $v0, 8
/* B3D5A0 800C6400 AE0E02B0 */ sw $t6, 0x2b0($s0)
/* B3D5A4 800C6404 AC400004 */ sw $zero, 4($v0)
/* B3D5A8 800C6408 0C031AD5 */ jal Graph_CloseDisps
/* B3D5AC 800C640C AC4F0000 */ sw $t7, ($v0)
/* B3D5B0 800C6410 3C088016 */ lui $t0, %hi(gGameInfo) # $t0, 0x8016
/* B3D5B4 800C6414 2508FA90 */ addiu $t0, %lo(gGameInfo) # addiu $t0, $t0, -0x570
/* B3D5B8 800C6418 8D020000 */ lw $v0, ($t0)
/* B3D5BC 800C641C 2401000A */ li $at, 10
/* B3D5C0 800C6420 84431074 */ lh $v1, 0x1074($v0)
/* B3D5C4 800C6424 54610010 */ bnel $v1, $at, .L800C6468
/* B3D5C8 800C6428 24010007 */ li $at, 7
/* B3D5CC 800C642C 8458108E */ lh $t8, 0x108e($v0)
/* B3D5D0 800C6430 24010002 */ li $at, 2
/* B3D5D4 800C6434 24190007 */ li $t9, 7
/* B3D5D8 800C6438 5701000B */ bnel $t8, $at, .L800C6468
/* B3D5DC 800C643C 24010007 */ li $at, 7
/* B3D5E0 800C6440 A4591074 */ sh $t9, 0x1074($v0)
/* B3D5E4 800C6444 8D0A0000 */ lw $t2, ($t0)
/* B3D5E8 800C6448 2409FFFF */ li $t1, -1
/* B3D5EC 800C644C A5491076 */ sh $t1, 0x1076($t2)
/* B3D5F0 800C6450 8D020000 */ lw $v0, ($t0)
/* B3D5F4 800C6454 844B108C */ lh $t3, 0x108c($v0)
/* B3D5F8 800C6458 A44B107A */ sh $t3, 0x107a($v0)
/* B3D5FC 800C645C 8D020000 */ lw $v0, ($t0)
/* B3D600 800C6460 84431074 */ lh $v1, 0x1074($v0)
/* B3D604 800C6464 24010007 */ li $at, 7
.L800C6468:
/* B3D608 800C6468 5461002D */ bnel $v1, $at, .L800C6520
/* B3D60C 800C646C AFA000C4 */ sw $zero, 0xc4($sp)
/* B3D610 800C6470 844C1076 */ lh $t4, 0x1076($v0)
/* B3D614 800C6474 5180002A */ beql $t4, $zero, .L800C6520
/* B3D618 800C6478 AFA000C4 */ sw $zero, 0xc4($sp)
/* B3D61C 800C647C 844D1078 */ lh $t5, 0x1078($v0)
/* B3D620 800C6480 24010003 */ li $at, 3
/* B3D624 800C6484 3C048016 */ lui $a0, %hi(sGraphUcodeFaultClient) # $a0, 0x8016
/* B3D628 800C6488 15A10007 */ bne $t5, $at, .L800C64A8
/* B3D62C 800C648C 24846648 */ addiu $a0, %lo(sGraphUcodeFaultClient) # addiu $a0, $a0, 0x6648
/* B3D630 800C6490 3C05800C */ lui $a1, %hi(Graph_UCodeFaultClient) # $a1, 0x800c
/* B3D634 800C6494 3C078014 */ lui $a3, %hi(D_80145384) # $a3, 0x8014
/* B3D638 800C6498 24E75384 */ addiu $a3, %lo(D_80145384) # addiu $a3, $a3, 0x5384
/* B3D63C 800C649C 24A55AB0 */ addiu $a1, %lo(Graph_UCodeFaultClient) # addiu $a1, $a1, 0x5ab0
/* B3D640 800C64A0 0C035077 */ jal Fault_AddClient
/* B3D644 800C64A4 8E0601B0 */ lw $a2, 0x1b0($s0)
.L800C64A8:
/* B3D648 800C64A8 0C03162F */ jal Graph_DisassembleUCode
/* B3D64C 800C64AC 8E0401B0 */ lw $a0, 0x1b0($s0)
/* B3D650 800C64B0 3C088016 */ lui $t0, %hi(gGameInfo) # $t0, 0x8016
/* B3D654 800C64B4 2508FA90 */ addiu $t0, %lo(gGameInfo) # addiu $t0, $t0, -0x570
/* B3D658 800C64B8 8D020000 */ lw $v0, ($t0)
/* B3D65C 800C64BC 24010003 */ li $at, 3
/* B3D660 800C64C0 3C048016 */ lui $a0, %hi(sGraphUcodeFaultClient) # $a0, 0x8016
/* B3D664 800C64C4 844E1078 */ lh $t6, 0x1078($v0)
/* B3D668 800C64C8 55C10006 */ bnel $t6, $at, .L800C64E4
/* B3D66C 800C64CC 84431076 */ lh $v1, 0x1076($v0)
/* B3D670 800C64D0 0C0350B0 */ jal Fault_RemoveClient
/* B3D674 800C64D4 24846648 */ addiu $a0, %lo(sGraphUcodeFaultClient) # addiu $a0, $a0, 0x6648
/* B3D678 800C64D8 3C028016 */ lui $v0, %hi(gGameInfo) # $v0, 0x8016
/* B3D67C 800C64DC 8C42FA90 */ lw $v0, %lo(gGameInfo)($v0)
/* B3D680 800C64E0 84431076 */ lh $v1, 0x1076($v0)
.L800C64E4:
/* B3D684 800C64E4 3C04A404 */ lui $a0, 0xa404
/* B3D688 800C64E8 04610009 */ bgez $v1, .L800C6510
/* B3D68C 800C64EC 00000000 */ nop
/* B3D690 800C64F0 0C000AC4 */ jal LogUtils_LogHexDump
/* B3D694 800C64F4 24050020 */ li $a1, 32
/* B3D698 800C64F8 3C04A410 */ lui $a0, 0xa410
/* B3D69C 800C64FC 0C000AC4 */ jal LogUtils_LogHexDump
/* B3D6A0 800C6500 24050020 */ li $a1, 32
/* B3D6A4 800C6504 3C028016 */ lui $v0, %hi(gGameInfo) # $v0, 0x8016
/* B3D6A8 800C6508 8C42FA90 */ lw $v0, %lo(gGameInfo)($v0)
/* B3D6AC 800C650C 84431076 */ lh $v1, 0x1076($v0)
.L800C6510:
/* B3D6B0 800C6510 04630003 */ bgezl $v1, .L800C6520
/* B3D6B4 800C6514 AFA000C4 */ sw $zero, 0xc4($sp)
/* B3D6B8 800C6518 A4401076 */ sh $zero, 0x1076($v0)
/* B3D6BC 800C651C AFA000C4 */ sw $zero, 0xc4($sp)
.L800C6520:
/* B3D6C0 800C6520 8E0F02D8 */ lw $t7, 0x2d8($s0)
/* B3D6C4 800C6524 3C09801B */ lui $t1, %hi(gGfxPools) # $t1, 0x801b
/* B3D6C8 800C6528 252941C0 */ addiu $t1, %lo(gGfxPools) # addiu $t1, $t1, 0x41c0
/* B3D6CC 800C652C 31F80001 */ andi $t8, $t7, 1
/* B3D6D0 800C6530 0018C8C0 */ sll $t9, $t8, 3
/* B3D6D4 800C6534 0338C821 */ addu $t9, $t9, $t8
/* B3D6D8 800C6538 0019C8C0 */ sll $t9, $t9, 3
/* B3D6DC 800C653C 0338C821 */ addu $t9, $t9, $t8
/* B3D6E0 800C6540 0019C980 */ sll $t9, $t9, 6
/* B3D6E4 800C6544 0338C821 */ addu $t9, $t9, $t8
/* B3D6E8 800C6548 0019C900 */ sll $t9, $t9, 4
/* B3D6EC 800C654C 03295021 */ addu $t2, $t9, $t1
/* B3D6F0 800C6550 AFAA004C */ sw $t2, 0x4c($sp)
/* B3D6F4 800C6554 954B0000 */ lhu $t3, ($t2)
/* B3D6F8 800C6558 24011234 */ li $at, 4660
/* B3D6FC 800C655C 1161000B */ beq $t3, $at, .L800C658C
/* B3D700 800C6560 3C048014 */ lui $a0, %hi(D_80145394) # $a0, 0x8014
/* B3D704 800C6564 24845394 */ addiu $a0, %lo(D_80145394) # addiu $a0, $a0, 0x5394
/* B3D708 800C6568 0C00084C */ jal osSyncPrintf
/* B3D70C 800C656C 24050007 */ li $a1, 7
/* B3D710 800C6570 3C048014 */ lui $a0, %hi(D_80145398) # $a0, 0x8014
/* B3D714 800C6574 0C00084C */ jal osSyncPrintf
/* B3D718 800C6578 24845398 */ addiu $a0, %lo(D_80145398) # addiu $a0, $a0, 0x5398
/* B3D71C 800C657C 3C048014 */ lui $a0, %hi(D_801453CC) # $a0, 0x8014
/* B3D720 800C6580 248453CC */ addiu $a0, %lo(D_801453CC) # addiu $a0, $a0, 0x53cc
/* B3D724 800C6584 0C0359C3 */ jal Fault_AddHungupAndCrash
/* B3D728 800C6588 2405042E */ li $a1, 1070
.L800C658C:
/* B3D72C 800C658C 8FAC004C */ lw $t4, 0x4c($sp)
/* B3D730 800C6590 3C0D0001 */ lui $t5, 1
/* B3D734 800C6594 24015678 */ li $at, 22136
/* B3D738 800C6598 01AC6821 */ addu $t5, $t5, $t4
/* B3D73C 800C659C 95AD2408 */ lhu $t5, 0x2408($t5)
/* B3D740 800C65A0 11A1000D */ beq $t5, $at, .L800C65D8
/* B3D744 800C65A4 240E0001 */ li $t6, 1
/* B3D748 800C65A8 3C048014 */ lui $a0, %hi(D_801453D8) # $a0, 0x8014
/* B3D74C 800C65AC AFAE00C4 */ sw $t6, 0xc4($sp)
/* B3D750 800C65B0 248453D8 */ addiu $a0, %lo(D_801453D8) # addiu $a0, $a0, 0x53d8
/* B3D754 800C65B4 0C00084C */ jal osSyncPrintf
/* B3D758 800C65B8 24050007 */ li $a1, 7
/* B3D75C 800C65BC 3C048014 */ lui $a0, %hi(D_801453DC) # $a0, 0x8014
/* B3D760 800C65C0 0C00084C */ jal osSyncPrintf
/* B3D764 800C65C4 248453DC */ addiu $a0, %lo(D_801453DC) # addiu $a0, $a0, 0x53dc
/* B3D768 800C65C8 3C048014 */ lui $a0, %hi(D_80145410) # $a0, 0x8014
/* B3D76C 800C65CC 24845410 */ addiu $a0, %lo(D_80145410) # addiu $a0, $a0, 0x5410
/* B3D770 800C65D0 0C0359C3 */ jal Fault_AddHungupAndCrash
/* B3D774 800C65D4 24050434 */ li $a1, 1076
.L800C65D8:
/* B3D778 800C65D8 0C030E30 */ jal THGA_IsCrash
/* B3D77C 800C65DC 260402B8 */ addiu $a0, $s0, 0x2b8
/* B3D780 800C65E0 10400009 */ beqz $v0, .L800C6608
/* B3D784 800C65E4 240F0001 */ li $t7, 1
/* B3D788 800C65E8 3C048014 */ lui $a0, %hi(D_8014541C) # $a0, 0x8014
/* B3D78C 800C65EC AFAF00C4 */ sw $t7, 0xc4($sp)
/* B3D790 800C65F0 2484541C */ addiu $a0, %lo(D_8014541C) # addiu $a0, $a0, 0x541c
/* B3D794 800C65F4 0C00084C */ jal osSyncPrintf
/* B3D798 800C65F8 24050007 */ li $a1, 7
/* B3D79C 800C65FC 3C048014 */ lui $a0, %hi(D_80145420) # $a0, 0x8014
/* B3D7A0 800C6600 0C00084C */ jal osSyncPrintf
/* B3D7A4 800C6604 24845420 */ addiu $a0, %lo(D_80145420) # addiu $a0, $a0, 0x5420
.L800C6608:
/* B3D7A8 800C6608 0C030E30 */ jal THGA_IsCrash
/* B3D7AC 800C660C 260402C8 */ addiu $a0, $s0, 0x2c8
/* B3D7B0 800C6610 10400009 */ beqz $v0, .L800C6638
/* B3D7B4 800C6614 24180001 */ li $t8, 1
/* B3D7B8 800C6618 3C048014 */ lui $a0, %hi(D_8014545C) # $a0, 0x8014
/* B3D7BC 800C661C AFB800C4 */ sw $t8, 0xc4($sp)
/* B3D7C0 800C6620 2484545C */ addiu $a0, %lo(D_8014545C) # addiu $a0, $a0, 0x545c
/* B3D7C4 800C6624 0C00084C */ jal osSyncPrintf
/* B3D7C8 800C6628 24050007 */ li $a1, 7
/* B3D7CC 800C662C 3C048014 */ lui $a0, %hi(D_80145460) # $a0, 0x8014
/* B3D7D0 800C6630 0C00084C */ jal osSyncPrintf
/* B3D7D4 800C6634 24845460 */ addiu $a0, %lo(D_80145460) # addiu $a0, $a0, 0x5460
.L800C6638:
/* B3D7D8 800C6638 0C030E30 */ jal THGA_IsCrash
/* B3D7DC 800C663C 260402A8 */ addiu $a0, $s0, 0x2a8
/* B3D7E0 800C6640 10400009 */ beqz $v0, .L800C6668
/* B3D7E4 800C6644 24190001 */ li $t9, 1
/* B3D7E8 800C6648 3C048014 */ lui $a0, %hi(D_8014549C) # $a0, 0x8014
/* B3D7EC 800C664C AFB900C4 */ sw $t9, 0xc4($sp)
/* B3D7F0 800C6650 2484549C */ addiu $a0, %lo(D_8014549C) # addiu $a0, $a0, 0x549c
/* B3D7F4 800C6654 0C00084C */ jal osSyncPrintf
/* B3D7F8 800C6658 24050007 */ li $a1, 7
/* B3D7FC 800C665C 3C048014 */ lui $a0, %hi(D_801454A0) # $a0, 0x8014
/* B3D800 800C6660 0C00084C */ jal osSyncPrintf
/* B3D804 800C6664 248454A0 */ addiu $a0, %lo(D_801454A0) # addiu $a0, $a0, 0x54a0
.L800C6668:
/* B3D808 800C6668 8FA900C4 */ lw $t1, 0xc4($sp)
/* B3D80C 800C666C 15200009 */ bnez $t1, .L800C6694
/* B3D810 800C6670 00000000 */ nop
/* B3D814 800C6674 0C031770 */ jal Graph_TaskSet00
/* B3D818 800C6678 02002025 */ move $a0, $s0
/* B3D81C 800C667C 8E0A02D8 */ lw $t2, 0x2d8($s0)
/* B3D820 800C6680 8E0C02E8 */ lw $t4, 0x2e8($s0)
/* B3D824 800C6684 254B0001 */ addiu $t3, $t2, 1
/* B3D828 800C6688 258D0001 */ addiu $t5, $t4, 1
/* B3D82C 800C668C AE0B02D8 */ sw $t3, 0x2d8($s0)
/* B3D830 800C6690 AE0D02E8 */ sw $t5, 0x2e8($s0)
.L800C6694:
/* B3D834 800C6694 0C03CC15 */ jal func_800F3054
/* B3D838 800C6698 00000000 */ nop
/* B3D83C 800C669C 0C001A78 */ jal osGetTime
/* B3D840 800C66A0 00000000 */ nop
/* B3D844 800C66A4 3C048017 */ lui $a0, %hi(gRSPGFXTotalTime) # $a0, 0x8017
/* B3D848 800C66A8 2484A568 */ addiu $a0, %lo(gRSPGFXTotalTime) # addiu $a0, $a0, -0x5a98
/* B3D84C 800C66AC 8C8E0000 */ lw $t6, ($a0)
/* B3D850 800C66B0 8C8F0004 */ lw $t7, 4($a0)
/* B3D854 800C66B4 3C188017 */ lui $t8, %hi(D_8016A538) # $t8, 0x8017
/* B3D858 800C66B8 2718A538 */ addiu $t8, %lo(D_8016A538) # addiu $t8, $t8, -0x5ac8
/* B3D85C 800C66BC 3C058017 */ lui $a1, %hi(gRSPAudioTotalTime) # $a1, 0x8017
/* B3D860 800C66C0 AF0E0000 */ sw $t6, ($t8)
/* B3D864 800C66C4 24A5A560 */ addiu $a1, %lo(gRSPAudioTotalTime) # addiu $a1, $a1, -0x5aa0
/* B3D868 800C66C8 AF0F0004 */ sw $t7, 4($t8)
/* B3D86C 800C66CC 8CAA0000 */ lw $t2, ($a1)
/* B3D870 800C66D0 8CAB0004 */ lw $t3, 4($a1)
/* B3D874 800C66D4 3C198017 */ lui $t9, %hi(D_8016A530) # $t9, 0x8017
/* B3D878 800C66D8 2739A530 */ addiu $t9, %lo(D_8016A530) # addiu $t9, $t9, -0x5ad0
/* B3D87C 800C66DC 3C068017 */ lui $a2, %hi(gRDPTotalTime) # $a2, 0x8017
/* B3D880 800C66E0 AF2A0000 */ sw $t2, ($t9)
/* B3D884 800C66E4 24C6A580 */ addiu $a2, %lo(gRDPTotalTime) # addiu $a2, $a2, -0x5a80
/* B3D888 800C66E8 AF2B0004 */ sw $t3, 4($t9)
/* B3D88C 800C66EC 8CCC0000 */ lw $t4, ($a2)
/* B3D890 800C66F0 8CCD0004 */ lw $t5, 4($a2)
/* B3D894 800C66F4 3C098017 */ lui $t1, %hi(D_8016A540) # $t1, 0x8017
/* B3D898 800C66F8 2529A540 */ addiu $t1, %lo(D_8016A540) # addiu $t1, $t1, -0x5ac0
/* B3D89C 800C66FC AD2C0000 */ sw $t4, ($t1)
/* B3D8A0 800C6700 AD2D0004 */ sw $t5, 4($t1)
/* B3D8A4 800C6704 240E0000 */ li $t6, 0
/* B3D8A8 800C6708 AC8E0000 */ sw $t6, ($a0)
/* B3D8AC 800C670C 240F0000 */ li $t7, 0
/* B3D8B0 800C6710 AC8F0004 */ sw $t7, 4($a0)
/* B3D8B4 800C6714 24180000 */ li $t8, 0
/* B3D8B8 800C6718 ACB80000 */ sw $t8, ($a1)
/* B3D8BC 800C671C 24190000 */ li $t9, 0
/* B3D8C0 800C6720 ACB90004 */ sw $t9, 4($a1)
/* B3D8C4 800C6724 240A0000 */ li $t2, 0
/* B3D8C8 800C6728 ACCA0000 */ sw $t2, ($a2)
/* B3D8CC 800C672C 240B0000 */ li $t3, 0
/* B3D8D0 800C6730 ACCB0004 */ sw $t3, 4($a2)
/* B3D8D4 800C6734 3C0C8016 */ lui $t4, %hi(sGraphUpdateTime) # $t4, 0x8016
/* B3D8D8 800C6738 8D8C65D0 */ lw $t4, %lo(sGraphUpdateTime)($t4)
/* B3D8DC 800C673C 3C0D8016 */ lui $t5, %hi(sGraphUpdateTime+4) # $t5, 0x8016
/* B3D8E0 800C6740 8DAD65D4 */ lw $t5, %lo(sGraphUpdateTime+4)($t5)
/* B3D8E4 800C6744 AFAC0020 */ sw $t4, 0x20($sp)
/* B3D8E8 800C6748 15800002 */ bnez $t4, .L800C6754
/* B3D8EC 800C674C AFAD0024 */ sw $t5, 0x24($sp)
/* B3D8F0 800C6750 11A00008 */ beqz $t5, .L800C6774
.L800C6754:
/* B3D8F4 800C6754 006D082B */ sltu $at, $v1, $t5
/* B3D8F8 800C6758 004C7023 */ subu $t6, $v0, $t4
/* B3D8FC 800C675C 3C098017 */ lui $t1, %hi(D_8016A548) # $t1, 0x8017
/* B3D900 800C6760 2529A548 */ addiu $t1, %lo(D_8016A548) # addiu $t1, $t1, -0x5ab8
/* B3D904 800C6764 01C17023 */ subu $t6, $t6, $at
/* B3D908 800C6768 AD2E0000 */ sw $t6, ($t1)
/* B3D90C 800C676C 006D7823 */ subu $t7, $v1, $t5
/* B3D910 800C6770 AD2F0004 */ sw $t7, 4($t1)
.L800C6774:
/* B3D914 800C6774 3C048013 */ lui $a0, %hi(D_8012DBC0) # $a0, 0x8013
/* B3D918 800C6778 8C84DBC0 */ lw $a0, %lo(D_8012DBC0)($a0)
/* B3D91C 800C677C 3C018016 */ lui $at, %hi(sGraphUpdateTime+4) # $at, 0x8016
/* B3D920 800C6780 AC2265D0 */ sw $v0, %lo(sGraphUpdateTime)($at)
/* B3D924 800C6784 10800015 */ beqz $a0, .L800C67DC
/* B3D928 800C6788 AC2365D4 */ sw $v1, %lo(sGraphUpdateTime+4)($at)
/* B3D92C 800C678C 8FA200CC */ lw $v0, 0xcc($sp)
/* B3D930 800C6790 2401DFFF */ li $at, -8193
/* B3D934 800C6794 94580020 */ lhu $t8, 0x20($v0)
/* B3D938 800C6798 0301C827 */ nor $t9, $t8, $at
/* B3D93C 800C679C 1720000F */ bnez $t9, .L800C67DC
/* B3D940 800C67A0 00000000 */ nop
/* B3D944 800C67A4 944A0014 */ lhu $t2, 0x14($v0)
/* B3D948 800C67A8 2401FFCF */ li $at, -49
/* B3D94C 800C67AC 3C0C8080 */ lui $t4, %hi(Select_Init) # $t4, 0x8080
/* B3D950 800C67B0 01415827 */ nor $t3, $t2, $at
/* B3D954 800C67B4 15600009 */ bnez $t3, .L800C67DC
/* B3D958 800C67B8 3C018016 */ lui $at, %hi(gSaveContext+0x135c) # $at, 0x8016
/* B3D95C 800C67BC AC20F9BC */ sw $zero, %lo(gSaveContext+0x135c)($at)
/* B3D960 800C67C0 258C1E44 */ addiu $t4, %lo(Select_Init) # addiu $t4, $t4, 0x1e44
/* B3D964 800C67C4 240D0240 */ li $t5, 576
/* B3D968 800C67C8 AC4D0010 */ sw $t5, 0x10($v0)
/* B3D96C 800C67CC AC4C000C */ sw $t4, 0xc($v0)
/* B3D970 800C67D0 AC400098 */ sw $zero, 0x98($v0)
/* B3D974 800C67D4 3C048013 */ lui $a0, %hi(D_8012DBC0) # $a0, 0x8013
/* B3D978 800C67D8 8C84DBC0 */ lw $a0, %lo(D_8012DBC0)($a0)
.L800C67DC:
/* B3D97C 800C67DC 10800014 */ beqz $a0, .L800C6830
/* B3D980 800C67E0 3C048016 */ lui $a0, %hi(gAppNmiBufferPtr) # $a0, 0x8016
/* B3D984 800C67E4 0C01EFC2 */ jal PreNmiBuff_IsResetting
/* B3D988 800C67E8 8C846660 */ lw $a0, %lo(gAppNmiBufferPtr)($a0)
/* B3D98C 800C67EC 10400010 */ beqz $v0, .L800C6830
/* B3D990 800C67F0 8FAE00CC */ lw $t6, 0xcc($sp)
/* B3D994 800C67F4 8DCF00A0 */ lw $t7, 0xa0($t6)
/* B3D998 800C67F8 3C048014 */ lui $a0, %hi(D_801454DC) # $a0, 0x8014
/* B3D99C 800C67FC 55E0000D */ bnezl $t7, .L800C6834
/* B3D9A0 800C6800 8FBF001C */ lw $ra, 0x1c($sp)
/* B3D9A4 800C6804 0C00084C */ jal osSyncPrintf
/* B3D9A8 800C6808 248454DC */ addiu $a0, %lo(D_801454DC) # addiu $a0, $a0, 0x54dc
/* B3D9AC 800C680C 8FB800CC */ lw $t8, 0xcc($sp)
/* B3D9B0 800C6810 3C098009 */ lui $t1, %hi(PreNMI_Init) # $t1, 0x8009
/* B3D9B4 800C6814 252924B8 */ addiu $t1, %lo(PreNMI_Init) # addiu $t1, $t1, 0x24b8
/* B3D9B8 800C6818 AF09000C */ sw $t1, 0xc($t8)
/* B3D9BC 800C681C 8FAA00CC */ lw $t2, 0xcc($sp)
/* B3D9C0 800C6820 241900AC */ li $t9, 172
/* B3D9C4 800C6824 AD590010 */ sw $t9, 0x10($t2)
/* B3D9C8 800C6828 8FAB00CC */ lw $t3, 0xcc($sp)
/* B3D9CC 800C682C AD600098 */ sw $zero, 0x98($t3)
.L800C6830:
/* B3D9D0 800C6830 8FBF001C */ lw $ra, 0x1c($sp)
.L800C6834:
/* B3D9D4 800C6834 8FB00018 */ lw $s0, 0x18($sp)
/* B3D9D8 800C6838 27BD00C8 */ addiu $sp, $sp, 0xc8
/* B3D9DC 800C683C 03E00008 */ jr $ra
/* B3D9E0 800C6840 00000000 */ nop

View file

@ -150,32 +150,28 @@ void Graph_Destroy(GraphicsContext* gfxCtx) {
Fault_RemoveClient(&sGraphFaultClient);
}
// Close to matching, reordering at the end
#ifdef NON_MATCHING
void Graph_TaskSet00(GraphicsContext* gfxCtx) {
static u32 D_8012D260 = 0;
static s32 sGraphCfbInfoIdx = 0;
OSTime time;
OSTimer timer;
OSMesg msg;
OSMesgQueue* mq;
u32 temp;
OSTime time;
OSTask_t* task;
Gfx* dispRefs[3];
OSScTask* scTask;
CfbInfo* cfb;
s32 pad1;
mq = &gfxCtx->queue;
task = &gfxCtx->task.list.t;
scTask = &gfxCtx->task;
D_8016A528 = osGetTime() - sGraphSetTaskTime - D_8016A558;
osSetTimer(&timer, 140625000, 0, mq, 666);
osSetTimer(&timer, 140625000, 0, &gfxCtx->queue, (OSMesg)666);
osRecvMesg(mq, &msg, OS_MESG_BLOCK);
osRecvMesg(&gfxCtx->queue, &msg, OS_MESG_BLOCK);
osStopTimer(&timer);
if (msg == (OSMesg)666) {
osSyncPrintf(VT_FGCOL(RED));
osSyncPrintf("RCPが帰ってきませんでした。"); // "RCP did not return."
@ -185,24 +181,25 @@ void Graph_TaskSet00(GraphicsContext* gfxCtx) {
LogUtils_LogHexDump(gGfxSPTaskYieldBuffer, sizeof(gGfxSPTaskYieldBuffer));
SREG(6) = -1;
if (D_8012D260) {
temp = D_8012D260;
if (D_8012D260 != 0) {
HREG(80) = 7;
HREG(81) = 1;
HREG(82) = 2;
D_8012D260 = temp;
Graph_DisassembleUCode(temp);
HREG(83) = 2;
D_8012D260 = D_8012D260;
Graph_DisassembleUCode(D_8012D260);
}
Fault_AddHungupAndCrashImpl("RCP is HUNG UP!!", "Oh! MY GOD!!");
}
osRecvMesg(mq, &msg, OS_MESG_NOBLOCK);
osRecvMesg(&gfxCtx->queue, &msg, OS_MESG_NOBLOCK);
D_8012D260 = gfxCtx->workBuffer;
if (gfxCtx->callback) {
if (gfxCtx->callback != NULL) {
gfxCtx->callback(gfxCtx, gfxCtx->callbackParam);
}
time = osGetTime();
if (D_8016A550) {
if (D_8016A550 != 0) {
D_8016A558 = (D_8016A558 + time) - D_8016A550;
D_8016A550 = time;
}
@ -218,18 +215,22 @@ void Graph_TaskSet00(GraphicsContext* gfxCtx) {
task->ucode_data = SysUcode_GetUCodeData();
task->ucode_size = 0x1000;
task->ucode_data_size = 0x800;
task->dram_stack = gGfxSPTaskStack;
task->dram_stack = (u64*)gGfxSPTaskStack;
task->dram_stack_size = sizeof(gGfxSPTaskStack);
task->output_buff = gGfxSPTaskOutputBuffer;
task->output_buff_size =
gGfxSPTaskYieldBuffer; //! @bug (?) should be sizeof(gGfxSPTaskYieldBuffer), probably a typo
task->data_ptr = gfxCtx->workBuffer;
task->output_buff_size = (u64*)((u8*)gGfxSPTaskOutputBuffer + sizeof(gGfxSPTaskOutputBuffer));
task->data_ptr = (u64*)gfxCtx->workBuffer;
Graph_OpenDisps(dispRefs, gfxCtx, "../graph.c", 828);
task->data_size = (u32)gfxCtx->work.p - (u32)gfxCtx->workBuffer;
Graph_CloseDisps(dispRefs, gfxCtx, "../graph.c", 830);
{
Gfx* dispRefs[5];
Graph_OpenDisps(dispRefs, gfxCtx, "../graph.c", 828);
task->data_size = (u32)gfxCtx->work.p - (u32)gfxCtx->workBuffer;
Graph_CloseDisps(dispRefs, gfxCtx, "../graph.c", 830);
}
task->yield_data_ptr = gGfxSPTaskYieldBuffer;
{ s32 pad2; } // Necessary to match stack usage
task->yield_data_ptr = (u64*)gGfxSPTaskYieldBuffer;
task->yield_data_size = sizeof(gGfxSPTaskYieldBuffer);
scTask->next = NULL;
@ -240,10 +241,10 @@ void Graph_TaskSet00(GraphicsContext* gfxCtx) {
gfxCtx->fbIdx--;
}
scTask->msgQ = &gfxCtx->queue;
scTask->msg = NULL;
scTask->msgQ = mq;
cfb = sGraphCfbInfos + sGraphCfbInfoIdx++;
cfb = &sGraphCfbInfos[sGraphCfbInfoIdx++];
cfb->fb1 = gfxCtx->curFrameBuffer;
cfb->swapBuffer = gfxCtx->curFrameBuffer;
cfb->viMode = gfxCtx->viMode;
@ -255,61 +256,68 @@ void Graph_TaskSet00(GraphicsContext* gfxCtx) {
scTask->framebuffer = cfb;
sGraphCfbInfoIdx = sGraphCfbInfoIdx % ARRAY_COUNT(sGraphCfbInfos);
if (1) {}
gfxCtx->schedMsgQ = &gSchedContext.cmdQ;
osSendMesg(&gSchedContext.cmdQ, scTask, OS_MESG_BLOCK);
Sched_SendEntryMsg(&gSchedContext); // osScKickEntryMsg
Sched_SendEntryMsg(&gSchedContext);
}
#else
u32 D_8012D260 = 0;
u32 sGraphCfbInfoIdx = 0;
#pragma GLOBAL_ASM("asm/non_matchings/code/graph/Graph_TaskSet00.s")
#endif
// Very close to matching, stack usage
#ifdef NON_MATCHING
void Graph_Update(GraphicsContext* gfxCtx, GameState* gameState) {
u32 problem; // 0xC4 -> 0xD4
Gfx* dispRefs[5]; // 0xB0 -> 0xC0
Gfx* dispRefs2[9]; // 0x8C -> 0x9C
Gfx* dispRefs3[9]; // 0x68 -> 0x78
u64 time;
GfxPool* pool; // 0x4C -> 0x6C
u32 problem;
gameState->unk_A0 = 0;
Graph_InitTHGA(gfxCtx);
Graph_OpenDisps(dispRefs, gfxCtx, "../graph.c", 966);
gDPNoOpString(gfxCtx->work.p++, "WORK_DISP 開始", 0);
gDPNoOpString(gfxCtx->polyOpa.p++, "POLY_OPA_DISP 開始", 0);
gDPNoOpString(gfxCtx->polyXlu.p++, "POLY_XLU_DISP 開始", 0);
gDPNoOpString(gfxCtx->overlay.p++, "OVERLAY_DISP 開始", 0);
Graph_CloseDisps(dispRefs, gfxCtx, "../graph.c", 975);
{
Gfx* dispRefs[5];
Graph_OpenDisps(dispRefs, gfxCtx, "../graph.c", 966);
gDPNoOpString(gfxCtx->work.p++, "WORK_DISP 開始", 0);
gDPNoOpString(gfxCtx->polyOpa.p++, "POLY_OPA_DISP 開始", 0);
gDPNoOpString(gfxCtx->polyXlu.p++, "POLY_XLU_DISP 開始", 0);
gDPNoOpString(gfxCtx->overlay.p++, "OVERLAY_DISP 開始", 0);
Graph_CloseDisps(dispRefs, gfxCtx, "../graph.c", 975);
}
GameState_ReqPadData(gameState);
GameState_Update(gameState);
Graph_OpenDisps(dispRefs2, gfxCtx, "../graph.c", 987);
gDPNoOpString(gfxCtx->work.p++, "WORK_DISP 終了", 0);
gDPNoOpString(gfxCtx->polyOpa.p++, "POLY_OPA_DISP 終了", 0);
gDPNoOpString(gfxCtx->polyXlu.p++, "POLY_XLU_DISP 終了", 0);
gDPNoOpString(gfxCtx->overlay.p++, "OVERLAY_DISP 終了", 0);
Graph_CloseDisps(dispRefs2, gfxCtx, "../graph.c", 996);
{
Gfx* dispRefs[5];
Graph_OpenDisps(dispRefs, gfxCtx, "../graph.c", 987);
Graph_OpenDisps(dispRefs3, gfxCtx, "../graph.c", 999);
gSPBranchList(gfxCtx->work.p++, gfxCtx->polyOpaBuffer);
gSPBranchList(gfxCtx->polyOpa.p++, gfxCtx->polyXluBuffer);
gSPBranchList(gfxCtx->polyXlu.p++, gfxCtx->overlayBuffer);
gDPPipeSync(gfxCtx->overlay.p++);
gDPFullSync(gfxCtx->overlay.p++);
gSPEndDisplayList(gfxCtx->overlay.p++);
Graph_CloseDisps(dispRefs3, gfxCtx, "../graph.c", 1028);
gDPNoOpString(gfxCtx->work.p++, "WORK_DISP 終了", 0);
gDPNoOpString(gfxCtx->polyOpa.p++, "POLY_OPA_DISP 終了", 0);
gDPNoOpString(gfxCtx->polyXlu.p++, "POLY_XLU_DISP 終了", 0);
gDPNoOpString(gfxCtx->overlay.p++, "OVERLAY_DISP 終了", 0);
Graph_CloseDisps(dispRefs, gfxCtx, "../graph.c", 996);
}
{
Gfx* dispRefs[5];
Graph_OpenDisps(dispRefs, gfxCtx, "../graph.c", 999);
gSPBranchList(gfxCtx->work.p++, gfxCtx->polyOpaBuffer);
gSPBranchList(gfxCtx->polyOpa.p++, gfxCtx->polyXluBuffer);
gSPBranchList(gfxCtx->polyXlu.p++, gfxCtx->overlayBuffer);
gDPPipeSync(gfxCtx->overlay.p++);
gDPFullSync(gfxCtx->overlay.p++);
gSPEndDisplayList(gfxCtx->overlay.p++);
Graph_CloseDisps(dispRefs, gfxCtx, "../graph.c", 1028);
}
if (HREG(80) == 10 && HREG(93) == 2) {
HREG(80) = 7;
HREG(81) = -1;
HREG(83) = HREG(92);
}
if (HREG(80) == 7 && HREG(81) != 0) {
if (HREG(82) == 3) {
Fault_AddClient(&sGraphUcodeFaultClient, Graph_UCodeFaultClient, gfxCtx->workBuffer, "do_count_fault");
@ -332,20 +340,24 @@ void Graph_Update(GraphicsContext* gfxCtx, GameState* gameState) {
}
problem = false;
pool = &gGfxPools[gfxCtx->gfxPoolIdx & 1];
if (pool->headMagic != GFXPOOL_HEAD_MAGIC) {
/*! @bug (?) : devs might've forgotten "problem = true;" */
osSyncPrintf("%c", 7);
// Dynamic area head is destroyed
osSyncPrintf(VT_COL(RED, WHITE) "ダイナミック領域先頭が破壊されています\n" VT_RST);
Fault_AddHungupAndCrash("../graph.c", 1070);
}
if (pool->tailMagic != GFXPOOL_TAIL_MAGIC) {
problem = true;
osSyncPrintf("%c", 7);
// Dynamic region tail is destroyed
osSyncPrintf(VT_COL(RED, WHITE) "ダイナミック領域末尾が破壊されています\n" VT_RST);
Fault_AddHungupAndCrash("../graph.c", 1076);
{
GfxPool* pool = &gGfxPools[gfxCtx->gfxPoolIdx & 1];
if (pool->headMagic != GFXPOOL_HEAD_MAGIC) {
// @bug (?) : devs might've forgotten "problem = true;"
osSyncPrintf("%c", 7);
// Dynamic area head is destroyed
osSyncPrintf(VT_COL(RED, WHITE) "ダイナミック領域先頭が破壊されています\n" VT_RST);
Fault_AddHungupAndCrash("../graph.c", 1070);
}
if (pool->tailMagic != GFXPOOL_TAIL_MAGIC) {
problem = true;
osSyncPrintf("%c", 7);
// Dynamic region tail is destroyed
osSyncPrintf(VT_COL(RED, WHITE) "ダイナミック領域末尾が破壊されています\n" VT_RST);
Fault_AddHungupAndCrash("../graph.c", 1076);
}
}
if (THGA_IsCrash(&gfxCtx->polyOpa)) {
@ -374,18 +386,23 @@ void Graph_Update(GraphicsContext* gfxCtx, GameState* gameState) {
}
func_800F3054();
time = osGetTime();
D_8016A538 = gRSPGFXTotalTime;
D_8016A530 = gRSPAudioTotalTime;
D_8016A540 = gRDPTotalTime;
gRSPGFXTotalTime = 0;
gRSPAudioTotalTime = 0;
gRDPTotalTime = 0;
if (sGraphUpdateTime != 0) {
D_8016A548 = time - sGraphUpdateTime;
{
OSTime time = osGetTime();
s32 pad[4];
D_8016A538 = gRSPGFXTotalTime;
D_8016A530 = gRSPAudioTotalTime;
D_8016A540 = gRDPTotalTime;
gRSPGFXTotalTime = 0;
gRSPAudioTotalTime = 0;
gRDPTotalTime = 0;
if (sGraphUpdateTime != 0) {
D_8016A548 = time - sGraphUpdateTime;
}
sGraphUpdateTime = time;
}
sGraphUpdateTime = time;
if (D_8012DBC0 && CHECK_PAD(gameState->input[0].press, Z_TRIG) &&
CHECK_PAD(gameState->input[0].cur, L_TRIG | R_TRIG)) {
@ -401,9 +418,6 @@ void Graph_Update(GraphicsContext* gfxCtx, GameState* gameState) {
gameState->running = false;
}
}
#else
#pragma GLOBAL_ASM("asm/non_matchings/code/graph/Graph_Update.s")
#endif
void Graph_ThreadEntry(void* arg0) {
GraphicsContext gfxCtx;