Author Topic: Chocobo patch bug?  (Read 2604 times)

Myria kitty

  • *
  • Posts: 42
    • View Profile
Chocobo patch bug?
« on: 2008-01-01 02:37:14 »
The Chocobo racing fix nop's this first instruction:

Code: [Select]
.text:0076EC32 0F BF 94 01 B8 86 01 00         movsx   edx, word ptr [ecx+eax+186B8h]
.text:0076EC3A 83 C2 03                        add     edx, 3

I don't think nop'ing it is the correct thing to do.  edx's value is left over from a previous array lookup (low word) and a multiply (high word).  If anything it should be "xor edx, edx".

I wonder what this code does on the R3000.  On the PSX, 0 was a valid memory address, so it would not have crashed here either.  I wouldn't know whether this code actually exists, since ~100k seems like an absurdly large memory structure in a 2 meg environment.

dziugo

  • *
  • Posts: 1470
    • View Profile
    • A new copy of FF7 thanks to Salk. Pack (zip/rar/etc) your saved game before sending it to me.
Re: Chocobo patch bug?
« Reply #1 on: 2008-01-01 16:23:19 »
The purpose of the patch was to avoid the unhandled exception when reading the memory. I agree that it's probably not a valid struct, so it must've been some hardcoded memory address. AFAIR, that value is passed to some function as an argument, but it's not actually used.

Edit: You might want to ask Akari what that value actually is in PSX version. He has been doing some serious reverse-engineering sessions on FF7 in order to develop QGears.
« Last Edit: 2008-01-01 16:28:02 by dziugo »