Users browsing this thread: 1 Guest(s)
Status Icon Overflow Patch

#1
Posts: 174
Threads: 23
Thanks Received: 21
Thanks Given: 7
Joined: Feb 2016
Reputation: 8
Status
Enlight
Status Icon Overflow
Author: SilentEnigma
Version: 1.2
Released: 2023-10-09
Applies to: FF3us 1.0, FF3us 1.1, FF6j
Download


Description

Did you know that navigating the Skills menu in FF6 is like walking a tightrope while running with scissors?
That one wrong move can send you plummeting into the depths of resetting your SNES? *

...Yeah, long story short, I ran into a game-freezing bug while doing some testing recently.
To my knowledge, it has never been reported before:
  • Inflict a character with any permanent status such that a status icon is displayed
  • Open their Skills screen
  • Navigate back and forth between the Skills menu and a skill submenu (Espers, Magic, etc.)
  • After about 16 repetitions, the portrait graphics will become corrupt, and after about 38 repetitions, the menu locks up entirely.
  • It takes fewer repetitions to glitch out if the character has more than one status effect.
[Image: status-icon-overflow.png]
Don't push your luck, kiddo

The problem is caused by the game creating new instances of the active status effect icons every time you navigate back to the top-level Skills menu from an ability submenu. Eventually the game runs out of internal slots for the icon graphics, and it winds up stuck inside the infinite loop instruction at C3/11AD:

Code:
C3/11A0: E8          INX
C3/11A1: E8          INX
C3/11A2: E0 80 00    CPX #$0080
C3/11A5: D0 EF       BNE $1196   ; last chance to escape
C3/11A7: CA          DEX
C3/11A8: CA          DEX
C3/11A9: 98          TYA
C3/11AA: 9D 49 32    STA $3249,X
C3/11AD: 80 FE       BRA $11AD   ; game over

Imzogelmo's C3 disassembly has the comment for C3/11AD: "Changing this to 80 ED unfreezes Novalia Spirit's Shop bug". The same change would prevent the lockup here while leaving the graphical glitch.

I'm thinking the code snippet containing C3/11AD was originally meant as protection against overflow scenarios like this one. However, the infinite loop was inserted during development (possibly for testing) and never removed.

Anyway, this patch fixes the bug for real by selectively skipping over the icon display code in the Skills menu. It uses no free space. Frog 
Thanks to @"Gi Nattak" for keeping a lid on this long enough for me to get a patch out.




* assuming you've already done the other 38 steps necessary to trigger the freeze


Attached Files
.zip  StatusIconOverflow_v1.2.zip (4.43 KB, 8 downloads)
Quote  
[-] The following 4 users say Thank You to SilentEnigma for this post:
  • C-Dude (04-23-2022), CVReynolds (04-22-2022), Gi Nattak (04-21-2022), madsiur (04-22-2022)

#2
Posts: 174
Threads: 23
Thanks Received: 21
Thanks Given: 7
Joined: Feb 2016
Reputation: 8
Status
Enlight
Patch updated to v1.1 to correct a text color issue with HP/MP/level values on the Skills page.
Still uses no free space! And the footprint only grew by a couple of bytes.

Thanks @"Gi Nattak" for reporting the issue in v1.0. I think we're in good shape now.
Quote  
[-] The following 1 user says Thank You to SilentEnigma for this post:
  • CVReynolds (04-23-2022)

#3
Posts: 2,549
Threads: 98
Thanks Received: 147
Thanks Given: 158
Joined: Aug 2009
Reputation: 52
Status
Nattak\'d
Posting this here as well in case it reaches you faster than my PMs - I believe I've found a bug with this patch:
https://www.youtube.com/watch?v=x1jqKYlrZGo

It'll happen once you select an esper, than rapidly exit and re-enter the submenu (can be just once), and then click on the esper again. I thought it was a confliction with RotDS, but testing it more on a vanilla rom it seems like not.

Edit: In case it isn’t obvious, the bug is that the character stats menu font that shows the level, HP and MP turns dark blue when it should remain the regular font color, default white in this case.


We are born, live, die and then do the same thing over again.
Quote  
[-] The following 2 users say Thank You to Gi Nattak for this post:
  • madsiur (10-03-2023), SilentEnigma (10-05-2023)

#4
Posts: 174
Threads: 23
Thanks Received: 21
Thanks Given: 7
Joined: Feb 2016
Reputation: 8
Status
Enlight
(10-03-2023, 08:16 PM)Gi Nattak Wrote: Posting this here as well in case it reaches you faster than my PMs - I believe I've found a bug with this patch:
https://www.youtube.com/watch?v=x1jqKYlrZGo

It'll happen once you select an esper, than rapidly exit and re-enter the submenu (can be just once), and then click on the esper again. I thought it was a confliction with RotDS, but testing it more on a vanilla rom it seems like not.

Edit: In case it isn’t obvious, the bug is that the character stats menu font that shows the level, HP and MP turns dark blue when it should remain the regular font color, default white in this case.

Thanks Gi for reporting the bug in v1.1.
I was able to reproduce it simply by alternating between the top-level Skills menu and an ability list twice, and then viewing the details of an Esper.

The patch has been updated to v1.2 to fix the issue. It still uses no free space (by the skin of my teeth).
Quote  
[-] The following 2 users say Thank You to SilentEnigma for this post:
  • CVReynolds (10-21-2023), Gi Nattak (10-09-2023)



Forum Jump:

Users browsing this thread: 1 Guest(s)


Theme by Madsiur2017Custom Graphics by JamesWhite