Difference between revisions of "Load Nibble of Compressed Graphic Data"

From Final Fantasy Hacktics Wiki
Jump to navigation Jump to search
m
 
(No difference)

Latest revision as of 13:05, 26 November 2022

0007a9b0: 3c028009 lui r2,0x8009
0007a9b4: 8c4262c8 lw r2,0x62c8(r2)			#load upper/lower nibble from graphics data
0007a9b8: 00000000 nop
0007a9bc: 1440000a bne r2,r0,0x0007a9e8		#branch if loading lower nibble from graphics data
0007a9c0: 00000000 nop
0007a9c4: 3c028009 lui r2,0x8009
0007a9c8: 8c4262d0 lw r2,0x62d0(r2)
0007a9cc: 3c038009 lui r3,0x8009
0007a9d0: 8c6362cc lw r3,0x62cc(r3)			#obtain pointer to current graphics data to decompress
0007a9d4: 00000000 nop
0007a9d8: 00431021 addu r2,r2,r3
0007a9dc: 90420000 lbu r2,0x0000(r2)
0007a9e0: 0801ea85 j 0x0007aa14
0007a9e4: 00021902 srl r3,r2,0x04			#return upper nibble of graphics byte
0007a9e8: 3c028009 lui r2,0x8009
0007a9ec: 8c4262d0 lw r2,0x62d0(r2)			#pointer to global graphics data?
0007a9f0: 3c038009 lui r3,0x8009
0007a9f4: 8c6362cc lw r3,0x62cc(r3)			#current position in graphics data
0007a9f8: 00000000 nop
0007a9fc: 00431021 addu r2,r2,r3
0007aa00: 90420000 lbu r2,0x0000(r2)			#load byte at location
0007aa04: 24630001 addiu r3,r3,0x0001			#increment pointer addition?
0007aa08: 3c018009 lui r1,0x8009
0007aa0c: ac2362cc sw r3,0x62cc(r1)			#store incremented current pos.
0007aa10: 3043000f andi r3,r2,0x000f			#obtain nibble
0007aa14: 3c028009 lui r2,0x8009
0007aa18: 8c4262c8 lw r2,0x62c8(r2)			#
0007aa1c: 00000000 nop
0007aa20: 38420001 xori r2,r2,0x0001			#flip nibble bit
0007aa24: 3c018009 lui r1,0x8009
0007aa28: ac2262c8 sw r2,0x62c8(r1)			#store again
0007aa2c: 03e00008 jr r31
0007aa30: 00601021 addu r2,r3,r0			#return graphics data to interpret