Skip to content

Super Nintendo · Bug Fix

Bad Decoration

By Lenophis

Final Fantasy III · All hacks & resources →

About this project

This patch fixes the infamous “Crusader redecorates Reflect barriers” bug.

Original game requirements

Final Fantasy III (USA).sfc - NOINTRO
CRC32: A27F1C7A
MD5: E986575B98300F721CE27C180264D890
SHA-1: 4F37E4274AC3B2EA1BEDB08AA149D8FC5BB676E7
SHA-256: 0F51B4FCA41B7FD509E4B8F9D543151F68EFA5E97B08493E4B2A0C06F5D8D5E2

Creator credits

Lenophis
Listed creator

RELEASE 1.0

Readme & instructions

254readme.txt

Title: Bad Decoration Author: Lenophis Version: v1.0 Applies to: FF3us v1.0 Tested on: FF3us v1.0 Contents: Fix Crusader - header.ips Fix Crusader - no header.ips readme.txt crusader orig.txt crusader new.txt Anti Crusader - header.ips Anti Crusader - no header.ips ROM addresses: C0/D800 - bugfix code C1/2DD3 - palette restoring code Urgency: Varies Would you rather you see blue barriers or butt-ugly brown barriers? Description: Summoning the esper Crusader will make the reflect barrier look funny. Less "ha ha" funny, more "ew" funny.

Read moreRead less
Title: Bad Decoration
Author: Lenophis
Version: v1.0
Applies to: FF3us v1.0
Tested on: FF3us v1.0

Contents: Fix Crusader - header.ips
          Fix Crusader - no header.ips
          readme.txt
          crusader orig.txt
          crusader new.txt
          Anti Crusader - header.ips
          Anti Crusader - no header.ips

ROM addresses: C0/D800 - bugfix code
               C1/2DD3 - palette restoring code

Urgency: Varies
Would you rather you see blue barriers or butt-ugly brown barriers?

--------------------------------------------------------------------------------
Description:

Summoning the esper Crusader will make the reflect barrier look funny. Less
"ha ha" funny, more "ew" funny. Beyond that, you can only notice it if you and
a monster survive the summoning.

--------------------------------------------------------------------------------
How this patch came into being: WARNING! LONG STORY AHEAD!

This bug had to be one of the more evasive bugs of FF6. From ZED's mystical
guide:

Crusader redecorates Reflect barriers -

If you cast Crusader during a battle and then proceed to bounce a spell off of
anyone with a Reflect status, Reflect will show up colored in red tones.  This
is because Crusader's palettes have overwritten the Reflect palette stored in
RAM.  It only lasts for the rest of the battle, the original Reflect palette is
rewritten to RAM at the start of each fight.

What that doesn't mention, is that for the length of the animation character
slot 4 is also overwritten. Maybe that was unknown, or maybe whoever found it
felt it wasn't notable enough to be included. Before the damage is displayed
that palette is restored. Thus the bug hunt began... Screenshot of
character 4 being ugly:

http://leno.hypher.net/images/crusader.png

This is what I knew about the palettes because of Crusader overwriting it:

Used by Crusader, for Purifier/Collapse of Heaven and Earth/Apocalypse attack
C2/BBCF:	AE6961  	LDX $6169      (from C1/CBD6)
C2/BBD2:	7B      	TDC            (set accumulator to 0)
C2/BBD3:	A8      	TAY            (set Y to 0)
C2/BBD4:	BF4078D2	LDA $D27840,X
C2/BBD8:	99E07F  	STA $7FE0,Y    (write over character 4's
              palette and reflect's barrier palette, set's left sprite palette)

C2/BBDB:	99E07D  	STA $7DE0,Y    (same as above)
C2/BBDE:	E8      	INX 
C2/BBDF:	C8      	INY 
C2/BBE0:	C02000  	CPY #$0020
C2/BBE3:	D0EF    	BNE $BBD4
C2/BBE5:	6B      	RTL

That brought about my first attempt to find the restoring: DMA!

I did some checks for the beginning of the palette block, $7F00. That led me to
a DMA routine during NMI. With a little tweaking I managed to make all monsters,
characters, and everything else except the backgrounds to look ugly. But, it
didn't end there. Screenshots of this attempt are here:

http://www.romhacking.net/forum/index.php/topic,1113.msg36987.html#msg36987

Second attempt: NMI in general!

A little later on in that routine, there were two LDA's to which I set
breakpoints to. I summoned Crusader. And.....Crusader disables NMI?!

"Holy shit, I must be on to something!" I thought.

It turns out the answer was very close to me, but I wouldn't know it for a
bit yet.

First attempt to fix the bug:

I then hijacked some code at the beginning of NMI. Needless to say it didn't
fix the bug, probably too soon in NMI.

Second attempt to fix the bug:

I inserted the palette restoring code at the end of NMI. I summoned Crusader,
then started bouncing spells back and forth. The barrier was normal! But wait!
Crusader wasn't normal! The final 8 colors of the left sprite were off! Enter
Kejardon:

"Why don't you set a breakpoint for writes to $7E/7FE0?"

My immediate reaction was "It can't be that simple."

Third attempt to fix the bug:

Setting the breakpoint led me to the routine that you see at the beginning of
this readme. Sure enough, there it is. Executed only during NMI. Finally, the
bug was fixed.

--------------------------------------------------------------------------------
What this patch does:

This patch is completely compatible with Imzogelmo's MP color patch. Just use
whichever patch (header or no header) and the bug is fixed.

Note: The anti-patches will effectively remove this patch.

--------------------------------------------------------------------------------
Credits:

Terii Senshi & assassin - For writing the C2 bank disassembly.
Imzogelmo - For writing the C1 bank disassembly.
Kejardon - Common sense is not an often enough occurance, thanks. :)

Download 254readme.txt ↓

FROM THE COMMUNITY

Player reviews

0 reviews
No ratings yet

Played this project? Tell other players how it holds up.

Your take on Bad Decoration

Spam has been overwhelming. To help us approve your review, sign up and introduce yourself in the Introductions forum so we know you’re not a bot.

Sign in with your Retro Replay account to rate this project and share your experience.

Sign in to review