Users browsing this thread: 1 Guest(s)
Frozen Terra Fix

#1
Posts: 3,871
Threads: 271
Thanks Received: 793
Thanks Given: 448
Joined: Oct 2011
Reputation: 64
Status
Tissue-aware
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]
  Find
Quote  
[-] The following 3 users say Thank You to madsiur for this post:
  • Gi Nattak (10-11-2016), Robo Jesus (10-16-2016), Warrax (01-12-2020)

#2
Posts: 1,633
Threads: 56
Thanks Received: 50
Thanks Given: 135
Joined: Apr 2014
Reputation: 12
Status
Atma
so a generic situation in which you reset the game might leave those data and trigger a similar issue?


THE GREATEST CHALLENGE OF ALL TIMES AWAITS:
http://www.ff6hacking.com/forums/showthr...p?tid=2593
DO YOU HAVE WHAT IT TAKES TO SLAY A GOD?
------------------------------------------------------------------------
Tenkarider's project #2 is started: FF6 Curse of the Madsiur Joke (CotMJ)
http://www.ff6hacking.com/forums/showthr...p?tid=2755
What happens when Madsiur tweaks your account? This full game hack will show that!
  Find
Quote  

#3
Posts: 3,871
Threads: 271
Thanks Received: 793
Thanks Given: 448
Joined: Oct 2011
Reputation: 64
Status
Tissue-aware
$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)
  Find
Quote  

#4
Posts: 3,871
Threads: 271
Thanks Received: 793
Thanks Given: 448
Joined: Oct 2011
Reputation: 64
Status
Tissue-aware
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.
  Find
Quote  

#5
Posts: 3,871
Threads: 271
Thanks Received: 793
Thanks Given: 448
Joined: Oct 2011
Reputation: 64
Status
Tissue-aware
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.
  Find
Quote  

#6
Posts: 198
Threads: 3
Thanks Received: 24
Thanks Given: 141
Joined: May 2013
Reputation: 0
Status
None
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.
  Find
Quote  

#7
Posts: 465
Threads: 39
Thanks Received: 17
Thanks Given: 15
Joined: Aug 2010
Reputation: 3
Status
Runic
I have never seen this bug before. But I never bother with this event too much.
  Find
Quote  

#8
Posts: 3,871
Threads: 271
Thanks Received: 793
Thanks Given: 448
Joined: Oct 2011
Reputation: 64
Status
Tissue-aware
(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...
  Find
Quote  

#9
Posts: 3,871
Threads: 271
Thanks Received: 793
Thanks Given: 448
Joined: Oct 2011
Reputation: 64
Status
Tissue-aware
Update

Added a patch version for FF6j.
  Find
Quote  

#10
Posts: 3,871
Threads: 271
Thanks Received: 793
Thanks Given: 448
Joined: Oct 2011
Reputation: 64
Status
Tissue-aware
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.
  Find
Quote  
[-] The following 1 user says Thank You to madsiur for this post:
  • SSJ Rick (01-24-2017)



Forum Jump:

Users browsing this thread: 1 Guest(s)


Theme by Madsiur2017Custom Graphics by JamesWhite