Novalia Spirit wrote:3. The DMA setup created by the first call can get overwritten via a call to the second function at C3/A888, thus preventing its execution. This always seems to be the case when the cost fails to be updated.
okay. in reaction to hitting a relevant button, C3/A888 can be skipped for a frame *. if this skippage directly follows a C3/27ED ==> C3/0F75 call, then that's good. but if it directly follows a C3/27ED ==> C3/A991 call, then tough luck.
i had noticed when moving with the arrows that the displayed cost would update right away, or not at all. it didn't seem to have the lag issue present with the Y button. i spoke too soon. there are two "events" that can make C3/A888 be skipped: the button press, and the completion of the spell description's output. if the MP cost display gets thwarted on the former, it can still be displayed on the latter. whether it is depends on the number of characters in the description (as one is output per frame), as that affects how the second skippage lines up. i had luck getting lagged update moving right from Ice to Bolt, with the second spell having a description of 26 characters. in contrast, a crapload of tests with odd-sized descriptions didn't let me pull this off.
as for why the Y button behaves differently.. i think it's because its pressing isn't reacted to until the end of Function C3/27E2, and requires said function to be called *again* a frame later to update the top right cost via C3/51C6. so we'll have a case of:
- Y button pressed, C3/27E2 detects, and overwrites spell menu.
- C3/14C7 does DMA transfer.
- C3/27E2 is called again next frame, and calls one of the DMA setup functions.
- same frame, C3/27E2 calls C3/51C6 to update cost in upper right video buffer.
- C3/14C7 does DMA transfer.
there are C3/A888 executions in there as well, along with skipping it once (i forget when). but i'm thinking that the button-induced skippage (unlike the description-completion skippage) happens too early relative to C3/51C6's running for it to be taken advantage of.
however, the button skippage WILL have the prior information buffered by C3/51C6 available. that probably explains the lag+flicker that's seen with the Y-button variety of the bug. namely, say you've hit the Y button, and the cost display doesn't update. then you hit the Y button again, the cost display updates to what the old value should have been, and then a fraction of a second later (when the normal or null spell description completes), it updates to the new value.
* maybe more if holding down an arrow or shoulder button. i have yet to test.
EDIT: ok, this post still doesn't explain the cases of big, ~3/4 of a second from button press lag. but it's made sense of some things.
EDIT2: ok, that longer lag seems to equal, in frames: (time from button press until description completes; i.e. normal lag) + # of characters in description + 2. is the game secretly printing the description twice?