The following warnings occurred:
Warning [2] count(): Parameter must be an array or an object that implements Countable - Line: 895 - File: showthread.php PHP 7.3.33 (Linux)
File Line Function
/showthread.php 895 errorHandler->error




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

#1
Posts: 174
Threads: 23
Thanks Received: 22
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)



Messages In This Thread
Status Icon Overflow Patch - by SilentEnigma - 04-21-2022, 10:13 PM
RE: Status Icon Overflow Patch - by SilentEnigma - 04-23-2022, 01:46 PM
RE: Status Icon Overflow Patch - by Gi Nattak - 10-03-2023, 08:16 PM
RE: Status Icon Overflow Patch - by SilentEnigma - 10-09-2023, 12:23 AM

Forum Jump:

Users browsing this thread: 1 Guest(s)


Theme by Madsiur2017Custom Graphics by JamesWhite