Difference between revisions of "000927bc - 00092d48"

From Final Fantasy Hacktics Wiki
Jump to navigation Jump to search
(Created page with "<font face='Courier New'> 000927bc: 27bdffe0 addiu r29,r29,0xffe0 000927c0: 8fa20030 lw r2,0x0030(r29) 000927c4: 0080c021 addu r24,r4,r0 000927c8: afb10014 sw r17,0x0014...")
 
m
 
(One intermediate revision by one other user not shown)
Line 1: Line 1:
<font face='Courier New'>
 
 
 
  000927bc: 27bdffe0 addiu r29,r29,0xffe0
 
  000927bc: 27bdffe0 addiu r29,r29,0xffe0
  000927c0: 8fa20030 lw r2,0x0030(r29)
+
  000927c0: 8fa20030 lw r2,0x0030(r29) Load ?
 
  000927c4: 0080c021 addu r24,r4,r0
 
  000927c4: 0080c021 addu r24,r4,r0
 
  000927c8: afb10014 sw r17,0x0014(r29)
 
  000927c8: afb10014 sw r17,0x0014(r29)
  000927cc: 8fb10040 lw r17,0x0040(r29)
+
  000927cc: 8fb10040 lw r17,0x0040(r29) r17 = Preset Value
  000927d0: 97af0034 lhu r15,0x0034(r29)
+
  000927d0: 97af0034 lhu r15,0x0034(r29) r15 = Red
  000927d4: 97ae0038 lhu r14,0x0038(r29)
+
  000927d4: 97ae0038 lhu r14,0x0038(r29) r14 = Green
  000927d8: 97ad003c lhu r13,0x003c(r29)
+
  000927d8: 97ad003c lhu r13,0x003c(r29) r13 = Blue
 
  000927dc: 34030001 ori r3,r0,0x0001
 
  000927dc: 34030001 ori r3,r0,0x0001
 
  000927e0: afb20018 sw r18,0x0018(r29)
 
  000927e0: afb20018 sw r18,0x0018(r29)
  000927e4: 144300a9 bne r2,r3,0x00092a8c
+
  000927e4: 144300a9 bne r2,r3,0x00092a8c Branch if ? != 1
 
  000927e8: afb00010 sw r16,0x0010(r29)
 
  000927e8: afb00010 sw r16,0x0010(r29)
  000927ec: 00006021 addu r12,r0,r0
+
 
  000927f0: 00061080 sll r2,r6,0x02
+
? = 1
  000927f4: 00461021 addu r2,r2,r6
+
  000927ec: 00006021 addu r12,r0,r0 Counter = 0
  000927f8: 00021080 sll r2,r2,0x02
+
  000927f0: 00061080 sll r2,r6,0x02 Section ID * 0x4
  000927fc: 00461023 subu r2,r2,r6
+
  000927f4: 00461021 addu r2,r2,r6 Section ID * 0x5
  00092800: 00021180 sll r2,r2,0x06
+
  000927f8: 00021080 sll r2,r2,0x02 section ID * 0x14
  00092804: 00461021 addu r2,r2,r6
+
  000927fc: 00461023 subu r2,r2,r6 section ID * 0x15
  00092808: 00028040 sll r16,r2,0x01
+
  00092800: 00021180 sll r2,r2,0x06 section ID * 0x540
 +
  00092804: 00461021 addu r2,r2,r6 section ID * 0x541
 +
  00092808: 00028040 sll r16,r2,0x01 section ID * 0xA82
 
  0009280c: 0000c821 addu r25,r0,r0
 
  0009280c: 0000c821 addu r25,r0,r0
 
  00092810: 3c03800e lui r3,0x800e
 
  00092810: 3c03800e lui r3,0x800e
 
  00092814: 24634ea4 addiu r3,r3,0x4ea4
 
  00092814: 24634ea4 addiu r3,r3,0x4ea4
  00092818: 00061240 sll r2,r6,0x09
+
  00092818: 00061240 sll r2,r6,0x09 section ID * 0x200
  0009281c: 00433821 addu r7,r2,r3
+
  0009281c: 00433821 addu r7,r2,r3 0x800e4ea4 + ID * 0x200
 
  00092820: 84a20000 lh r2,0x0000(r5)
 
  00092820: 84a20000 lh r2,0x0000(r5)
 
  00092824: 94a80000 lhu r8,0x0000(r5)
 
  00092824: 94a80000 lhu r8,0x0000(r5)
Line 119: Line 119:
 
  0009298c: 1c400002 bgtz r2,0x00092998
 
  0009298c: 1c400002 bgtz r2,0x00092998
 
  00092990: 00091400 sll r2,r9,0x10
 
  00092990: 00091400 sll r2,r9,0x10
  00092994: 00005021 addu r10,r0,r0
+
  00092994: 00005021 addu r10,r0,r0  
  00092998: 1c400002 bgtz r2,0x000929a4
+
  00092998: 1c400002 bgtz r2,0x000929a4  
 
  0009299c: 00061400 sll r2,r6,0x10
 
  0009299c: 00061400 sll r2,r6,0x10
 
  000929a0: 00004821 addu r9,r0,r0
 
  000929a0: 00004821 addu r9,r0,r0
Line 135: Line 135:
 
  000929cc: 1220001c beq r17,r0,0x00092a40
 
  000929cc: 1220001c beq r17,r0,0x00092a40
 
  000929d0: 00091140 sll r2,r9,0x05
 
  000929d0: 00091140 sll r2,r9,0x05
  000929d4: 01421021 addu r2,r10,r2
+
  000929d4: 01421021 addu r2,r10,r2  
 
  000929d8: 00061a80 sll r3,r6,0x0a
 
  000929d8: 00061a80 sll r3,r6,0x0a
 
  000929dc: 00431021 addu r2,r2,r3
 
  000929dc: 00431021 addu r2,r2,r3
Line 176: Line 176:
 
  00092a70: 24e70002 addiu r7,r7,0x0002
 
  00092a70: 24e70002 addiu r7,r7,0x0002
 
  00092a74: 258c0001 addiu r12,r12,0x0001
 
  00092a74: 258c0001 addiu r12,r12,0x0001
  00092a78: 29820100 slti r2,r12,0x0100
+
  00092a78: 29820100 slti r2,r12,0x0100  
 
  00092a7c: 1440ff68 bne r2,r0,0x00092820
 
  00092a7c: 1440ff68 bne r2,r0,0x00092820
 
  00092a80: 24a50002 addiu r5,r5,0x0002
 
  00092a80: 24a50002 addiu r5,r5,0x0002
 
  00092a84: 08024b4b j 0x00092d2c
 
  00092a84: 08024b4b j 0x00092d2c
 
  00092a88: 34020001 ori r2,r0,0x0001
 
  00092a88: 34020001 ori r2,r0,0x0001
  00092a8c: 00006021 addu r12,r0,r0
+
 +
*? != 1*
 +
  00092a8c: 00006021 addu r12,r0,r0 Counter = 0
 
  00092a90: 3c03800e lui r3,0x800e
 
  00092a90: 3c03800e lui r3,0x800e
 
  00092a94: 24634ea4 addiu r3,r3,0x4ea4
 
  00092a94: 24634ea4 addiu r3,r3,0x4ea4
  00092a98: 00061240 sll r2,r6,0x09
+
  00092a98: 00061240 sll r2,r6,0x09 Section ID * 0x200
  00092a9c: 00439021 addu r18,r2,r3
+
  00092a9c: 00439021 addu r18,r2,r3 r18 = Modified Palette Pointer
  00092aa0: 000718c0 sll r3,r7,0x03
+
  00092aa0: 000718c0 sll r3,r7,0x03 Unit Misc ID * 8
  00092aa4: 00061080 sll r2,r6,0x02
+
  00092aa4: 00061080 sll r2,r6,0x02 Section ID * 4
  00092aa8: 00461021 addu r2,r2,r6
+
  00092aa8: 00461021 addu r2,r2,r6 ID * 5
  00092aac: 00021080 sll r2,r2,0x02
+
  00092aac: 00021080 sll r2,r2,0x02 ID * 20
  00092ab0: 00461023 subu r2,r2,r6
+
  00092ab0: 00461023 subu r2,r2,r6 ID * 19
  00092ab4: 00021180 sll r2,r2,0x06
+
  00092ab4: 00021180 sll r2,r2,0x06 ID * 1216
  00092ab8: 00461021 addu r2,r2,r6
+
  00092ab8: 00461021 addu r2,r2,r6 ID * 1217
  00092abc: 00028040 sll r16,r2,0x01
+
  00092abc: 00028040 sll r16,r2,0x01 ID * 2434
  00092ac0: 0070c821 addu r25,r3,r16
+
  00092ac0: 0070c821 addu r25,r3,r16 r25 = Raw Palette Pointer
  00092ac4: 84a20000 lh r2,0x0000(r5)
+
 
  00092ac8: 94a80000 lhu r8,0x0000(r5)
+
<loop>
  00092acc: 10400042 beq r2,r0,0x00092bd8
+
  00092ac4: 84a20000 lh r2,0x0000(r5) Load colour from other.bin
 +
  00092ac8: 94a80000 lhu r8,0x0000(r5) Ditto
 +
  00092acc: 10400042 beq r2,r0,0x00092bd8 skip if colour = 0
 
  00092ad0: 34020005 ori r2,r0,0x0005
 
  00092ad0: 34020005 ori r2,r0,0x0005
  00092ad4: 1302000a beq r24,r2,0x00092b00
+
  00092ad4: 1302000a beq r24,r2,0x00092b00
 
  00092ad8: 2b020006 slti r2,r24,0x0006
 
  00092ad8: 2b020006 slti r2,r24,0x0006
 
  00092adc: 14400036 bne r2,r0,0x00092bb8
 
  00092adc: 14400036 bne r2,r0,0x00092bb8
Line 208: Line 212:
 
  00092af0: 1302001d beq r24,r2,0x00092b68
 
  00092af0: 1302001d beq r24,r2,0x00092b68
 
  00092af4: 3103001f andi r3,r8,0x001f
 
  00092af4: 3103001f andi r3,r8,0x001f
  00092af8: 08024aee j 0x00092bb8
+
  00092af8: 08024aee j 0x00092bb8 r2 = red from other.bin palette
 
  00092afc: 3102001f andi r2,r8,0x001f
 
  00092afc: 3102001f andi r2,r8,0x001f
 +
 
  00092b00: 3102001f andi r2,r8,0x001f
 
  00092b00: 3102001f andi r2,r8,0x001f
 
  00092b04: 00021043 sra r2,r2,0x01
 
  00092b04: 00021043 sra r2,r2,0x01
Line 223: Line 228:
 
  00092b2c: 310203e0 andi r2,r8,0x03e0
 
  00092b2c: 310203e0 andi r2,r8,0x03e0
 
  00092b30: 00023142 srl r6,r2,0x05
 
  00092b30: 00023142 srl r6,r2,0x05
  00092b34: 31027c00 andi r2,r8,0x7c00
+
  00092b34: 31027c00 andi r2,r8,0x7c00  
 
  00092b38: 00024a82 srl r9,r2,0x0a
 
  00092b38: 00024a82 srl r9,r2,0x0a
 
  00092b3c: 3c042aaa lui r4,0x2aaa
 
  00092b3c: 3c042aaa lui r4,0x2aaa
Line 256: Line 261:
 
  00092bb0: 08024afb j 0x00092bec
 
  00092bb0: 08024afb j 0x00092bec
 
  00092bb4: 01a23021 addu r6,r13,r2
 
  00092bb4: 01a23021 addu r6,r13,r2
  00092bb8: 01e25021 addu r10,r15,r2
+
 
  00092bbc: 310203e0 andi r2,r8,0x03e0
+
testing went here for sprite turning to crystal (colour from other.bin)
 +
  00092bb8: 01e25021 addu r10,r15,r2 red
 +
  00092bbc: 310203e0 andi r2,r8,0x03e0
 
  00092bc0: 00021142 srl r2,r2,0x05
 
  00092bc0: 00021142 srl r2,r2,0x05
  00092bc4: 01c24821 addu r9,r14,r2
+
  00092bc4: 01c24821 addu r9,r14,r2 green
 
  00092bc8: 31027c00 andi r2,r8,0x7c00
 
  00092bc8: 31027c00 andi r2,r8,0x7c00
 
  00092bcc: 00021282 srl r2,r2,0x0a
 
  00092bcc: 00021282 srl r2,r2,0x0a
  00092bd0: 08024afb j 0x00092bec
+
  00092bd0: 08024afb j 0x00092bec store
  00092bd4: 01a23021 addu r6,r13,r2
+
  00092bd4: 01a23021 addu r6,r13,r2 blue
 +
 
 
  00092bd8: 310a001f andi r10,r8,0x001f
 
  00092bd8: 310a001f andi r10,r8,0x001f
 
  00092bdc: 310203e0 andi r2,r8,0x03e0
 
  00092bdc: 310203e0 andi r2,r8,0x03e0
Line 327: Line 335:
 
  00092ccc: 00481023 subu r2,r2,r8
 
  00092ccc: 00481023 subu r2,r2,r8
 
  00092cd0: 00621821 addu r3,r3,r2
 
  00092cd0: 00621821 addu r3,r3,r2
  00092cd4: a06a0000 sb r10,0x0000(r3)
+
  00092cd4: a06a0000 sb r10,0x0000(r3) Store Red
  00092cd8: a0690001 sb r9,0x0001(r3)
+
  00092cd8: a0690001 sb r9,0x0001(r3)
 
  00092cdc: a0660002 sb r6,0x0002(r3)
 
  00092cdc: a0660002 sb r6,0x0002(r3)
 
  00092ce0: a06b0003 sb r11,0x0003(r3)
 
  00092ce0: a06b0003 sb r11,0x0003(r3)
  00092ce4: 00072100 sll r4,r7,0x04
+
  00092ce4: 00072100 sll r4,r7,0x04 #some kind of displacement?
  00092ce8: 008c2021 addu r4,r4,r12
+
  00092ce8: 008c2021 addu r4,r4,r12 #palette colour index +
 
  00092cec: 3c02800a lui r2,0x800a
 
  00092cec: 3c02800a lui r2,0x800a
 
  00092cf0: 24429d76 addiu r2,r2,0x9d76
 
  00092cf0: 24429d76 addiu r2,r2,0x9d76
  00092cf4: 00042040 sll r4,r4,0x01
+
  00092cf4: 00042040 sll r4,r4,0x01  
  00092cf8: 02021021 addu r2,r16,r2
+
  00092cf8: 02021021 addu r2,r16,r2 0x800a9d76 + section table entry
  00092cfc: 00822021 addu r4,r4,r2
+
  00092cfc: 00822021 addu r4,r4,r2 #VRAM palette
  00092d00: 00091140 sll r2,r9,0x05
+
  00092d00: 00091140 sll r2,r9,0x05 #green << 0x05?
  00092d04: 01421021 addu r2,r10,r2
+
  00092d04: 01421021 addu r2,r10,r2 #red
  00092d08: 00061a80 sll r3,r6,0x0a
+
  00092d08: 00061a80 sll r3,r6,0x0a #blue << 0x0a?
  00092d0c: 00431021 addu r2,r2,r3
+
  00092d0c: 00431021 addu r2,r2,r3 #RGB
  00092d10: 000b1bc0 sll r3,r11,0x0f
+
  00092d10: 000b1bc0 sll r3,r11,0x0f #alpha
  00092d14: 00431021 addu r2,r2,r3
+
  00092d14: 00431021 addu r2,r2,r3 #final colour with alpha
  00092d18: a4820000 sh r2,0x0000(r4)
+
  00092d18: a4820000 sh r2,0x0000(r4) #store colour to VRAM palette
  00092d1c: 258c0001 addiu r12,r12,0x0001
+
  00092d1c: 258c0001 addiu r12,r12,0x0001 #current palette colour index
  00092d20: 29820010 slti r2,r12,0x0010
+
  00092d20: 29820010 slti r2,r12,0x0010 #do 0x10 times
 
  00092d24: 1440ff67 bne r2,r0,0x00092ac4
 
  00092d24: 1440ff67 bne r2,r0,0x00092ac4
 
  00092d28: 34020001 ori r2,r0,0x0001
 
  00092d28: 34020001 ori r2,r0,0x0001
 +
</loop>
 +
 
  00092d2c: 3c01800a lui r1,0x800a
 
  00092d2c: 3c01800a lui r1,0x800a
 
  00092d30: ac2295ec sw r2,-0x6a14(r1)
 
  00092d30: ac2295ec sw r2,-0x6a14(r1)
Line 357: Line 367:
 
  00092d44: 03e00008 jr r31
 
  00092d44: 03e00008 jr r31
 
  00092d48: 00000000 nop
 
  00092d48: 00000000 nop
</font>
 

Latest revision as of 06:42, 2 March 2023

000927bc: 27bdffe0 addiu r29,r29,0xffe0
000927c0: 8fa20030 lw r2,0x0030(r29)		Load ?
000927c4: 0080c021 addu r24,r4,r0
000927c8: afb10014 sw r17,0x0014(r29)
000927cc: 8fb10040 lw r17,0x0040(r29)		r17 = Preset Value
000927d0: 97af0034 lhu r15,0x0034(r29)		r15 = Red
000927d4: 97ae0038 lhu r14,0x0038(r29)		r14 = Green
000927d8: 97ad003c lhu r13,0x003c(r29)		r13 = Blue
000927dc: 34030001 ori r3,r0,0x0001
000927e0: afb20018 sw r18,0x0018(r29)
000927e4: 144300a9 bne r2,r3,0x00092a8c		Branch if ? != 1
000927e8: afb00010 sw r16,0x0010(r29)
? = 1
000927ec: 00006021 addu r12,r0,r0		Counter = 0
000927f0: 00061080 sll r2,r6,0x02		Section ID * 0x4
000927f4: 00461021 addu r2,r2,r6		Section ID * 0x5
000927f8: 00021080 sll r2,r2,0x02		section ID * 0x14
000927fc: 00461023 subu r2,r2,r6		section ID * 0x15
00092800: 00021180 sll r2,r2,0x06		section ID * 0x540
00092804: 00461021 addu r2,r2,r6		section ID * 0x541
00092808: 00028040 sll r16,r2,0x01		section ID * 0xA82
0009280c: 0000c821 addu r25,r0,r0
00092810: 3c03800e lui r3,0x800e
00092814: 24634ea4 addiu r3,r3,0x4ea4
00092818: 00061240 sll r2,r6,0x09		section ID * 0x200
0009281c: 00433821 addu r7,r2,r3		0x800e4ea4 + ID * 0x200
00092820: 84a20000 lh r2,0x0000(r5)
00092824: 94a80000 lhu r8,0x0000(r5)
00092828: 10400042 beq r2,r0,0x00092934
0009282c: 34020005 ori r2,r0,0x0005
00092830: 1302000a beq r24,r2,0x0009285c
00092834: 2b020006 slti r2,r24,0x0006
00092838: 14400036 bne r2,r0,0x00092914
0009283c: 3102001f andi r2,r8,0x001f
00092840: 34020006 ori r2,r0,0x0006
00092844: 1302000f beq r24,r2,0x00092884
00092848: 34020007 ori r2,r0,0x0007
0009284c: 1302001d beq r24,r2,0x000928c4
00092850: 3103001f andi r3,r8,0x001f
00092854: 08024a45 j 0x00092914
00092858: 3102001f andi r2,r8,0x001f
0009285c: 3102001f andi r2,r8,0x001f
00092860: 00021043 sra r2,r2,0x01
00092864: 01e25021 addu r10,r15,r2
00092868: 310203e0 andi r2,r8,0x03e0
0009286c: 00021182 srl r2,r2,0x06
00092870: 01c24821 addu r9,r14,r2
00092874: 31027c00 andi r2,r8,0x7c00
00092878: 000212c2 srl r2,r2,0x0b
0009287c: 08024a52 j 0x00092948
00092880: 01a23021 addu r6,r13,r2
00092884: 3103001f andi r3,r8,0x001f
00092888: 310203e0 andi r2,r8,0x03e0
0009288c: 00023142 srl r6,r2,0x05
00092890: 31027c00 andi r2,r8,0x7c00
00092894: 00024a82 srl r9,r2,0x0a
00092898: 3c042aaa lui r4,0x2aaa
0009289c: 3484aaab ori r4,r4,0xaaab
000928a0: 00031840 sll r3,r3,0x01
000928a4: 00061040 sll r2,r6,0x01
000928a8: 00461021 addu r2,r2,r6
000928ac: 00621821 addu r3,r3,r2
000928b0: 00691821 addu r3,r3,r9
000928b4: 00640018 mult r3,r4
000928b8: 00001010 mfhi r2
000928bc: 08024a40 j 0x00092900
000928c0: 00031fc3 sra r3,r3,0x1f
000928c4: 310203e0 andi r2,r8,0x03e0
000928c8: 00023142 srl r6,r2,0x05
000928cc: 31027c00 andi r2,r8,0x7c00
000928d0: 00024a82 srl r9,r2,0x0a
000928d4: 3c042aaa lui r4,0x2aaa
000928d8: 3484aaab ori r4,r4,0xaaab
000928dc: 00031840 sll r3,r3,0x01
000928e0: 00061040 sll r2,r6,0x01
000928e4: 00461021 addu r2,r2,r6
000928e8: 00621821 addu r3,r3,r2
000928ec: 00691821 addu r3,r3,r9
000928f0: 00640018 mult r3,r4
000928f4: 00031fc3 sra r3,r3,0x1f
000928f8: 00001010 mfhi r2
000928fc: 00021043 sra r2,r2,0x01
00092900: 00431023 subu r2,r2,r3
00092904: 01e25021 addu r10,r15,r2
00092908: 01c24821 addu r9,r14,r2
0009290c: 08024a52 j 0x00092948
00092910: 01a23021 addu r6,r13,r2
00092914: 01e25021 addu r10,r15,r2
00092918: 310203e0 andi r2,r8,0x03e0
0009291c: 00021142 srl r2,r2,0x05
00092920: 01c24821 addu r9,r14,r2
00092924: 31027c00 andi r2,r8,0x7c00
00092928: 00021282 srl r2,r2,0x0a
0009292c: 08024a52 j 0x00092948
00092930: 01a23021 addu r6,r13,r2
00092934: 310a001f andi r10,r8,0x001f
00092938: 310203e0 andi r2,r8,0x03e0
0009293c: 00024942 srl r9,r2,0x05
00092940: 31027c00 andi r2,r8,0x7c00
00092944: 00023282 srl r6,r2,0x0a
00092948: 000a1400 sll r2,r10,0x10
0009294c: 00021403 sra r2,r2,0x10
00092950: 28420020 slti r2,r2,0x0020
00092954: 14400002 bne r2,r0,0x00092960
00092958: 00085bc2 srl r11,r8,0x0f
0009295c: 340a001f ori r10,r0,0x001f
00092960: 00091400 sll r2,r9,0x10
00092964: 00021403 sra r2,r2,0x10
00092968: 28420020 slti r2,r2,0x0020
0009296c: 14400002 bne r2,r0,0x00092978
00092970: 00061400 sll r2,r6,0x10
00092974: 3409001f ori r9,r0,0x001f
00092978: 00021403 sra r2,r2,0x10
0009297c: 28420020 slti r2,r2,0x0020
00092980: 14400002 bne r2,r0,0x0009298c
00092984: 000a1400 sll r2,r10,0x10
00092988: 3406001f ori r6,r0,0x001f
0009298c: 1c400002 bgtz r2,0x00092998
00092990: 00091400 sll r2,r9,0x10
00092994: 00005021 addu r10,r0,r0 
00092998: 1c400002 bgtz r2,0x000929a4 
0009299c: 00061400 sll r2,r6,0x10
000929a0: 00004821 addu r9,r0,r0
000929a4: 1c400002 bgtz r2,0x000929b0
000929a8: 01491025 or r2,r10,r9
000929ac: 00003021 addu r6,r0,r0
000929b0: 00c21025 or r2,r6,r2
000929b4: 00021400 sll r2,r2,0x10
000929b8: 14400004 bne r2,r0,0x000929cc
000929bc: 31027fff andi r2,r8,0x7fff
000929c0: 10400002 beq r2,r0,0x000929cc
000929c4: 00000000 nop
000929c8: 34060001 ori r6,r0,0x0001
000929cc: 1220001c beq r17,r0,0x00092a40
000929d0: 00091140 sll r2,r9,0x05
000929d4: 01421021 addu r2,r10,r2 
000929d8: 00061a80 sll r3,r6,0x0a
000929dc: 00431021 addu r2,r2,r3
000929e0: 000b1bc0 sll r3,r11,0x0f
000929e4: 00431021 addu r2,r2,r3
000929e8: a4e20000 sh r2,0x0000(r7)
000929ec: 05810002 bgez r12,0x000929f8
000929f0: 01801021 addu r2,r12,r0
000929f4: 2582000f addiu r2,r12,0x000f
000929f8: 00021103 sra r2,r2,0x04
000929fc: 000210c0 sll r2,r2,0x03
00092a00: 00501021 addu r2,r2,r16
00092a04: 3c01800a lui r1,0x800a
00092a08: 00220821 addu r1,r1,r2
00092a0c: 902295f6 lbu r2,-0x6a0a(r1)
00092a10: 00000000 nop
00092a14: 1440000a bne r2,r0,0x00092a40
00092a18: 000c10c0 sll r2,r12,0x03
00092a1c: 3c03800a lui r3,0x800a
00092a20: 24639676 addiu r3,r3,0x9676
00092a24: 02031821 addu r3,r16,r3
00092a28: 004c1023 subu r2,r2,r12
00092a2c: 00621821 addu r3,r3,r2
00092a30: a06a0000 sb r10,0x0000(r3)
00092a34: a0690001 sb r9,0x0001(r3)
00092a38: a0660002 sb r6,0x0002(r3)
00092a3c: a06b0003 sb r11,0x0003(r3)
00092a40: 3c04800a lui r4,0x800a
00092a44: 24849d76 addiu r4,r4,0x9d76
00092a48: 02042021 addu r4,r16,r4
00092a4c: 03242021 addu r4,r25,r4
00092a50: 00091140 sll r2,r9,0x05
00092a54: 01421021 addu r2,r10,r2
00092a58: 00061a80 sll r3,r6,0x0a
00092a5c: 00431021 addu r2,r2,r3
00092a60: 000b1bc0 sll r3,r11,0x0f
00092a64: 00431021 addu r2,r2,r3
00092a68: a4820000 sh r2,0x0000(r4)
00092a6c: 27390002 addiu r25,r25,0x0002
00092a70: 24e70002 addiu r7,r7,0x0002
00092a74: 258c0001 addiu r12,r12,0x0001
00092a78: 29820100 slti r2,r12,0x0100 
00092a7c: 1440ff68 bne r2,r0,0x00092820
00092a80: 24a50002 addiu r5,r5,0x0002
00092a84: 08024b4b j 0x00092d2c
00092a88: 34020001 ori r2,r0,0x0001

  • ? != 1*
00092a8c: 00006021 addu r12,r0,r0		Counter = 0
00092a90: 3c03800e lui r3,0x800e
00092a94: 24634ea4 addiu r3,r3,0x4ea4
00092a98: 00061240 sll r2,r6,0x09		Section ID * 0x200
00092a9c: 00439021 addu r18,r2,r3		r18 = Modified Palette Pointer
00092aa0: 000718c0 sll r3,r7,0x03		Unit Misc ID * 8
00092aa4: 00061080 sll r2,r6,0x02		Section ID * 4
00092aa8: 00461021 addu r2,r2,r6		ID * 5
00092aac: 00021080 sll r2,r2,0x02		ID * 20
00092ab0: 00461023 subu r2,r2,r6		ID * 19
00092ab4: 00021180 sll r2,r2,0x06		ID * 1216
00092ab8: 00461021 addu r2,r2,r6		ID * 1217
00092abc: 00028040 sll r16,r2,0x01		ID * 2434
00092ac0: 0070c821 addu r25,r3,r16		r25 = Raw Palette Pointer
<loop>
00092ac4: 84a20000 lh r2,0x0000(r5)		Load colour from other.bin
00092ac8: 94a80000 lhu r8,0x0000(r5)		Ditto
00092acc: 10400042 beq r2,r0,0x00092bd8	skip if colour = 0
00092ad0: 34020005 ori r2,r0,0x0005
00092ad4: 1302000a beq r24,r2,0x00092b00	
00092ad8: 2b020006 slti r2,r24,0x0006
00092adc: 14400036 bne r2,r0,0x00092bb8
00092ae0: 3102001f andi r2,r8,0x001f
00092ae4: 34020006 ori r2,r0,0x0006
00092ae8: 1302000f beq r24,r2,0x00092b28
00092aec: 34020007 ori r2,r0,0x0007
00092af0: 1302001d beq r24,r2,0x00092b68
00092af4: 3103001f andi r3,r8,0x001f
00092af8: 08024aee j 0x00092bb8		r2 = red from other.bin palette
00092afc: 3102001f andi r2,r8,0x001f
00092b00: 3102001f andi r2,r8,0x001f
00092b04: 00021043 sra r2,r2,0x01
00092b08: 01e25021 addu r10,r15,r2
00092b0c: 310203e0 andi r2,r8,0x03e0
00092b10: 00021182 srl r2,r2,0x06
00092b14: 01c24821 addu r9,r14,r2
00092b18: 31027c00 andi r2,r8,0x7c00
00092b1c: 000212c2 srl r2,r2,0x0b
00092b20: 08024afb j 0x00092bec
00092b24: 01a23021 addu r6,r13,r2
00092b28: 3103001f andi r3,r8,0x001f
00092b2c: 310203e0 andi r2,r8,0x03e0
00092b30: 00023142 srl r6,r2,0x05
00092b34: 31027c00 andi r2,r8,0x7c00 
00092b38: 00024a82 srl r9,r2,0x0a
00092b3c: 3c042aaa lui r4,0x2aaa
00092b40: 3484aaab ori r4,r4,0xaaab
00092b44: 00031840 sll r3,r3,0x01
00092b48: 00061040 sll r2,r6,0x01
00092b4c: 00461021 addu r2,r2,r6
00092b50: 00621821 addu r3,r3,r2
00092b54: 00691821 addu r3,r3,r9
00092b58: 00640018 mult r3,r4
00092b5c: 00001010 mfhi r2
00092b60: 08024ae9 j 0x00092ba4
00092b64: 00031fc3 sra r3,r3,0x1f
00092b68: 310203e0 andi r2,r8,0x03e0
00092b6c: 00023142 srl r6,r2,0x05
00092b70: 31027c00 andi r2,r8,0x7c00
00092b74: 00024a82 srl r9,r2,0x0a
00092b78: 3c042aaa lui r4,0x2aaa
00092b7c: 3484aaab ori r4,r4,0xaaab
00092b80: 00031840 sll r3,r3,0x01
00092b84: 00061040 sll r2,r6,0x01
00092b88: 00461021 addu r2,r2,r6
00092b8c: 00621821 addu r3,r3,r2
00092b90: 00691821 addu r3,r3,r9
00092b94: 00640018 mult r3,r4
00092b98: 00031fc3 sra r3,r3,0x1f
00092b9c: 00001010 mfhi r2
00092ba0: 00021043 sra r2,r2,0x01
00092ba4: 00431023 subu r2,r2,r3
00092ba8: 01e25021 addu r10,r15,r2
00092bac: 01c24821 addu r9,r14,r2
00092bb0: 08024afb j 0x00092bec
00092bb4: 01a23021 addu r6,r13,r2

testing went here for sprite turning to crystal (colour from other.bin)

00092bb8: 01e25021 addu r10,r15,r2		red
00092bbc: 310203e0 andi r2,r8,0x03e0		
00092bc0: 00021142 srl r2,r2,0x05
00092bc4: 01c24821 addu r9,r14,r2		green
00092bc8: 31027c00 andi r2,r8,0x7c00
00092bcc: 00021282 srl r2,r2,0x0a
00092bd0: 08024afb j 0x00092bec		store
00092bd4: 01a23021 addu r6,r13,r2		blue
00092bd8: 310a001f andi r10,r8,0x001f
00092bdc: 310203e0 andi r2,r8,0x03e0
00092be0: 00024942 srl r9,r2,0x05
00092be4: 31027c00 andi r2,r8,0x7c00
00092be8: 00023282 srl r6,r2,0x0a
00092bec: 000a1400 sll r2,r10,0x10
00092bf0: 00021403 sra r2,r2,0x10
00092bf4: 28420020 slti r2,r2,0x0020
00092bf8: 14400002 bne r2,r0,0x00092c04
00092bfc: 00085bc2 srl r11,r8,0x0f
00092c00: 340a001f ori r10,r0,0x001f
00092c04: 00091400 sll r2,r9,0x10
00092c08: 00021403 sra r2,r2,0x10
00092c0c: 28420020 slti r2,r2,0x0020
00092c10: 14400002 bne r2,r0,0x00092c1c
00092c14: 00061400 sll r2,r6,0x10
00092c18: 3409001f ori r9,r0,0x001f
00092c1c: 00021403 sra r2,r2,0x10
00092c20: 28420020 slti r2,r2,0x0020
00092c24: 14400002 bne r2,r0,0x00092c30
00092c28: 000a1400 sll r2,r10,0x10
00092c2c: 3406001f ori r6,r0,0x001f
00092c30: 1c400002 bgtz r2,0x00092c3c
00092c34: 00091400 sll r2,r9,0x10
00092c38: 00005021 addu r10,r0,r0
00092c3c: 1c400002 bgtz r2,0x00092c48
00092c40: 00061400 sll r2,r6,0x10
00092c44: 00004821 addu r9,r0,r0
00092c48: 1c400002 bgtz r2,0x00092c54
00092c4c: 01491025 or r2,r10,r9
00092c50: 00003021 addu r6,r0,r0
00092c54: 00c21025 or r2,r6,r2
00092c58: 00021400 sll r2,r2,0x10
00092c5c: 14400004 bne r2,r0,0x00092c70
00092c60: 31027fff andi r2,r8,0x7fff
00092c64: 10400002 beq r2,r0,0x00092c70
00092c68: 00000000 nop
00092c6c: 34060001 ori r6,r0,0x0001
00092c70: 1220001c beq r17,r0,0x00092ce4
00092c74: 24a50002 addiu r5,r5,0x0002
00092c78: 00071100 sll r2,r7,0x04
00092c7c: 004c4021 addu r8,r2,r12
00092c80: 00082040 sll r4,r8,0x01
00092c84: 00922021 addu r4,r4,r18
00092c88: 00091140 sll r2,r9,0x05
00092c8c: 01421021 addu r2,r10,r2
00092c90: 00061a80 sll r3,r6,0x0a
00092c94: 00431021 addu r2,r2,r3
00092c98: 000b1bc0 sll r3,r11,0x0f
00092c9c: 00431021 addu r2,r2,r3
00092ca0: a4820000 sh r2,0x0000(r4)
00092ca4: 3c01800a lui r1,0x800a
00092ca8: 00390821 addu r1,r1,r25
00092cac: 902295f6 lbu r2,-0x6a0a(r1)
00092cb0: 00000000 nop
00092cb4: 1440000c bne r2,r0,0x00092ce8
00092cb8: 00072100 sll r4,r7,0x04
00092cbc: 3c03800a lui r3,0x800a
00092cc0: 24639676 addiu r3,r3,0x9676
00092cc4: 02031821 addu r3,r16,r3
00092cc8: 000810c0 sll r2,r8,0x03
00092ccc: 00481023 subu r2,r2,r8
00092cd0: 00621821 addu r3,r3,r2
00092cd4: a06a0000 sb r10,0x0000(r3)		Store Red
00092cd8: a0690001 sb r9,0x0001(r3)		
00092cdc: a0660002 sb r6,0x0002(r3)
00092ce0: a06b0003 sb r11,0x0003(r3)
00092ce4: 00072100 sll r4,r7,0x04			#some kind of displacement?
00092ce8: 008c2021 addu r4,r4,r12			#palette colour index + 
00092cec: 3c02800a lui r2,0x800a
00092cf0: 24429d76 addiu r2,r2,0x9d76
00092cf4: 00042040 sll r4,r4,0x01 
00092cf8: 02021021 addu r2,r16,r2			0x800a9d76 + section table entry
00092cfc: 00822021 addu r4,r4,r2			#VRAM palette
00092d00: 00091140 sll r2,r9,0x05			#green << 0x05?
00092d04: 01421021 addu r2,r10,r2			#red
00092d08: 00061a80 sll r3,r6,0x0a			#blue << 0x0a?
00092d0c: 00431021 addu r2,r2,r3			#RGB
00092d10: 000b1bc0 sll r3,r11,0x0f			#alpha
00092d14: 00431021 addu r2,r2,r3			#final colour with alpha
00092d18: a4820000 sh r2,0x0000(r4)			#store colour to VRAM palette
00092d1c: 258c0001 addiu r12,r12,0x0001		#current palette colour index
00092d20: 29820010 slti r2,r12,0x0010			#do 0x10 times
00092d24: 1440ff67 bne r2,r0,0x00092ac4
00092d28: 34020001 ori r2,r0,0x0001
</loop>
00092d2c: 3c01800a lui r1,0x800a
00092d30: ac2295ec sw r2,-0x6a14(r1)
00092d34: 8fb20018 lw r18,0x0018(r29)
00092d38: 8fb10014 lw r17,0x0014(r29)
00092d3c: 8fb00010 lw r16,0x0010(r29)
00092d40: 27bd0020 addiu r29,r29,0x0020
00092d44: 03e00008 jr r31
00092d48: 00000000 nop