CT increment routine?

From Final Fantasy Hacktics Wiki
Revision as of 23:05, 17 February 2012 by Choto (talk | contribs) (Created page with " jumped to from 18189c 0018370c: 3c028019 lui r2,0x8019 00183710: 8c42f51c lw r2,-0x0ae4(r2) 00183714: 27bdff58 addiu r29,r29,0xff58 00183718: afbe00a0 sw r30,0x00a0(r29) ...")
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to: navigation, search
jumped to from 18189c
0018370c: 3c028019 lui r2,0x8019
00183710: 8c42f51c lw r2,-0x0ae4(r2)
00183714: 27bdff58 addiu r29,r29,0xff58
00183718: afbe00a0 sw r30,0x00a0(r29)
0018371c: 0000f021 addu r30,r0,r0
00183720: afb60098 sw r22,0x0098(r29)
00183724: 0000b021 addu r22,r0,r0
00183728: afa40060 sw r4,0x0060(r29)
0018372c: 8fa30060 lw r3,0x0060(r29)
00183730: 340400ff ori r4,r0,0x00ff
00183734: afa50068 sw r5,0x0068(r29)
00183738: 3405ffff ori r5,r0,0xffff
0018373c: afbf00a4 sw r31,0x00a4(r29)
00183740: afb7009c sw r23,0x009c(r29)
00183744: afb50094 sw r21,0x0094(r29)
00183748: afb40090 sw r20,0x0090(r29)
0018374c: afb3008c sw r19,0x008c(r29)
00183750: afb20088 sw r18,0x0088(r29)
00183754: afb10084 sw r17,0x0084(r29)
00183758: afb00080 sw r16,0x0080(r29)
0018375c: 38420009 xori r2,r2,0x0009
00183760: 2c420001 sltiu r2,r2,0x0001
00183764: afa20070 sw r2,0x0070(r29)
00183768: a0640000 sb r4,0x0000(r3)
0018376c: a0640001 sb r4,0x0001(r3)
00183770: a4650002 sh r5,0x0002(r3)
00183774: 26d60001 addiu r22,r22,0x0001
00183778: 2ac20028 slti r2,r22,0x0028
0018377c: 1440fffa bne r2,r0,0x00183768		loop runs 28 times
00183780: 24630004 addiu r3,r3,0x0004
00183784: 8fa90068 lw r9,0x0068(r29)
00183788: 34020002 ori r2,r0,0x0002
0018378c: 1122000a beq r9,r2,0x001837b8
00183790: 0000b021 addu r22,r0,r 0
00183794: 0c060445 jal 0x00181114		check whose turn it is load unit  data pointer
00183798: 00000000 nop
0018379c: 00408821 addu r17,r2,r0
001837a0: 12200005 beq r17,r0,0x001837b8	check if unit exists
001837a4: 00002821 addu r5,r0,r0
001837a8: 9224018a lbu r4,0x018a(r17)		load unit ID
001837ac: 8fa70060 lw r7,0x0060(r29)
001837b0: 0c060eb3 jal 0x00183acc		manipulates Unit ID depending on last skillset/attack used
001837b4: 00003021 addu r6,r0,r0
001837b8: afa00078 sw r0,0x0078(r29)		
001837bc: 8fa90078 lw r9,0x0078(r29)		clear r9
001837c0: 3c028019 lui r2,0x8019
001837c4: 244208cc addiu r2,r2,0x08cc		r2 = unit data pointer
001837c8: 01228821 addu r17,r9,r2		
001837cc: 0c060d6a jal 0x001835a8
001837d0: 02202021 addu r4,r17,r0		r4 = 1908c c
001837d4: 144000a8 bne r2,r0,0x00183a78		unit targetability tests?, r2=0 if  targetable
001837d8: 00000000 nop
001837dc: 9222005b lbu r2,0x005b(r17)		load status 4
001837e0: 00000000 nop
001837e4: 30420002 andi r2,r2,0x0002		
001837e8: 10400002 beq r2,r0,0x001837f4		jump if unit is not stopped
001837ec: 0000a821 addu r21,r0,r0
001837f0: 92350063 lbu r21,0x0063(r17)		r21 = stop CT
001837f4: 9222005c lbu r2,0x005c(r17)		load status 5
001837f8: 00000000 nop
001837fc: 30420010 andi r2,r2,0x0010		
00183800: 10400007 beq r2,r0,0x00183820		jump if unit is not sleep
00183804: 00000000 nop
00183808: 92230068 lbu r3,0x0068(r17)		r3 = sleep CT
0018380c: 00000000 nop
00183810: 02a3102b sltu r2,r21,r3		r2 = 1 if stop CT < sleep CT
00183814: 10400002 beq r2,r0,0x00183820		
00183818: 00000000 nop
0018381c: 0060a821 addu r21,r3,r0		r21 = sleep CT
00183820: 9223015d lbu r3,0x015d(r17)		load current ability CT
00183824: 340200ff ori r2,r0,0x00ff		r2 = ff
00183828: 306400ff andi r4,r3,0x00ff		
0018382c: 1082002f beq r4,r2,0x001838ec		jump if current ability CT != ff? (no ability  charging when this routine ran, r4 = ff)
00183830: 34020001 ori r2,r0,0x0001		r2=01
00183834: 8fa90068 lw r9,0x0068(r29)
00183838: 00000000 nop
0018383c: 1122002c beq r9,r2,0x001838f0
00183840: 00000000 nop
00183844: 14800007 bne r4,r0,0x00183864
00183848: 02a39021 addu r18,r21,r3
0018384c: 92220186 lbu r2,0x0186(r17)		load characters turn byte into r2
00183850: 00000000 nop
00183854: 10400003 beq r2,r0,0x00183864		jump if not characters turn
00183858: 34020003 ori r2,r0,0x0003		r2 = 03
0018385c: 11220005 beq r9,r2,0x00183874		
00183860: 02c02021 addu r4,r22,r0
00183864: 8fa90070 lw r9,0x0070(r29)
00183868: 00000000 nop
0018386c: 02499021 addu r18,r18,r9
00183870: 02c02021 addu r4,r22,r0
00183874: 34050001 ori r5,r0,0x0001		r5= 1
00183878: 00123200 sll r6,r18,0x08
0018387c: 8fa70060 lw r7,0x0060(r29)
00183880: 0c060eb3 jal 0x00183acc		
00183884: 30c6ff00 andi r6,r6,0xff00
00183888: 92230058 lbu r3,0x0058(r17)		load status 1
0018388c: 00000000 nop
00183890: 30630001 andi r3,r3,0x0001
00183894: 10600015 beq r3,r0,0x001838ec		branch if unit not performing
00183898: 03c2f021 addu r30,r30,r2
0018389c: 0c0179de jal 0x0005e778		?
001838a0: 02202021 addu r4,r17,r0
001838a4: 0000a021 addu r20,r0,r 0
001838a8: 9222018b lbu r2,0x018b(r17)		Unit ID (without "Unit Exists"  check)
001838ac: 00000000 nop
001838b0: 00529021 addu r18,r2,r18
001838b4: 3246ffff andi r6,r18,0xffff
001838b8: 2cc20100 sltiu r2,r6,0x0100
001838bc: 1040000b beq r2,r0,0x001838ec
001838c0: 02c02021 addu r4,r22,r0
001838c4: 00063200 sll r6,r6,0x08
001838c8: 34050001 ori r5,r0,0x0001
001838cc: 8fa70060 lw r7,0x0060(r29)
001838d0: 0c060eb3 jal 0x00183acc
001838d4: 30c6ff00 andi r6,r6,0xff00
001838d8: 03c2f021 addu r30,r30,r2
001838dc: 26940001 addiu r20,r20,0x0001
001838e0: 2a820027 slti r2,r20,0x0027		27 time loop, same as another  routine?
001838e4: 1440fff0 bne r2,r0,0x001838a8
001838e8: 00000000 nop
001838ec: 8fa90068 lw r9,0x0068(r29)
001838f0: 34020002 ori r2,r0,0x0002
001838f4: 11220060 beq r9,r2,0x00183a78
001838f8: 00000000 nop
001838fc: 00009821 addu r19,r0,r0
00183900: 9223005b lbu r3,0x005b(r17)		
00183904: 92240051 lbu r4,0x0051(r17)
00183908: 30620004 andi r2,r3,0x0004
0018390c: 1040000a beq r2,r0,0x00183938		branch if unit not slow
00183910: 00008021 addu r16,r0,r0
00183914: 92330062 lbu r19,0x0062(r17)		r19 = slow CT
00183918: 30820004 andi r2,r4,0x0004
0018391c: 10400003 beq r2,r0,0x0018392c		branch if unit not innate: slow?
00183920: 02759823 subu r19,r19,r21		r19 = slow CT - sleep CT?
00183924: 34130200 ori r19,r0,0x0200		r19 = 200
00183928: 02759823 subu r19,r19,r21		
0018392c: 06610003 bgez r19,0x0018393c
00183930: 30620008 andi r2,r3,0x0008
00183934: 00009821 addu r19,r0,r0
00183938: 30620008 andi r2,r3,0x0008
0018393c: 10400009 beq r2,r0,0x00183964
00183940: 30820008 andi r2,r4,0x0008
00183944: 92300061 lbu r16,0x0061(r17)		load haste CT
00183948: 10400003 beq r2,r0,0x00183958
0018394c: 02158023 subu r16,r16,r21
00183950: 34100200 ori r16,r0,0x0200
00183954: 02158023 subu r16,r16,r21
00183958: 06010002 bgez r16,0x00183964
0018395c: 00000000 nop
00183960: 00008021 addu r16,r0,r0
00183964: 92370038 lbu r23,0x0038(r17)		load Speed	
00183968: 00000000 nop
0018396c: 16e00002 bne r23,r0,0x00183978
00183970: 02a09021 addu r18,r21,r0
00183974: 34170001 ori r23,r0,0x0001
00183978: 92310039 lbu r17,0x0039(r17)		load CT	
0018397c: 08060e7a j 0x001839e8
00183980: 0000a021 addu r20,r0,r0
00183984: 1260000a beq r19,r0,0x001839b0
00183988: 02e01821 addu r3,r23,r0
0018398c: 306200ff andi r2,r3,0x00ff
00183990: 00021842 srl r3,r2,0x01
00183994: 14600002 bne r3,r0,0x001839a0
00183998: 2673ffff addiu r19,r19,0xffff
0018399c: 34030001 ori r3,r0,0x0001
001839a0: 1200000b beq r16,r0,0x001839d0
001839a4: 306200ff andi r2,r3,0x00ff
001839a8: 08060e74 j 0x001839d0
001839ac: 2610ffff addiu r16,r16,0xffff
001839b0: 12000007 beq r16,r0,0x001839d0
001839b4: 306200ff andi r2,r3,0x00ff
001839b8: 2610ffff addiu r16,r16,0xffff
001839bc: 306300ff andi r3,r3,0x00ff
001839c0: 00031040 sll r2,r3,0x01
001839c4: 00431021 addu r2,r2,r3
001839c8: 00021842 srl r3,r2,0x01
001839cc: 306200ff andi r2,r3,0x00ff
001839d0: 02221021 addu r2,r17,r2
001839d4: 00408821 addu r17,r2,r0
001839d8: 3242ffff andi r2,r18,0xffff
001839dc: 2c4201f5 sltiu r2,r2,0x01f5
001839e0: 10400007 beq r2,r0,0x00183a00
001839e4: 3246ffff andi r6,r18,0xffff
001839e8: 3222ffff andi r2,r17,0xffff
001839ec: 2c420064 sltiu r2,r2,0x0064
001839f0: 1440ffe4 bne r2,r0,0x00183984
001839f4: 26520001 addiu r18,r18,0x0001
001839f8: 2652ffff addiu r18,r18,0xffff
001839fc: 3246ffff andi r6,r18,0xffff
00183a00: 2cc20100 sltiu r2,r6,0x0100
00183a04: 1040001c beq r2,r0,0x00183a78
00183a08: 3c0251eb lui r2,0x51eb
00183a0c: 3442851f ori r2,r2,0x851f
00183a10: 3228ffff andi r8,r17,0xffff
00183a14: 01020019 multu r8,r2
00183a18: 02c02021 addu r4,r22,r0
00183a1c: 00002821 addu r5,r0,r0
00183a20: 8fa70060 lw r7,0x0060(r29)
00183a24: 00063200 sll r6,r6,0x08
00183a28: 24c60064 addiu r6,r6,0x0064
00183a2c: 00001810 mfhi r3
00183a30: 00031942 srl r3,r3,0x05
00183a34: 00031040 sll r2,r3,0x01
00183a38: 00431021 addu r2,r2,r3
00183a3c: 000210c0 sll r2,r2,0x03
00183a40: 00431021 addu r2,r2,r3
00183a44: 00021080 sll r2,r2,0x02
00183a48: 01024023 subu r8,r8,r2
00183a4c: 01008821 addu r17,r8,r0
00183a50: 00c83023 subu r6,r6,r8
00183a54: 0c060eb3 jal 0x00183acc		unit ID routine
00183a58: 30c6ffff andi r6,r6,0xffff
00183a5c: 10400006 beq r2,r0,0x00183a78
00183a60: 00000000 nop
00183a64: 03c2f021 addu r30,r30,r2
00183a68: 26940001 addiu r20,r20,0x0001
00183a6c: 2a820028 slti r2,r20,0x0028
00183a70: 1440ffde bne r2,r0,0x001839ec
00183a74: 3222ffff andi r2,r17,0xffff
00183a78: 26d60001 addiu r22,r22,0x0001
00183a7c: 8fa90078 lw r9,0x0078(r29)
00183a80: 2ac20015 slti r2,r22,0x0015
00183a84: 252901c0 addiu r9,r9,0x01c0
00183a88: 1440ff4c bne r2,r0,0x001837bc
00183a8c: afa90078 sw r9,0x0078(r29)
00183a90: 2fc20001 sltiu r2,r30,0x0001
00183a94: 00021023 subu r2,r0,r2
00183a98: 8fbf00a4 lw r31,0x00a4(r29)
00183a9c: 8fbe00a0 lw r30,0x00a0(r29)
00183aa0: 8fb7009c lw r23,0x009c(r29)
00183aa4: 8fb60098 lw r22,0x0098(r29)
00183aa8: 8fb50094 lw r21,0x0094(r29)
00183aac: 8fb40090 lw r20,0x0090(r29)
00183ab0: 8fb3008c lw r19,0x008c(r29)
00183ab4: 8fb20088 lw r18,0x0088(r29)
00183ab8: 8fb10084 lw r17,0x0084(r29)
00183abc: 8fb00080 lw r16,0x0080(r29)
00183ac0: 27bd00a8 addiu r29,r29,0x00a8
00183ac4: 03e00008 jr r31