+  RHDN Forum Archive
|-+  Romhacking
| |-+  General Romhacking
| | |-+  NES Tilemap errors
Pages: [1]
Author Topic: NES Tilemap errors  (Read 263 times)
KingMike
Guest
« on: April 18, 2007, 12:04:39 am »

I'm trying to fix a bug in a translation I'm working on.
Somehow some rouge data (likely palette data) is getting chucked into the tilemap.
It probably wouldn't be too hard to fix, except that I'm using FCEUXD SP 1.06, and I think it's allowing a VRAM write to go through without breaking.
(the debugger pauses when the game attempts to clear out a dialouge bar, and I can see the proper data being written, but when I have the hex editor open, I can see the bad data being written, with no pause)

(looks like FCEUXD SP has been updated to 1.07 a couple months ago. Do submissions work yet for updates of existing utils? This update offers a RAM Filter, which is reportedly a better cheat finder.)
Disch
Guest
« Reply #1 on: April 18, 2007, 12:46:07 am »

Worst case scenario is that there are writes happening outside of VBlank.  This could explain all the problems:

1) The PPU updates the VRAM address as it runs.. therefore if the game sets the address to $2000 then writes to VRAM, it may actually be attempting to write to $2001 or higher if the PPU modified the address at all (creating garbage)

2)  The Debugger might not snap on such a breakpoint because the debugger may not run the PPU (to update the VRAM address) before it checks the address against the desired ranges.  IIRC, FCEUXD snaps its breakpoints before the instruction is even executed -- FCEU probably doesn't catch up the PPU (and thus, modify the VRAM address to what it "should" be) until after the write is processed (and thus -- after the instruction is executed).


Check to see *when* the game is writing to VRAM.  Make sure it's not after rendering has started.  Try to optimize as much VBlank code as you can.



But that's all speculation.  The problem might be something else entirely, you never know.  Although this is the only explanation I can think of that would explain your breakpoints failing.
Nightcrawler
Guest
« Reply #2 on: April 18, 2007, 07:35:32 am »

Quote from: KingMike on April 18, 2007, 12:04:39 am
(looks like FCEUXD SP has been updated to 1.07 a couple months ago. Do submissions work yet for updates of existing utils? This update offers a RAM Filter, which is reportedly a better cheat finder.)

Actually, now that you mention it, yes edit submissions are operational under RHDN 2.0, however they are untested. This is a good opportunity to run a test. Please PM me a reminder about this(or I'm likely to forget for a few days). I'll give the Utilities code another final check over and then I can give the URL and you can give RHDN 2.0 a try editing that utility. Smiley
Pages: [1]  


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