+  RHDN Forum Archive
|-+  Romhacking
| |-+  ROM Hacking Discussion
| | |-+  Faxanadu: Fixing the Pendant Bug
Pages: [1]
Author Topic: Faxanadu: Fixing the Pendant Bug  (Read 317 times)
Harry_Pothead
Guest
« on: November 29, 2007, 06:12:33 am »

Hey guys, new to the board. 

In Faxanadu the pendant item is bugged.  Instead of increasing offensive power it decreases it.  My guess is that the programmers made a sign error when they were coding the game.   It seems logical that the bug could be fixed without going to the source code at all by simply finding the offset in the faxanadu.nes file that stores the pendant's attack change value and then change the value to its inverse.  For example, if attack power in Faxanadu used a single byte (which I think is most likely) and the value at the pendant offset was 05, I would change it to FB.   Subtracting FB would in effect be adding 05, fixing the bug. 

The problem I have is how to find the offset.  The best way I can think of now is to induce the offset location for your total attack value by comparing sets of save states with nothing different except the weapon equipped.  Once I got that, then I could compare 2 save states with the same weapon, one with the pendant and one without, to deduce the pendant's value.  Then I could open up the .nes file and search for all instances of that value.  But there are some practical problems with the idea.  I don't have a program that can compare 2 files and find differences nor do I have an idea of how to narrow it down further once I find the pendant's value.  Faxanadu.nes is 40000 bytes long.  That's an average of 400 instances per value, and if the pendant's value is a common number like something from 01 to 10, it could be much more than 400.  Using brute force would take a prohibitively long time. 

Anyone have any thoughts?
Sliver X
Guest
« Reply #1 on: November 29, 2007, 06:53:33 am »

Probably the best way? Use FCEUXD's realtime hex editor and view the RAM contents. Try seeing if an address changes when you equip the pendant. Once you find that, set a read breakpoint on it and start tracing code.
Jigglysaint
Guest
« Reply #2 on: November 29, 2007, 11:43:08 pm »

Most likely the item either sets a flag(story items are stored as bits).  Find the address in ram, then do a search for that one bit.  More often than not you will find a direct match.  There should be a spot in the rom where there is an attack modifier branch that is triggered by having the pendant in your inventory.
Pages: [1]  


Powered by SMF 1.1.4 | SMF © 2006-2007, Simple Machines LLC