fix/movement_glitch patch branch #4
wizardwhosaysni
started this conversation in
Show and tell
Replies: 1 comment 1 reply
-
|
Thank you very much Wiz for that great fix! I just tested your patch and it works like a charm! I can no longer reproduce the movement glitch after the fix! Well done! You must have made a mistake with the ROM address at the bottom. According to your entity script, it is: 0x44E5A. |
Beta Was this translation helpful? Give feedback.
1 reply
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
SF2DISASM patch branch available here :
https://github.com/ShiningForceCentral/SF2DISASM/tree/fix/movement_glitch
Intro
The movement glitch is used in battles to reach places which are out of the controlled character's moving boundaries.
Bug explanation :
Controlling the character relies on two decorrelated loops :
On main CPU thread, the battle character control loop :
At vertical interruption (once every display frame), the controlled character script :
The issue is that when the battle loop restarts the entity loop, the entity loop doesn't wait for the current destination to be reached : it immediately checks input again, based on previous position, and consequently determining a new destination which should not be reachable.
The entity script :
How to reproduce the glitch :
Fix implementation :
Simply change the command order in the entity script loop !
New command order :
This way, the wait for the destination is never bypassed, and the glitch can't happen anymore.
Fixed entity script :
IPS Patch content :
At ROM address 0x44E5A change "00 40 00 02 00 01" with "00 01 00 40 00 02".
Savestate and IPS patch available here :
movement_glitch_savestate_and_patch.zip
Beta Was this translation helpful? Give feedback.
All reactions