Decompress Attack spritesheet
Jump to navigation
Jump to search
0007aa34: 27bdffc8 addiu r29,r29,0xffc8 0007aa38: afb40028 sw r20,0x0028(r29) 0007aa3c: 00a0a021 addu r20,r5,r0 0007aa40: afb30024 sw r19,0x0024(r29) 0007aa44: 00009821 addu r19,r0,r0 0007aa48: afb1001c sw r17,0x001c(r29) 0007aa4c: 00008821 addu r17,r0,r0 0007aa50: afb5002c sw r21,0x002c(r29) 0007aa54: 34156400 ori r21,r0,0x6400 #size of graphical data in nibbles 0007aa58: afb20020 sw r18,0x0020(r29) 0007aa5c: 02809021 addu r18,r20,r0 0007aa60: afbf0030 sw r31,0x0030(r29) 0007aa64: afb00018 sw r16,0x0018(r29) 0007aa68: 3c018009 lui r1,0x8009 0007aa6c: ac2462d0 sw r4,0x62d0(r1) 0007aa70: 3c018009 lui r1,0x8009 0007aa74: ac2062cc sw r0,0x62cc(r1) 0007aa78: 3c018009 lui r1,0x8009 0007aa7c: ac2062c8 sw r0,0x62c8(r1) 0007aa80: 0c01ea6c jal 0x0007a9b0 #0007a9b0 - 0007aa30 0007aa84: 00000000 nop 0007aa88: 00408021 addu r16,r2,r0 0007aa8c: 1600003a bne r16,r0,0x0007ab78 #branch if not 0 (store as normal) 0007aa90: 00000000 nop 0007aa94: 0c01ea6c jal 0x0007a9b0 #grabs next nibble if 0 0007aa98: 00000000 nop 0007aa9c: 00408021 addu r16,r2,r0 0007aaa0: 34020007 ori r2,r0,0x0007 0007aaa4: 12020011 beq r16,r2,0x0007aaec #branch if nibble is 7? 0007aaa8: 00000000 nop 0007aaac: 2a020008 slti r2,r16,0x0008 0007aab0: 10400005 beq r2,r0,0x0007aac8 #branch if nibble is > 7? 0007aab4: 00000000 nop 0007aab8: 12000008 beq r16,r0,0x0007aadc #branch if 0? 0007aabc: 00000000 nop 0007aac0: 0801eaca j 0x0007ab28 #treat nibble as No. bytes to clear 0007aac4: 00000000 nop
pseudo-graphic data >= 8
0007aac8: 34020008 ori r2,r0,0x0008 0007aacc: 1202000d beq r16,r2,0x0007ab04 #branch if nibble is 8? 0007aad0: 00000000 nop 0007aad4: 0801eaca j 0x0007ab28 #treat nibble as No. bytes to clear 0007aad8: 00000000 nop
pseudo-graphic data = 0 (clear data 0xf coded)
0007aadc: 0c01ea6c jal 0x0007a9b0 #load next nibble 0007aae0: 00000000 nop 0007aae4: 0801eaca j 0x0007ab28 0007aae8: 00408021 addu r16,r2,r0 #move to r16 to determine length of data to null
pseudo-graphic data = 7 (clear data 0xff coded)
0007aaec: 0c01ea6c jal 0x0007a9b0 0007aaf0: 00000000 nop 0007aaf4: 0c01ea6c jal 0x0007a9b0 #grab next 2 nibbles of data 0007aaf8: 00408021 addu r16,r2,r0 0007aafc: 0801eac9 j 0x0007ab24 #bit combine to obtain length of data to null 0007ab00: 00021100 sll r2,r2,0x04
pseudo-graphic data = 8 (clear data 0x0fff coded)
0007ab04: 0c01ea6c jal 0x0007a9b0 0007ab08: 00000000 nop 0007ab0c: 0c01ea6c jal 0x0007a9b0 0007ab10: 00408021 addu r16,r2,r0 0007ab14: 00021100 sll r2,r2,0x04 0007ab18: 0c01ea6c jal 0x0007a9b0 #grab next 3 nibbles of data 0007ab1c: 02028025 or r16,r16,r2 0007ab20: 00021200 sll r2,r2,0x08 0007ab24: 02028025 or r16,r16,r2 #bit-combine to obtain length of data to null 0007ab28: 1a00ffd5 blez r16,0x0007aa80 #unnecessary error check 0007ab2c: 00002021 addu r4,r0,r0 0007ab30: 02341821 addu r3,r17,r20 #current address for graphical storage 0007ab34: 16600003 bne r19,r0,0x0007ab44 #branch if storing to lower nibble 0007ab38: 00000000 nop 0007ab3c: 0801ead8 j 0x0007ab60 0007ab40: a0600000 sb r0,0x0000(r3) #store 0 at address
pseudo-graphic data = 0, 7, 8 (low nibble)
0007ab44: 26520001 addiu r18,r18,0x0001 #current address + 1 0007ab48: 90620000 lbu r2,0x0000(r3) #load byte 0007ab4c: 26310001 addiu r17,r17,0x0001 #increment count 0007ab50: 304200f0 andi r2,r2,0x00f0 #AND out lower nibble 0007ab54: a0620000 sb r2,0x0000(r3) #restore 0007ab58: 12350013 beq r17,r21,0x0007aba8 #branch if end of allotted VRAM graphical data 0007ab5c: 24630001 addiu r3,r3,0x0001
Pseudo-graphic data = 0, 7, 8 (upper nibble)
0007ab60: 24840001 addiu r4,r4,0x0001 #increment count 0007ab64: 0090102a slt r2,r4,r16 #set if still less than r16 0007ab68: 1440fff2 bne r2,r0,0x0007ab34 # 0007ab6c: 3a730001 xori r19,r19,0x0001 #flip nibble 0007ab70: 0801eaa0 j 0x0007aa80 0007ab74: 00000000 nop
storing nibble of graphic data?
0007ab78: 16600003 bne r19,r0,0x0007ab88 #branch if storing to lower nibble 0007ab7c: 00101100 sll r2,r16,0x04 0007ab80: 0801eae8 j 0x0007aba0 0007ab84: a2420000 sb r2,0x0000(r18) #store data in upper nibble 0007ab88: 92420000 lbu r2,0x0000(r18) #load rest of byte (if storing to lower nibble) 0007ab8c: 26310001 addiu r17,r17,0x0001 0007ab90: 00501025 or r2,r2,r16 #bit-combine and store upper and lower nibble 0007ab94: a2420000 sb r2,0x0000(r18) 0007ab98: 12350003 beq r17,r21,0x0007aba8 0007ab9c: 26520001 addiu r18,r18,0x0001 0007aba0: 0801eaa0 j 0x0007aa80 0007aba4: 3a730001 xori r19,r19,0x0001 0007aba8: 8fbf0030 lw r31,0x0030(r29) 0007abac: 8fb5002c lw r21,0x002c(r29) 0007abb0: 8fb40028 lw r20,0x0028(r29) 0007abb4: 8fb30024 lw r19,0x0024(r29) 0007abb8: 8fb20020 lw r18,0x0020(r29) 0007abbc: 8fb1001c lw r17,0x001c(r29) 0007abc0: 8fb00018 lw r16,0x0018(r29) 0007abc4: 27bd0038 addiu r29,r29,0x0038 0007abc8: 03e00008 jr r31 0007abcc: 00000000 nop