øAslickproductions.org/forum/index.php?PHPSESSID=5f0fck550j2m4m2fpbtkj2vkm1&action=profile;u=25;area=showposts;start=225e:/My Web Sites/Slick Productions - FFIV Message Board/slickproductions.org/forum/index1dba-2.htmlslickproductions.org/forum/index.php?PHPSESSID=5f0fck550j2m4m2fpbtkj2vkm1&action=profile;area=showposts;u=25e:/My Web Sites/Slick Productions - FFIV Message Board/slickproductions.org/forum/index1dba-2.html.zxE›h^ÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÈ0PdôOKtext/htmlISO-8859-1gzip8:ÖôÿÿÿÿÿÿÿÿWed, 11 Mar 2020 08:19:41 GMT0ó°° ®0®P®€§²ð®D›h^ÿÿÿÿÿÿÿÿ4ô Show Posts - assassin

Show Posts

This section allows you to view all posts made by this member. Note that you can only see posts made in areas you currently have access to.


Messages - assassin

226
Game Modification Station / Re: WIP Patch: Permanent Morph bugfix
« on: May 05, 2016, 11:05:08 PM »
don't those commands' executions still make use of Function C2/13D3, and thus its "JSR ($19C7,X)"?

227
Game Modification Station / Re: WIP Patch: Permanent Morph bugfix
« on: May 05, 2016, 10:18:44 PM »
Quote from: magitek
If your spidey senses are tingling, I'll definitely keep this in mind. However, from what I can understand, C2/1211 always gets called every (other) frame as long as $3EE2 is set, and if only C2/0AA8 clears it, Revert is forced to happen at the soonest possible moment as long as the Morph timer is zero. The function to update Morph-related stuff (C2/0AA8) is called every turn and both clears $3EE2 and calls C2/0B36. C2/0B36 updates the Morph supply from the Morph timer ($3F30-$3F31) and that variable never changes outside of C2/1211 (except for being initialized by Morph and cleared by Revert). I can't see how waiting for C2/0AA8 to update the Morph supply would be an issue, unless you think there's another way Revert could get thwarted. Sorry if I seem hard-headed about this, I just want to make sure I didn't miss anything. :)

this is basically moot since you agreed to keep the C2/0B36 call in, but what the hey...

a possible loophole is if the Morph timer gets reduced to something like FFFFh (and then 00FFh) when a Revert-prohibiting status is in effect, and you have a VERY small Morph decrementor (e.g. 16d).  once the status is gone, Revert won't necessarily be queued right after, as the next few calls to C2/1211 won't zero Morph's timer.  should the battle end quickly, you're now hoping that the end-of-battle code calls C2/0B36.  i don't like relying on it for this, especially given there are multiple ways for a battle to end, and thus multiple holes to plug for patchmakers.

more simple scenario: just having the Revert-prohibiting status in effect through finishing the fight makes you dependent on the end-of-battle code calling C2/0B36.  but the prior example is more obnoxious, given the Morph timer initially expired _during_ battle.

and as i've said, honoring cause and effect is important.  running out of "fuel" causes Terra to Revert, not vice versa.  so making recognition of the former be contingent on the latter ignores cause and effect.

Quote
Now that I think of it, I suppose the battle ending would thwart Revert. Not updating the supply immediately when the timer runs out actually kind of silently fixes the problem with the timer running out during end-of-battle messages, but certain special battle endings don't update the Morph supply, such as Gau Leaping or Returning, or Shadow leaving, and in those cases the supply wouldn't get updated even if the timer ran out just as the battle ended. That's a pretty good tradeoff though, in my opinion (but it's easy to fix).

i realize you're just thinking aloud here, but nooooo... :P  don't try to rely on one flaw to balance out another.  the various end-of-battle issues *are* tackle-able, such as with your $3EE2-clearing fix.  maybe with my proposed C2/5C54 call added on.

228
Game Modification Station / Re: WIP Patch: Permanent Morph bugfix
« on: May 05, 2016, 09:40:43 PM »
nope, i haven't made anything on the is-queued bit.

Quote
On another note, someone made a menu Swdtech patch? I'd like to see that.

oops, i must've been thinking of the iOS/Android remake, and Ronnen's Menu Blitz patch, or perhaps just prior talk of people wanting to make SwdTech use a menu.  so yes, the only SwdTech patches i know of so far are ArmorVil's and HatZen08's.

for reasons you gave differentiating that command from Morph, i don't necessarily think the two commands should be lumped into a single patch.  and while i agree that Morph honoring Haste/Slow would make sense, i'm not sure that it currently ignoring them falls into the "obvious bug" category that ignoring Stop/other-Quick does; the latter spits all over any recognition of time flow rules.  so i'm advocating for three separate patches, officially making me a pain in the ass. :P  well, actually four, given i still see merit to the C2/4BB2 relaxation method Morph fix.

Code: [Select]
;To remedy this hypothetical sitation, lower the cap on the
                    ;Morph decrementor at C2/0B27. For a 128 Haste multiplier
                    ;(double speed) set it to 511 to prevent overflow.
                    ;I'm not sure why that's set to 2048, since it should never
                    ;get that high.
                   
LSR #6              ;(Divide by 64 [the "Normal" ATB multiplier])

another way to deal with that situation:

Code: [Select]
PHX
LDX #$3F
CPX $EA         (if top byte of product is >= 64, it'll have a nonzero value
                 after routine C2/0DD1, meaning the decrementor exceeded
                 65535.)
BCC reduce_it
LDA #$0005
JSR $0DD1     (Divide 32-bit product by 64.  the product doesn't occupy
               more than 3 bytes going into this call, but the function
               operates on 32-bits.)
reduce_it:
TDC
DEC
PLX

maybe that's TOO paranoid about a hypothetical giant 24-bit decrementor, in which case the hacker just needs the "LDA #$0005 / JSR $0DD1". :)

229
Game Modification Station / Re: WIP Patch: Permanent Morph bugfix
« on: May 03, 2016, 09:13:42 PM »
Quote
no, you'd still be queuing up Revert from the same place.  yes on clearing the bit when Revert is executed.  what it'd be doing is adopting periodic damage/healing's just-one-queued-at-a-time system (as achieved by bit 4 of $3AA1,index , but we'd use our own flag), which is more robust.

I don't think I follow. Where is the bit set, and where is it checked?

Bit 4 of $3AA1,index is set and checked in the C2/5A83-invoked functions that queue periodic damage/healing.  it's cleared in the functions that (try to) execute the periodic damage/healing.

the hypothetical bit would be set and checked in Function C2/1211 (provided the timer has expired), and cleared in the Revert execution code.

Quote
Quote
the check you're currently using will prevent multiple sequential queued Reverts, which is probably the prime offender in terms of that pause, but it'll be fooled if anything gets queued or run in between them.  obvious culprits are high-priority stuff, like statuses auto-expiring or equipment magic activations on low HP.  also, i believe a Revert that gets queued during a string of an enemy's counters (which are equal-priority, but the first actor gets precedence), as it'll wait until the monster is done to execute.  another equal-priority way: attack whacks ally with Retort, Interceptor, or Black Belt on; Revert gets queued during attack animation; counter executes and overwrites $3A7A.  really, lots of things can overwrite $3A7A (like a party of Cure Ring wearers queuing their Regen healing), so this approach has its holes.  Square's way is more thorough.  but if our only concern is aesthetics of a visible lag, and the prime offender IS being taken care of, then maybe it's not worth claiming the extra RAM bit to be more thorough.

I think it's fine that counterattacks get priority over Revert, it would look weird to have Terra Revert in between attacks. As for Revert getting delayed by Relic activation, periodical damage, or status expiration, that could get a little weird. The delay might be noticeable if a lot of automatic actions happen in succession and one may wonder why Terra is waiting for things that are happening to others before she transforms. Of course, it's an artifact of the battle system that things can't happen simultaneously, but there should be the illusion of things happening independently of each other, and that requires fair queueing. It's not a big issue, but I, too, appreciate when things are done right.

Relic activation and status expiration are put in an uber-high-priority queue on purpose, so Revert waiting makes total sense.

to be clear, i have no objection to the fact that other things can be queued and/or executed in between Revert's queuing and execution.  i was pointing out that in doing so, they overwrite $3A7A, and thus thwart your method of checking for "is Revert already queued?".  a system that follows the Squaresoft one i've mentioned would not be fooled by this.

but as i've acknowledged, the $3A7A check does get rid of the major pause contributor of multiple sequential queued Reverts, so it might be good enough for our goals, even if not fully robust.

-------------

there is some precedent to a timer-based thing ignoring Haste and Slow: Cyan's SwdTech.  of course, it's a much-maligned ability, which multiple people patch with speed-ups or menus just to make it competitive. :P

230
Game Modification Station / Re: WIP Patch: Permanent Morph bugfix
« on: May 03, 2016, 05:13:43 PM »
re the code: save 2 bytes by going "LDA #$04 / CMP $3A7A" and dropping an instruction.

Quote
Could you elaborate on this? You mean periodically queuing up Revert via another function that doesn't depend on $3EE2 being set, like C2/5A83, conditional on bit 3 of $3AA1,index being set instead? Would you then be setting that bit in C2/1211 to allow Revert to be queued up, and then clear it when Revert is executed? Essentially offloading the responsibility for Revert onto an unused bit instead of $3EE2?

no, you'd still be queuing up Revert from the same place.  yes on clearing the bit when Revert is executed.  what it'd be doing is adopting periodic damage/healing's just-one-queued-at-a-time system (as achieved by bit 4 of $3AA1,index , but we'd use our own flag), which is more robust.

the check you're currently using will prevent multiple sequential queued Reverts, which is probably the prime offender in terms of that pause, but it'll be fooled if anything gets queued or run in between them.  obvious culprits are high-priority stuff, like statuses auto-expiring or equipment magic activations on low HP.  also, i believe a Revert that gets queued during a string of an enemy's counters (which are equal-priority, but the first actor gets precedence), as it'll wait until the monster is done to execute.  another equal-priority way: attack whacks ally with Retort, Interceptor, or Black Belt on; Revert gets queued during attack animation; counter executes and overwrites $3A7A.  really, lots of things can overwrite $3A7A (like a party of Cure Ring wearers queuing their Regen healing), so this approach has its holes.  Square's way is more thorough.  but if our only concern is aesthetics of a visible lag, and the prime offender IS being taken care of, then maybe it's not worth claiming the extra RAM bit to be more thorough.

231
Game Modification Station / Re: WIP Patch: Permanent Morph bugfix
« on: May 03, 2016, 03:50:18 AM »
Quote from: magitek
Yes, I just tested it by simply hitting Terra with Stop, and letting her Morph gauge run out during the casting animation for Stop, and her Revert does indeed slip through the time freeze. The case was the same with Quick.

haha; or do that.  guess i overthought my test scenario.  :blush:

--------

to reiterate an earlier point: i still think it's a bad idea to drop the "JSR $0B36" for space savings.  relying on Revert to always happen doesn't sit well with me, particularly in a version where you're not relaxing C2/4BB2.  and conceptually, failure to revert shouldn't make your "fuel" depletion fail to stick.  more generally, i've come to see this issue as fairly separate of the ongoing debate on $3EE2.

--------

regarding the rest of your 5/2/16 06:35:45 PM CDT post: overall, a good summary/digestion/analysis of things, and a must-read for people new to the topic, or foggily returning weeks later.

---------

Quote from: 13375K31C43R
If I'm right, then all you need to do before queueing Revert is to make sure it's not already queued. There's a bit of code in my "Dead in the Air" Fix A that can help you out.

or something like Bit 4 of $3AA1,index for periodic damage/healing?  is Bit 3 of that byte indeed unused, or am i overlooking something?

and how'd i go so long without commenting Function C2/0A41? :/

----------

Quote from: magitek
What do these [$3AA0,index] bits do, anyway?

torment our souls with eternal hellfire?

some of those are regularly being set or unset; they'll combine multiple sets or clears at once; they'll change the combination of which bits are being altered together.  truly evil.

it's largely luck that i gave Bit 4 of $3AA0,index a chance and decoded the thing.  the madness with this byte also infests parts of others, like $3AA1 and $3204.  in fact, it mostly explains my extreme tardiness in commenting Function C2/0A41 (will upload an update eventually).  when i see another one of these damn toggles, my brain shuts down as a protective measure.  it might stall the Bank C2 progress, but it's kept me alive so far.

232
Game Modification Station / Re: New patch: Chance Offering Bug fix
« on: May 03, 2016, 12:52:30 AM »
given that Atma Weapon and Offering both use a multiplier, as opposed to adding a term like ValiantKnife (or subtracting one), there shouldn't be any need to change the former weapon.

233
Game Modification Station / Re: WIP Patch: Permanent Morph bugfix
« on: May 02, 2016, 04:56:08 PM »
Quote
Since all of that is now fixed, I have only one small reservation: do you think it would still be possible to trigger the bug with frame-perfect timing, by hitting Terra with Stop or having someone else enter Quick just as the Morph timer ran out, but before Revert could be executed? I can't make it happen during testing, but I don't have the patience for testing with frame-perfect input. This is the difference between "fixed" and "well hidden" that will gnaw at my conscience late at night.

given C2/4BB2 is being made *more* permissive by the suggested patch, i hope this would not be an issue.

what i think could happen is the reverse:
- Morph timer is near running down
- cast Flare on a monster (nice long animation, good for testing)
- monster queues a counter, let's say a Stop spell
- during Flare animation, Morph timer expires, queues Revert
- you get Stopped
- more permissive C2/4BB2 allows Revert to go through, even though the character is now stopped.
- ..........does that bother us?

i'd actually tested the above, but with a periodic damage/healing timer in place of Morph timer, so it's not purely theoretical.  C2/4BDD indeed tried to execute the Regen "turn", but it didn't heal me, i believe because of C2/5018 exiting.

afaik, the Revert command has no such exit.  which is good from the standpoint of not having the reversion disappear into a black hole.  but a little bad from the standpoint that we're very briefly waiving the time stoppage to complete the command.

------------

as for waiting for the Revert on Sleep/Freeze, i've considered having C2/1211 check for those statuses, and if so, refusing to perform the final Morph tick (i.e. one where the deduction exceeds the current timer).  this should be effectively pretty similar, without trying to wrangle the disconnect between expiration and reversion that other coding approaches might have.

yes, it's arbitrary to do every tick except the last.  but in my mind, no more arbitrary than a Morph-expired character somehow still having the status.  (pardon the repeat complaint. ;) )

note that because this change would probably be done _instead_ of relaxing C2/4BB2, i wonder if it might allow the worse scenario you asked about above.

234
Game Modification Station / Re: WIP Patch: Permanent Morph bugfix
« on: May 02, 2016, 11:03:31 AM »
i don't see the clearing of $3EE2 as the root cause of the problem.  rather, it stems from Square failing to account for certain statuses, and even ignoring time stoppage when decrementing the Morph timer.

in the latter case, most of Function C2/1211 should be skipped (and indeed will be with your added Stop/other-Quick check), so it's arbitrary to try and pin the problem on $3EE2.  why single out 2 instructions when 10+ are wrongly being executed?  and why skip the 2 ALL the time just to account for statuses that *might* be -- but usually aren't -- possessed?

provided that the time-stoppage flub is dealt with, and some Sleep/Freeze awareness is added, things will work properly, and you won't need blunter measures like checking for whether Revert's already been queued.

iow, you're trying to balance out an overly-aggressive omission of "LDA #$FF / STA $3EE2" with a highly-broad queue screening.  it seems more sensible to identify the specific cases that cause the bug and go after those.

235
Game Modification Station / Re: WIP Patch: Permanent Morph bugfix
« on: May 02, 2016, 10:14:25 AM »
However, it seems to me that the function to update Morph supply doesn't need to be called every frame.

that function is only called when C2/1211 detects the Morph timer has expired.

Quote
It seemed like a good way to make sure that Terra Reverts no matter what, but it causes that pause, and I'm not sure why it only happens when the timer runs out during an attack animation.

like i said earlier, read my big comment at the end of Function C2/1211.

Quote
Revert doesn't clear $3EE2, it just sets Morph status to be removed, by the way.

true, but the C2/0AA8 call that follows right after Revert will clear it.

Quote
Anyway, I would prefer to find a way to make sure she Reverts immediately after Sleep and Freeze wear off instead of during, but I tried your suggestion:

[...]

I think there's a more efficient way to structure those branches and jumps, but it works, both for Sleep and Freeze. Even if it looks funny. Perhaps it might be more aesthetically pleasing to hook into however Sleep and Freeze are removed when their timers run out, and queue Revert from there, instead.

glad it works.  i see what you're saying on waiting, but separating the Reversion from the timer depletion gets tricky.  besides, if Terra can run out of gas while in Sleep/Freeze, why should she get to stay Morphed and continue receiving its benefits?  what's keeping her in the status?

both conceptually and for coding ease, i tend to see reversion as something that doesn't require her active participation.  if she's awake, let her stand and spin.  but otherwise, a compromise would be to make the animation more subtle if she's in certain statuses.

Quote
Clearing $3EE2 at the end of battle fixes the issue with the Morph gauge ticking down, by the way.
very nice and direct.  i hadn't written any code, but the crap i was mulling was more complicated (e.g. trying to detect it was post-battle somehow  :lame:).

also, congrats on ending a 7-year dormancy.  :laugh:

"Posts:  8 (0.003 per day)"

not many active users can compete with this, outside of Drakkhen and kveldolf.

236
Game Modification Station / Re: WIP Patch: Permanent Morph bugfix
« on: May 02, 2016, 02:28:33 AM »
the Morph supply is updated before you confirm any messages, so you won't get burned unless you let the timer run down all the way (when the supply will update again).

they zero the Morph gauge(s) right after that first update, suggesting they want an empty one displayed.  but because the Morph timer decrement function (C2/1211) is still called, the gauge gets re-synchronized with the Morph timer.  it would make sense to stop calling this function after the battle is won -- yet the ironic thing is, the empty gauge would never show up then, because the game doesn't bother to call C2/5C54 outside of the first function (and battle start-up).

face it: they're just idiots.  if they were trying to dis-incentivize certain behavior, their code is really sending mixed messages.  the battle's over, so it's indeed unfair.

your Stop and other-Quick check makes perfect sense.

237
Game Modification Station / Re: WIP Patch: Permanent Morph bugfix
« on: May 01, 2016, 05:03:10 PM »
- yeah, leaving $3EE2 uncleared probably causes some of my comment at the end of Function C2/1211 to occur.
- i can't get onboard with dropping "JSR $0B36" just to save space.  it might be safe, with Revert hopefully issuing it, but it's poor form.  i don't see why he'd/you'd make a gamble that Square didn't need to write something, when the only thing to gain out of being right is a few bytes.
- looks like C2/4BCE is thwarting Revert while asleep.  in contrast, slumberers can still be affected by periodic damage/healing, so maybe broaden the command check at C2/4BB2?  who knows what side effects there'll be, though.

now, a standing up Revert might look out of place for somebody who's supposed to be sleeping, but it's only a graphical issue. :)

239
Game Modification Station / Re: New patch: Multiple Events fix
« on: April 29, 2016, 01:57:26 PM »
i've been informed that Command FD does more than NOP, and has a slight risk of messing things up when used as such.. enough where i'm reconsidering its use in my Incoherent Gungho dialogue fix.

240
Game Modification Station / Re: Sprinting without Sprint Shoes?
« on: April 29, 2016, 03:37:33 AM »
the traditional version, the 1-way Status Immunity fix -compatible one, or both?

---------

EDIT:

okay, the "C23BB2:" label is duplicated 3 times in the .asm file.  more importantly, the second "org $C23BB2" should read "org $C2439D" (or "org $C24385" on FF6j).  so copy+paste mayhem. :P