Difference between revisions of "Trap & Unit graphic information loading"

From Final Fantasy Hacktics Wiki
Jump to navigation Jump to search
(still incomplete notation)
m
Line 22: Line 22:
 
  80084268: 0c020fc6 jal 0x80083f18 --> [[Update Sprite display data]]
 
  80084268: 0c020fc6 jal 0x80083f18 --> [[Update Sprite display data]]
 
  8008426c: afa20014 sw r2,0x0014(r29) save stack pointer to stack
 
  8008426c: afa20014 sw r2,0x0014(r29) save stack pointer to stack
  80084270: 8fa3002c lw r3,0x002c(r29) load
+
  80084270: 8fa3002c lw r3,0x002c(r29) load pointer (saved in previous routine)
  80084274: 2402ffff addiu r2,r0,-0x0001
+
  80084274: 2402ffff addiu r2,r0,-0x0001 r2 = 0xffffffff
  80084278: 14620003 bne r3,r2,0x80084288 #branch if (in progress)
+
  80084278: 14620003 bne r3,r2,0x80084288 #branch if pointer is not completely invalid
 
  8008427c: 00000000 nop |
 
  8008427c: 00000000 nop |
 
  80084280: 0c011282 jal 0x80044a08 |--> [[00044a08 - 00044a30]] Clears information if above results in some kind of error
 
  80084280: 0c011282 jal 0x80044a08 |--> [[00044a08 - 00044a30]] Clears information if above results in some kind of error
 
  80084284: 34040008 ori r4,r0,0x0008 |r4 = 0x08
 
  80084284: 34040008 ori r4,r0,0x0008 |r4 = 0x08
  80084288: 8fa2002c lw r2,0x002c(r29) #
+
  80084288: 8fa2002c lw r2,0x002c(r29) #load pointer again
 
  8008428c: 00000000 nop
 
  8008428c: 00000000 nop
 
  80084290: 90430000 lbu r3,0x0000(r2)
 
  80084290: 90430000 lbu r3,0x0000(r2)

Revision as of 12:02, 28 July 2021

80084214: 27bdffa8 addiu r29,r29,-0x0058
80084218: afb20038 sw r18,0x0038(r29)
8008421c: 00809021 addu r18,r4,r0			r18 = unit misc data pointer
80084220: afb00030 sw r16,0x0030(r29)
80084224: 00a08021 addu r16,r5,r0			r16 = unit sprite data
80084228: afb10034 sw r17,0x0034(r29)
8008422c: 30d1ffff andi r17,r6,0xffff			r17 = command byte + sprite speed(?)
80084230: 02203021 addu r6,r17,r0			r6 = "
80084234: afb3003c sw r19,0x003c(r29)
80084238: 30f3ffff andi r19,r7,0xffff			r19 = animation
8008423c: 02603821 addu r7,r19,r0			r7 = "
80084240: afbf0054 sw r31,0x0054(r29)
80084244: afbe0050 sw r30,0x0050(r29)
80084248: afb7004c sw r23,0x004c(r29)
8008424c: afb60048 sw r22,0x0048(r29)
80084250: afb50044 sw r21,0x0044(r29)
80084254: afb40040 sw r20,0x0040(r29)
80084258: 965e007a lhu r30,0x007a(r18)			loads ?
8008425c: 27a20028 addiu r2,r29,0x0028			r2 = stack pointer + 0x28 (for some reason)
80084260: afa20010 sw r2,0x0010(r29)			save stack pointer to stack
80084264: 27a2002c addiu r2,r29,0x002c			stack pointer + 0x2c
80084268: 0c020fc6 jal 0x80083f18			--> Update Sprite display data
8008426c: afa20014 sw r2,0x0014(r29)			save stack pointer to stack
80084270: 8fa3002c lw r3,0x002c(r29)			load pointer (saved in previous routine)
80084274: 2402ffff addiu r2,r0,-0x0001			r2 = 0xffffffff
80084278: 14620003 bne r3,r2,0x80084288		#branch if pointer is not completely invalid
8008427c: 00000000 nop						|
80084280: 0c011282 jal 0x80044a08				|--> 00044a08 - 00044a30 Clears information if above results in some kind of error
80084284: 34040008 ori r4,r0,0x0008				|r4 = 0x08
80084288: 8fa2002c lw r2,0x002c(r29)			#load pointer again
8008428c: 00000000 nop
80084290: 90430000 lbu r3,0x0000(r2)
80084294: 8e15002c lw r21,0x002c(r16)
80084298: 30630007 andi r3,r3,0x0007
8008429c: 24630001 addiu r3,r3,0x0001
800842a0: a2a30003 sb r3,0x0003(r21)
800842a4: 8fa2002c lw r2,0x002c(r29)
800842a8: 00000000 nop
800842ac: 90420000 lbu r2,0x0000(r2)
800842b0: 00000000 nop
800842b4: 000210c2 srl r2,r2,0x03
800842b8: 00021040 sll r2,r2,0x01
800842bc: 3c018009 lui r1,0x8009
800842c0: 00220821 addu r1,r1,r2
800842c4: 94224508 lhu r2,0x4508(r1)
800842c8: 307600ff andi r22,r3,0x00ff
800842cc: a6a2000c sh r2,0x000c(r21)
800842d0: 2ec20009 sltiu r2,r22,0x0009
800842d4: 14400004 bne r2,r0,0x800842e8
800842d8: 00000000 nop
800842dc: 34160008 ori r22,r0,0x0008
800842e0: 0c011282 jal 0x80044a08
800842e4: 3404000a ori r4,r0,0x000a
800842e8: 92420006 lbu r2,0x0006(r18)
800842ec: 8fa6002c lw r6,0x002c(r29)
800842f0: 2c42009b sltiu r2,r2,0x009b
800842f4: 90d40001 lbu r20,0x0001(r6)
800842f8: 14400035 bne r2,r0,0x800843d0
800842fc: 32820060 andi r2,r20,0x0060
80084300: 3442000b ori r2,r2,0x000b
80084304: a6a20004 sh r2,0x0004(r21)
80084308: 96420010 lhu r2,0x0010(r18)
8008430c: 00008821 addu r17,r0,r0
80084310: 12c000da beq r22,r0,0x8008467c
80084314: a6a20006 sh r2,0x0006(r21)
80084318: 02a02021 addu r4,r21,r0
8008431c: 3225ffff andi r5,r17,0xffff
80084320: 26310001 addiu r17,r17,0x0001
80084324: 00051080 sll r2,r5,0x02
80084328: 8fa3002c lw r3,0x002c(r29)
8008432c: 24420002 addiu r2,r2,0x0002
80084330: 00439821 addu r19,r2,r3
80084334: 96700002 lhu r16,0x0002(r19)
80084338: 82660000 lb r6,0x0000(r19)
8008433c: 82670001 lb r7,0x0001(r19)
80084340: 32033c00 andi r3,r16,0x3c00
80084344: 000319c2 srl r3,r3,0x07
80084348: 320203ff andi r2,r16,0x03ff
8008434c: 3048001f andi r8,r2,0x001f
80084350: 000840c0 sll r8,r8,0x03
80084354: 00021142 srl r2,r2,0x05
80084358: 000210c0 sll r2,r2,0x03
8008435c: 03c21021 addu r2,r30,r2
80084360: 00021400 sll r2,r2,0x10
80084364: 00021403 sra r2,r2,0x10
80084368: 3c018009 lui r1,0x8009
8008436c: 00230821 addu r1,r1,r3
80084370: 8c2946c8 lw r9,0x46c8(r1)
80084374: 3c018009 lui r1,0x8009
80084378: 00230821 addu r1,r1,r3
8008437c: 8c2a46cc lw r10,0x46cc(r1)
80084380: 32830061 andi r3,r20,0x0061
80084384: afa20014 sw r2,0x0014(r29)
80084388: 3202c000 andi r2,r16,0xc000
8008438c: 00021342 srl r2,r2,0x0d
80084390: 00621825 or r3,r3,r2
80084394: afa80010 sw r8,0x0010(r29)
80084398: afa30020 sw r3,0x0020(r29)
8008439c: 00094cc0 sll r9,r9,0x13
800843a0: 00094c03 sra r9,r9,0x10
800843a4: 000a54c0 sll r10,r10,0x13
800843a8: 000a5403 sra r10,r10,0x10
800843ac: afa90018 sw r9,0x0018(r29)
800843b0: 0c01ed3b jal 0x8007b4ec
800843b4: afaa001c sw r10,0x001c(r29)
800843b8: 3222ffff andi r2,r17,0xffff
800843bc: 0056102b sltu r2,r2,r22
800843c0: 1440ffd6 bne r2,r0,0x8008431c
800843c4: 02a02021 addu r4,r21,r0
800843c8: 0802119f j 0x8008467c
800843cc: 00000000 nop
800843d0: 8e02001c lw r2,0x001c(r16)
800843d4: 00000000 nop
800843d8: 8c420000 lw r2,0x0000(r2)
800843dc: 00000000 nop
800843e0: 0222102b sltu r2,r17,r2
800843e4: 10400088 beq r2,r0,0x80084608
800843e8: 32830060 andi r3,r20,0x0060
800843ec: 9642000e lhu r2,0x000e(r18)
800843f0: 00000000 nop
800843f4: 00431025 or r2,r2,r3
800843f8: a6a20004 sh r2,0x0004(r21)
800843fc: 96420010 lhu r2,0x0010(r18)
80084400: 00008821 addu r17,r0,r0
80084404: 12c0009d beq r22,r0,0x8008467c
80084408: a6a20006 sh r2,0x0006(r21)
8008440c: 32820061 andi r2,r20,0x0061
80084410: 305700ff andi r23,r2,0x00ff
80084414: 3234ffff andi r20,r17,0xffff
80084418: 00141080 sll r2,r20,0x02
8008441c: 8fa3002c lw r3,0x002c(r29)
80084420: 24420002 addiu r2,r2,0x0002
80084424: 00439821 addu r19,r2,r3
80084428: 96700002 lhu r16,0x0002(r19)
8008442c: 00000000 nop
80084430: 32023c00 andi r2,r16,0x3c00
80084434: 00023282 srl r6,r2,0x0a
80084438: 3402000e ori r2,r0,0x000e
8008443c: 14c2004c bne r6,r2,0x80084570
80084440: 02a02021 addu r4,r21,r0
80084444: 92430006 lbu r3,0x0006(r18)
80084448: 34020049 ori r2,r0,0x0049
8008444c: 10620003 beq r3,r2,0x8008445c
80084450: 34020041 ori r2,r0,0x0041
80084454: 1462001d bne r3,r2,0x800844cc
80084458: 02802821 addu r5,r20,r0
8008445c: 02802821 addu r5,r20,r0
80084460: 320203ff andi r2,r16,0x03ff
80084464: 3043001f andi r3,r2,0x001f
80084468: 00021142 srl r2,r2,0x05
8008446c: 000210c0 sll r2,r2,0x03
80084470: 03c21021 addu r2,r30,r2
80084474: 00021400 sll r2,r2,0x10
80084478: 82660000 lb r6,0x0000(r19)
8008447c: 82670001 lb r7,0x0001(r19)
80084480: 00021403 sra r2,r2,0x10
80084484: afa20014 sw r2,0x0014(r29)
80084488: 3202c000 andi r2,r16,0xc000
8008448c: 00021342 srl r2,r2,0x0d
80084490: 02e21025 or r2,r23,r2
80084494: afa20020 sw r2,0x0020(r29)
80084498: 3c028009 lui r2,0x8009
8008449c: 8c424738 lw r2,0x4738(r2)
800844a0: 000318c0 sll r3,r3,0x03
800844a4: afa30010 sw r3,0x0010(r29)
800844a8: 3c038009 lui r3,0x8009
800844ac: 8c63473c lw r3,0x473c(r3)
800844b0: 000214c0 sll r2,r2,0x13
800844b4: 00021403 sra r2,r2,0x10
800844b8: 00031cc0 sll r3,r3,0x13
800844bc: 00031c03 sra r3,r3,0x10
800844c0: afa20018 sw r2,0x0018(r29)
800844c4: 0802117a j 0x800845e8
800844c8: afa3001c sw r3,0x001c(r29)
800844cc: 321103ff andi r17,r16,0x03ff
800844d0: 3232001f andi r18,r17,0x001f
800844d4: 001290c0 sll r18,r18,0x03
800844d8: 00118942 srl r17,r17,0x05
800844dc: 001110c0 sll r2,r17,0x03
800844e0: 24420018 addiu r2,r2,0x0018
800844e4: 82660000 lb r6,0x0000(r19)
800844e8: 92670001 lbu r7,0x0001(r19)
800844ec: 340b0030 ori r11,r0,0x0030
800844f0: afab0018 sw r11,0x0018(r29)
800844f4: 340b0018 ori r11,r0,0x0018
800844f8: 3210c000 andi r16,r16,0xc000
800844fc: 00108342 srl r16,r16,0x0d
80084500: 02f08025 or r16,r23,r16
80084504: afb20010 sw r18,0x0010(r29)
80084508: afa20014 sw r2,0x0014(r29)
8008450c: afab001c sw r11,0x001c(r29)
80084510: afb00020 sw r16,0x0020(r29)
80084514: 00073e00 sll r7,r7,0x18
80084518: 00073e03 sra r7,r7,0x18
8008451c: 0c01ed3b jal 0x8007b4ec
80084520: 24e70018 addiu r7,r7,0x0018
80084524: 02a02021 addu r4,r21,r0
80084528: 26850001 addiu r5,r20,0x0001
8008452c: 001188c0 sll r17,r17,0x03
80084530: 82660000 lb r6,0x0000(r19)
80084534: 82670001 lb r7,0x0001(r19)
80084538: 340b0030 ori r11,r0,0x0030
8008453c: afab0018 sw r11,0x0018(r29)
80084540: 340b0018 ori r11,r0,0x0018
80084544: 36100080 ori r16,r16,0x0080
80084548: afb20010 sw r18,0x0010(r29)
8008454c: afb10014 sw r17,0x0014(r29)
80084550: afab001c sw r11,0x001c(r29)
80084554: 0c01ed3b jal 0x8007b4ec
80084558: afb00020 sw r16,0x0020(r29)
8008455c: 92a20003 lbu r2,0x0003(r21)
80084560: 00000000 nop
80084564: 24420001 addiu r2,r2,0x0001
80084568: 0802119f j 0x8008467c
8008456c: a2a20003 sb r2,0x0003(r21)
80084570: 02802821 addu r5,r20,r0
80084574: 000630c0 sll r6,r6,0x03
80084578: 320203ff andi r2,r16,0x03ff
8008457c: 3043001f andi r3,r2,0x001f
80084580: 000318c0 sll r3,r3,0x03
80084584: 00021142 srl r2,r2,0x05
80084588: 000210c0 sll r2,r2,0x03
8008458c: 03c21021 addu r2,r30,r2
80084590: 00021400 sll r2,r2,0x10
80084594: 3c018009 lui r1,0x8009
80084598: 00260821 addu r1,r1,r6
8008459c: 8c2846c8 lw r8,0x46c8(r1)
800845a0: 3c018009 lui r1,0x8009
800845a4: 00260821 addu r1,r1,r6
800845a8: 8c2946cc lw r9,0x46cc(r1)
800845ac: 82660000 lb r6,0x0000(r19)
800845b0: 82670001 lb r7,0x0001(r19)
800845b4: 00021403 sra r2,r2,0x10
800845b8: afa20014 sw r2,0x0014(r29)
800845bc: 3202c000 andi r2,r16,0xc000
800845c0: 00021342 srl r2,r2,0x0d
800845c4: 02e21025 or r2,r23,r2
800845c8: afa30010 sw r3,0x0010(r29)
800845cc: afa20020 sw r2,0x0020(r29)
800845d0: 000844c0 sll r8,r8,0x13
800845d4: 00084403 sra r8,r8,0x10
800845d8: 00094cc0 sll r9,r9,0x13
800845dc: 00094c03 sra r9,r9,0x10
800845e0: afa80018 sw r8,0x0018(r29)
800845e4: afa9001c sw r9,0x001c(r29)
800845e8: 0c01ed3b jal 0x8007b4ec
800845ec: 26310001 addiu r17,r17,0x0001
800845f0: 3222ffff andi r2,r17,0xffff
800845f4: 0056102b sltu r2,r2,r22
800845f8: 1440ff87 bne r2,r0,0x80084418
800845fc: 3234ffff andi r20,r17,0xffff
80084600: 0802119f j 0x8008467c
80084604: 00000000 nop
80084608: 2e2200d2 sltiu r2,r17,0x00d2
8008460c: 10400012 beq r2,r0,0x80084658
80084610: 2e620258 sltiu r2,r19,0x0258
80084614: 3c02800a lui r2,0x800a
80084618: 8c4277c4 lw r2,0x77c4(r2)
8008461c: 92430004 lbu r3,0x0004(r18)
80084620: 3042001f andi r2,r2,0x001f
80084624: 14430004 bne r2,r3,0x80084638
80084628: 02402021 addu r4,r18,r0
8008462c: 02a02821 addu r5,r21,r0
80084630: 0802119d j 0x80084674
80084634: 34070004 ori r7,r0,0x0004
80084638: 3c02800b lui r2,0x800b
8008463c: 8c42ed28 lw r2,-0x12d8(r2)
80084640: 00000000 nop
80084644: 3042001f andi r2,r2,0x001f
80084648: 10430008 beq r2,r3,0x8008466c
8008464c: 00000000 nop
80084650: 0802119f j 0x8008467c
80084654: 00000000 nop
80084658: 10400004 beq r2,r0,0x8008466c
8008465c: 02402021 addu r4,r18,r0
80084660: 02a02821 addu r5,r21,r0
80084664: 0802119d j 0x80084674
80084668: 34070004 ori r7,r0,0x0004
8008466c: 02a02821 addu r5,r21,r0
80084670: 34070005 ori r7,r0,0x0005
80084674: 0c020f84 jal 0x80083e10
80084678: 00000000 nop
8008467c: 8fbf0054 lw r31,0x0054(r29)
80084680: 8fbe0050 lw r30,0x0050(r29)
80084684: 8fb7004c lw r23,0x004c(r29)
80084688: 8fb60048 lw r22,0x0048(r29)
8008468c: 8fb50044 lw r21,0x0044(r29)
80084690: 8fb40040 lw r20,0x0040(r29)
80084694: 8fb3003c lw r19,0x003c(r29)
80084698: 8fb20038 lw r18,0x0038(r29)
8008469c: 8fb10034 lw r17,0x0034(r29)
800846a0: 8fb00030 lw r16,0x0030(r29)
800846a4: 27bd0058 addiu r29,r29,0x0058
800846a8: 03e00008 jr r31
800846ac: 00000000 nop