Non-fraudulent Sketch Bug fix thread

If it has bytes, we can change it. Talk about anything relating to hacking and emulation here.

Moderators: General Moderator, Game Moderator

Non-fraudulent Sketch Bug fix thread

Postby Assassin » Mon Jul 25, 2016 3:40 am

in late August 2004, i released a Sketch Bug fix on Master ZED's site that intended to give FF3us 1.0 the protections of v1.1.

however, in September 2012, Novalia Spirit (may he R.I.P. truly, he was an inspiration to us a -- wait, what?!) informed me, by way of our joint (heterosexual) confidante, Lenophis, that my patch is incomplete. it'll work on vanilla FF3us 1.0, but a hack that changes innocuous data could be blindsided by a lurking bug that, in the vein of Freddy Krueger and Jason Voorhees, just won't die.

basically, there are two components to Square's fix in FF3us 1.1:

1) Bank C2 is discussed here:

http://masterzed.cavesofnarshe.com/Game ... 3sktch.txt

when Sketch misses, save a special case value of FFFFh for a pointer.

2) Bank C1 is discussed here:

http://www.angelfire.com/al2/imzogelmo/Differences.txt

detect the pointer value of FFFFh, and don't treat it normally. instead, recognize it as a special case, and take steps accordingly, which involve zeroing its value used in a pointer calculation, or zeroing two video buffers.

---------------

my patch does Bank C2 fine, but totally missed Bank C1. inexcusable, given Imzogelmo's fine document predates it by a month. either i didn't notice it until later, or failed to understand its significance.

America is the land of second acts, so i'm finally taking the opportunity to get this right. here's an untested attempt at a Bank C1 portion:

http://assassin17.brinkster.net/forum-p ... c1-fix.asm

C1/2456 thru C1/24A4 are essentially the same as what Square did in FF3us 1.1. but i kept v1.0's relative order of functions, as i set out to minimize the number of routines with altered starting addresses. of note is reordering Function C1/2456's internals a little differently, so that Function C1/24D1 could shrink by reusing it.

C1/24A9 has a very minor change.

C1/24D1 should be functionally equivalent to FF3us 1.1, but a bit smaller due to said reuse.

C1/24F5 is also hopefully behaviorally equivalent to FF3us 1.1, but gets the most clever with optimizations, so i'd like extra peer review on this.

the 12-year anniversary of the original patch is in late August. i hope to have a working new patch out 4-5 weeks after that, as punctuality and sentimentality are for weenies. the 3.6-year dawdling (even less excusable than getting the initial patch wrong) was part being a lazy jackass, and part thinking that i'd have to revamp much of Functions C1/24F5 and near-twin C1/205A into shared functionlets to make the former fit.

scrutiny and feedback are much appreciated, and any questions are welcome.
User avatar
Assassin
Moderator
Moderator
 
Posts: 1195
Joined: Tue Sep 14, 2004 5:10 am

Re: Non-fraudulent Sketch Bug fix thread

Postby Imzogelmo » Thu Jul 28, 2016 4:31 pm

Hi assassin,
I'm also a lazy jackass, but not the same kind as you. My laziness is in not making my own topic, and instead hijacking yours.

I've been without internet for about a week, and boy, what a productivity boost that has been. :) Just for kicks, I've been making an optimized version of C1, with the unstated goal of trimming 1000 (decimal, not hex) bytes from it. We're at 936 right now. 8)
So, yeah, would you like to have a copy of the assembly file that does this? It could surely use a bit more testing, and sounds like you may need the bytes anyway.

EDIT: I can't seem to connect to any of your brinkster pages at the moment. :(
User avatar
Imzogelmo
Veteran
Veteran
 
Posts: 659
Joined: Wed Sep 08, 2004 4:07 pm
Location: On the spirtual plane

Re: Non-fraudulent Sketch Bug fix thread

Postby Assassin » Thu Jul 28, 2016 9:25 pm

commendable. give it another couple weeks, and you'll be building elaborate birdhouses. ;)

i don't need the space currently, but would like to look at it anyway. odd; my site's still down 5 hours later. it'll probably resolve in less than a day.
User avatar
Assassin
Moderator
Moderator
 
Posts: 1195
Joined: Tue Sep 14, 2004 5:10 am


Return to ROM Hacking and Emulation

Who is online

Users browsing this forum: No registered users and 3 guests

cron