FF6 Hacking
Frozen Terra Fix - Printable Version

+- FF6 Hacking (https://www.ff6hacking.com/forums)
+-- Forum: Hacks, Resources and Tutorials (https://www.ff6hacking.com/forums/forum-1.html)
+--- Forum: Jidoor Auction House (https://www.ff6hacking.com/forums/forum-4.html)
+---- Forum: Patches, Bugfixes, Tweaks (https://www.ff6hacking.com/forums/forum-15.html)
+---- Thread: Frozen Terra Fix (/thread-3343.html)



Frozen Terra Fix - madsiur - 10-09-2016

Frozen Terra Fix
version: 1.3
apply to FF3us
wiki entry
Download


Objects RAM ($0867-$1068) is not initialized on game reset. This can lead to a bug where characters x and y positions ($1FD3-$1FF2) loaded from the save file can be overwritten after save file loading by the objects x and y position RAM values.

As specific consequence of this omission is if the player say three time no to Banon with Terra and watch the wounded returner event and reset the game after the end of event, Locke, Edgar and Sabin positions will not be reset. Loading the game and repeating the wounded soldier event will freeze the event because Edgar, Sabin and Locke appear on the map before their position is modified to the right of the screen by event. Terra will be unable to move because of those characters blocking the way hence the event freeze.

Video of the bug

To fix this, all Objects RAM is cleared at game loading. The fix take 18 bytes at end of bank $C3.

[Image: fetch.php?media=ff3:ff3us:patches:madsiu...erra:1.png] [Image: fetch.php?media=ff3:ff3us:patches:madsiu...erra:2.png]


RE: Free Moving Terra Fix - Tenkarider - 10-09-2016

so a generic situation in which you reset the game might leave those data and trigger a similar issue?


RE: Free Moving Terra Fix - madsiur - 10-09-2016

$0869-$086E for objects $00-$0F is maybe not filled at game load by $1FD3-$1FF2 (2 bytes X, Y map position for objects $00-$0F). This would mean the map position of objects below NPC status ($10) would not reflect what is in SRAM. If $0000-$15FF RAM is cleared at game reset then the theory doesn't stand. Maybe the object data block ($0867-$1068) is not cleared at game reset and should. Or maybe it's $1FD3-$1FF2 that is not properly updated, updated into RAM sister values or cleared between map changes or at another moment in a specific event command code (like object deletion). I can't understand what is wrong without some debugging.

All I know is that there is only two instances of interactions between object position RAM and object position SRAM (RAM->SRAM and SRAM->RAM). The objects positions are carried on to the next event after game load. It's especially problematic here because the next event featuring the 3 characters is same event played last before the game reset. Those 3 character are shown in a map position that is onscreen, exactly where Terra walk.

Short story, it could happen in another event context with prior to the event a game reset.

Code:
++ $0869 tttttttt ttttpppp xxxxxxxx
            t: X Position (in tiles)
            p: X Position (in pixels)
            x: X Position (in pixels/4096)
   ++ $086C tttttttt ttttpppp yyyyyyyy
            t: Y Position (in tiles)
            p: Y Position (in pixels)
            y: Y Position (in pixels/4096)



RE: Free Moving Terra Fix - madsiur - 10-14-2016

I think I found an ASM fix. I did a reset on objects RAM data ($0867-$1068) before a game is loaded. The save file is correctly loaded but its values at starting at $1FD3 get overwritten by what was left in RAM before the reset. The loop I did at end of bank $C3 fix this. See first post for details.


RE: Free Moving Terra Fix - madsiur - 10-16-2016

Updated to version 1.2.

There was a bug with my fix and game saving. It is now corrected. I also removed the event fix from the archive.


RE: Frozen Terra Fix - Warrax - 10-19-2016

Interesting, I never knew there was a unique event when saying no 3 times in a row to Banon, and it skip the meeting as well.


RE: Frozen Terra Fix - CrumpledMedal - 10-20-2016

I have never seen this bug before. But I never bother with this event too much.


RE: Frozen Terra Fix - madsiur - 10-21-2016

(10-20-2016, 11:17 PM)CrumpledMedal Wrote: I have never seen this bug before.

I was unaware of it as well until I saw the video. Who knows there might be other places in the game after a game reset where this non-reset RAM produce undesirable effects...


RE: Frozen Terra Fix - madsiur - 10-27-2016

Update

Added a patch version for FF6j.


RE: Frozen Terra Fix - madsiur - 01-22-2017

vivify93 reported a bug on RHDN where when entering loading confirmation menu, coming back and starting a new game would reset all object data thus having 3 terra with palette 0 on start of the game. I simply hooked the data resetting routine after you press "A" in the loading confirmation menu. If you already have the version 1.2 patched, just apply one of the "repair" patch available in the 1.3 archive.