pal-beta: Get ROM fully matching

This commit is contained in:
Ryan Dwyer 2022-03-12 15:47:01 +10:00
parent 589cb38161
commit 8a1dd76fa4
38 changed files with 3947 additions and 94 deletions

View File

@ -25,6 +25,7 @@ NTSC=0
PAL=0
JPN=0
ZIPMAGIC=0x0000
COPYLEN=2
ifeq ($(ROMID),ntsc-beta)
NTSC=1
@ -45,6 +46,7 @@ ifeq ($(ROMID),pal-beta)
PAL=1
VERSION=3
ZIPMAGIC=0x0c00
COPYLEN=6
endif
ifeq ($(ROMID),pal-final)
PAL=1
@ -55,6 +57,7 @@ ifeq ($(ROMID),jpn-final)
JPN=1
VERSION=5
ZIPMAGIC=0x0002
COPYLEN=4
endif
DEFINES := VERSION=$(VERSION) NTSC=$(NTSC) PAL=$(PAL) JPN=$(JPN) PIRACYCHECKS=$(PIRACYCHECKS) _FINALROM=1
@ -324,7 +327,7 @@ $(B_DIR)/stage1.bin: $(B_DIR)/stage1.elf
# mkrom handles calculating the piracy checksums, zipping segments and
# calculating the ROM checksum.
$(B_DIR)/pd.z64: $(B_DIR)/stage1.bin tools/mkrom/mkrom
tools/mkrom/mkrom $(B_DIR)/stage1.bin $(B_DIR)/pd.map $(PIRACYCHECKS) $(ZIPMAGIC) $@
tools/mkrom/mkrom $(B_DIR)/stage1.bin $(B_DIR)/pd.map $(PIRACYCHECKS) $(ZIPMAGIC) $(COPYLEN) $@
tools/mkrom/mkrom:
$(MAKE) -C tools/mkrom

View File

@ -385,7 +385,7 @@ void amTick(void)
// Update alpha of slots so they fade in
if (g_AmMenus[g_AmIndex].alphafrac < 1) {
#if VERSION >= VERSION_PAL_FINAL
#if VERSION >= VERSION_PAL_BETA
g_AmMenus[g_AmIndex].alphafrac += g_Vars.lvupdate240freal / 30.0f;
#else
g_AmMenus[g_AmIndex].alphafrac += g_Vars.lvupdate240f / 30.0f;
@ -397,7 +397,7 @@ void amTick(void)
}
// Make selection border pulsate
#if VERSION >= VERSION_PAL_FINAL
#if VERSION >= VERSION_PAL_BETA
g_AmMenus[g_AmIndex].selpulse += g_Vars.lvupdate240freal / 5.0f;
#else
g_AmMenus[g_AmIndex].selpulse += g_Vars.lvupdate240f / 5.0f;

View File

@ -77,7 +77,7 @@ u32 var8009d134;
u32 var8009d138;
u32 var8009d13c;
#if VERSION >= VERSION_PAL_FINAL
#if VERSION >= VERSION_PAL_BETA
u32 fill2[2];
#endif
@ -557,7 +557,7 @@ f32 bgun0f09815c(struct hand *hand)
return 0;
}
#if VERSION >= VERSION_PAL_BETA
#if VERSION >= VERSION_PAL_FINAL
GLOBAL_ASM(
glabel bgun0f0981e8
.late_rodata
@ -1130,6 +1130,579 @@ glabel var7f1ad3acpf
/* f098900: 03e00008 */ jr $ra
/* f098904: 27bd0160 */ addiu $sp,$sp,0x160
);
#elif VERSION >= VERSION_PAL_BETA
GLOBAL_ASM(
glabel bgun0f0981e8
.late_rodata
glabel var7f1ad398pf
.word 0x461c4000
glabel var7f1ad39cpf
.word 0x3f451eb8
glabel var7f1ad3a0pf
.word 0x3f333333
glabel var7f1ad3a4pf
.word 0x3f99999a
glabel var7f1ad3a8pf
.word 0x3f555555
glabel var7f1ad3acpf
.word 0x3f99999a
.text
/* f098058: 27bdfea0 */ addiu $sp,$sp,-352
/* f09805c: afbf004c */ sw $ra,0x4c($sp)
/* f098060: afb40048 */ sw $s4,0x48($sp)
/* f098064: afb30044 */ sw $s3,0x44($sp)
/* f098068: afb20040 */ sw $s2,0x40($sp)
/* f09806c: afb1003c */ sw $s1,0x3c($sp)
/* f098070: afb00038 */ sw $s0,0x38($sp)
/* f098074: f7b40030 */ sdc1 $f20,0x30($sp)
/* f098078: afa50164 */ sw $a1,0x164($sp)
/* f09807c: 908e0690 */ lbu $t6,0x690($a0)
/* f098080: 8c98068c */ lw $t8,0x68c($a0)
/* f098084: 24010002 */ li $at,0x2
/* f098088: 31cfffe3 */ andi $t7,$t6,0xffe3
/* f09808c: 00809025 */ move $s2,$a0
/* f098090: 1701000f */ bne $t8,$at,.PB0f0980d0
/* f098094: a08f0690 */ sb $t7,0x690($a0)
/* f098098: 0fc25ff3 */ jal 0xf097fcc
/* f09809c: 00000000 */ nop
/* f0980a0: 46000506 */ mov.s $f20,$f0
/* f0980a4: 0c00772a */ jal 0x1dca8
/* f0980a8: 26440384 */ addiu $a0,$s2,0x384
/* f0980ac: 2459ffff */ addiu $t9,$v0,-1
/* f0980b0: 44992000 */ mtc1 $t9,$f4
/* f0980b4: 00000000 */ nop
/* f0980b8: 468021a0 */ cvt.s.w $f6,$f4
/* f0980bc: 4614303e */ c.le.s $f6,$f20
/* f0980c0: 00000000 */ nop
/* f0980c4: 45020003 */ bc1fl .PB0f0980d4
/* f0980c8: 8e480680 */ lw $t0,0x680($s2)
/* f0980cc: ae40068c */ sw $zero,0x68c($s2)
.PB0f0980d0:
/* f0980d0: 8e480680 */ lw $t0,0x680($s2)
.PB0f0980d4:
/* f0980d4: 8e49068c */ lw $t1,0x68c($s2)
/* f0980d8: 29020000 */ slti $v0,$t0,0x0
/* f0980dc: 392a0002 */ xori $t2,$t1,0x2
/* f0980e0: 2d4a0001 */ sltiu $t2,$t2,0x1
/* f0980e4: 38420001 */ xori $v0,$v0,0x1
/* f0980e8: 01425825 */ or $t3,$t2,$v0
/* f0980ec: 516001d2 */ beqzl $t3,.PB0f098838
/* f0980f0: 8fbf004c */ lw $ra,0x4c($sp)
/* f0980f4: 44801000 */ mtc1 $zero,$f2
/* f0980f8: c64806d0 */ lwc1 $f8,0x6d0($s2)
/* f0980fc: 26540384 */ addiu $s4,$s2,0x384
/* f098100: 4608103c */ c.lt.s $f2,$f8
/* f098104: 00000000 */ nop
/* f098108: 45000006 */ bc1f .PB0f098124
/* f09810c: 00000000 */ nop
/* f098110: 8e480680 */ lw $t0,0x680($s2)
/* f098114: ae400684 */ sw $zero,0x684($s2)
/* f098118: e6420688 */ swc1 $f2,0x688($s2)
/* f09811c: 29020000 */ slti $v0,$t0,0x0
/* f098120: 38420001 */ xori $v0,$v0,0x1
.PB0f098124:
/* f098124: 5040005a */ beqzl $v0,.PB0f098290
/* f098128: 8e4d0690 */ lw $t5,0x690($s2)
/* f09812c: 8e4306b0 */ lw $v1,0x6b0($s2)
/* f098130: 3c013f80 */ lui $at,0x3f80
/* f098134: 924d06d6 */ lbu $t5,0x6d6($s2)
/* f098138: 8c6c0004 */ lw $t4,0x4($v1)
/* f09813c: 44810000 */ mtc1 $at,$f0
/* f098140: 3c017f1b */ lui $at,0x7f1b
/* f098144: 448c5000 */ mtc1 $t4,$f10
/* f098148: c432dde8 */ lwc1 $f18,-0x2218($at)
/* f09814c: 31ae0001 */ andi $t6,$t5,0x1
/* f098150: 46805420 */ cvt.s.w $f16,$f10
/* f098154: 3c0f800a */ lui $t7,0x800a
/* f098158: 11c0001a */ beqz $t6,.PB0f0981c4
/* f09815c: 46128503 */ div.s $f20,$f16,$f18
/* f098160: 8defe754 */ lw $t7,-0x18ac($t7)
/* f098164: 81f80de4 */ lb $t8,0xde4($t7)
/* f098168: 13000016 */ beqz $t8,.PB0f0981c4
/* f09816c: 00000000 */ nop
/* f098170: 0c004be0 */ jal 0x12f80
/* f098174: 00000000 */ nop
/* f098178: 44822000 */ mtc1 $v0,$f4
/* f09817c: 3c014f80 */ lui $at,0x4f80
/* f098180: 04410004 */ bgez $v0,.PB0f098194
/* f098184: 468021a0 */ cvt.s.w $f6,$f4
/* f098188: 44814000 */ mtc1 $at,$f8
/* f09818c: 00000000 */ nop
/* f098190: 46083180 */ add.s $f6,$f6,$f8
.PB0f098194:
/* f098194: 3c012f80 */ lui $at,0x2f80
/* f098198: 44815000 */ mtc1 $at,$f10
/* f09819c: 3c017f1b */ lui $at,0x7f1b
/* f0981a0: c432ddec */ lwc1 $f18,-0x2214($at)
/* f0981a4: 460a3402 */ mul.s $f16,$f6,$f10
/* f0981a8: 3c017f1b */ lui $at,0x7f1b
/* f0981ac: c428ddf0 */ lwc1 $f8,-0x2210($at)
/* f0981b0: 44801000 */ mtc1 $zero,$f2
/* f0981b4: 8e480680 */ lw $t0,0x680($s2)
/* f0981b8: 8e4306b0 */ lw $v1,0x6b0($s2)
/* f0981bc: 46128102 */ mul.s $f4,$f16,$f18
/* f0981c0: 46082000 */ add.s $f0,$f4,$f8
.PB0f0981c4:
/* f0981c4: 10600018 */ beqz $v1,.PB0f098228
/* f0981c8: 02802025 */ move $a0,$s4
/* f0981cc: 4602a03c */ c.lt.s $f20,$f2
/* f0981d0: 00082c00 */ sll $a1,$t0,0x10
/* f0981d4: 0005cc03 */ sra $t9,$a1,0x10
/* f0981d8: 45000013 */ bc1f .PB0f098228
/* f0981dc: 00000000 */ nop
/* f0981e0: 46140182 */ mul.s $f6,$f0,$f20
/* f0981e4: 44071000 */ mfc1 $a3,$f2
/* f0981e8: 02802025 */ move $a0,$s4
/* f0981ec: 03202825 */ move $a1,$t9
/* f0981f0: 00003025 */ move $a2,$zero
/* f0981f4: e7a20014 */ swc1 $f2,0x14($sp)
/* f0981f8: 0c0079d7 */ jal 0x1e75c
/* f0981fc: e7a60010 */ swc1 $f6,0x10($sp)
/* f098200: 0c00772a */ jal 0x1dca8
/* f098204: 02802025 */ move $a0,$s4
/* f098208: 44825000 */ mtc1 $v0,$f10
/* f09820c: 02802025 */ move $a0,$s4
/* f098210: 468052a0 */ cvt.s.w $f10,$f10
/* f098214: 44055000 */ mfc1 $a1,$f10
/* f098218: 0c007aaa */ jal 0x1eaa8
/* f09821c: 00000000 */ nop
/* f098220: 1000000b */ b .PB0f098250
/* f098224: 240affff */ li $t2,-1
.PB0f098228:
/* f098228: 46140402 */ mul.s $f16,$f0,$f20
/* f09822c: 00082c00 */ sll $a1,$t0,0x10
/* f098230: 00054c03 */ sra $t1,$a1,0x10
/* f098234: 44071000 */ mfc1 $a3,$f2
/* f098238: 01202825 */ move $a1,$t1
/* f09823c: 00003025 */ move $a2,$zero
/* f098240: e7a20014 */ swc1 $f2,0x14($sp)
/* f098244: 0c0079d7 */ jal 0x1e75c
/* f098248: e7b00010 */ swc1 $f16,0x10($sp)
/* f09824c: 240affff */ li $t2,-1
.PB0f098250:
/* f098250: 240b0002 */ li $t3,0x2
/* f098254: ae4a0680 */ sw $t2,0x680($s2)
/* f098258: ae4b068c */ sw $t3,0x68c($s2)
/* f09825c: 0c007746 */ jal 0x1dd18
/* f098260: 02802025 */ move $a0,$s4
/* f098264: 8e4c0684 */ lw $t4,0x684($s2)
/* f098268: 3c017f1b */ lui $at,0x7f1b
/* f09826c: c428ddf4 */ lwc1 $f8,-0x220c($at)
/* f098270: 448c9000 */ mtc1 $t4,$f18
/* f098274: 44801000 */ mtc1 $zero,$f2
/* f098278: 46809120 */ cvt.s.w $f4,$f18
/* f09827c: 46082182 */ mul.s $f6,$f4,$f8
/* f098280: 00000000 */ nop
/* f098284: 46060282 */ mul.s $f10,$f0,$f6
/* f098288: e64a0688 */ swc1 $f10,0x688($s2)
/* f09828c: 8e4d0690 */ lw $t5,0x690($s2)
.PB0f098290:
/* f098290: 000d7840 */ sll $t7,$t5,0x1
/* f098294: 05e10003 */ bgez $t7,.PB0f0982a4
/* f098298: 00000000 */ nop
/* f09829c: ae400684 */ sw $zero,0x684($s2)
/* f0982a0: e6420688 */ swc1 $f2,0x688($s2)
.PB0f0982a4:
/* f0982a4: 0fc25ff3 */ jal 0xf097fcc
/* f0982a8: 02402025 */ move $a0,$s2
/* f0982ac: 44809000 */ mtc1 $zero,$f18
/* f0982b0: c6500688 */ lwc1 $f16,0x688($s2)
/* f0982b4: 46000506 */ mov.s $f20,$f0
/* f0982b8: 46120032 */ c.eq.s $f0,$f18
/* f0982bc: 46008380 */ add.s $f14,$f16,$f0
/* f0982c0: 4502000b */ bc1fl .PB0f0982f0
/* f0982c4: 8e4306b0 */ lw $v1,0x6b0($s2)
/* f0982c8: 44802000 */ mtc1 $zero,$f4
/* f0982cc: 3c013f80 */ lui $at,0x3f80
/* f0982d0: 460e203c */ c.lt.s $f4,$f14
/* f0982d4: 00000000 */ nop
/* f0982d8: 45020005 */ bc1fl .PB0f0982f0
/* f0982dc: 8e4306b0 */ lw $v1,0x6b0($s2)
/* f0982e0: 44814000 */ mtc1 $at,$f8
/* f0982e4: 00000000 */ nop
/* f0982e8: 46080501 */ sub.s $f20,$f0,$f8
/* f0982ec: 8e4306b0 */ lw $v1,0x6b0($s2)
.PB0f0982f0:
/* f0982f0: 106000d8 */ beqz $v1,.PB0f098654
/* f0982f4: 00608825 */ move $s1,$v1
/* f0982f8: 106000d6 */ beqz $v1,.PB0f098654
/* f0982fc: afa0014c */ sw $zero,0x14c($sp)
/* f098300: 00008025 */ move $s0,$zero
/* f098304: 24130001 */ li $s3,0x1
/* f098308: 92230000 */ lbu $v1,0x0($s1)
.PB0f09830c:
/* f09830c: 14600003 */ bnez $v1,.PB0f09831c
/* f098310: 00000000 */ nop
/* f098314: 100000b6 */ b .PB0f0985f0
/* f098318: afb3014c */ sw $s3,0x14c($sp)
.PB0f09831c:
/* f09831c: 12630003 */ beq $s3,$v1,.PB0f09832c
/* f098320: 24010002 */ li $at,0x2
/* f098324: 54610036 */ bnel $v1,$at,.PB0f098400
/* f098328: 24010003 */ li $at,0x3
.PB0f09832c:
/* f09832c: 96260002 */ lhu $a2,0x2($s1)
/* f098330: 3c014f80 */ lui $at,0x4f80
/* f098334: 2405ffff */ li $a1,-1
/* f098338: 44863000 */ mtc1 $a2,$f6
/* f09833c: 27ab0094 */ addiu $t3,$sp,0x94
/* f098340: 04c10004 */ bgez $a2,.PB0f098354
/* f098344: 468032a0 */ cvt.s.w $f10,$f6
/* f098348: 44818000 */ mtc1 $at,$f16
/* f09834c: 00000000 */ nop
/* f098350: 46105280 */ add.s $f10,$f10,$f16
.PB0f098354:
/* f098354: 460e503e */ c.le.s $f10,$f14
/* f098358: 2401ffff */ li $at,-1
/* f09835c: 450200a5 */ bc1fl .PB0f0985f4
/* f098360: 8fac014c */ lw $t4,0x14c($sp)
/* f098364: 1a00000a */ blez $s0,.PB0f098390
/* f098368: 00001025 */ move $v0,$zero
/* f09836c: 8e240004 */ lw $a0,0x4($s1)
/* f098370: 27a3010c */ addiu $v1,$sp,0x10c
.PB0f098374:
/* f098374: 8c780000 */ lw $t8,0x0($v1)
/* f098378: 54980003 */ bnel $a0,$t8,.PB0f098388
/* f09837c: 24420001 */ addiu $v0,$v0,0x1
/* f098380: 00402825 */ move $a1,$v0
/* f098384: 24420001 */ addiu $v0,$v0,0x1
.PB0f098388:
/* f098388: 1450fffa */ bne $v0,$s0,.PB0f098374
/* f09838c: 24630004 */ addiu $v1,$v1,0x4
.PB0f098390:
/* f098390: 14a1000a */ bne $a1,$at,.PB0f0983bc
/* f098394: 2409ffff */ li $t1,-1
/* f098398: 8e240004 */ lw $a0,0x4($s1)
/* f09839c: 02002825 */ move $a1,$s0
/* f0983a0: 00051080 */ sll $v0,$a1,0x2
/* f0983a4: 03a2c821 */ addu $t9,$sp,$v0
/* f0983a8: 03a25021 */ addu $t2,$sp,$v0
/* f0983ac: af24010c */ sw $a0,0x10c($t9)
/* f0983b0: ad490094 */ sw $t1,0x94($t2)
/* f0983b4: 26100001 */ addiu $s0,$s0,0x1
/* f0983b8: 96260002 */ lhu $a2,0x2($s1)
.PB0f0983bc:
/* f0983bc: 00051080 */ sll $v0,$a1,0x2
/* f0983c0: 004b1821 */ addu $v1,$v0,$t3
/* f0983c4: 8c6c0000 */ lw $t4,0x0($v1)
/* f0983c8: 0186082a */ slt $at,$t4,$a2
/* f0983cc: 50200089 */ beqzl $at,.PB0f0985f4
/* f0983d0: 8fac014c */ lw $t4,0x14c($sp)
/* f0983d4: ac660000 */ sw $a2,0x0($v1)
/* f0983d8: 922d0000 */ lbu $t5,0x0($s1)
/* f0983dc: 03a27821 */ addu $t7,$sp,$v0
/* f0983e0: 03a27021 */ addu $t6,$sp,$v0
/* f0983e4: 166d0003 */ bne $s3,$t5,.PB0f0983f4
/* f0983e8: 00000000 */ nop
/* f0983ec: 10000080 */ b .PB0f0985f0
/* f0983f0: add300d0 */ sw $s3,0xd0($t6)
.PB0f0983f4:
/* f0983f4: 1000007e */ b .PB0f0985f0
/* f0983f8: ade000d0 */ sw $zero,0xd0($t7)
/* f0983fc: 24010003 */ li $at,0x3
.PB0f098400:
/* f098400: 10610005 */ beq $v1,$at,.PB0f098418
/* f098404: 24010008 */ li $at,0x8
/* f098408: 50610049 */ beql $v1,$at,.PB0f098530
/* f09840c: 8e4e0690 */ lw $t6,0x690($s2)
/* f098410: 10000078 */ b .PB0f0985f4
/* f098414: 8fac014c */ lw $t4,0x14c($sp)
.PB0f098418:
/* f098418: 8e580690 */ lw $t8,0x690($s2)
/* f09841c: 0018cfc2 */ srl $t9,$t8,0x1f
/* f098420: 53200074 */ beqzl $t9,.PB0f0985f4
/* f098424: 8fac014c */ lw $t4,0x14c($sp)
/* f098428: 96290002 */ lhu $t1,0x2($s1)
/* f09842c: 3c014f80 */ lui $at,0x4f80
/* f098430: 44899000 */ mtc1 $t1,$f18
/* f098434: 05210004 */ bgez $t1,.PB0f098448
/* f098438: 468090a0 */ cvt.s.w $f2,$f18
/* f09843c: 44812000 */ mtc1 $at,$f4
/* f098440: 00000000 */ nop
/* f098444: 46041080 */ add.s $f2,$f2,$f4
.PB0f098448:
/* f098448: 460e103e */ c.le.s $f2,$f14
/* f09844c: 00000000 */ nop
/* f098450: 45020068 */ bc1fl .PB0f0985f4
/* f098454: 8fac014c */ lw $t4,0x14c($sp)
/* f098458: 4602a03c */ c.lt.s $f20,$f2
/* f09845c: 00000000 */ nop
/* f098460: 45020064 */ bc1fl .PB0f0985f4
/* f098464: 8fac014c */ lw $t4,0x14c($sp)
/* f098468: 460ea03c */ c.lt.s $f20,$f14
/* f09846c: 00000000 */ nop
/* f098470: 45020060 */ bc1fl .PB0f0985f4
/* f098474: 8fac014c */ lw $t4,0x14c($sp)
/* f098478: 0fc25ff3 */ jal 0xf097fcc
/* f09847c: 02402025 */ move $a0,$s2
/* f098480: 962a0002 */ lhu $t2,0x2($s1)
/* f098484: 3c014f80 */ lui $at,0x4f80
/* f098488: 02802025 */ move $a0,$s4
/* f09848c: 448a4000 */ mtc1 $t2,$f8
/* f098490: 05410004 */ bgez $t2,.PB0f0984a4
/* f098494: 468041a0 */ cvt.s.w $f6,$f8
/* f098498: 44818000 */ mtc1 $at,$f16
/* f09849c: 00000000 */ nop
/* f0984a0: 46103180 */ add.s $f6,$f6,$f16
.PB0f0984a4:
/* f0984a4: 46003081 */ sub.s $f2,$f6,$f0
/* f0984a8: 3c014000 */ lui $at,0x4000
/* f0984ac: 44815000 */ mtc1 $at,$f10
/* f0984b0: c64c0688 */ lwc1 $f12,0x688($s2)
/* f0984b4: 460a1083 */ div.s $f2,$f2,$f10
/* f0984b8: 460c103c */ c.lt.s $f2,$f12
/* f0984bc: 00000000 */ nop
/* f0984c0: 45000018 */ bc1f .PB0f098524
/* f0984c4: 00000000 */ nop
/* f0984c8: 0c007746 */ jal 0x1dd18
/* f0984cc: e7a20084 */ swc1 $f2,0x84($sp)
/* f0984d0: 3c017f1b */ lui $at,0x7f1b
/* f0984d4: c432ddf8 */ lwc1 $f18,-0x2208($at)
/* f0984d8: c7a20084 */ lwc1 $f2,0x84($sp)
/* f0984dc: 02802025 */ move $a0,$s4
/* f0984e0: 46121102 */ mul.s $f4,$f2,$f18
/* f0984e4: 46002203 */ div.s $f8,$f4,$f0
/* f0984e8: 4600440d */ trunc.w.s $f16,$f8
/* f0984ec: 440c8000 */ mfc1 $t4,$f16
/* f0984f0: 0c007746 */ jal 0x1dd18
/* f0984f4: ae4c0684 */ sw $t4,0x684($s2)
/* f0984f8: 8e4d0684 */ lw $t5,0x684($s2)
/* f0984fc: 3c017f1b */ lui $at,0x7f1b
/* f098500: c432ddfc */ lwc1 $f18,-0x2204($at)
/* f098504: 448d3000 */ mtc1 $t5,$f6
/* f098508: 00000000 */ nop
/* f09850c: 468032a0 */ cvt.s.w $f10,$f6
/* f098510: 46125102 */ mul.s $f4,$f10,$f18
/* f098514: 00000000 */ nop
/* f098518: 46040202 */ mul.s $f8,$f0,$f4
/* f09851c: e6480688 */ swc1 $f8,0x688($s2)
/* f098520: c64c0688 */ lwc1 $f12,0x688($s2)
.PB0f098524:
/* f098524: 10000032 */ b .PB0f0985f0
/* f098528: 46146380 */ add.s $f14,$f12,$f20
/* f09852c: 8e4e0690 */ lw $t6,0x690($s2)
.PB0f098530:
/* f098530: 000ec080 */ sll $t8,$t6,0x2
/* f098534: 0703002f */ bgezl $t8,.PB0f0985f4
/* f098538: 8fac014c */ lw $t4,0x14c($sp)
/* f09853c: 96260002 */ lhu $a2,0x2($s1)
/* f098540: 3c014f80 */ lui $at,0x4f80
/* f098544: 44868000 */ mtc1 $a2,$f16
/* f098548: 04c10004 */ bgez $a2,.PB0f09855c
/* f09854c: 468080a0 */ cvt.s.w $f2,$f16
/* f098550: 44813000 */ mtc1 $at,$f6
/* f098554: 00000000 */ nop
/* f098558: 46061080 */ add.s $f2,$f2,$f6
.PB0f09855c:
/* f09855c: 460e103e */ c.le.s $f2,$f14
/* f098560: 00000000 */ nop
/* f098564: 45020023 */ bc1fl .PB0f0985f4
/* f098568: 8fac014c */ lw $t4,0x14c($sp)
/* f09856c: 4602a03c */ c.lt.s $f20,$f2
/* f098570: 00000000 */ nop
/* f098574: 4502001f */ bc1fl .PB0f0985f4
/* f098578: 8fac014c */ lw $t4,0x14c($sp)
/* f09857c: 460ea03c */ c.lt.s $f20,$f14
/* f098580: 02802025 */ move $a0,$s4
/* f098584: 4502001b */ bc1fl .PB0f0985f4
/* f098588: 8fac014c */ lw $t4,0x14c($sp)
/* f09858c: 460e103e */ c.le.s $f2,$f14
/* f098590: 44809000 */ mtc1 $zero,$f18
/* f098594: 46007006 */ mov.s $f0,$f14
/* f098598: 4502000c */ bc1fl .PB0f0985cc
/* f09859c: ae400684 */ sw $zero,0x684($s2)
/* f0985a0: 8e390004 */ lw $t9,0x4($s1)
/* f0985a4: 03264823 */ subu $t1,$t9,$a2
/* f0985a8: 44895000 */ mtc1 $t1,$f10
/* f0985ac: 00000000 */ nop
/* f0985b0: 46805320 */ cvt.s.w $f12,$f10
/* f0985b4: 460c0000 */ add.s $f0,$f0,$f12
.PB0f0985b8:
/* f0985b8: 4600103e */ c.le.s $f2,$f0
/* f0985bc: 00000000 */ nop
/* f0985c0: 4503fffd */ bc1tl .PB0f0985b8
/* f0985c4: 460c0000 */ add.s $f0,$f0,$f12
/* f0985c8: ae400684 */ sw $zero,0x684($s2)
.PB0f0985cc:
/* f0985cc: e6520688 */ swc1 $f18,0x688($s2)
/* f0985d0: 44050000 */ mfc1 $a1,$f0
/* f0985d4: 46000506 */ mov.s $f20,$f0
/* f0985d8: 0c007aaa */ jal 0x1eaa8
/* f0985dc: e7a00080 */ swc1 $f0,0x80($sp)
/* f0985e0: 924a0691 */ lbu $t2,0x691($s2)
/* f0985e4: c7ae0080 */ lwc1 $f14,0x80($sp)
/* f0985e8: 254b0001 */ addiu $t3,$t2,0x1
/* f0985ec: a24b0691 */ sb $t3,0x691($s2)
.PB0f0985f0:
/* f0985f0: 8fac014c */ lw $t4,0x14c($sp)
.PB0f0985f4:
/* f0985f4: 26310008 */ addiu $s1,$s1,0x8
/* f0985f8: 5180ff44 */ beqzl $t4,.PB0f09830c
/* f0985fc: 92230000 */ lbu $v1,0x0($s1)
/* f098600: 5a000015 */ blezl $s0,.PB0f098658
/* f098604: 3c054099 */ lui $a1,0x4099
/* f098608: 1a000012 */ blez $s0,.PB0f098654
/* f09860c: 00001025 */ move $v0,$zero
/* f098610: 27a3010c */ addiu $v1,$sp,0x10c
/* f098614: 27a800d0 */ addiu $t0,$sp,0xd0
.PB0f098618:
/* f098618: 84640002 */ lh $a0,0x2($v1)
/* f09861c: 8d050000 */ lw $a1,0x0($t0)
/* f098620: afa80058 */ sw $t0,0x58($sp)
/* f098624: afa3005c */ sw $v1,0x5c($sp)
/* f098628: afa2007c */ sw $v0,0x7c($sp)
/* f09862c: 02403025 */ move $a2,$s2
/* f098630: 0fc25f39 */ jal 0xf097ce4
/* f098634: 8fa70164 */ lw $a3,0x164($sp)
/* f098638: 8fa2007c */ lw $v0,0x7c($sp)
/* f09863c: 8fa3005c */ lw $v1,0x5c($sp)
/* f098640: 8fa80058 */ lw $t0,0x58($sp)
/* f098644: 24420001 */ addiu $v0,$v0,0x1
/* f098648: 24630004 */ addiu $v1,$v1,0x4
/* f09864c: 1450fff2 */ bne $v0,$s0,.PB0f098618
/* f098650: 25080004 */ addiu $t0,$t0,0x4
.PB0f098654:
/* f098654: 3c054099 */ lui $a1,0x4099
.PB0f098658:
/* f098658: 34a5999a */ ori $a1,$a1,0x999a
/* f09865c: 02802025 */ move $a0,$s4
/* f098660: 0c007a8f */ jal 0x1ea3c
/* f098664: 24060000 */ li $a2,0x0
/* f098668: 02802025 */ move $a0,$s4
/* f09866c: 8e450684 */ lw $a1,0x684($s2)
/* f098670: 0c007e2a */ jal 0x1f8a8
/* f098674: 24060001 */ li $a2,0x1
/* f098678: 0fc25ff3 */ jal 0xf097fcc
/* f09867c: 02402025 */ move $a0,$s2
/* f098680: 8e4306b0 */ lw $v1,0x6b0($s2)
/* f098684: 46000386 */ mov.s $f14,$f0
/* f098688: 00004025 */ move $t0,$zero
/* f09868c: 10600069 */ beqz $v1,.PB0f098834
/* f098690: 00608025 */ move $s0,$v1
/* f098694: 3c013f80 */ lui $at,0x3f80
/* f098698: 44812000 */ mtc1 $at,$f4
/* f09869c: 00008825 */ move $s1,$zero
/* f0986a0: 10600064 */ beqz $v1,.PB0f098834
/* f0986a4: e7a40070 */ swc1 $f4,0x70($sp)
/* f0986a8: 24140009 */ li $s4,0x9
/* f0986ac: 24130005 */ li $s3,0x5
.PB0f0986b0:
/* f0986b0: 92030000 */ lbu $v1,0x0($s0)
/* f0986b4: 54600004 */ bnezl $v1,.PB0f0986c8
/* f0986b8: 960d0002 */ lhu $t5,0x2($s0)
/* f0986bc: 1000005b */ b .PB0f09882c
/* f0986c0: 24080001 */ li $t0,0x1
/* f0986c4: 960d0002 */ lhu $t5,0x2($s0)
.PB0f0986c8:
/* f0986c8: 3c014f80 */ lui $at,0x4f80
/* f0986cc: 448d4000 */ mtc1 $t5,$f8
/* f0986d0: 05a10004 */ bgez $t5,.PB0f0986e4
/* f0986d4: 46804020 */ cvt.s.w $f0,$f8
/* f0986d8: 44818000 */ mtc1 $at,$f16
/* f0986dc: 00000000 */ nop
/* f0986e0: 46100000 */ add.s $f0,$f0,$f16
.PB0f0986e4:
/* f0986e4: 460e003e */ c.le.s $f0,$f14
/* f0986e8: 00000000 */ nop
/* f0986ec: 4500004f */ bc1f .PB0f09882c
/* f0986f0: 00000000 */ nop
/* f0986f4: 4600a03c */ c.lt.s $f20,$f0
/* f0986f8: 00000000 */ nop
/* f0986fc: 4500004b */ bc1f .PB0f09882c
/* f098700: 00000000 */ nop
/* f098704: 460ea03c */ c.lt.s $f20,$f14
/* f098708: 00000000 */ nop
/* f09870c: 45000047 */ bc1f .PB0f09882c
/* f098710: 00000000 */ nop
/* f098714: 10730007 */ beq $v1,$s3,.PB0f098734
/* f098718: 00000000 */ nop
/* f09871c: 10740039 */ beq $v1,$s4,.PB0f098804
/* f098720: 2401000b */ li $at,0xb
/* f098724: 5061002f */ beql $v1,$at,.PB0f0987e4
/* f098728: 8e0d0004 */ lw $t5,0x4($s0)
/* f09872c: 1000003f */ b .PB0f09882c
/* f098730: 00000000 */ nop
.PB0f098734:
/* f098734: 12200016 */ beqz $s1,.PB0f098790
/* f098738: 00002025 */ move $a0,$zero
/* f09873c: 8e0e0004 */ lw $t6,0x4($s0)
/* f098740: c7a60070 */ lwc1 $f6,0x70($sp)
/* f098744: 240f0001 */ li $t7,0x1
/* f098748: 2418ffff */ li $t8,-1
/* f09874c: 24190001 */ li $t9,0x1
/* f098750: afb90020 */ sw $t9,0x20($sp)
/* f098754: afb8001c */ sw $t8,0x1c($sp)
/* f098758: afaf0018 */ sw $t7,0x18($sp)
/* f09875c: e7ae0158 */ swc1 $f14,0x158($sp)
/* f098760: afa80078 */ sw $t0,0x78($sp)
/* f098764: 00002025 */ move $a0,$zero
/* f098768: 00002825 */ move $a1,$zero
/* f09876c: 24067fff */ li $a2,0x7fff
/* f098770: 24070040 */ li $a3,0x40
/* f098774: 00008825 */ move $s1,$zero
/* f098778: afae0010 */ sw $t6,0x10($sp)
/* f09877c: 0c0041d9 */ jal 0x10764
/* f098780: e7a60014 */ swc1 $f6,0x14($sp)
/* f098784: 8fa80078 */ lw $t0,0x78($sp)
/* f098788: 10000028 */ b .PB0f09882c
/* f09878c: c7ae0158 */ lwc1 $f14,0x158($sp)
.PB0f098790:
/* f098790: 8e090004 */ lw $t1,0x4($s0)
/* f098794: 3c013f80 */ lui $at,0x3f80
/* f098798: 44815000 */ mtc1 $at,$f10
/* f09879c: 240a0001 */ li $t2,0x1
/* f0987a0: 240bffff */ li $t3,-1
/* f0987a4: 240c0001 */ li $t4,0x1
/* f0987a8: afac0020 */ sw $t4,0x20($sp)
/* f0987ac: afab001c */ sw $t3,0x1c($sp)
/* f0987b0: afaa0018 */ sw $t2,0x18($sp)
/* f0987b4: e7ae0158 */ swc1 $f14,0x158($sp)
/* f0987b8: afa80078 */ sw $t0,0x78($sp)
/* f0987bc: 00002825 */ move $a1,$zero
/* f0987c0: 24067fff */ li $a2,0x7fff
/* f0987c4: 24070040 */ li $a3,0x40
/* f0987c8: afa90010 */ sw $t1,0x10($sp)
/* f0987cc: 0c0041d9 */ jal 0x10764
/* f0987d0: e7aa0014 */ swc1 $f10,0x14($sp)
/* f0987d4: 8fa80078 */ lw $t0,0x78($sp)
/* f0987d8: 10000014 */ b .PB0f09882c
/* f0987dc: c7ae0158 */ lwc1 $f14,0x158($sp)
/* f0987e0: 8e0d0004 */ lw $t5,0x4($s0)
.PB0f0987e4:
/* f0987e4: 3c01447a */ lui $at,0x447a
/* f0987e8: 44814000 */ mtc1 $at,$f8
/* f0987ec: 448d9000 */ mtc1 $t5,$f18
/* f0987f0: 24110001 */ li $s1,0x1
/* f0987f4: 46809120 */ cvt.s.w $f4,$f18
/* f0987f8: 46082403 */ div.s $f16,$f4,$f8
/* f0987fc: 1000000b */ b .PB0f09882c
/* f098800: e7b00070 */ swc1 $f16,0x70($sp)
.PB0f098804:
/* f098804: 8e4e0690 */ lw $t6,0x690($s2)
/* f098808: 924b0690 */ lbu $t3,0x690($s2)
/* f09880c: 000e78c0 */ sll $t7,$t6,0x3
/* f098810: 000fc742 */ srl $t8,$t7,0x1d
/* f098814: 27190001 */ addiu $t9,$t8,0x1
/* f098818: 00194880 */ sll $t1,$t9,0x2
/* f09881c: 312a001c */ andi $t2,$t1,0x1c
/* f098820: 316cffe3 */ andi $t4,$t3,0xffe3
/* f098824: 014c6825 */ or $t5,$t2,$t4
/* f098828: a24d0690 */ sb $t5,0x690($s2)
.PB0f09882c:
/* f09882c: 1100ffa0 */ beqz $t0,.PB0f0986b0
/* f098830: 26100008 */ addiu $s0,$s0,0x8
.PB0f098834:
/* f098834: 8fbf004c */ lw $ra,0x4c($sp)
.PB0f098838:
/* f098838: d7b40030 */ ldc1 $f20,0x30($sp)
/* f09883c: 8fb00038 */ lw $s0,0x38($sp)
/* f098840: 8fb1003c */ lw $s1,0x3c($sp)
/* f098844: 8fb20040 */ lw $s2,0x40($sp)
/* f098848: 8fb30044 */ lw $s3,0x44($sp)
/* f09884c: 8fb40048 */ lw $s4,0x48($sp)
/* f098850: 03e00008 */ jr $ra
/* f098854: 27bd0160 */ addiu $sp,$sp,0x160
);
#elif VERSION >= VERSION_NTSC_1_0
GLOBAL_ASM(
glabel bgun0f0981e8
@ -6140,7 +6713,7 @@ s32 bgun0f09a3f8(struct hand *hand, struct weaponfunc *func)
if (autofunc->unk50 > 0) {
if (hand->gs_float1 < 1) {
#if VERSION >= VERSION_PAL_FINAL
#if VERSION >= VERSION_PAL_BETA
hand->gs_float1 += g_Vars.lvupdate240freal / autofunc->unk50;
#else
hand->gs_float1 += g_Vars.lvupdate240f / autofunc->unk50;
@ -6202,7 +6775,7 @@ s32 bgun0f09a3f8(struct hand *hand, struct weaponfunc *func)
if (autofunc->unk51 > 0) {
if (hand->gs_float1 > 0) {
#if VERSION >= VERSION_PAL_FINAL
#if VERSION >= VERSION_PAL_BETA
hand->gs_float1 -= g_Vars.lvupdate240freal / autofunc->unk51;
#else
hand->gs_float1 -= g_Vars.lvupdate240f / autofunc->unk51;
@ -6225,7 +6798,7 @@ s32 bgun0f09a3f8(struct hand *hand, struct weaponfunc *func)
return -1;
}
#if VERSION >= VERSION_PAL_FINAL
#if VERSION >= VERSION_PAL_BETA
GLOBAL_ASM(
glabel bgun0f09a6f8
.late_rodata
@ -7931,7 +8504,7 @@ bool bgunTickIncAttackingClose(s32 handnum, struct hand *hand)
hand->burstbullets++;
if (hand->triggeron) {
#if VERSION >= VERSION_PAL_FINAL
#if VERSION >= VERSION_PAL_BETA
hand->matmot2 += 0.01f * g_Vars.lvupdate240freal;
#else
hand->matmot2 += 0.01f * g_Vars.lvupdate240f;
@ -8939,7 +9512,7 @@ void bgunTick(s32 handnum)
lvupdate = g_Vars.lvupdate240_60;
hand->animframeinc = g_Vars.lvupdate240_60;
#if VERSION >= VERSION_PAL_FINAL
#if VERSION >= VERSION_PAL_BETA
hand->animframeincfreal = modelGetAbsAnimSpeed(&hand->unk09bc) * PALUPF(hand->animframeinc);
#else
hand->animframeincfreal += PALUPF(g_Vars.lvupdate240_60);
@ -16209,7 +16782,7 @@ glabel var7f1ac764
void bgunSwivelTowards(f32 screenx, f32 screeny, f32 damp)
{
struct weapon *weapon = weaponFindById(bgunGetWeaponNum(HAND_RIGHT));
#if VERSION >= VERSION_PAL_FINAL
#if VERSION >= VERSION_PAL_BETA
f32 value = weapon->eptr->unk10;
#else
f32 value = weapon->eptr->unk14;
@ -16225,7 +16798,7 @@ void bgunSwivelTowards(f32 screenx, f32 screeny, f32 damp)
void bgun0f0a0b98(f32 screenx, f32 screeny)
{
struct weapon *weapon = weaponFindById(bgunGetWeaponNum(HAND_RIGHT));
#if VERSION >= VERSION_PAL_FINAL
#if VERSION >= VERSION_PAL_BETA
f32 value = weapon->eptr->unk10;
#else
f32 value = weapon->eptr->unk14;
@ -17454,7 +18027,7 @@ void bgun0f0a24f0(struct coord *arg0, s32 handnum)
arg0->z = b.z;
}
#if VERSION >= VERSION_PAL_FINAL
#if VERSION >= VERSION_PAL_BETA
GLOBAL_ASM(
glabel bgun0f0a256c
/* f0a256c: 3c0e800a */ lui $t6,%hi(var8009d148)
@ -18759,7 +19332,7 @@ glabel var7f1ac7d0
);
#endif
#if VERSION >= VERSION_PAL_FINAL
#if VERSION >= VERSION_PAL_BETA
GLOBAL_ASM(
glabel bgun0f0a3490
.late_rodata
@ -19566,7 +20139,7 @@ glabel bgun0f0a37b4
/* f0a3aa0: 00000000 */ nop
);
#if VERSION >= VERSION_PAL_FINAL
#if VERSION >= VERSION_PAL_BETA
GLOBAL_ASM(
glabel bgun0f0a3aa4
.late_rodata
@ -20323,7 +20896,7 @@ glabel bgun0f0a3eac
/* f0a4090: 27bd00a8 */ addiu $sp,$sp,0xa8
);
#if VERSION >= VERSION_PAL_FINAL
#if VERSION >= VERSION_PAL_BETA
GLOBAL_ASM(
glabel bgun0f0a4094
.late_rodata
@ -20481,7 +21054,7 @@ glabel var7f1ac8c0
);
#endif
#if VERSION >= VERSION_PAL_FINAL
#if VERSION >= VERSION_PAL_BETA
GLOBAL_ASM(
glabel bgun0f0a419c
.late_rodata
@ -20723,7 +21296,7 @@ void bgun0f0a4334(struct hand *hand)
}
if (hand->matmot1 > 0) {
#if VERSION >= VERSION_PAL_FINAL
#if VERSION >= VERSION_PAL_BETA
hand->matmot1 -= g_Vars.lvupdate240freal / 10.0f;
#else
hand->matmot1 -= g_Vars.lvupdate240f / 10.0f;
@ -27935,7 +28508,7 @@ void bgun0f0a6c30(void)
// Handle RCP120 cloak ammo usage
if ((chr->hidden & CHRHFLAG_CLOAKED) && chr->cloakfadefinished == true) {
hand = &player->hands[HAND_RIGHT];
#if VERSION >= VERSION_PAL_FINAL
#if VERSION >= VERSION_PAL_BETA
hand->matmot1 += g_Vars.lvupdate240freal * 0.4f;
#else
hand->matmot1 += g_Vars.lvupdate240f * 0.4f;
@ -28061,7 +28634,7 @@ s32 bgunAllocateFireslot(void)
return index;
}
#if VERSION >= VERSION_PAL_FINAL
#if VERSION >= VERSION_PAL_BETA
GLOBAL_ASM(
glabel bgun0f0a7138
.late_rodata

View File

@ -854,7 +854,7 @@ glabel var7f1a7ad8nb
const char var7f1ad75c[] = "bondwalk.c";
#if VERSION >= VERSION_PAL_FINAL
#if VERSION >= VERSION_PAL_BETA
GLOBAL_ASM(
glabel bwalkCalculateNewPositionWithPush
/* f0c4250: 27bdff58 */ addiu $sp,$sp,-168

View File

@ -19318,6 +19318,8 @@ bool chrNavCanSeeNextPos(struct chrdata *chr, struct coord *chrpos, s16 *chrroom
spbc = true;
#if VERSION >= VERSION_PAL_FINAL
cd00024e4c(&spac, &spa0, 14151, "chr/chraction.c");
#elif VERSION >= VERSION_PAL_BETA
cd00024e4c(&spac, &spa0, 14146, "chraction.c");
#elif VERSION >= VERSION_NTSC_1_0
cd00024e4c(&spac, &spa0, 14145, "chraction.c");
#else
@ -19339,6 +19341,8 @@ bool chrNavCanSeeNextPos(struct chrdata *chr, struct coord *chrpos, s16 *chrroom
spb8 = true;
#if VERSION >= VERSION_PAL_FINAL
cd00024e4c(&sp94, &sp88, 14166, "chr/chraction.c");
#elif VERSION >= VERSION_PAL_BETA
cd00024e4c(&sp94, &sp88, 14161, "chraction.c");
#elif VERSION >= VERSION_NTSC_1_0
cd00024e4c(&sp94, &sp88, 14160, "chraction.c");
#else
@ -19380,6 +19384,8 @@ bool chrNavCanSeeNextPos(struct chrdata *chr, struct coord *chrpos, s16 *chrroom
} else {
#if VERSION >= VERSION_PAL_FINAL
cd00024e4c(leftpos, rightpos, 14236, "chr/chraction.c");
#elif VERSION >= VERSION_PAL_BETA
cd00024e4c(leftpos, rightpos, 14231, "chraction.c");
#elif VERSION >= VERSION_NTSC_1_0
cd00024e4c(leftpos, rightpos, 14230, "chraction.c");
#else
@ -19465,6 +19471,8 @@ bool chrNavCheckForObstacle(struct chrdata *chr, struct coord *chrpos, s16 *chrr
spbc = true;
#if VERSION >= VERSION_PAL_FINAL
cd00024e4c(&spac, &spa0, 14316, "chr/chraction.c");
#elif VERSION >= VERSION_PAL_BETA
cd00024e4c(&spac, &spa0, 14311, "chraction.c");
#elif VERSION >= VERSION_NTSC_1_0
cd00024e4c(&spac, &spa0, 14310, "chraction.c");
#else
@ -19487,6 +19495,8 @@ bool chrNavCheckForObstacle(struct chrdata *chr, struct coord *chrpos, s16 *chrr
spb8 = true;
#if VERSION >= VERSION_PAL_FINAL
cd00024e4c(&sp94, &sp88, 14331, "chr/chraction.c");
#elif VERSION >= VERSION_PAL_BETA
cd00024e4c(&sp94, &sp88, 14326, "chraction.c");
#elif VERSION >= VERSION_NTSC_1_0
cd00024e4c(&sp94, &sp88, 14325, "chraction.c");
#else
@ -19536,6 +19546,8 @@ bool chrNavCheckForObstacle(struct chrdata *chr, struct coord *chrpos, s16 *chrr
} else {
#if VERSION >= VERSION_PAL_FINAL
cd00024e4c(leftpos, rightpos, 14401, "chr/chraction.c");
#elif VERSION >= VERSION_PAL_BETA
cd00024e4c(leftpos, rightpos, 14396, "chraction.c");
#elif VERSION >= VERSION_NTSC_1_0
cd00024e4c(leftpos, rightpos, 14395, "chraction.c");
#else
@ -25042,6 +25054,8 @@ bool chrRunFromPos(struct chrdata *chr, u32 speed, f32 rundist, struct coord *fr
if (cdTestAToB4(&chr->prop->pos, chr->prop->rooms, &delta, CDTYPE_ALL, 4) == CDRESULT_COLLISION) {
#if VERSION >= VERSION_PAL_FINAL
cdGetPos(&delta, 18555, "chr/chraction.c");
#elif VERSION >= VERSION_PAL_BETA
cdGetPos(&delta, 18550, "chraction.c");
#elif VERSION >= VERSION_NTSC_1_0
cdGetPos(&delta, 18547, "chraction.c");
#else
@ -25384,6 +25398,249 @@ glabel var7f1a942c
/* f04cbfc: 03e00008 */ jr $ra
/* f04cc00: 24020001 */ addiu $v0,$zero,0x1
);
#elif VERSION >= VERSION_PAL_BETA
GLOBAL_ASM(
glabel func0f04c874
.late_rodata
glabel var7f1a942c
.word 0x3c8ef461
.text
/* f04c998: 27bdff18 */ addiu $sp,$sp,-232
/* f04c99c: afbf007c */ sw $ra,0x7c($sp)
/* f04c9a0: afb40068 */ sw $s4,0x68($sp)
/* f04c9a4: afb30064 */ sw $s3,0x64($sp)
/* f04c9a8: afb20060 */ sw $s2,0x60($sp)
/* f04c9ac: afb00058 */ sw $s0,0x58($sp)
/* f04c9b0: 00c08025 */ move $s0,$a2
/* f04c9b4: 00a09025 */ move $s2,$a1
/* f04c9b8: 00809825 */ move $s3,$a0
/* f04c9bc: 30f400ff */ andi $s4,$a3,0xff
/* f04c9c0: afbe0078 */ sw $s8,0x78($sp)
/* f04c9c4: afb70074 */ sw $s7,0x74($sp)
/* f04c9c8: afb60070 */ sw $s6,0x70($sp)
/* f04c9cc: afb5006c */ sw $s5,0x6c($sp)
/* f04c9d0: afb1005c */ sw $s1,0x5c($sp)
/* f04c9d4: f7be0050 */ sdc1 $f30,0x50($sp)
/* f04c9d8: f7bc0048 */ sdc1 $f28,0x48($sp)
/* f04c9dc: f7ba0040 */ sdc1 $f26,0x40($sp)
/* f04c9e0: f7b80038 */ sdc1 $f24,0x38($sp)
/* f04c9e4: f7b60030 */ sdc1 $f22,0x30($sp)
/* f04c9e8: f7b40028 */ sdc1 $f20,0x28($sp)
/* f04c9ec: 0fc0a255 */ jal 0xf028954
/* f04c9f0: afa700f4 */ sw $a3,0xf4($sp)
/* f04c9f4: 4480d000 */ mtc1 $zero,$f26
/* f04c9f8: 00408825 */ move $s1,$v0
/* f04c9fc: 0fc1322a */ jal 0xf04c8a8
/* f04ca00: 02602025 */ move $a0,$s3
/* f04ca04: 8e6e001c */ lw $t6,0x1c($s3)
/* f04ca08: 3c0143b4 */ lui $at,0x43b4
/* f04ca0c: 4481f000 */ mtc1 $at,$f30
/* f04ca10: c5c40008 */ lwc1 $f4,0x8($t6)
/* f04ca14: 3c014334 */ lui $at,0x4334
/* f04ca18: 4481e000 */ mtc1 $at,$f28
/* f04ca1c: e7a400c8 */ swc1 $f4,0xc8($sp)
/* f04ca20: 8e6f001c */ lw $t7,0x1c($s3)
/* f04ca24: 46000606 */ mov.s $f24,$f0
/* f04ca28: 27be00c8 */ addiu $s8,$sp,0xc8
/* f04ca2c: c5e6000c */ lwc1 $f6,0xc($t7)
/* f04ca30: 27b7009c */ addiu $s7,$sp,0x9c
/* f04ca34: 27b600a0 */ addiu $s6,$sp,0xa0
/* f04ca38: e7a600cc */ swc1 $f6,0xcc($sp)
/* f04ca3c: 8e78001c */ lw $t8,0x1c($s3)
/* f04ca40: 27b50098 */ addiu $s5,$sp,0x98
/* f04ca44: c7080010 */ lwc1 $f8,0x10($t8)
/* f04ca48: e7a800d0 */ swc1 $f8,0xd0($sp)
/* f04ca4c: 44925000 */ mtc1 $s2,$f10
.PB0f04ca50:
/* f04ca50: 3c014f80 */ lui $at,0x4f80
/* f04ca54: 06410004 */ bgez $s2,.PB0f04ca68
/* f04ca58: 46805020 */ cvt.s.w $f0,$f10
/* f04ca5c: 44818000 */ mtc1 $at,$f16
/* f04ca60: 00000000 */ nop
/* f04ca64: 46100000 */ add.s $f0,$f0,$f16
.PB0f04ca68:
/* f04ca68: 4600e03c */ c.lt.s $f28,$f0
/* f04ca6c: 46000506 */ mov.s $f20,$f0
/* f04ca70: 3c017f1b */ lui $at,0x7f1b
/* f04ca74: 45020003 */ bc1fl .PB0f04ca84
/* f04ca78: 4618a501 */ sub.s $f20,$f20,$f24
/* f04ca7c: 461e0501 */ sub.s $f20,$f0,$f30
/* f04ca80: 4618a501 */ sub.s $f20,$f20,$f24
.PB0f04ca84:
/* f04ca84: c432b118 */ lwc1 $f18,-0x4ee8($at)
/* f04ca88: 4612a502 */ mul.s $f20,$f20,$f18
/* f04ca8c: 0c006b88 */ jal 0x1ae20
/* f04ca90: 4600a306 */ mov.s $f12,$f20
/* f04ca94: 46000586 */ mov.s $f22,$f0
/* f04ca98: 0c006b8b */ jal 0x1ae2c
/* f04ca9c: 4600a306 */ mov.s $f12,$f20
/* f04caa0: c62e0008 */ lwc1 $f14,0x8($s1)
/* f04caa4: c7a400c8 */ lwc1 $f4,0xc8($sp)
/* f04caa8: c7a600d0 */ lwc1 $f6,0xd0($sp)
/* f04caac: c6280010 */ lwc1 $f8,0x10($s1)
/* f04cab0: 460e2081 */ sub.s $f2,$f4,$f14
/* f04cab4: 02a02825 */ move $a1,$s5
/* f04cab8: 02c03025 */ move $a2,$s6
/* f04cabc: 46083301 */ sub.s $f12,$f6,$f8
/* f04cac0: 46161282 */ mul.s $f10,$f2,$f22
/* f04cac4: 02e03825 */ move $a3,$s7
/* f04cac8: 46006402 */ mul.s $f16,$f12,$f0
/* f04cacc: 46105481 */ sub.s $f18,$f10,$f16
/* f04cad0: 46001202 */ mul.s $f8,$f2,$f0
/* f04cad4: 00000000 */ nop
/* f04cad8: 46166282 */ mul.s $f10,$f12,$f22
/* f04cadc: 46127100 */ add.s $f4,$f14,$f18
/* f04cae0: e6040000 */ swc1 $f4,0x0($s0)
/* f04cae4: c7a600cc */ lwc1 $f6,0xcc($sp)
/* f04cae8: 460a4400 */ add.s $f16,$f8,$f10
/* f04caec: e6060004 */ swc1 $f6,0x4($s0)
/* f04caf0: c6320010 */ lwc1 $f18,0x10($s1)
/* f04caf4: 46109100 */ add.s $f4,$f18,$f16
/* f04caf8: e6040008 */ swc1 $f4,0x8($s0)
/* f04cafc: 0fc0a2ab */ jal 0xf028aac
/* f04cb00: 8e64001c */ lw $a0,0x1c($s3)
/* f04cb04: c7a800cc */ lwc1 $f8,0xcc($sp)
/* f04cb08: c7a600a0 */ lwc1 $f6,0xa0($sp)
/* f04cb0c: c7b2009c */ lwc1 $f18,0x9c($sp)
/* f04cb10: 8e65001c */ lw $a1,0x1c($s3)
/* f04cb14: 46083281 */ sub.s $f10,$f6,$f8
/* f04cb18: 24190001 */ li $t9,0x1
/* f04cb1c: afb90010 */ sw $t9,0x10($sp)
/* f04cb20: 46089401 */ sub.s $f16,$f18,$f8
/* f04cb24: e7aa0014 */ swc1 $f10,0x14($sp)
/* f04cb28: 03c02025 */ move $a0,$s8
/* f04cb2c: 02003025 */ move $a2,$s0
/* f04cb30: e7b00018 */ swc1 $f16,0x18($sp)
/* f04cb34: 24070023 */ li $a3,0x23
/* f04cb38: 0c00b760 */ jal 0x2dd80
/* f04cb3c: 24a50028 */ addiu $a1,$a1,0x28
/* f04cb40: 1440002a */ bnez $v0,.PB0f04cbec
/* f04cb44: 02002025 */ move $a0,$s0
/* f04cb48: 3c067f1b */ lui $a2,0x7f1b
/* f04cb4c: 24c6a9b4 */ addiu $a2,$a2,-22092
/* f04cb50: 0c00951f */ jal 0x2547c
/* f04cb54: 24054901 */ li $a1,0x4901
/* f04cb58: c6040000 */ lwc1 $f4,0x0($s0)
/* f04cb5c: c7a600c8 */ lwc1 $f6,0xc8($sp)
/* f04cb60: c60a0008 */ lwc1 $f10,0x8($s0)
/* f04cb64: c7b200d0 */ lwc1 $f18,0xd0($sp)
/* f04cb68: 46062501 */ sub.s $f20,$f4,$f6
/* f04cb6c: 46125581 */ sub.s $f22,$f10,$f18
/* f04cb70: 4614a202 */ mul.s $f8,$f20,$f20
/* f04cb74: 00000000 */ nop
/* f04cb78: 4616b402 */ mul.s $f16,$f22,$f22
/* f04cb7c: 0c012ae4 */ jal 0x4ab90
/* f04cb80: 46104300 */ add.s $f12,$f8,$f16
/* f04cb84: 3c014248 */ lui $at,0x4248
/* f04cb88: 44812000 */ mtc1 $at,$f4
/* f04cb8c: 44805000 */ mtc1 $zero,$f10
/* f04cb90: c7b200c8 */ lwc1 $f18,0xc8($sp)
/* f04cb94: 46040181 */ sub.s $f6,$f0,$f4
/* f04cb98: c7a400c8 */ lwc1 $f4,0xc8($sp)
/* f04cb9c: 46003083 */ div.s $f2,$f6,$f0
/* f04cba0: 460a103c */ c.lt.s $f2,$f10
/* f04cba4: 00000000 */ nop
/* f04cba8: 45000007 */ bc1f .PB0f04cbc8
/* f04cbac: 00000000 */ nop
/* f04cbb0: e6120000 */ swc1 $f18,0x0($s0)
/* f04cbb4: c7a800cc */ lwc1 $f8,0xcc($sp)
/* f04cbb8: e6080004 */ swc1 $f8,0x4($s0)
/* f04cbbc: c7b000d0 */ lwc1 $f16,0xd0($sp)
/* f04cbc0: 1000000a */ b .PB0f04cbec
/* f04cbc4: e6100008 */ swc1 $f16,0x8($s0)
.PB0f04cbc8:
/* f04cbc8: 4602a502 */ mul.s $f20,$f20,$f2
/* f04cbcc: 46142180 */ add.s $f6,$f4,$f20
/* f04cbd0: 4602b582 */ mul.s $f22,$f22,$f2
/* f04cbd4: e6060000 */ swc1 $f6,0x0($s0)
/* f04cbd8: c7aa00cc */ lwc1 $f10,0xcc($sp)
/* f04cbdc: e60a0004 */ swc1 $f10,0x4($s0)
/* f04cbe0: c7b200d0 */ lwc1 $f18,0xd0($sp)
/* f04cbe4: 46169200 */ add.s $f8,$f18,$f22
/* f04cbe8: e6080008 */ swc1 $f8,0x8($s0)
.PB0f04cbec:
/* f04cbec: 12800019 */ beqz $s4,.PB0f04cc54
/* f04cbf0: 00001025 */ move $v0,$zero
/* f04cbf4: c6000000 */ lwc1 $f0,0x0($s0)
/* f04cbf8: c7b000c8 */ lwc1 $f16,0xc8($sp)
/* f04cbfc: c7a400cc */ lwc1 $f4,0xcc($sp)
/* f04cc00: c6060004 */ lwc1 $f6,0x4($s0)
/* f04cc04: 46008081 */ sub.s $f2,$f16,$f0
/* f04cc08: c7aa00d0 */ lwc1 $f10,0xd0($sp)
/* f04cc0c: c6120008 */ lwc1 $f18,0x8($s0)
/* f04cc10: 46062381 */ sub.s $f14,$f4,$f6
/* f04cc14: 46021202 */ mul.s $f8,$f2,$f2
/* f04cc18: e7a000a8 */ swc1 $f0,0xa8($sp)
/* f04cc1c: 46125301 */ sub.s $f12,$f10,$f18
/* f04cc20: 460e7402 */ mul.s $f16,$f14,$f14
/* f04cc24: c60a0004 */ lwc1 $f10,0x4($s0)
/* f04cc28: 24080168 */ li $t0,0x168
/* f04cc2c: 460c6182 */ mul.s $f6,$f12,$f12
/* f04cc30: e7aa00ac */ swc1 $f10,0xac($sp)
/* f04cc34: c6120008 */ lwc1 $f18,0x8($s0)
/* f04cc38: 01129023 */ subu $s2,$t0,$s2
/* f04cc3c: 24020001 */ li $v0,0x1
/* f04cc40: 46104100 */ add.s $f4,$f8,$f16
/* f04cc44: 0000a025 */ move $s4,$zero
/* f04cc48: e7b200b0 */ swc1 $f18,0xb0($sp)
/* f04cc4c: 10000001 */ b .PB0f04cc54
/* f04cc50: 46062680 */ add.s $f26,$f4,$f6
.PB0f04cc54:
/* f04cc54: 5440ff7e */ bnezl $v0,.PB0f04ca50
/* f04cc58: 44925000 */ mtc1 $s2,$f10
/* f04cc5c: 44804000 */ mtc1 $zero,$f8
/* f04cc60: c7b000c8 */ lwc1 $f16,0xc8($sp)
/* f04cc64: 02602025 */ move $a0,$s3
/* f04cc68: 4608d032 */ c.eq.s $f26,$f8
/* f04cc6c: 02002825 */ move $a1,$s0
/* f04cc70: 45010018 */ bc1t .PB0f04ccd4
/* f04cc74: 00000000 */ nop
/* f04cc78: c6040000 */ lwc1 $f4,0x0($s0)
/* f04cc7c: c7a600cc */ lwc1 $f6,0xcc($sp)
/* f04cc80: c60a0004 */ lwc1 $f10,0x4($s0)
/* f04cc84: 46048081 */ sub.s $f2,$f16,$f4
/* f04cc88: c7b200d0 */ lwc1 $f18,0xd0($sp)
/* f04cc8c: c6080008 */ lwc1 $f8,0x8($s0)
/* f04cc90: 460a3381 */ sub.s $f14,$f6,$f10
/* f04cc94: 46021402 */ mul.s $f16,$f2,$f2
/* f04cc98: 46089301 */ sub.s $f12,$f18,$f8
/* f04cc9c: 460e7102 */ mul.s $f4,$f14,$f14
/* f04cca0: c7a800a8 */ lwc1 $f8,0xa8($sp)
/* f04cca4: 460c6282 */ mul.s $f10,$f12,$f12
/* f04cca8: 46048180 */ add.s $f6,$f16,$f4
/* f04ccac: 460a3480 */ add.s $f18,$f6,$f10
/* f04ccb0: 461a903c */ c.lt.s $f18,$f26
/* f04ccb4: 00000000 */ nop
/* f04ccb8: 45000006 */ bc1f .PB0f04ccd4
/* f04ccbc: 00000000 */ nop
/* f04ccc0: e6080000 */ swc1 $f8,0x0($s0)
/* f04ccc4: c7b000ac */ lwc1 $f16,0xac($sp)
/* f04ccc8: e6100004 */ swc1 $f16,0x4($s0)
/* f04cccc: c7a400b0 */ lwc1 $f4,0xb0($sp)
/* f04ccd0: e6040008 */ swc1 $f4,0x8($s0)
.PB0f04ccd4:
/* f04ccd4: 0fc0eb38 */ jal 0xf03ace0
/* f04ccd8: 93a600fb */ lbu $a2,0xfb($sp)
/* f04ccdc: 8fbf007c */ lw $ra,0x7c($sp)
/* f04cce0: d7b40028 */ ldc1 $f20,0x28($sp)
/* f04cce4: d7b60030 */ ldc1 $f22,0x30($sp)
/* f04cce8: d7b80038 */ ldc1 $f24,0x38($sp)
/* f04ccec: d7ba0040 */ ldc1 $f26,0x40($sp)
/* f04ccf0: d7bc0048 */ ldc1 $f28,0x48($sp)
/* f04ccf4: d7be0050 */ ldc1 $f30,0x50($sp)
/* f04ccf8: 8fb00058 */ lw $s0,0x58($sp)
/* f04ccfc: 8fb1005c */ lw $s1,0x5c($sp)
/* f04cd00: 8fb20060 */ lw $s2,0x60($sp)
/* f04cd04: 8fb30064 */ lw $s3,0x64($sp)
/* f04cd08: 8fb40068 */ lw $s4,0x68($sp)
/* f04cd0c: 8fb5006c */ lw $s5,0x6c($sp)
/* f04cd10: 8fb60070 */ lw $s6,0x70($sp)
/* f04cd14: 8fb70074 */ lw $s7,0x74($sp)
/* f04cd18: 8fbe0078 */ lw $s8,0x78($sp)
/* f04cd1c: 27bd00e8 */ addiu $sp,$sp,0xe8
/* f04cd20: 03e00008 */ jr $ra
/* f04cd24: 24020001 */ li $v0,0x1
);
#elif VERSION >= VERSION_NTSC_1_0
GLOBAL_ASM(
glabel func0f04c874

View File

@ -786,7 +786,7 @@ void func0f13870c(void)
}
}
#if VERSION >= VERSION_PAL_FINAL
#if VERSION >= VERSION_PAL_BETA
GLOBAL_ASM(
glabel func0f13899c
.late_rodata

View File

@ -383,13 +383,19 @@ s32 var800787a4nb = 0;
s32 var800787a8nb = 0;
bool g_DebugMemInfo = false;
s32 var800787b0nb = 0;
#if VERSION == VERSION_PAL_BETA
s32 var800787bcnb = 0;
s32 var800781e4pb = 0;
s32 var800787b8nb = 0;
s32 var800787b4nb = 0;
#else
s32 var800787b4nb = 0;
s32 var800787b8nb = 0;
s32 var800787bcnb = 0;
s32 var800787c0nb = 0;
#if VERSION == VERSION_PAL_BETA
s32 var800781f0pb = 0;
#endif
s32 var800787c0nb = 0;
s32 var800787c4nb = 1;
s32 var800787c8nb = 0;
s32 var800787ccnb = 0;
@ -1277,6 +1283,15 @@ bool debug0f119ba8nb(void)
return var800787bcnb;
}
#if VERSION == VERSION_PAL_BETA
GLOBAL_ASM(
glabel func0f120478nb
/* f120478: 3c028008 */ lui $v0,0x8008
/* f12047c: 03e00008 */ jr $ra
/* f120480: 8c4281ec */ lw $v0,-0x7e14($v0)
);
#endif
bool debugIsChrStatsEnabled(void)
{
return g_DebugChrStats;
@ -1296,12 +1311,3 @@ bool debug0f119bd8nb(void)
{
return var800787f0nb;
}
#if VERSION == VERSION_PAL_BETA
GLOBAL_ASM(
glabel func0f1204a8nb
/* f1204a8: 3c028008 */ lui $v0,0x8008
/* f1204ac: 03e00008 */ jr $ra
/* f1204b0: 8c428220 */ lw $v0,-0x7de0($v0)
);
#endif

View File

@ -31,7 +31,7 @@ u32 colourBlend(u32 a, u32 b, u32 aweight)
void func0f0069dc(void)
{
#if VERSION >= VERSION_PAL_FINAL
#if VERSION >= VERSION_PAL_BETA
var80061630 = var80061630 + g_Vars.diffframe240freal / 4800.0f;
#else
var80061630 = var80061630 + g_Vars.diffframe240f / 4800.0f;
@ -41,7 +41,7 @@ void func0f0069dc(void)
var80061630 -= 1.0f;
}
#if VERSION >= VERSION_PAL_FINAL
#if VERSION >= VERSION_PAL_BETA
var80061634 = var80061634 + g_Vars.lvupdate240freal / 4800.0f;
#else
var80061634 = var80061634 + g_Vars.lvupdate240f / 4800.0f;

View File

@ -3178,7 +3178,7 @@ void setupHov(struct defaultobj *obj, struct hov *hov)
hov->groundprev60 = -1;
}
#if VERSION >= VERSION_PAL_FINAL
#if VERSION >= VERSION_PAL_BETA
GLOBAL_ASM(
glabel setupLoadBriefing
/* f00e980: 27bdffc8 */ addiu $sp,$sp,-56

View File

@ -158,7 +158,7 @@ void menuTick(void)
}
if (g_MenuData.screenshottimer == 0 || g_MenuData.bg != 0) {
#if VERSION >= VERSION_PAL_FINAL
#if VERSION >= VERSION_PAL_BETA
f32 diffframe = g_Vars.diffframe60freal;
#else
f32 diffframe = g_Vars.diffframe60f;

View File

@ -4182,7 +4182,7 @@ void func0f0aefb8(void)
(var8009da60[i].unk20.f[1] - var8009da60[i].unk14.f[1]) * (var8009da60[i].unk20.f[1] - var8009da60[i].unk14.f[1]) +
(var8009da60[i].unk20.f[2] - var8009da60[i].unk14.f[2]) * (var8009da60[i].unk20.f[2] - var8009da60[i].unk14.f[2]));
#if VERSION >= VERSION_PAL_FINAL
#if VERSION >= VERSION_PAL_BETA
value -= var8009da60[i].unk2c * g_Vars.lvupdate240freal / 60.0f;
#else
value -= var8009da60[i].unk2c * g_Vars.lvupdate240f / 60.0f;

View File

@ -220,7 +220,7 @@ void currentPlayerZoomOut(f32 fovpersec)
}
if (index >= 0) {
#if VERSION >= VERSION_PAL_FINAL
#if VERSION >= VERSION_PAL_BETA
f32 amount = fovpersec * 0.25f * g_Vars.lvupdate240freal;
#else
f32 amount = fovpersec * 0.25f * g_Vars.lvupdate240f;
@ -249,7 +249,7 @@ void currentPlayerZoomIn(f32 fovpersec)
}
if (index >= 0) {
#if VERSION >= VERSION_PAL_FINAL
#if VERSION >= VERSION_PAL_BETA
f32 amount = fovpersec * 0.25f * g_Vars.lvupdate240freal;
#else
f32 amount = fovpersec * 0.25f * g_Vars.lvupdate240f;
@ -565,7 +565,7 @@ f32 gsetGetDamage(struct gset *gset)
damage = fullfunc->damage;
if (gset->weaponnum == WEAPON_REAPER) {
#if VERSION >= VERSION_PAL_FINAL
#if VERSION >= VERSION_PAL_BETA
damage *= g_Vars.lvupdate240freal;
#else
damage *= g_Vars.lvupdate240f;

View File

@ -564,7 +564,7 @@ char *langGet(s32 textid)
return (char *)addr;
}
#if PAL
#if VERSION >= VERSION_PAL_FINAL
GLOBAL_ASM(
glabel func0f16f6ecpf
/* f16f6ec: 27bdffd8 */ addiu $sp,$sp,-40
@ -598,6 +598,40 @@ glabel func0f16f6ecpf
/* f16f754: 03e00008 */ jr $ra
/* f16f758: 27bd0028 */ addiu $sp,$sp,0x28
);
#elif VERSION >= VERSION_PAL_BETA
GLOBAL_ASM(
glabel func0f16f6ecpf
/* f1701ec: 27bdffd8 */ addiu $sp,$sp,-40
/* f1701f0: afbf0024 */ sw $ra,0x24($sp)
/* f1701f4: 3c048008 */ lui $a0,0x8008
/* f1701f8: afb20020 */ sw $s2,0x20($sp)
/* f1701fc: afb1001c */ sw $s1,0x1c($sp)
/* f170200: afb00018 */ sw $s0,0x18($sp)
/* f170204: 0fc5e23c */ jal 0xf1788f0
/* f170208: 8c8465f4 */ lw $a0,0x65f4($a0)
/* f17020c: 3c018008 */ lui $at,0x8008
/* f170210: 3c11800b */ lui $s1,0x800b
/* f170214: ac2265f8 */ sw $v0,0x65f8($at)
/* f170218: 2631f0c0 */ addiu $s1,$s1,-3904
/* f17021c: 00008025 */ move $s0,$zero
/* f170220: 24120045 */ li $s2,0x45
.PB0f170224:
/* f170224: 8e2e0000 */ lw $t6,0x0($s1)
/* f170228: 51c00004 */ beqzl $t6,.PB0f17023c
/* f17022c: 26100001 */ addiu $s0,$s0,0x1
/* f170230: 0fc5c01e */ jal 0xf170078
/* f170234: 02002025 */ move $a0,$s0
/* f170238: 26100001 */ addiu $s0,$s0,0x1
.PB0f17023c:
/* f17023c: 1612fff9 */ bne $s0,$s2,.PB0f170224
/* f170240: 26310004 */ addiu $s1,$s1,0x4
/* f170244: 8fbf0024 */ lw $ra,0x24($sp)
/* f170248: 8fb00018 */ lw $s0,0x18($sp)
/* f17024c: 8fb1001c */ lw $s1,0x1c($sp)
/* f170250: 8fb20020 */ lw $s2,0x20($sp)
/* f170254: 03e00008 */ jr $ra
/* f170258: 27bd0028 */ addiu $sp,$sp,0x28
);
#endif
#if VERSION >= VERSION_PAL_FINAL

View File

@ -533,7 +533,7 @@ Gfx *lvRenderFade(Gfx *gdl)
if (g_FadeDelay > 0) {
g_FadeDelay--;
} else {
#if VERSION >= VERSION_PAL_FINAL
#if VERSION >= VERSION_PAL_BETA
g_FadeFrac += g_Vars.diffframe60freal / g_FadeNumFrames;
#else
g_FadeFrac += g_Vars.diffframe60f / g_FadeNumFrames;
@ -1536,7 +1536,7 @@ Gfx *lvRender(Gfx *gdl)
f32 cutsceneblurfrac = playerGetCutsceneBlurFrac();
if (cutsceneblurfrac > 0) {
#if VERSION < VERSION_PAL_FINAL
#if VERSION < VERSION_PAL_BETA
u32 stack;
#endif
gdl = bviewRenderMotionBlur(gdl, 0xffffff00, cutsceneblurfrac * 255);

View File

@ -265,7 +265,7 @@ s32 menuhandlerScreenRatio(s32 operation, struct menuitem *item, union handlerda
return 0;
}
#if VERSION >= VERSION_PAL_BETA
#if VERSION >= VERSION_PAL_FINAL
u16 var80071ce0pf[] = { 0x5507, 0x5508, 0x5509, 0x550a, 0x550b };
GLOBAL_ASM(
@ -334,6 +334,75 @@ glabel func0f1030e4pf
/* f1031bc: 03e00008 */ jr $ra
/* f1031c0: 00000000 */ nop
);
#elif VERSION >= VERSION_PAL_BETA
u16 var80071ce0pf[] = { 0x5507, 0x5508, 0x5509, 0x550a, 0x550b };
GLOBAL_ASM(
glabel func0f1030e4pf
/* f102e4c: 27bdffd8 */ addiu $sp,$sp,-40
/* f102e50: 3c0e8007 */ lui $t6,0x8007
/* f102e54: afbf0014 */ sw $ra,0x14($sp)
/* f102e58: afa5002c */ sw $a1,0x2c($sp)
/* f102e5c: 25ce36cc */ addiu $t6,$t6,0x36cc
/* f102e60: 8dc10000 */ lw $at,0x0($t6)
/* f102e64: 27a2001c */ addiu $v0,$sp,0x1c
/* f102e68: 24080005 */ li $t0,0x5
/* f102e6c: ac410000 */ sw $at,0x0($v0)
/* f102e70: 8dd90004 */ lw $t9,0x4($t6)
/* f102e74: ac590004 */ sw $t9,0x4($v0)
/* f102e78: 95c10008 */ lhu $at,0x8($t6)
/* f102e7c: a4410008 */ sh $at,0x8($v0)
/* f102e80: 24010001 */ li $at,0x1
/* f102e84: 10810009 */ beq $a0,$at,.PB0f102eac
/* f102e88: 24010003 */ li $at,0x3
/* f102e8c: 10810009 */ beq $a0,$at,.PB0f102eb4
/* f102e90: 24010006 */ li $at,0x6
/* f102e94: 1081000e */ beq $a0,$at,.PB0f102ed0
/* f102e98: 24010007 */ li $at,0x7
/* f102e9c: 10810018 */ beq $a0,$at,.PB0f102f00
/* f102ea0: 3c02800a */ lui $v0,0x800a
/* f102ea4: 1000001d */ b .PB0f102f1c
/* f102ea8: 00001025 */ move $v0,$zero
.PB0f102eac:
/* f102eac: 1000001a */ b .PB0f102f18
/* f102eb0: acc80000 */ sw $t0,0x0($a2)
.PB0f102eb4:
/* f102eb4: 8cc90000 */ lw $t1,0x0($a2)
/* f102eb8: 00095040 */ sll $t2,$t1,0x1
/* f102ebc: 004a5821 */ addu $t3,$v0,$t2
/* f102ec0: 0fc5c06a */ jal 0xf1701a8
/* f102ec4: 95640000 */ lhu $a0,0x0($t3)
/* f102ec8: 10000015 */ b .PB0f102f20
/* f102ecc: 8fbf0014 */ lw $ra,0x14($sp)
.PB0f102ed0:
/* f102ed0: 8ccc0000 */ lw $t4,0x0($a2)
/* f102ed4: 3c02800a */ lui $v0,0x800a
/* f102ed8: 2442e4d0 */ addiu $v0,$v0,-6960
/* f102edc: a44c0482 */ sh $t4,0x482($v0)
/* f102ee0: 0fc5c097 */ jal 0xf17025c
/* f102ee4: 3184ffff */ andi $a0,$t4,0xffff
/* f102ee8: 3c02800a */ lui $v0,0x800a
/* f102eec: 2442e4d0 */ addiu $v0,$v0,-6960
/* f102ef0: 8c4d0458 */ lw $t5,0x458($v0)
/* f102ef4: 35b80005 */ ori $t8,$t5,0x5
/* f102ef8: 10000007 */ b .PB0f102f18
/* f102efc: ac580458 */ sw $t8,0x458($v0)
.PB0f102f00:
/* f102f00: 2442e4d0 */ addiu $v0,$v0,-6960
/* f102f04: 944f0482 */ lhu $t7,0x482($v0)
/* f102f08: 2de10005 */ sltiu $at,$t7,0x5
/* f102f0c: 14200002 */ bnez $at,.PB0f102f18
/* f102f10: accf0000 */ sw $t7,0x0($a2)
/* f102f14: acc00000 */ sw $zero,0x0($a2)
.PB0f102f18:
/* f102f18: 00001025 */ move $v0,$zero
.PB0f102f1c:
/* f102f1c: 8fbf0014 */ lw $ra,0x14($sp)
.PB0f102f20:
/* f102f20: 27bd0028 */ addiu $sp,$sp,0x28
/* f102f24: 03e00008 */ jr $ra
/* f102f28: 00000000 */ nop
);
#endif
s32 menuhandlerScreenSplit(s32 operation, struct menuitem *item, union handlerdata *data)
@ -4590,7 +4659,7 @@ struct menudialogdef g_MissionControlOptionsMenuDialog = {
NULL,
};
#if VERSINO >= VERSION_PAL_FINAL
#if VERSION >= VERSION_PAL_FINAL
struct menuitem g_CiControlOptionsMenuItems2[] = {
{ MENUITEMTYPE_SELECTABLE, 0, 0x00000000, L_MPWEAPONS_270, (u32)&func0f105664, menuhandlerControlStyle }, // "Control Style"
{ MENUITEMTYPE_CHECKBOX, 0, 0x00000000, L_MPWEAPONS_271, 0x00000004, menuhandlerReversePitch }, // "Reverse Pitch"

View File

@ -112,7 +112,7 @@ const struct menucolourpalette g_MenuColourPalettes3[] = {
#if VERSION >= VERSION_NTSC_1_0
char *g_StringPointer = g_CheatMarqueeString;
char *g_StringPointer2 = &g_CheatMarqueeString[PAL ? 150 : 125];
char *g_StringPointer2 = &g_CheatMarqueeString[VERSION >= VERSION_PAL_FINAL ? 150 : 125];
#endif
s32 g_MpPlayerNum = 0;
@ -2060,7 +2060,7 @@ void func0f0f1418(void)
for (i = 0; i < 4; i++) {
if (g_Menus[g_MpPlayerNum].unkdfc[i].item) {
#if VERSION >= VERSION_PAL_FINAL
#if VERSION >= VERSION_PAL_BETA
g_Menus[g_MpPlayerNum].unkdfc[i].unk04 += g_Vars.diffframe60freal / 60.0f;
#else
g_Menus[g_MpPlayerNum].unkdfc[i].unk04 += g_Vars.diffframe60f / 60.0f;

View File

@ -4269,7 +4269,7 @@ u32 menugfx0f0e4fe0(void)
return align16(0xd20);
}
#if VERSION >= VERSION_PAL_FINAL
#if VERSION >= VERSION_PAL_BETA
GLOBAL_ASM(
glabel menugfxRenderBgSuccess
.late_rodata

View File

@ -3476,7 +3476,7 @@ Gfx *menuitemSeparatorRender(Gfx *gdl, struct menurendercontext *context)
u32 var800711e8 = 0x00000000;
#if PAL
#if VERSION >= VERSION_PAL_FINAL
GLOBAL_ASM(
glabel menuitemObjectivesRenderOne
/* f0e98ac: 27bdfed0 */ addiu $sp,$sp,-304
@ -5626,7 +5626,7 @@ Gfx *menuitemObjectivesRender(Gfx *gdl, struct menurendercontext *context)
if (context->item->param == 0) {
y += 18;
} else if (context->item->param == 2) {
y += PAL ? 34 : 30;
y += VERSION >= VERSION_PAL_FINAL ? 34 : 30;
} else {
y += 14;
}

View File

@ -545,7 +545,7 @@ s32 mpCharacterBodyMenuHandler(s32 operation, struct menuitem *item, union handl
if (g_Menus[g_MpPlayerNum].unk840.unk578 > 0) {
g_Menus[g_MpPlayerNum].unk840.unk578 -= g_Vars.diffframe60;
} else {
#if VERSION >= VERSION_PAL_FINAL
#if VERSION >= VERSION_PAL_BETA
f32 value = g_Menus[g_MpPlayerNum].unk840.unk524 + 0.01f * g_Vars.diffframe60freal;
#else
f32 value = g_Menus[g_MpPlayerNum].unk840.unk524 + 0.01f * g_Vars.diffframe60f;
@ -1271,7 +1271,7 @@ s32 mpCharacterHeadMenuHandler(s32 operation, struct menuitem *item, union handl
data->carousel.value = mpGetNumHeads2();
break;
case MENUOP_11:
#if VERSION >= VERSION_PAL_FINAL
#if VERSION >= VERSION_PAL_BETA
diffframe = g_Menus[g_MpPlayerNum].unk840.unk524 + 0.01f * g_Vars.diffframe60freal;
#else
diffframe = g_Menus[g_MpPlayerNum].unk840.unk524 + 0.01f * g_Vars.diffframe60f;

View File

@ -103,7 +103,7 @@
#define MAX_HEADERCACHE_ENTRIES 50
#if VERSION >= VERSION_PAL_FINAL
#if VERSION >= VERSION_PAL_BETA
#define LINE_825 825
#define LINE_1058 1058
#define LINE_1551 1551
@ -215,7 +215,7 @@ u32 var800a337c;
u32 var800a3380;
u32 var800a3384;
#if VERSION >= VERSION_NTSC_1_0
#if VERSION != VERSION_NTSC_BETA && VERSION != VERSION_PAL_BETA
// This is likely g_DebugCutsceneLabelPtrs and/or g_DebugCutsceneLabelBuffers
// but with reduced lengths
u32 var800a3388;

View File

@ -2110,7 +2110,7 @@ void playerTickCutscene(bool arg0)
s32 endframe;
s8 contpadnum = optionsGetContpadNum1(g_Vars.currentplayerstats->mpindex);
u16 buttons;
#if VERSION >= VERSION_PAL_FINAL
#if VERSION >= VERSION_PAL_BETA
u8 stack3[0x2c];
#endif
f32 barfrac;

View File

@ -620,7 +620,11 @@ void playerInit(void)
if (cheatIsActive(CHEAT_CLOAKINGDEVICE)) {
invGiveSingleWeapon(WEAPON_CLOAKINGDEVICE);
#if VERSION >= VERSION_PAL_FINAL
bgunSetAmmoQuantity(AMMOTYPE_CLOAK, TICKS(7200));
#else
bgunSetAmmoQuantity(AMMOTYPE_CLOAK, 7200);
#endif
}
if (cheatIsActive(CHEAT_PERFECTDARKNESS)) {

File diff suppressed because it is too large Load Diff

View File

@ -3387,7 +3387,7 @@ glabel var7f1adde8
);
#endif
#if VERSION >= VERSION_PAL_FINAL
#if VERSION >= VERSION_PAL_BETA
GLOBAL_ASM(
glabel sightRenderDefault
.late_rodata

View File

@ -6611,7 +6611,7 @@ void titleInitNintendoLogo(void)
g_TitleFastForward = false;
if (g_TitleButtonPressed) {
g_TitleTimer = PAL ? 133 : 180;
g_TitleTimer = VERSION >= VERSION_PAL_FINAL ? TICKS(160) : TICKS(180);
} else {
g_TitleTimer = 0;
}
@ -6686,7 +6686,7 @@ Gfx *titleRenderNintendoLogo(Gfx *gdl)
s32 i;
s32 j;
Mtxf sp108;
f32 fracdone = g_TitleTimer / (PAL ? 183.0f : 240.0f);
f32 fracdone = g_TitleTimer / (VERSION >= VERSION_PAL_FINAL ? 183.0f : TICKS(240.0f));
struct coord spf8 = {0, 0, 0};
s32 v0;

View File

@ -1125,6 +1125,12 @@ s32 ciCharacterProfileMenuDialog(s32 operation, struct menudialogdef *dialogdef,
x = -127;
}
}
#elif VERSION >= VERSION_PAL_BETA
x = -117;
if (optionsGetScreenRatio() == SCREENRATIO_16_9) {
x = -87;
}
#else
x = -130;
@ -1192,7 +1198,7 @@ s32 ciCharacterProfileMenuDialog(s32 operation, struct menudialogdef *dialogdef,
if (g_Menus[g_MpPlayerNum].unk840.unk578 > 0) {
g_Menus[g_MpPlayerNum].unk840.unk578 -= g_Vars.diffframe60;
} else {
#if VERSION >= VERSION_PAL_FINAL
#if VERSION >= VERSION_PAL_BETA
f32 tmp = g_Menus[g_MpPlayerNum].unk840.unk524 + 0.01f * g_Vars.diffframe60freal;
#else
f32 tmp = g_Menus[g_MpPlayerNum].unk840.unk524 + 0.01f * g_Vars.diffframe60f;
@ -1376,6 +1382,14 @@ s32 dtTrainingDetailsMenuDialog(s32 operation, struct menudialogdef *dialogdef,
g_Menus[g_MpPlayerNum].unk840.unk510 = 84;
}
}
#elif VERSION >= VERSION_PAL_BETA
if (optionsGetScreenRatio() == SCREENRATIO_16_9) {
g_Menus[g_MpPlayerNum].unk840.unk538 = 64;
g_Menus[g_MpPlayerNum].unk840.unk510 = 64;
} else {
g_Menus[g_MpPlayerNum].unk840.unk538 = 84;
g_Menus[g_MpPlayerNum].unk840.unk510 = 84;
}
#else
if (optionsGetScreenRatio() == SCREENRATIO_16_9) {
g_Menus[g_MpPlayerNum].unk840.unk538 = 70;
@ -1855,7 +1869,7 @@ s32 ciHangarTitleMenuHandler(s32 operation, struct menuitem *item, union handler
return 0;
}
#if VERSION >= VERSION_PAL_FINAL
#if VERSION >= VERSION_PAL_BETA
GLOBAL_ASM(
glabel ciHangarHolographMenuDialog
.late_rodata

View File

@ -9610,7 +9610,7 @@ Gfx *frRenderHud(Gfx *gdl)
f32 mult;
if (viGetViewWidth() > (VERSION >= VERSION_PAL_FINAL ? 330 : 400)) {
mult = PAL ? 1.5f : 2;
mult = VERSION >= VERSION_PAL_FINAL ? 1.5f : 2;
} else {
mult = 1;
}

View File

@ -379,7 +379,7 @@ void weatherTickRain(struct weatherdata *weather)
for (i = 0; i != ARRAYCOUNT(data->particles); i++) {
struct weatherparticle *particle = &data->particles[i];
#if VERSION >= VERSION_PAL_FINAL
#if VERSION >= VERSION_PAL_BETA
particle->pos.x += particle->inc.x * g_Vars.lvupdate240freal;
particle->pos.y += particle->inc.y * g_Vars.lvupdate240freal;
particle->pos.z += particle->inc.z * g_Vars.lvupdate240freal;
@ -475,7 +475,7 @@ void weatherTickSnow(struct weatherdata *weather)
data = g_WeatherData->particledata[0];
// 0
data->unk3ec8[0] += 0.04f * (VERSION >= VERSION_PAL_FINAL ? g_Vars.lvupdate240freal : g_Vars.lvupdate240f);
data->unk3ec8[0] += 0.04f * (VERSION >= VERSION_PAL_BETA ? g_Vars.lvupdate240freal : g_Vars.lvupdate240f);
if (data->unk3ec8[0] < 0) {
data->unk3ec8[0] += M_TAU;
@ -486,7 +486,7 @@ void weatherTickSnow(struct weatherdata *weather)
}
// 1
data->unk3ec8[1] += -0.03f * (VERSION >= VERSION_PAL_FINAL ? g_Vars.lvupdate240freal : g_Vars.lvupdate240f);
data->unk3ec8[1] += -0.03f * (VERSION >= VERSION_PAL_BETA ? g_Vars.lvupdate240freal : g_Vars.lvupdate240f);
if (data->unk3ec8[1] < 0) {
data->unk3ec8[1] += M_TAU;
@ -497,7 +497,7 @@ void weatherTickSnow(struct weatherdata *weather)
}
// 2
data->unk3ec8[2] += 0.04f * (VERSION >= VERSION_PAL_FINAL ? g_Vars.lvupdate240freal : g_Vars.lvupdate240f);
data->unk3ec8[2] += 0.04f * (VERSION >= VERSION_PAL_BETA ? g_Vars.lvupdate240freal : g_Vars.lvupdate240f);
if (data->unk3ec8[2] < 0) {
data->unk3ec8[2] += M_TAU;
@ -508,7 +508,7 @@ void weatherTickSnow(struct weatherdata *weather)
}
// 3
data->unk3ec8[3] += 0.03f * (VERSION >= VERSION_PAL_FINAL ? g_Vars.lvupdate240freal : g_Vars.lvupdate240f);
data->unk3ec8[3] += 0.03f * (VERSION >= VERSION_PAL_BETA ? g_Vars.lvupdate240freal : g_Vars.lvupdate240f);
if (data->unk3ec8[3] < 0) {
data->unk3ec8[3] += M_TAU;
@ -519,7 +519,7 @@ void weatherTickSnow(struct weatherdata *weather)
}
// 4
data->unk3ec8[4] += 0.02f * (VERSION >= VERSION_PAL_FINAL ? g_Vars.lvupdate240freal : g_Vars.lvupdate240f);
data->unk3ec8[4] += 0.02f * (VERSION >= VERSION_PAL_BETA ? g_Vars.lvupdate240freal : g_Vars.lvupdate240f);
if (data->unk3ec8[4] < 0) {
data->unk3ec8[4] += M_TAU;
@ -530,7 +530,7 @@ void weatherTickSnow(struct weatherdata *weather)
}
// 5
data->unk3ec8[5] += 0.01f * (VERSION >= VERSION_PAL_FINAL ? g_Vars.lvupdate240freal : g_Vars.lvupdate240f);
data->unk3ec8[5] += 0.01f * (VERSION >= VERSION_PAL_BETA ? g_Vars.lvupdate240freal : g_Vars.lvupdate240f);
if (data->unk3ec8[5] < 0) {
data->unk3ec8[5] += M_TAU;
@ -541,7 +541,7 @@ void weatherTickSnow(struct weatherdata *weather)
}
// 6
data->unk3ec8[6] += -0.01f * (VERSION >= VERSION_PAL_FINAL ? g_Vars.lvupdate240freal : g_Vars.lvupdate240f);
data->unk3ec8[6] += -0.01f * (VERSION >= VERSION_PAL_BETA ? g_Vars.lvupdate240freal : g_Vars.lvupdate240f);
if (data->unk3ec8[6] < 0) {
data->unk3ec8[6] += M_TAU;
@ -552,7 +552,7 @@ void weatherTickSnow(struct weatherdata *weather)
}
// 7
data->unk3ec8[7] += -0.02f * (VERSION >= VERSION_PAL_FINAL ? g_Vars.lvupdate240freal : g_Vars.lvupdate240f);
data->unk3ec8[7] += -0.02f * (VERSION >= VERSION_PAL_BETA ? g_Vars.lvupdate240freal : g_Vars.lvupdate240f);
if (data->unk3ec8[7] < 0) {
data->unk3ec8[7] += M_TAU;
@ -565,7 +565,7 @@ void weatherTickSnow(struct weatherdata *weather)
for (i = 0; i < ARRAYCOUNT(data->particles); i++) {
struct weatherparticle *particle = &data->particles[i];
#if VERSION >= VERSION_PAL_FINAL
#if VERSION >= VERSION_PAL_BETA
particle->pos.x += particle->inc.x * g_Vars.lvupdate240freal;
particle->pos.y += particle->inc.y * g_Vars.lvupdate240freal;
particle->pos.z += particle->inc.z * g_Vars.lvupdate240freal;

View File

@ -5,8 +5,10 @@
#include "data.h"
#include "types.h"
#if VERSION < VERSION_NTSC_1_0
#if VERSION == VERSION_NTSC_BETA
u8 var80097110nb[0x950];
#elif VERSION == VERSION_PAL_BETA
u8 var80097110nb[0x860];
#endif
volatile u32 g_DmaNumSlotsBusy;

View File

@ -281,7 +281,7 @@ u32 mempGetPoolSize(u8 poolnum, u32 bank)
}
#endif
#if VERSION <= VERSION_NTSC_1_0
#if VERSION < VERSION_NTSC_1_0
void *mempAllocFromPackedWord(u32 word)
{
return mempAlloc(word >> 4, word & 0x0f);

View File

@ -30,7 +30,7 @@ bool var8005efbc = false;
f32 var8005efc0 = 0;
bool (*var8005efc4)(struct model *model, struct modelnode *node) = NULL;
#if VERSION >= VERSION_PAL_FINAL
#if VERSION >= VERSION_PAL_BETA
u32 var8005efd8_2 = 0;
#endif
@ -3539,10 +3539,6 @@ void model0001e14c(struct model *model, f32 arg1, f32 arg2)
}
}
#if VERSION == VERSION_PAL_BETA
u32 var80060670pb = 0;
#endif
bool var8005efdc = true;
u32 var8005efe0 = 0x00000000;
u32 var8005efe4 = 0x00000000;

View File

@ -5,7 +5,7 @@
OSPifRam __osEepPifRam;
#if VERSION >= VERSION_PAL_FINAL
#if VERSION >= VERSION_PAL_BETA
u32 var8009d010pf[4];
#endif

View File

@ -2,6 +2,7 @@
#include <os_internal.h>
#include <R4300.h>
#include <rcp.h>
#include "versions.h"
/**
* Note: This file is included in PAL only.
@ -25,6 +26,7 @@ s32 osViClock = VI_NTSC_CLOCK;
u32 var80060fecpf = 0;
u32 var80060ff0pf = OS_IM_ALL;
#if VERSION >= VERSION_PAL_FINAL
GLOBAL_ASM(
glabel osInitialize2
/* 517c0: 27bdffc8 */ addiu $sp,$sp,-56
@ -208,6 +210,191 @@ glabel osInitialize2
/* 51a60: 03e00008 */ jr $ra
/* 51a64: 00000000 */ nop
);
#else
GLOBAL_ASM(
glabel osInitialize2
/* 52480: 27bdffc8 */ addiu $sp,$sp,-56
/* 52484: afbf001c */ sw $ra,0x1c($sp)
/* 52488: 240e0001 */ li $t6,0x1
/* 5248c: 3c018009 */ lui $at,0x8009
/* 52490: afb00018 */ sw $s0,0x18($sp)
/* 52494: afa00030 */ sw $zero,0x30($sp)
/* 52498: 0c012ca4 */ jal 0x4b290
/* 5249c: ac2e2f40 */ sw $t6,0x2f40($at)
/* 524a0: 00408025 */ move $s0,$v0
/* 524a4: 3c012000 */ lui $at,0x2000
/* 524a8: 0c012ca0 */ jal 0x4b280
/* 524ac: 02012025 */ or $a0,$s0,$at
/* 524b0: 3c040100 */ lui $a0,0x100
/* 524b4: 0c0121e8 */ jal 0x487a0
/* 524b8: 34840800 */ ori $a0,$a0,0x800
/* 524bc: 3c041fc0 */ lui $a0,0x1fc0
/* 524c0: 348407fc */ ori $a0,$a0,0x7fc
/* 524c4: 0c012ca8 */ jal 0x4b2a0
/* 524c8: 27a50034 */ addiu $a1,$sp,0x34
/* 524cc: 10400007 */ beqz $v0,.PB000524ec
/* 524d0: 00000000 */ nop
.PB000524d4:
/* 524d4: 3c041fc0 */ lui $a0,0x1fc0
/* 524d8: 348407fc */ ori $a0,$a0,0x7fc
/* 524dc: 0c012ca8 */ jal 0x4b2a0
/* 524e0: 27a50034 */ addiu $a1,$sp,0x34
/* 524e4: 1440fffb */ bnez $v0,.PB000524d4
/* 524e8: 00000000 */ nop
.PB000524ec:
/* 524ec: 8fa50034 */ lw $a1,0x34($sp)
/* 524f0: 3c041fc0 */ lui $a0,0x1fc0
/* 524f4: 348407fc */ ori $a0,$a0,0x7fc
/* 524f8: 34af0008 */ ori $t7,$a1,0x8
/* 524fc: 0c012cbc */ jal 0x4b2f0
/* 52500: 01e02825 */ move $a1,$t7
/* 52504: 10400009 */ beqz $v0,.PB0005252c
/* 52508: 00000000 */ nop
.PB0005250c:
/* 5250c: 8fa50034 */ lw $a1,0x34($sp)
/* 52510: 3c041fc0 */ lui $a0,0x1fc0
/* 52514: 348407fc */ ori $a0,$a0,0x7fc
/* 52518: 34b80008 */ ori $t8,$a1,0x8
/* 5251c: 0c012cbc */ jal 0x4b2f0
/* 52520: 03002825 */ move $a1,$t8
/* 52524: 1440fff9 */ bnez $v0,.PB0005250c
/* 52528: 00000000 */ nop
.PB0005252c:
/* 5252c: 3c087000 */ lui $t0,0x7000
/* 52530: 250834c0 */ addiu $t0,$t0,0x34c0
/* 52534: 8d010000 */ lw $at,0x0($t0)
/* 52538: 3c198000 */ lui $t9,0x8000
/* 5253c: 3c0d7000 */ lui $t5,0x7000
/* 52540: af210000 */ sw $at,0x0($t9)
/* 52544: 8d0b0004 */ lw $t3,0x4($t0)
/* 52548: 25ad34c0 */ addiu $t5,$t5,0x34c0
/* 5254c: 3c0c8000 */ lui $t4,0x8000
/* 52550: af2b0004 */ sw $t3,0x4($t9)
/* 52554: 8d010008 */ lw $at,0x8($t0)
/* 52558: 358c0080 */ ori $t4,$t4,0x80
/* 5255c: 3c097000 */ lui $t1,0x7000
/* 52560: af210008 */ sw $at,0x8($t9)
/* 52564: 8d0b000c */ lw $t3,0xc($t0)
/* 52568: 252934c0 */ addiu $t1,$t1,0x34c0
/* 5256c: 3c0a8000 */ lui $t2,0x8000
/* 52570: af2b000c */ sw $t3,0xc($t9)
/* 52574: 8da10000 */ lw $at,0x0($t5)
/* 52578: 354a0100 */ ori $t2,$t2,0x100
/* 5257c: 3c0e7000 */ lui $t6,0x7000
/* 52580: ad810000 */ sw $at,0x0($t4)
/* 52584: 8db80004 */ lw $t8,0x4($t5)
/* 52588: 25ce34c0 */ addiu $t6,$t6,0x34c0
/* 5258c: 3c0f8000 */ lui $t7,0x8000
/* 52590: ad980004 */ sw $t8,0x4($t4)
/* 52594: 8da10008 */ lw $at,0x8($t5)
/* 52598: 35ef0180 */ ori $t7,$t7,0x180
/* 5259c: 3c048000 */ lui $a0,0x8000
/* 525a0: ad810008 */ sw $at,0x8($t4)
/* 525a4: 8db8000c */ lw $t8,0xc($t5)
/* 525a8: 24050190 */ li $a1,0x190
/* 525ac: ad98000c */ sw $t8,0xc($t4)
/* 525b0: 8d210000 */ lw $at,0x0($t1)
/* 525b4: ad410000 */ sw $at,0x0($t2)
/* 525b8: 8d2b0004 */ lw $t3,0x4($t1)
/* 525bc: ad4b0004 */ sw $t3,0x4($t2)
/* 525c0: 8d210008 */ lw $at,0x8($t1)
/* 525c4: ad410008 */ sw $at,0x8($t2)
/* 525c8: 8d2b000c */ lw $t3,0xc($t1)
/* 525cc: ad4b000c */ sw $t3,0xc($t2)
/* 525d0: 8dc10000 */ lw $at,0x0($t6)
/* 525d4: ade10000 */ sw $at,0x0($t7)
/* 525d8: 8dd80004 */ lw $t8,0x4($t6)
/* 525dc: adf80004 */ sw $t8,0x4($t7)
/* 525e0: 8dc10008 */ lw $at,0x8($t6)
/* 525e4: ade10008 */ sw $at,0x8($t7)
/* 525e8: 8dd8000c */ lw $t8,0xc($t6)
/* 525ec: 0c012cd0 */ jal 0x4b340
/* 525f0: adf8000c */ sw $t8,0xc($t7)
/* 525f4: 3c048000 */ lui $a0,0x8000
/* 525f8: 0c0121c4 */ jal 0x48710
/* 525fc: 24050190 */ li $a1,0x190
/* 52600: 0c0149ca */ jal 0x52728
/* 52604: 00000000 */ nop
/* 52608: 0c014b50 */ jal 0x52d40
/* 5260c: 00000000 */ nop
/* 52610: 0c000bf0 */ jal 0x2fc0
/* 52614: 00000000 */ nop
/* 52618: 3c048006 */ lui $a0,0x8006
/* 5261c: 3c058006 */ lui $a1,0x8006
/* 52620: 8ca5d904 */ lw $a1,-0x26fc($a1)
/* 52624: 8c84d900 */ lw $a0,-0x2700($a0)
/* 52628: 24060000 */ li $a2,0x0
/* 5262c: 0c013a0a */ jal 0x4e828
/* 52630: 24070003 */ li $a3,0x3
/* 52634: afa20020 */ sw $v0,0x20($sp)
/* 52638: afa30024 */ sw $v1,0x24($sp)
/* 5263c: 8fa50024 */ lw $a1,0x24($sp)
/* 52640: 8fa40020 */ lw $a0,0x20($sp)
/* 52644: 24060000 */ li $a2,0x0
/* 52648: 0c0139ca */ jal 0x4e728
/* 5264c: 24070004 */ li $a3,0x4
/* 52650: 3c088000 */ lui $t0,0x8000
/* 52654: 8d08030c */ lw $t0,0x30c($t0)
/* 52658: 3c018006 */ lui $at,0x8006
/* 5265c: ac22d900 */ sw $v0,-0x2700($at)
/* 52660: 15000005 */ bnez $t0,.PB00052678
/* 52664: ac23d904 */ sw $v1,-0x26fc($at)
/* 52668: 3c048000 */ lui $a0,0x8000
/* 5266c: 2484031c */ addiu $a0,$a0,0x31c
/* 52670: 0c012cf0 */ jal 0x4b3c0
/* 52674: 24050040 */ li $a1,0x40
.PB00052678:
/* 52678: 3c198000 */ lui $t9,0x8000
/* 5267c: 8f390300 */ lw $t9,0x300($t9)
/* 52680: 17200006 */ bnez $t9,.PB0005269c
/* 52684: 00000000 */ nop
/* 52688: 3c0a02f5 */ lui $t2,0x2f5
/* 5268c: 354ab2d2 */ ori $t2,$t2,0xb2d2
/* 52690: 3c018006 */ lui $at,0x8006
/* 52694: 1000000f */ b .PB000526d4
/* 52698: ac2a29d8 */ sw $t2,0x29d8($at)
.PB0005269c:
/* 5269c: 3c098000 */ lui $t1,0x8000
/* 526a0: 8d290300 */ lw $t1,0x300($t1)
/* 526a4: 24010002 */ li $at,0x2
/* 526a8: 15210006 */ bne $t1,$at,.PB000526c4
/* 526ac: 00000000 */ nop
/* 526b0: 3c0b02e6 */ lui $t3,0x2e6
/* 526b4: 356b025c */ ori $t3,$t3,0x25c
/* 526b8: 3c018006 */ lui $at,0x8006
/* 526bc: 10000005 */ b .PB000526d4
/* 526c0: ac2b29d8 */ sw $t3,0x29d8($at)
.PB000526c4:
/* 526c4: 3c0d02e6 */ lui $t5,0x2e6
/* 526c8: 35add354 */ ori $t5,$t5,0xd354
/* 526cc: 3c018006 */ lui $at,0x8006
/* 526d0: ac2d29d8 */ sw $t5,0x29d8($at)
.PB000526d4:
/* 526d4: 0c012d18 */ jal 0x4b460
/* 526d8: 00000000 */ nop
/* 526dc: 304c1000 */ andi $t4,$v0,0x1000
/* 526e0: 11800003 */ beqz $t4,.PB000526f0
/* 526e4: 00000000 */ nop
.PB000526e8:
/* 526e8: 1000ffff */ b .PB000526e8
/* 526ec: 00000000 */ nop
.PB000526f0:
/* 526f0: 240f0001 */ li $t7,0x1
/* 526f4: 3c0ea450 */ lui $t6,0xa450
/* 526f8: adcf0008 */ sw $t7,0x8($t6)
/* 526fc: 24183fff */ li $t8,0x3fff
/* 52700: 3c08a450 */ lui $t0,0xa450
/* 52704: ad180010 */ sw $t8,0x10($t0)
/* 52708: 2419000f */ li $t9,0xf
/* 5270c: 3c0aa450 */ lui $t2,0xa450
/* 52710: ad590014 */ sw $t9,0x14($t2)
/* 52714: 8fbf001c */ lw $ra,0x1c($sp)
/* 52718: 8fb00018 */ lw $s0,0x18($sp)
/* 5271c: 27bd0038 */ addiu $sp,$sp,0x38
/* 52720: 03e00008 */ jr $ra
/* 52724: 00000000 */ nop
);
#endif
OSPiHandle *osCartRomInit2(void);

View File

@ -295,7 +295,7 @@ void vi00009ed4(void)
osViSetSpecialFeatures(OS_VI_GAMMA_OFF | OS_VI_DITHER_FILTER_ON);
}
#if VERSION >= VERSION_PAL_BETA
#if VERSION >= VERSION_PAL_FINAL
GLOBAL_ASM(
glabel viUpdateMode
/* 9f64: 3c098006 */ lui $t1,0x8006
@ -870,6 +870,581 @@ glabel viUpdateMode
/* a78c: 03e00008 */ jr $ra
/* a790: 00000000 */ nop
);
#elif VERSION >= VERSION_PAL_BETA
GLOBAL_ASM(
glabel viUpdateMode
/* 9f4c: 3c098006 */ lui $t1,0x8006
/* 9f50: 3c0e8006 */ lui $t6,0x8006
/* 9f54: 8dcedf20 */ lw $t6,-0x20e0($t6)
/* 9f58: 8d29df24 */ lw $t1,-0x20dc($t1)
/* 9f5c: 27bdffe8 */ addiu $sp,$sp,-24
/* 9f60: afbf0014 */ sw $ra,0x14($sp)
/* 9f64: 91cf0000 */ lbu $t7,0x0($t6)
/* 9f68: 91220000 */ lbu $v0,0x0($t1)
/* 9f6c: 504f0014 */ beql $v0,$t7,.PB00009fc0
/* 9f70: 85380004 */ lh $t8,0x4($t1)
/* 9f74: 10400008 */ beqz $v0,.PB00009f98
/* 9f78: 00401825 */ move $v1,$v0
/* 9f7c: 241f0001 */ li $ra,0x1
/* 9f80: 105f000e */ beq $v0,$ra,.PB00009fbc
/* 9f84: 24010002 */ li $at,0x2
/* 9f88: 5061000d */ beql $v1,$at,.PB00009fc0
/* 9f8c: 85380004 */ lh $t8,0x4($t1)
/* 9f90: 1000000b */ b .PB00009fc0
/* 9f94: 85380004 */ lh $t8,0x4($t1)
.PB00009f98:
/* 9f98: 3c013f80 */ lui $at,0x3f80
/* 9f9c: 44816000 */ mtc1 $at,$f12
/* 9fa0: 0c01252c */ jal 0x494b0
/* 9fa4: 00000000 */ nop
/* 9fa8: 0c0124a8 */ jal 0x492a0
/* 9fac: 24040001 */ li $a0,0x1
/* 9fb0: 3c098006 */ lui $t1,0x8006
/* 9fb4: 8d29df24 */ lw $t1,-0x20dc($t1)
/* 9fb8: 91220000 */ lbu $v0,0x0($t1)
.PB00009fbc:
/* 9fbc: 85380004 */ lh $t8,0x4($t1)
.PB00009fc0:
/* 9fc0: 85390018 */ lh $t9,0x18($t1)
/* 9fc4: 852e0006 */ lh $t6,0x6($t1)
/* 9fc8: 44982000 */ mtc1 $t8,$f4
/* 9fcc: 852f001a */ lh $t7,0x1a($t1)
/* 9fd0: 44994000 */ mtc1 $t9,$f8
/* 9fd4: 468021a0 */ cvt.s.w $f6,$f4
/* 9fd8: 448e8000 */ mtc1 $t6,$f16
/* 9fdc: 448f2000 */ mtc1 $t7,$f4
/* 9fe0: 3c0d8009 */ lui $t5,0x8009
/* 9fe4: 241f0001 */ li $ra,0x1
/* 9fe8: 468042a0 */ cvt.s.w $f10,$f8
/* 9fec: 3c0c8006 */ lui $t4,0x8006
/* 9ff0: 3c013f80 */ lui $at,0x3f80
/* 9ff4: 25ad02ec */ addiu $t5,$t5,0x2ec
/* 9ff8: 468084a0 */ cvt.s.w $f18,$f16
/* 9ffc: 46802220 */ cvt.s.w $f8,$f4
/* a000: 460a3083 */ div.s $f2,$f6,$f10
/* a004: 14400003 */ bnez $v0,.PB0000a014
/* a008: 46089003 */ div.s $f0,$f18,$f8
/* a00c: 44810000 */ mtc1 $at,$f0
/* a010: 00000000 */ nop
.PB0000a014:
/* a014: 8d8cdf30 */ lw $t4,-0x20d0($t4)
/* a018: 3c018006 */ lui $at,0x8006
/* a01c: 000c5880 */ sll $t3,$t4,0x2
/* a020: 002b0821 */ addu $at,$at,$t3
/* a024: e422d818 */ swc1 $f2,-0x27e8($at)
/* a028: 3c018006 */ lui $at,0x8006
/* a02c: 002b0821 */ addu $at,$at,$t3
/* a030: e420d820 */ swc1 $f0,-0x27e0($at)
/* a034: 91220000 */ lbu $v0,0x0($t1)
/* a038: 57e200a3 */ bnel $ra,$v0,.PB0000a2c8
/* a03c: 24010002 */ li $at,0x2
/* a040: 3c0a8006 */ lui $t2,0x8006
/* a044: 8d4adf28 */ lw $t2,-0x20d8($t2)
/* a048: 3c1f8009 */ lui $ra,0x8009
/* a04c: 000c7880 */ sll $t7,$t4,0x2
/* a050: 11400019 */ beqz $t2,.PB0000a0b8
/* a054: 27ff02f0 */ addiu $ra,$ra,0x2f0
/* a058: 000cc080 */ sll $t8,$t4,0x2
/* a05c: 030cc021 */ addu $t8,$t8,$t4
/* a060: 3c198009 */ lui $t9,0x8009
/* a064: 273901a0 */ addiu $t9,$t9,0x1a0
/* a068: 0018c100 */ sll $t8,$t8,0x4
/* a06c: 03191021 */ addu $v0,$t8,$t9
/* a070: 3c0e8006 */ lui $t6,0x8006
/* a074: 25ce12b0 */ addiu $t6,$t6,0x12b0
/* a078: 25d80048 */ addiu $t8,$t6,0x48
/* a07c: 0040c825 */ move $t9,$v0
.PB0000a080:
/* a080: 8dc10000 */ lw $at,0x0($t6)
/* a084: 25ce000c */ addiu $t6,$t6,0xc
/* a088: 2739000c */ addiu $t9,$t9,0xc
/* a08c: af21fff4 */ sw $at,-0xc($t9)
/* a090: 8dc1fff8 */ lw $at,-0x8($t6)
/* a094: af21fff8 */ sw $at,-0x8($t9)
/* a098: 8dc1fffc */ lw $at,-0x4($t6)
/* a09c: 15d8fff8 */ bne $t6,$t8,.PB0000a080
/* a0a0: af21fffc */ sw $at,-0x4($t9)
/* a0a4: 8dc10000 */ lw $at,0x0($t6)
/* a0a8: af210000 */ sw $at,0x0($t9)
/* a0ac: 8dd80004 */ lw $t8,0x4($t6)
/* a0b0: 10000017 */ b .PB0000a110
/* a0b4: af380004 */ sw $t8,0x4($t9)
.PB0000a0b8:
/* a0b8: 01ec7821 */ addu $t7,$t7,$t4
/* a0bc: 3c188009 */ lui $t8,0x8009
/* a0c0: 271801a0 */ addiu $t8,$t8,0x1a0
/* a0c4: 000f7900 */ sll $t7,$t7,0x4
/* a0c8: 01f81021 */ addu $v0,$t7,$t8
/* a0cc: 3c0e8006 */ lui $t6,0x8006
/* a0d0: 25ce13f0 */ addiu $t6,$t6,0x13f0
/* a0d4: 25cf0048 */ addiu $t7,$t6,0x48
/* a0d8: 0040c025 */ move $t8,$v0
.PB0000a0dc:
/* a0dc: 8dc10000 */ lw $at,0x0($t6)
/* a0e0: 25ce000c */ addiu $t6,$t6,0xc
/* a0e4: 2718000c */ addiu $t8,$t8,0xc
/* a0e8: af01fff4 */ sw $at,-0xc($t8)
/* a0ec: 8dc1fff8 */ lw $at,-0x8($t6)
/* a0f0: af01fff8 */ sw $at,-0x8($t8)
/* a0f4: 8dc1fffc */ lw $at,-0x4($t6)
/* a0f8: 15cffff8 */ bne $t6,$t7,.PB0000a0dc
/* a0fc: af01fffc */ sw $at,-0x4($t8)
/* a100: 8dc10000 */ lw $at,0x0($t6)
/* a104: af010000 */ sw $at,0x0($t8)
/* a108: 8dcf0004 */ lw $t7,0x4($t6)
/* a10c: af0f0004 */ sw $t7,0x4($t8)
.PB0000a110:
/* a110: 85390018 */ lh $t9,0x18($t1)
/* a114: 24010280 */ li $at,0x280
/* a118: 24080400 */ li $t0,0x400
/* a11c: ac590008 */ sw $t9,0x8($v0)
/* a120: 852f0018 */ lh $t7,0x18($t1)
/* a124: 8c44001c */ lw $a0,0x1c($v0)
/* a128: 3c078006 */ lui $a3,0x8006
/* a12c: 000f7280 */ sll $t6,$t7,0xa
/* a130: 01c1001a */ div $zero,$t6,$at
/* a134: 0000c012 */ mflo $t8
/* a138: ac580020 */ sw $t8,0x20($v0)
/* a13c: 85390018 */ lh $t9,0x18($t1)
/* a140: 3406ffff */ li $a2,0xffff
/* a144: 00197840 */ sll $t7,$t9,0x1
/* a148: ac4f0028 */ sw $t7,0x28($v0)
/* a14c: 852e0018 */ lh $t6,0x18($t1)
/* a150: ac48002c */ sw $t0,0x2c($v0)
/* a154: ac480040 */ sw $t0,0x40($v0)
/* a158: 000ec040 */ sll $t8,$t6,0x1
/* a15c: ac58003c */ sw $t8,0x3c($v0)
/* a160: 8ce7df18 */ lw $a3,-0x20e8($a3)
/* a164: 0004cc03 */ sra $t9,$a0,0x10
/* a168: 332fffff */ andi $t7,$t9,0xffff
/* a16c: 01e77021 */ addu $t6,$t7,$a3
/* a170: 01c6001a */ div $zero,$t6,$a2
/* a174: 14c00002 */ bnez $a2,.PB0000a180
/* a178: 00000000 */ nop
/* a17c: 0007000d */ break 0x7
.PB0000a180:
/* a180: 2401ffff */ li $at,-1
/* a184: 14c10004 */ bne $a2,$at,.PB0000a198
/* a188: 3c018000 */ lui $at,0x8000
/* a18c: 15c10002 */ bne $t6,$at,.PB0000a198
/* a190: 00000000 */ nop
/* a194: 0006000d */ break 0x6
.PB0000a198:
/* a198: 308fffff */ andi $t7,$a0,0xffff
/* a19c: 0000c010 */ mfhi $t8
/* a1a0: 01e77021 */ addu $t6,$t7,$a3
/* a1a4: 0018cc00 */ sll $t9,$t8,0x10
/* a1a8: 01c6001a */ div $zero,$t6,$a2
/* a1ac: 14c00002 */ bnez $a2,.PB0000a1b8
/* a1b0: 00000000 */ nop
/* a1b4: 0007000d */ break 0x7
.PB0000a1b8:
/* a1b8: 2401ffff */ li $at,-1
/* a1bc: 14c10004 */ bne $a2,$at,.PB0000a1d0
/* a1c0: 3c018000 */ lui $at,0x8000
/* a1c4: 15c10002 */ bne $t6,$at,.PB0000a1d0
/* a1c8: 00000000 */ nop
/* a1cc: 0006000d */ break 0x6
.PB0000a1d0:
/* a1d0: 0000c010 */ mfhi $t8
/* a1d4: 03381825 */ or $v1,$t9,$t8
/* a1d8: ac43001c */ sw $v1,0x1c($v0)
/* a1dc: 3c018009 */ lui $at,0x8009
/* a1e0: ac2302e8 */ sw $v1,0x2e8($at)
/* a1e4: 8525001a */ lh $a1,0x1a($t1)
/* a1e8: 24180140 */ li $t8,0x140
/* a1ec: 3c048006 */ lui $a0,0x8006
/* a1f0: 00057a80 */ sll $t7,$a1,0xa
/* a1f4: 000f7282 */ srl $t6,$t7,0xa
/* a1f8: 29c1012d */ slti $at,$t6,0x12d
/* a1fc: 14200002 */ bnez $at,.PB0000a208
/* a200: 01c02825 */ move $a1,$t6
/* a204: 000e2843 */ sra $a1,$t6,0x1
.PB0000a208:
/* a208: 03053823 */ subu $a3,$t8,$a1
/* a20c: 24ef0002 */ addiu $t7,$a3,0x2
/* a210: 24b9fffe */ addiu $t9,$a1,-2
/* a214: 0019c040 */ sll $t8,$t9,0x1
/* a218: 000f7400 */ sll $t6,$t7,0x10
/* a21c: 00f87821 */ addu $t7,$a3,$t8
/* a220: 25f90002 */ addiu $t9,$t7,0x2
/* a224: 8c84df1c */ lw $a0,-0x20e4($a0)
/* a228: 01d94025 */ or $t0,$t6,$t9
/* a22c: 0008c403 */ sra $t8,$t0,0x10
/* a230: 330fffff */ andi $t7,$t8,0xffff
/* a234: 01e47021 */ addu $t6,$t7,$a0
/* a238: 01c6001a */ div $zero,$t6,$a2
/* a23c: 14c00002 */ bnez $a2,.PB0000a248
/* a240: 00000000 */ nop
/* a244: 0007000d */ break 0x7
.PB0000a248:
/* a248: 2401ffff */ li $at,-1
/* a24c: 14c10004 */ bne $a2,$at,.PB0000a260
/* a250: 3c018000 */ lui $at,0x8000
/* a254: 15c10002 */ bne $t6,$at,.PB0000a260
/* a258: 00000000 */ nop
/* a25c: 0006000d */ break 0x6
.PB0000a260:
/* a260: 310fffff */ andi $t7,$t0,0xffff
/* a264: 01e47021 */ addu $t6,$t7,$a0
/* a268: 0000c810 */ mfhi $t9
/* a26c: 0019c400 */ sll $t8,$t9,0x10
/* a270: 240f0001 */ li $t7,0x1
/* a274: 01c6001a */ div $zero,$t6,$a2
/* a278: 14c00002 */ bnez $a2,.PB0000a284
/* a27c: 00000000 */ nop
/* a280: 0007000d */ break 0x7
.PB0000a284:
/* a284: 2401ffff */ li $at,-1
/* a288: 14c10004 */ bne $a2,$at,.PB0000a29c
/* a28c: 3c018000 */ lui $at,0x8000
/* a290: 15c10002 */ bne $t6,$at,.PB0000a29c
/* a294: 00000000 */ nop
/* a298: 0006000d */ break 0x6
.PB0000a29c:
/* a29c: 0000c810 */ mfhi $t9
/* a2a0: 03191825 */ or $v1,$t8,$t9
/* a2a4: 3c018006 */ lui $at,0x8006
/* a2a8: ac430030 */ sw $v1,0x30($v0)
/* a2ac: ada30000 */ sw $v1,0x0($t5)
/* a2b0: ac430044 */ sw $v1,0x44($v0)
/* a2b4: afe30000 */ sw $v1,0x0($ra)
/* a2b8: 002b0821 */ addu $at,$at,$t3
/* a2bc: 100000dd */ b .PB0000a634
/* a2c0: ac2fd828 */ sw $t7,-0x27d8($at)
/* a2c4: 24010002 */ li $at,0x2
.PB0000a2c8:
/* a2c8: 144100d5 */ bne $v0,$at,.PB0000a620
/* a2cc: 000c7080 */ sll $t6,$t4,0x2
/* a2d0: 01cc7021 */ addu $t6,$t6,$t4
/* a2d4: 3c188009 */ lui $t8,0x8009
/* a2d8: 271801a0 */ addiu $t8,$t8,0x1a0
/* a2dc: 000e7100 */ sll $t6,$t6,0x4
/* a2e0: 01d81021 */ addu $v0,$t6,$t8
/* a2e4: 3c198006 */ lui $t9,0x8006
/* a2e8: 3c0d8009 */ lui $t5,0x8009
/* a2ec: 27391580 */ addiu $t9,$t9,0x1580
/* a2f0: 25ad02ec */ addiu $t5,$t5,0x2ec
/* a2f4: 3406ffff */ li $a2,0xffff
/* a2f8: 24080800 */ li $t0,0x800
/* a2fc: 272e0048 */ addiu $t6,$t9,0x48
/* a300: 0040c025 */ move $t8,$v0
.PB0000a304:
/* a304: 8f210000 */ lw $at,0x0($t9)
/* a308: 2739000c */ addiu $t9,$t9,0xc
/* a30c: 2718000c */ addiu $t8,$t8,0xc
/* a310: af01fff4 */ sw $at,-0xc($t8)
/* a314: 8f21fff8 */ lw $at,-0x8($t9)
/* a318: af01fff8 */ sw $at,-0x8($t8)
/* a31c: 8f21fffc */ lw $at,-0x4($t9)
/* a320: 172efff8 */ bne $t9,$t6,.PB0000a304
/* a324: af01fffc */ sw $at,-0x4($t8)
/* a328: 8f210000 */ lw $at,0x0($t9)
/* a32c: 3c078006 */ lui $a3,0x8006
/* a330: 3c048006 */ lui $a0,0x8006
/* a334: af010000 */ sw $at,0x0($t8)
/* a338: 8f2e0004 */ lw $t6,0x4($t9)
/* a33c: 24010280 */ li $at,0x280
/* a340: 3c1f8009 */ lui $ra,0x8009
/* a344: af0e0004 */ sw $t6,0x4($t8)
/* a348: 852f0018 */ lh $t7,0x18($t1)
/* a34c: 8c45001c */ lw $a1,0x1c($v0)
/* a350: 27ff02f0 */ addiu $ra,$ra,0x2f0
/* a354: ac4f0008 */ sw $t7,0x8($v0)
/* a358: 852e0018 */ lh $t6,0x18($t1)
/* a35c: ac48002c */ sw $t0,0x2c($v0)
/* a360: ac480040 */ sw $t0,0x40($v0)
/* a364: 000eca80 */ sll $t9,$t6,0xa
/* a368: 0321001a */ div $zero,$t9,$at
/* a36c: 0000c012 */ mflo $t8
/* a370: ac580020 */ sw $t8,0x20($v0)
/* a374: 852f0018 */ lh $t7,0x18($t1)
/* a378: 3c0a8006 */ lui $t2,0x8006
/* a37c: 000f7040 */ sll $t6,$t7,0x1
/* a380: ac4e0028 */ sw $t6,0x28($v0)
/* a384: 85390018 */ lh $t9,0x18($t1)
/* a388: 00057c03 */ sra $t7,$a1,0x10
/* a38c: 31eeffff */ andi $t6,$t7,0xffff
/* a390: 0019c080 */ sll $t8,$t9,0x2
/* a394: ac58003c */ sw $t8,0x3c($v0)
/* a398: 8ce7df18 */ lw $a3,-0x20e8($a3)
/* a39c: 01c7c821 */ addu $t9,$t6,$a3
/* a3a0: 0326001a */ div $zero,$t9,$a2
/* a3a4: 14c00002 */ bnez $a2,.PB0000a3b0
/* a3a8: 00000000 */ nop
/* a3ac: 0007000d */ break 0x7
.PB0000a3b0:
/* a3b0: 2401ffff */ li $at,-1
/* a3b4: 14c10004 */ bne $a2,$at,.PB0000a3c8
/* a3b8: 3c018000 */ lui $at,0x8000
/* a3bc: 17210002 */ bne $t9,$at,.PB0000a3c8
/* a3c0: 00000000 */ nop
/* a3c4: 0006000d */ break 0x6
.PB0000a3c8:
/* a3c8: 30aeffff */ andi $t6,$a1,0xffff
/* a3cc: 0000c010 */ mfhi $t8
/* a3d0: 01c7c821 */ addu $t9,$t6,$a3
/* a3d4: 00187c00 */ sll $t7,$t8,0x10
/* a3d8: 0326001a */ div $zero,$t9,$a2
/* a3dc: 14c00002 */ bnez $a2,.PB0000a3e8
/* a3e0: 00000000 */ nop
/* a3e4: 0007000d */ break 0x7
.PB0000a3e8:
/* a3e8: 2401ffff */ li $at,-1
/* a3ec: 14c10004 */ bne $a2,$at,.PB0000a400
/* a3f0: 3c018000 */ lui $at,0x8000
/* a3f4: 17210002 */ bne $t9,$at,.PB0000a400
/* a3f8: 00000000 */ nop
/* a3fc: 0006000d */ break 0x6
.PB0000a400:
/* a400: 0000c010 */ mfhi $t8
/* a404: 01f81825 */ or $v1,$t7,$t8
/* a408: ac43001c */ sw $v1,0x1c($v0)
/* a40c: 3c018009 */ lui $at,0x8009
/* a410: ac2302e8 */ sw $v1,0x2e8($at)
/* a414: 8c450030 */ lw $a1,0x30($v0)
/* a418: 8c84df1c */ lw $a0,-0x20e4($a0)
/* a41c: 00057403 */ sra $t6,$a1,0x10
/* a420: 31d9ffff */ andi $t9,$t6,0xffff
/* a424: 03247821 */ addu $t7,$t9,$a0
/* a428: 01e6001a */ div $zero,$t7,$a2
/* a42c: 14c00002 */ bnez $a2,.PB0000a438
/* a430: 00000000 */ nop
/* a434: 0007000d */ break 0x7
.PB0000a438:
/* a438: 2401ffff */ li $at,-1
/* a43c: 14c10004 */ bne $a2,$at,.PB0000a450
/* a440: 3c018000 */ lui $at,0x8000
/* a444: 15e10002 */ bne $t7,$at,.PB0000a450
/* a448: 00000000 */ nop
/* a44c: 0006000d */ break 0x6
.PB0000a450:
/* a450: 30b9ffff */ andi $t9,$a1,0xffff
/* a454: 03247821 */ addu $t7,$t9,$a0
/* a458: 0000c010 */ mfhi $t8
/* a45c: 8c450044 */ lw $a1,0x44($v0)
/* a460: 00187400 */ sll $t6,$t8,0x10
/* a464: 01e6001a */ div $zero,$t7,$a2
/* a468: 14c00002 */ bnez $a2,.PB0000a474
/* a46c: 00000000 */ nop
/* a470: 0007000d */ break 0x7
.PB0000a474:
/* a474: 2401ffff */ li $at,-1
/* a478: 14c10004 */ bne $a2,$at,.PB0000a48c
/* a47c: 3c018000 */ lui $at,0x8000
/* a480: 15e10002 */ bne $t7,$at,.PB0000a48c
/* a484: 00000000 */ nop
/* a488: 0006000d */ break 0x6
.PB0000a48c:
/* a48c: 0000c010 */ mfhi $t8
/* a490: 0005cc03 */ sra $t9,$a1,0x10
/* a494: 01d81825 */ or $v1,$t6,$t8
/* a498: 332fffff */ andi $t7,$t9,0xffff
/* a49c: 01e47021 */ addu $t6,$t7,$a0
/* a4a0: 01c6001a */ div $zero,$t6,$a2
/* a4a4: 30afffff */ andi $t7,$a1,0xffff
/* a4a8: 0000c010 */ mfhi $t8
/* a4ac: 0018cc00 */ sll $t9,$t8,0x10
/* a4b0: ac430030 */ sw $v1,0x30($v0)
/* a4b4: ada30000 */ sw $v1,0x0($t5)
/* a4b8: 14c00002 */ bnez $a2,.PB0000a4c4
/* a4bc: 00000000 */ nop
/* a4c0: 0007000d */ break 0x7
.PB0000a4c4:
/* a4c4: 2401ffff */ li $at,-1
/* a4c8: 14c10004 */ bne $a2,$at,.PB0000a4dc
/* a4cc: 3c018000 */ lui $at,0x8000
/* a4d0: 15c10002 */ bne $t6,$at,.PB0000a4dc
/* a4d4: 00000000 */ nop
/* a4d8: 0006000d */ break 0x6
.PB0000a4dc:
/* a4dc: 01e47021 */ addu $t6,$t7,$a0
/* a4e0: 01c6001a */ div $zero,$t6,$a2
/* a4e4: 0000c010 */ mfhi $t8
/* a4e8: 03381825 */ or $v1,$t9,$t8
/* a4ec: ac430044 */ sw $v1,0x44($v0)
/* a4f0: afe30000 */ sw $v1,0x0($ra)
/* a4f4: 3c0f8006 */ lui $t7,0x8006
/* a4f8: 8defe828 */ lw $t7,-0x17d8($t7)
/* a4fc: 14c00002 */ bnez $a2,.PB0000a508
/* a500: 00000000 */ nop
/* a504: 0007000d */ break 0x7
.PB0000a508:
/* a508: 2401ffff */ li $at,-1
/* a50c: 14c10004 */ bne $a2,$at,.PB0000a520
/* a510: 3c018000 */ lui $at,0x8000
/* a514: 15c10002 */ bne $t6,$at,.PB0000a520
/* a518: 00000000 */ nop
/* a51c: 0006000d */ break 0x6
.PB0000a520:
/* a520: 248e01fa */ addiu $t6,$a0,0x1fa
/* a524: 11e00038 */ beqz $t7,.PB0000a608
/* a528: 00000000 */ nop
/* a52c: 01c6001a */ div $zero,$t6,$a2
/* a530: 0000c810 */ mfhi $t9
/* a534: 248f0086 */ addiu $t7,$a0,0x86
/* a538: 14c00002 */ bnez $a2,.PB0000a544
/* a53c: 00000000 */ nop
/* a540: 0007000d */ break 0x7
.PB0000a544:
/* a544: 2401ffff */ li $at,-1
/* a548: 14c10004 */ bne $a2,$at,.PB0000a55c
/* a54c: 3c018000 */ lui $at,0x8000
/* a550: 15c10002 */ bne $t6,$at,.PB0000a55c
/* a554: 00000000 */ nop
/* a558: 0006000d */ break 0x6
.PB0000a55c:
/* a55c: 01e6001a */ div $zero,$t7,$a2
/* a560: 00007010 */ mfhi $t6
/* a564: 0019c400 */ sll $t8,$t9,0x10
/* a568: 249901fc */ addiu $t9,$a0,0x1fc
/* a56c: 0326001a */ div $zero,$t9,$a2
/* a570: 030e1825 */ or $v1,$t8,$t6
/* a574: 248e0084 */ addiu $t6,$a0,0x84
/* a578: 14c00002 */ bnez $a2,.PB0000a584
/* a57c: 00000000 */ nop
/* a580: 0007000d */ break 0x7
.PB0000a584:
/* a584: 2401ffff */ li $at,-1
/* a588: 14c10004 */ bne $a2,$at,.PB0000a59c
/* a58c: 3c018000 */ lui $at,0x8000
/* a590: 15e10002 */ bne $t7,$at,.PB0000a59c
/* a594: 00000000 */ nop
/* a598: 0006000d */ break 0x6
.PB0000a59c:
/* a59c: 00007810 */ mfhi $t7
/* a5a0: ac430030 */ sw $v1,0x30($v0)
/* a5a4: ada30000 */ sw $v1,0x0($t5)
/* a5a8: 01c6001a */ div $zero,$t6,$a2
/* a5ac: 14c00002 */ bnez $a2,.PB0000a5b8
/* a5b0: 00000000 */ nop
/* a5b4: 0007000d */ break 0x7
.PB0000a5b8:
/* a5b8: 2401ffff */ li $at,-1
/* a5bc: 14c10004 */ bne $a2,$at,.PB0000a5d0
/* a5c0: 3c018000 */ lui $at,0x8000
/* a5c4: 17210002 */ bne $t9,$at,.PB0000a5d0
/* a5c8: 00000000 */ nop
/* a5cc: 0006000d */ break 0x6
.PB0000a5d0:
/* a5d0: 0000c810 */ mfhi $t9
/* a5d4: 000fc400 */ sll $t8,$t7,0x10
/* a5d8: 03191825 */ or $v1,$t8,$t9
/* a5dc: ac430044 */ sw $v1,0x44($v0)
/* a5e0: afe30000 */ sw $v1,0x0($ra)
/* a5e4: 14c00002 */ bnez $a2,.PB0000a5f0
/* a5e8: 00000000 */ nop
/* a5ec: 0007000d */ break 0x7
.PB0000a5f0:
/* a5f0: 2401ffff */ li $at,-1
/* a5f4: 14c10004 */ bne $a2,$at,.PB0000a608
/* a5f8: 3c018000 */ lui $at,0x8000
/* a5fc: 15c10002 */ bne $t6,$at,.PB0000a608
/* a600: 00000000 */ nop
/* a604: 0006000d */ break 0x6
.PB0000a608:
/* a608: 3c018006 */ lui $at,0x8006
/* a60c: 002b0821 */ addu $at,$at,$t3
/* a610: 240f0001 */ li $t7,0x1
/* a614: ac2fd828 */ sw $t7,-0x27d8($at)
/* a618: 10000006 */ b .PB0000a634
/* a61c: 8d4adf28 */ lw $t2,-0x20d8($t2)
.PB0000a620:
/* a620: 3c018006 */ lui $at,0x8006
/* a624: 002b0821 */ addu $at,$at,$t3
/* a628: 3c0a8006 */ lui $t2,0x8006
/* a62c: 8d4adf28 */ lw $t2,-0x20d8($t2)
/* a630: ac20d828 */ sw $zero,-0x27d8($at)
.PB0000a634:
/* a634: 258c0001 */ addiu $t4,$t4,0x1
/* a638: 05810004 */ bgez $t4,.PB0000a64c
/* a63c: 318e0001 */ andi $t6,$t4,0x1
/* a640: 11c00002 */ beqz $t6,.PB0000a64c
/* a644: 00000000 */ nop
/* a648: 25cefffe */ addiu $t6,$t6,-2
.PB0000a64c:
/* a64c: 3c018006 */ lui $at,0x8006
/* a650: 11400006 */ beqz $t2,.PB0000a66c
/* a654: ac2edf30 */ sw $t6,-0x20d0($at)
/* a658: 3c198006 */ lui $t9,0x8006
/* a65c: 8f3907a8 */ lw $t9,0x7a8($t9)
/* a660: 8d380028 */ lw $t8,0x28($t1)
/* a664: 10000006 */ b .PB0000a680
/* a668: af380058 */ sw $t8,0x58($t9)
.PB0000a66c:
/* a66c: 3c0f800a */ lui $t7,0x800a
/* a670: 3c0e8006 */ lui $t6,0x8006
/* a674: 8dce07a8 */ lw $t6,0x7a8($t6)
/* a678: 8def0fe0 */ lw $t7,0xfe0($t7)
/* a67c: adcf0058 */ sw $t7,0x58($t6)
.PB0000a680:
/* a680: 3c028009 */ lui $v0,0x8009
/* a684: 24424d56 */ addiu $v0,$v0,0x4d56
/* a688: 90580000 */ lbu $t8,0x0($v0)
/* a68c: 3c048006 */ lui $a0,0x8006
/* a690: 8c84df24 */ lw $a0,-0x20dc($a0)
/* a694: 27190001 */ addiu $t9,$t8,0x1
/* a698: 3c038009 */ lui $v1,0x8009
/* a69c: 2408002c */ li $t0,0x2c
/* a6a0: 24634d57 */ addiu $v1,$v1,0x4d57
/* a6a4: 906e0000 */ lbu $t6,0x0($v1)
/* a6a8: 3c078006 */ lui $a3,0x8006
/* a6ac: 24e7dec0 */ addiu $a3,$a3,-8512
/* a6b0: 07210004 */ bgez $t9,.PB0000a6c4
/* a6b4: 332f0001 */ andi $t7,$t9,0x1
/* a6b8: 11e00002 */ beqz $t7,.PB0000a6c4
/* a6bc: 00000000 */ nop
/* a6c0: 25effffe */ addiu $t7,$t7,-2
.PB0000a6c4:
/* a6c4: a04f0000 */ sb $t7,0x0($v0)
/* a6c8: 904f0000 */ lbu $t7,0x0($v0)
/* a6cc: 25d80001 */ addiu $t8,$t6,0x1
/* a6d0: 07010004 */ bgez $t8,.PB0000a6e4
/* a6d4: 33190001 */ andi $t9,$t8,0x1
/* a6d8: 13200002 */ beqz $t9,.PB0000a6e4
/* a6dc: 00000000 */ nop
/* a6e0: 2739fffe */ addiu $t9,$t9,-2
.PB0000a6e4:
/* a6e4: 01e80019 */ multu $t7,$t0
/* a6e8: a0790000 */ sb $t9,0x0($v1)
/* a6ec: 3c018006 */ lui $at,0x8006
/* a6f0: 3c058006 */ lui $a1,0x8006
/* a6f4: 2406002c */ li $a2,0x2c
/* a6f8: 00007012 */ mflo $t6
/* a6fc: 00eec021 */ addu $t8,$a3,$t6
/* a700: ac38df20 */ sw $t8,-0x20e0($at)
/* a704: 90790000 */ lbu $t9,0x0($v1)
/* a708: 3c018006 */ lui $at,0x8006
/* a70c: 03280019 */ multu $t9,$t0
/* a710: 00007812 */ mflo $t7
/* a714: 00ef7021 */ addu $t6,$a3,$t7
/* a718: ac2edf24 */ sw $t6,-0x20dc($at)
/* a71c: 0c012d1c */ jal 0x4b470
/* a720: 8ca5df24 */ lw $a1,-0x20dc($a1)
/* a724: 3c038009 */ lui $v1,0x8009
/* a728: 24634d57 */ addiu $v1,$v1,0x4d57
/* a72c: 90780000 */ lbu $t8,0x0($v1)
/* a730: 3c0f800a */ lui $t7,0x800a
/* a734: 3c0e8006 */ lui $t6,0x8006
/* a738: 0018c880 */ sll $t9,$t8,0x2
/* a73c: 01f97821 */ addu $t7,$t7,$t9
/* a740: 8def0fe0 */ lw $t7,0xfe0($t7)
/* a744: 8dcedf24 */ lw $t6,-0x20dc($t6)
/* a748: 3c028006 */ lui $v0,0x8006
/* a74c: 2442df2c */ addiu $v0,$v0,-8404
/* a750: adcf0028 */ sw $t7,0x28($t6)
/* a754: 8c580000 */ lw $t8,0x0($v0)
/* a758: 53000005 */ beqzl $t8,.PB0000a770
/* a75c: 8fbf0014 */ lw $ra,0x14($sp)
/* a760: ac400000 */ sw $zero,0x0($v0)
/* a764: 0c002773 */ jal 0x9dcc
/* a768: 00002025 */ move $a0,$zero
/* a76c: 8fbf0014 */ lw $ra,0x14($sp)
.PB0000a770:
/* a770: 27bd0018 */ addiu $sp,$sp,0x18
/* a774: 03e00008 */ jr $ra
/* a778: 00000000 */ nop
);
#else
GLOBAL_ASM(
glabel viUpdateMode

View File

@ -74,15 +74,22 @@ u32 g_VmMarker;
u32 g_VmRamEnd;
u32 g_VmStateTableEnd;
#if VERSION == VERSION_NTSC_BETA
u8 g_VmShowStats = false;
u32 fillnb[2] = {0};
#elif VERSION == VERSION_PAL_BETA
#if VERSION == VERSION_NTSC_BETA || VERSION == VERSION_PAL_BETA
u8 g_VmShowStats = false;
#endif
#if VERSION == VERSION_NTSC_BETA
u32 fillnb[2] = {0};
#endif
#if VERSION == VERSION_PAL_BETA
s32 g_VmNumPages = 0;
u32 var8005cf80 = 0;
#else
u32 var8005cf80 = 0;
s32 g_VmNumPages = 0;
#endif
u32 var8005cf88 = 0;
extern u8 _gameSegmentStart;

View File

@ -28,19 +28,25 @@ struct state state;
* piracy checks.
*
* <zipmagic>
* This is a two byte value which is used when zipping the game segments.
* This is a two byte hex value which is used when zipping the game segments.
* The original code was influenced by uninitialised data. These two bytes are
* just setting that uninitialised data.
*
* <copylen>
* This is used for copying some redundant data at the end of the gamezips
* segment. The value is the number of bytes to copy. Copying this data makes
* no functional difference but is required for a match. This parameter can be
* removed if a formula is found for calculating the copy amount.
*
* <outfile>
* The file to write the final ROM file to.
*
* eg. mkrom stage1.bin pd.map 1 0x1234 pd.z64
* eg. mkrom stage1.bin pd.map 1 0x1234 2 pd.z64
*/
int main(int argc, char **argv)
{
if (argc < 6) {
fprintf(stderr, "Usage: mkrom <romfile> <mapfile> <piracychecks> <zipmagic> <outfile>\n");
if (argc < 7) {
fprintf(stderr, "Usage: mkrom <romfile> <mapfile> <piracychecks> <zipmagic> <copylen> <outfile>\n");
exit(1);
}
@ -49,6 +55,7 @@ int main(int argc, char **argv)
state.piracychecks = atoi(argv[3]);
state.zipmagic = strtol(argv[4], NULL, 16);
state.copylen = atoi(argv[5]);
// Compute piracy checksums if requested
if (state.piracychecks) {
@ -66,7 +73,7 @@ int main(int argc, char **argv)
rom_update_crc();
rom_write(argv[5]);
rom_write(argv[6]);
return 0;
}

View File

@ -28,6 +28,11 @@ struct state {
*/
unsigned short zipmagic;
/**
* Number of bytes to copy after building gamezips.
*/
unsigned char copylen;
/**
* File descriptor for the linker map.
*/

View File

@ -83,9 +83,10 @@ void pack_game(void)
memcpy(&state.rom[gamezipstart + state.gamezipslen], state.gamezips, truncatedlen);
// The final two bytes from the real segment are duplicated into
// the first two bytes of the second segment's offset table
state.rom[gamezipstart + state.gamezipslen + 0] = state.rom[gamezipstart + state.gamezipslen - 2];
state.rom[gamezipstart + state.gamezipslen + 1] = state.rom[gamezipstart + state.gamezipslen - 1];
// the first two bytes of the second segment's offset table...
// though for some versions the copy length can vary for unknown reasons
// so we take the copy length as an argument to mkrom.
memcpy(&state.rom[gamezipstart + state.gamezipslen], &state.rom[gamezipstart + state.gamezipslen - state.copylen], state.copylen);
}
}