Difference between revisions of "Calculate shadow VRAM palette"

From Final Fantasy Hacktics Wiki
Jump to navigation Jump to search
m (links)
m (link)
Line 319: Line 319:
 
  0007dac0: 27a40028 addiu r4,r29,0x0028
 
  0007dac0: 27a40028 addiu r4,r29,0x0028
 
  0007dac4: 27a50010 addiu r5,r29,0x0010
 
  0007dac4: 27a50010 addiu r5,r29,0x0010
  0007dac8: 0c00755e jal 0x0001d578
+
  0007dac8: 0c00755e jal 0x0001d578                     [[Get_vector_from_GTE]]
 
  0007dacc: 27a60038 addiu r6,r29,0x0038
 
  0007dacc: 27a60038 addiu r6,r29,0x0038
 
  0007dad0: 8fb00018 lw r16,0x0018(r29)
 
  0007dad0: 8fb00018 lw r16,0x0018(r29)

Revision as of 13:50, 25 January 2022

0007d5d0: 27bdffa8 addiu r29,r29,0xffa8
0007d5d4: afb20048 sw r18,0x0048(r29)
0007d5d8: 00809021 addu r18,r4,r0
0007d5dc: afbf0050 sw r31,0x0050(r29)
0007d5e0: afb3004c sw r19,0x004c(r29)
0007d5e4: afb10044 sw r17,0x0044(r29)
0007d5e8: afb00040 sw r16,0x0040(r29)
0007d5ec: 92420299 lbu r2,0x0299(r18)
0007d5f0: 00a09821 addu r19,r5,r0
0007d5f4: 34420001 ori r2,r2,0x0001
0007d5f8: 10400007 beq r2,r0,0x0007d618
0007d5fc: a2420299 sb r2,0x0299(r18)
0007d600: 0c01ee74 jal 0x0007b9d0
0007d604: 00000000 nop
0007d608: 92420299 lbu r2,0x0299(r18)
0007d60c: 00000000 nop
0007d610: 38420001 xori r2,r2,0x0001
0007d614: a2420299 sb r2,0x0299(r18)
0007d618: 3c10800a lui r16,0x800a
0007d61c: 26108a24 addiu r16,r16,0x8a24
0007d620: 0c00742a jal 0x0001d0a8                     Store_Rotation_matrix_elements_to_GTE
0007d624: 02002021 addu r4,r16,r0
0007d628: 0c00744e jal 0x0001d138                     Store_Translation_Vectors_to_GTE
0007d62c: 02002021 addu r4,r16,r0
0007d630: 0c01ebc2 jal 0x0007af08
0007d634: 00000000 nop
0007d638: 2644029c addiu r4,r18,0x029c
0007d63c: 27a50010 addiu r5,r29,0x0010
0007d640: 27b00038 addiu r16,r29,0x0038
0007d644: 02003021 addu r6,r16,r0
0007d648: 00021400 sll r2,r2,0x10
0007d64c: 00021403 sra r2,r2,0x10
0007d650: 00021880 sll r3,r2,0x02
0007d654: 00621821 addu r3,r3,r2
0007d658: 3c02800e lui r2,0x800e
0007d65c: 8c424e70 lw r2,0x4e70(r2)
0007d660: 000318c0 sll r3,r3,0x03
0007d664: 00628821 addu r17,r3,r2
0007d668: 34020009 ori r2,r0,0x0009
0007d66c: a2220003 sb r2,0x0003(r17)
0007d670: 3402002c ori r2,r0,0x002c
0007d674: 0c00755e jal 0x0001d578                     Get_vector_from_GTE
0007d678: a2220007 sb r2,0x0007(r17)
0007d67c: 264402a4 addiu r4,r18,0x02a4
0007d680: 97a20010 lhu r2,0x0010(r29)
0007d684: 27a50010 addiu r5,r29,0x0010
0007d688: a6220008 sh r2,0x0008(r17)
0007d68c: 97a20014 lhu r2,0x0014(r29)
0007d690: 02003021 addu r6,r16,r0
0007d694: 0c00755e jal 0x0001d578                     Get_vector_from_GTE
0007d698: a622000a sh r2,0x000a(r17)
0007d69c: 264402ac addiu r4,r18,0x02ac                
0007d6a0: 97a20010 lhu r2,0x0010(r29)
0007d6a4: 27a50010 addiu r5,r29,0x0010
0007d6a8: a6220010 sh r2,0x0010(r17)
0007d6ac: 97a20014 lhu r2,0x0014(r29)
0007d6b0: 02003021 addu r6,r16,r0
0007d6b4: 0c00755e jal 0x0001d578                     Get_vector_from_GTE
0007d6b8: a6220012 sh r2,0x0012(r17)
0007d6bc: 264402b4 addiu r4,r18,0x02b4
0007d6c0: 97a20010 lhu r2,0x0010(r29)
0007d6c4: 27a50010 addiu r5,r29,0x0010
0007d6c8: a6220018 sh r2,0x0018(r17)
0007d6cc: 97a20014 lhu r2,0x0014(r29)
0007d6d0: 02003021 addu r6,r16,r0
0007d6d4: 0c00755e jal 0x0001d578                     Get_vector_from_GTE
0007d6d8: a622001a sh r2,0x001a(r17)
0007d6dc: 97a20010 lhu r2,0x0010(r29)
0007d6e0: 3c069249 lui r6,0x9249
0007d6e4: a6220020 sh r2,0x0020(r17)
0007d6e8: 92220007 lbu r2,0x0007(r17)
0007d6ec: 97a30014 lhu r3,0x0014(r29)
0007d6f0: 34420002 ori r2,r2,0x0002
0007d6f4: a2220007 sb r2,0x0007(r17)
0007d6f8: a6230022 sh r3,0x0022(r17)
0007d6fc: 96420040 lhu r2,0x0040(r18)
0007d700: 34c62493 ori r6,r6,0x2493
0007d704: 00021400 sll r2,r2,0x10
0007d708: 00022c03 sra r5,r2,0x10
0007d70c: 00a60018 mult r5,r6
0007d710: 96430044 lhu r3,0x0044(r18)
0007d714: 00002010 mfhi r4
0007d718: 00031c00 sll r3,r3,0x10
0007d71c: 00033c03 sra r7,r3,0x10
0007d720: 00e60018 mult r7,r6
0007d724: 000217c3 sra r2,r2,0x1f
0007d728: 00031fc3 sra r3,r3,0x1f
0007d72c: 00852021 addu r4,r4,r5
0007d730: 00042103 sra r4,r4,0x04
0007d734: 00822023 subu r4,r4,r2
0007d738: 00042400 sll r4,r4,0x10
0007d73c: 00042403 sra r4,r4,0x10
0007d740: 9246007e lbu r6,0x007e(r18)
0007d744: 00002810 mfhi r5
0007d748: 00a72821 addu r5,r5,r7
0007d74c: 00052903 sra r5,r5,0x04
0007d750: 00a32823 subu r5,r5,r3
0007d754: 00052c00 sll r5,r5,0x10
0007d758: 0c060fed jal 0x00183fb4
0007d75c: 00052c03 sra r5,r5,0x10
0007d760: 00402021 addu r4,r2,r0
0007d764: 90820003 lbu r2,0x0003(r4)
0007d768: 00000000 nop
0007d76c: 304200e0 andi r2,r2,0x00e0
0007d770: 10400060 beq r2,r0,0x0007d8f4
0007d774: 3402005f ori r2,r0,0x005f
0007d778: 90820003 lbu r2,0x0003(r4)
0007d77c: 90830002 lbu r3,0x0002(r4)
0007d780: 00021142 srl r2,r2,0x05
0007d784: 00621821 addu r3,r3,r2
0007d788: 00031823 subu r3,r0,r3
0007d78c: 00031040 sll r2,r3,0x01
0007d790: 00431021 addu r2,r2,r3
0007d794: 86430042 lh r3,0x0042(r18)
0007d798: 00021080 sll r2,r2,0x02
0007d79c: 0043102a slt r2,r2,r3
0007d7a0: 10400054 beq r2,r0,0x0007d8f4
0007d7a4: 3402005f ori r2,r0,0x005f
0007d7a8: 9242029a lbu r2,0x029a(r18)
0007d7ac: 3c038004 lui r3,0x8004
0007d7b0: 90635980 lbu r3,0x5980(r3)
0007d7b4: 00000000 nop
0007d7b8: 00431021 addu r2,r2,r3
0007d7bc: a242029a sb r2,0x029a(r18)
0007d7c0: 9244029a lbu r4,0x029a(r18)
0007d7c4: 3402003f ori r2,r0,0x003f
0007d7c8: a6220016 sh r2,0x0016(r17)
0007d7cc: 96430010 lhu r3,0x0010(r18)
0007d7d0: 34020080 ori r2,r0,0x0080
0007d7d4: a2220006 sb r2,0x0006(r17)
0007d7d8: a2220005 sb r2,0x0005(r17)
0007d7dc: a2220004 sb r2,0x0004(r17)
0007d7e0: 34020010 ori r2,r0,0x0010
0007d7e4: 24630040 addiu r3,r3,0x0040
0007d7e8: 30840030 andi r4,r4,0x0030
0007d7ec: 1082001b beq r4,r2,0x0007d85c
0007d7f0: a623000e sh r3,0x000e(r17)
0007d7f4: 2c820011 sltiu r2,r4,0x0011
0007d7f8: 10400005 beq r2,r0,0x0007d810
0007d7fc: 00000000 nop
0007d800: 1080000a beq r4,r0,0x0007d82c
0007d804: 340200a8 ori r2,r0,0x00a8
0007d808: 0801f652 j 0x0007d948
0007d80c: 27b00020 addiu r16,r29,0x0020
0007d810: 34020020 ori r2,r0,0x0020
0007d814: 1082001e beq r4,r2,0x0007d890
0007d818: 34020030 ori r2,r0,0x0030
0007d81c: 10820029 beq r4,r2,0x0007d8c4
0007d820: 340200a8 ori r2,r0,0x00a8
0007d824: 0801f652 j 0x0007d948
0007d828: 27b00020 addiu r16,r29,0x0020
0007d82c: a222001c sb r2,0x001c(r17)
0007d830: a222000c sb r2,0x000c(r17)
0007d834: 340200bb ori r2,r0,0x00bb
0007d838: a2220024 sb r2,0x0024(r17)
0007d83c: a2220014 sb r2,0x0014(r17)
0007d840: 34020040 ori r2,r0,0x0040
0007d844: a2220015 sb r2,0x0015(r17)
0007d848: a222000d sb r2,0x000d(r17)
0007d84c: 34020053 ori r2,r0,0x0053
0007d850: a2220025 sb r2,0x0025(r17)
0007d854: 0801f651 j 0x0007d944
0007d858: a222001d sb r2,0x001d(r17)
0007d85c: 340200a8 ori r2,r0,0x00a8
0007d860: a2220024 sb r2,0x0024(r17)
0007d864: a222001c sb r2,0x001c(r17)
0007d868: 340200bb ori r2,r0,0x00bb
0007d86c: a2220014 sb r2,0x0014(r17)
0007d870: a222000c sb r2,0x000c(r17)
0007d874: 34020040 ori r2,r0,0x0040
0007d878: a222001d sb r2,0x001d(r17)
0007d87c: a222000d sb r2,0x000d(r17)
0007d880: 34020053 ori r2,r0,0x0053
0007d884: a2220025 sb r2,0x0025(r17)
0007d888: 0801f651 j 0x0007d944
0007d88c: a2220015 sb r2,0x0015(r17)
0007d890: 340200a8 ori r2,r0,0x00a8
0007d894: a2220024 sb r2,0x0024(r17)
0007d898: a2220014 sb r2,0x0014(r17)
0007d89c: 340200bb ori r2,r0,0x00bb
0007d8a0: a222001c sb r2,0x001c(r17)
0007d8a4: a222000c sb r2,0x000c(r17)
0007d8a8: 34020040 ori r2,r0,0x0040
0007d8ac: a2220025 sb r2,0x0025(r17)
0007d8b0: a222001d sb r2,0x001d(r17)
0007d8b4: 34020053 ori r2,r0,0x0053
0007d8b8: a2220015 sb r2,0x0015(r17)
0007d8bc: 0801f651 j 0x0007d944
0007d8c0: a222000d sb r2,0x000d(r17)
0007d8c4: a2220014 sb r2,0x0014(r17)
0007d8c8: a222000c sb r2,0x000c(r17)
0007d8cc: 340200bb ori r2,r0,0x00bb
0007d8d0: a2220024 sb r2,0x0024(r17)
0007d8d4: a222001c sb r2,0x001c(r17)
0007d8d8: 34020040 ori r2,r0,0x0040
0007d8dc: a2220025 sb r2,0x0025(r17)
0007d8e0: a2220015 sb r2,0x0015(r17)
0007d8e4: 34020053 ori r2,r0,0x0053
0007d8e8: a222001d sb r2,0x001d(r17)
0007d8ec: 0801f651 j 0x0007d944
0007d8f0: a222000d sb r2,0x000d(r17)
0007d8f4: a6220016 sh r2,0x0016(r17)
0007d8f8: 96430010 lhu r3,0x0010(r18)
0007d8fc: 34020080 ori r2,r0,0x0080
0007d900: a2220006 sb r2,0x0006(r17)
0007d904: a2220005 sb r2,0x0005(r17)
0007d908: a2220004 sb r2,0x0004(r17)
0007d90c: 34020090 ori r2,r0,0x0090
0007d910: a222001c sb r2,0x001c(r17)
0007d914: a222000c sb r2,0x000c(r17)
0007d918: 340200a3 ori r2,r0,0x00a3
0007d91c: a2220024 sb r2,0x0024(r17)
0007d920: a2220014 sb r2,0x0014(r17)
0007d924: 34020040 ori r2,r0,0x0040
0007d928: a2220015 sb r2,0x0015(r17)
0007d92c: a222000d sb r2,0x000d(r17)
0007d930: 34020053 ori r2,r0,0x0053
0007d934: a2220025 sb r2,0x0025(r17)
0007d938: a222001d sb r2,0x001d(r17)
0007d93c: 24630040 addiu r3,r3,0x0040
0007d940: a623000e sh r3,0x000e(r17)
0007d944: 27b00020 addiu r16,r29,0x0020
0007d948: 02002021 addu r4,r16,r0
0007d94c: 00003021 addu r6,r0,r0
0007d950: 86450040 lh r5,0x0040(r18)
0007d954: 86420060 lh r2,0x0060(r18)
0007d958: 86430050 lh r3,0x0050(r18)
0007d95c: 86470044 lh r7,0x0044(r18)
0007d960: 00a22821 addu r5,r5,r2
0007d964: 00a32821 addu r5,r5,r3
0007d968: 86420064 lh r2,0x0064(r18)
0007d96c: 86430054 lh r3,0x0054(r18)
0007d970: 00e23821 addu r7,r7,r2
0007d974: 0c010ac7 jal 0x00042b1c
0007d978: 00e33821 addu r7,r7,r3
0007d97c: 9245007e lbu r5,0x007e(r18)
0007d980: 0c01f203 jal 0x0007c80c              0007d5d0_-_0007db18
0007d984: 02002021 addu r4,r16,r0
0007d988: a7a20022 sh r2,0x0022(r29)
0007d98c: 00021400 sll r2,r2,0x10
0007d990: 86430042 lh r3,0x0042(r18)
0007d994: 00021403 sra r2,r2,0x10
0007d998: 0062182a slt r3,r3,r2
0007d99c: 14600003 bne r3,r0,0x0007d9ac
0007d9a0: 3c069249 lui r6,0x9249
0007d9a4: 0801f6bd j 0x0007daf4
0007d9a8: 02602021 addu r4,r19,r0
0007d9ac: 97a20020 lhu r2,0x0020(r29)
0007d9b0: 34c62493 ori r6,r6,0x2493
0007d9b4: 00021400 sll r2,r2,0x10
0007d9b8: 00022c03 sra r5,r2,0x10
0007d9bc: 00a60018 mult r5,r6
0007d9c0: 97a30024 lhu r3,0x0024(r29)
0007d9c4: 00002010 mfhi r4
0007d9c8: 00031c00 sll r3,r3,0x10
0007d9cc: 00033c03 sra r7,r3,0x10
0007d9d0: 00e60018 mult r7,r6
0007d9d4: 000217c3 sra r2,r2,0x1f
0007d9d8: 00031fc3 sra r3,r3,0x1f
0007d9dc: 00852021 addu r4,r4,r5
0007d9e0: 00042103 sra r4,r4,0x04
0007d9e4: 00822023 subu r4,r4,r2
0007d9e8: 00042400 sll r4,r4,0x10
0007d9ec: 00042403 sra r4,r4,0x10
0007d9f0: 9246007e lbu r6,0x007e(r18)
0007d9f4: 00002810 mfhi r5
0007d9f8: 00a72821 addu r5,r5,r7
0007d9fc: 00052903 sra r5,r5,0x04
0007da00: 00a32823 subu r5,r5,r3
0007da04: 00052c00 sll r5,r5,0x10
0007da08: 0c060fed jal 0x00183fb4
0007da0c: 00052c03 sra r5,r5,0x10
0007da10: 00402021 addu r4,r2,r0
0007da14: 90820003 lbu r2,0x0003(r4)
0007da18: 00000000 nop
0007da1c: 00021142 srl r2,r2,0x05
0007da20: 00021840 sll r3,r2,0x01
0007da24: 00621821 addu r3,r3,r2
0007da28: 97a20022 lhu r2,0x0022(r29)
0007da2c: 00031880 sll r3,r3,0x02
0007da30: 00431023 subu r2,r2,r3
0007da34: a7a20022 sh r2,0x0022(r29)
0007da38: 9242007f lbu r2,0x007f(r18)
0007da3c: 00000000 nop
0007da40: 1040000e beq r2,r0,0x0007da7c
0007da44: 00000000 nop
0007da48: 90820000 lbu r2,0x0000(r4)
0007da4c: 00000000 nop
0007da50: 30420040 andi r2,r2,0x0040
0007da54: 10400005 beq r2,r0,0x0007da6c
0007da58: 02002021 addu r4,r16,r0
0007da5c: 0c01edaa jal 0x0007b6a8
0007da60: 27a50028 addiu r5,r29,0x0028
0007da64: 0801f6aa j 0x0007daa8
0007da68: 00000000 nop
0007da6c: 0c01eda2 jal 0x0007b688
0007da70: 27a50028 addiu r5,r29,0x0028
0007da74: 0801f6aa j 0x0007daa8
0007da78: 00000000 nop
0007da7c: 90820000 lbu r2,0x0000(r4)
0007da80: 00000000 nop
0007da84: 30420040 andi r2,r2,0x0040
0007da88: 10400005 beq r2,r0,0x0007daa0
0007da8c: 02002021 addu r4,r16,r0
0007da90: 0c01ee53 jal 0x0007b94c
0007da94: 27a50028 addiu r5,r29,0x0028
0007da98: 0801f6aa j 0x0007daa8
0007da9c: 00000000 nop
0007daa0: 0c01ee4b jal 0x0007b92c
0007daa4: 27a50028 addiu r5,r29,0x0028
0007daa8: 3c10800a lui r16,0x800a
0007daac: 26108a24 addiu r16,r16,0x8a24
0007dab0: 0c00742a jal 0x0001d0a8                     Store_Rotation_matrix_elements_to_GTE
0007dab4: 02002021 addu r4,r16,r0
0007dab8: 0c00744e jal 0x0001d138                     Store_Translation_Vectors_to_GTE
0007dabc: 02002021 addu r4,r16,r0
0007dac0: 27a40028 addiu r4,r29,0x0028
0007dac4: 27a50010 addiu r5,r29,0x0010
0007dac8: 0c00755e jal 0x0001d578                     Get_vector_from_GTE
0007dacc: 27a60038 addiu r6,r29,0x0038
0007dad0: 8fb00018 lw r16,0x0018(r29)
0007dad4: 00000000 nop
0007dad8: 06010002 bgez r16,0x0007dae4
0007dadc: 00000000 nop
0007dae0: 26100003 addiu r16,r16,0x0003
0007dae4: 0c011298 jal 0x00044a60
0007dae8: 00108083 sra r16,r16,0x02
0007daec: 00108080 sll r16,r16,0x02
0007daf0: 00502021 addu r4,r2,r16
0007daf4: 0c008eed jal 0x00023bb4
0007daf8: 02202821 addu r5,r17,r0
0007dafc: 8fbf0050 lw r31,0x0050(r29)
0007db00: 8fb3004c lw r19,0x004c(r29)
0007db04: 8fb20048 lw r18,0x0048(r29)
0007db08: 8fb10044 lw r17,0x0044(r29)
0007db0c: 8fb00040 lw r16,0x0040(r29)
0007db10: 27bd0058 addiu r29,r29,0x0058
0007db14: 03e00008 jr r31
0007db18: 00000000 nop