Users browsing this thread: 1 Guest(s)
Timers and Status Durations

#8
Posts: 3,971
Threads: 279
Thanks Received: 237
Thanks Given: 58
Joined: Oct 2011
Reputation: 65
Status
Tissue-aware
(11-29-2013, 09:14 PM)lopolly Wrote: Not to be redundant but just for the sake of confirmation, would this include the above statuses like Stop/Sleep/Freeze?

From the comments of the disassembly yes, but I can't tell where exactly it happens. I trust however the guy who wrote these comments. The best way to know is to test it.

You have to see the function as a whole where many parameters can be modified to change the Battle Time Counter function, the code in the event thread being one.

Code:
Battle Time Counter function
(Recalculate the amount by which to increase the ATB gauge.  
This will also affect the speed of the "wait timer" [which determines how long a
character is in their ready stance], the Condemned counter, invisible timers
for auto-expiring statuses, and the frequency of damage/healing from statuses
like Regen and Poison.)

C2/09D2: 08           PHP
C2/09D3: A0 20        LDY #$20      (ATB multiplier = 32 if slowed)
C2/09D5: BD F8 3E     LDA $3EF8,X
C2/09D8: 89 04        BIT #$04
C2/09DA: D0 08        BNE $09E4     (Branch if Slow)
C2/09DC: A0 40        LDY #$40      (ATB multiplier = 64 normally)
C2/09DE: 89 08        BIT #$08
C2/09E0: F0 02        BEQ $09E4     (Branch if not Haste)
C2/09E2: A0 54        LDY #$54      (ATB multiplier = 84 if hasted)
C2/09E4: 98           TYA
C2/09E5: 9D DD 3A     STA $3ADD,X   (save the ATB multiplier)
C2/09E8: 98           TYA           (this instruction seems frivolous)
C2/09E9: 48           PHA
C2/09EA: 18           CLC
C2/09EB: 4A           LSR
C2/09EC: 63 01        ADC $01,S
C2/09EE: 83 01        STA $01,S     (ATB multiplier *= 1.5)
C2/09F0: BD 19 3B     LDA $3B19,X   (Speed)
C2/09F3: 69 14        ADC #$14        
C2/09F5: EB           XBA           (Speed + 20 in top byte of Accumulator)
C2/09F6: E0 08        CPX #$08    
C2/09F8: 90 06        BCC $0A00     (branch if not an enemy)
C2/09FA: AD 90 3A     LDA $3A90     (= 255 - (Battle Speed setting * 24) )
                                    (remember that what you see on the Config menu is
                                     Battle Speed + 1)
C2/09FD: 20 81 47     JSR $4781     (A = (speed + 20) * $3A90 )
C2/0A00: 68           PLA           (bottom byte of A is now Slow/Normal/Haste Constant)
C2/0A01: 20 81 47     JSR $4781     (Let C be the Slow/Normal/Haste constant, equal to
                                     48, 96, or 126, respectively.
                                     for characters:
                                      A = (Speed + 20) * C
                                     for enemies:
                                      A = ( ((Speed + 20) * $3A90) DIV 256) * C  )
C2/0A04: C2 20        REP #$20
C2/0A06: 4A           LSR
C2/0A07: 4A           LSR
C2/0A08: 4A           LSR
C2/0A09: 4A           LSR           (A = A / 16)
C2/0A0A: 9D C8 3A     STA $3AC8,X   (Save as amount by which to increase ATB timer.)
C2/0A0D: 28           PLP
C2/0A0E: 60           RTS
  Find
Quote  
[-] The following 1 user says Thank You to madsiur for this post:
  • lopolly (11-30-2013)



Messages In This Thread
Timers and Status Durations - by lopolly - 11-28-2013, 06:05 PM
RE: Timers and Status Durations - by Gi Nattak - 11-29-2013, 12:23 AM
RE: Timers and Status Durations - by lopolly - 11-29-2013, 01:58 AM
RE: Timers and Status Durations - by Gi Nattak - 11-29-2013, 02:44 AM
RE: Timers and Status Durations - by lopolly - 11-29-2013, 06:31 PM
RE: Timers and Status Durations - by madsiur - 11-29-2013, 07:22 PM
RE: Timers and Status Durations - by lopolly - 11-29-2013, 09:14 PM
RE: Timers and Status Durations - by madsiur - 11-29-2013, 10:36 PM
RE: Timers and Status Durations - by lopolly - 11-30-2013, 02:28 PM
RE: Timers and Status Durations - by madsiur - 11-30-2013, 05:07 PM
RE: Timers and Status Durations - by lopolly - 11-30-2013, 05:33 PM
RE: Timers and Status Durations - by madsiur - 11-30-2013, 10:13 PM
RE: Timers and Status Durations - by lopolly - 11-30-2013, 11:46 PM

Forum Jump:

Users browsing this thread: 1 Guest(s)


Theme by Madsiur2017Custom Graphics by JamesWhite