Points of Required Attention™
Please chime in on a proposed restructuring of the ROM hacking sections.
Views: 88,484,027
Main | FAQ | Uploader | IRC chat | Radio | Memberlist | Active users | Latest posts | Calendar | Stats | Online users | Search 04-25-24 11:57 PM
Guest: Register | Login

0 users currently in ROM Hacking | 3 guests | 1 bot

Main - ROM Hacking - NES PPU-related problem New thread | New reply


JaSp
Posted on 01-06-08 01:55 PM Link | Quote | ID: 72866


Shyguy
Level: 24

Posts: 18/95
EXP: 73285
Next: 4840

Since: 03-02-07
From: Paris, France

Last post: 4350 days
Last view: 4145 days
Hi there,
I'm working on a hack for SMB3 and I'm changing various on-screen stuff on the name table and the palette.
Here is the problem : it seems that if there are too many writes to $2007, it'll mess with the scroll lines. I tried to do my changes via the game's built-in PPU buffer, I tried to access directly the registers, but the problem is always here! For example, when there are more than $27 data writes to the PPU, then the vertical scroll line messes (it stays on the top when Mario isn't moving, and it flickers with the good area when I'm scrolling through the level). When there are less than $27 writes, everything is fine... I don't understand that, as the writes to $2000 & $2005 aren't changed according to both values (it seems that $2002's value is changed though, I don't know if it is important or not...)
After several hours of document-searching and trials/errors, I'm almost desperate
Please explain me the NES mysteries!

Drag
Posted on 01-07-08 05:00 AM Link | Quote | ID: 72930


Spike
Dragon
Level: 57

Posts: 696/705
EXP: 1482919
Next: 3009

Since: 02-19-07
From:

Last post: 3927 days
Last view: 3927 days
Most likely, the problem is because there's too much data being written. The reason that's a problem is because the loop that writes the data to the PPU ends up continuing after vblank ends, because there's still data to write. If you write to $2006, or do anything that messes with the PPU address (like accessing $2007) outside of vblank, the PPU starts rendering from the updated PPU address midscreen, instead of where it's intended to be.

Also because SMB3 probably updates the screen's scrolling after the writes to $2007 are finished, it ends up trying to set the scrolling after the screen is already rendering, and due to the way the PPU works, the update doesn't occur properly. That's why the screen would hop to the top of the level, instead of just jumping to random places.

So in short, you can't write too much data, so you'll have to find a way around it.

____________________

JaSp
Posted on 01-07-08 07:56 PM Link | Quote | ID: 72955


Shyguy
Level: 24

Posts: 19/95
EXP: 73285
Next: 4840

Since: 03-02-07
From: Paris, France

Last post: 4350 days
Last view: 4145 days
Ok, I see... well I'll try to do some "interlaced" setting where the palette will be updated on even frames and the status bar on uneven ones.
Thanks

Main - ROM Hacking - NES PPU-related problem New thread | New reply

Acmlmboard 2.1+4δ (2023-01-15)
© 2005-2023 Acmlm, blackhole89, Xkeeper et al.

Page rendered in 0.019 seconds. (339KB of memory used)
MySQL - queries: 47, rows: 70/70, time: 0.016 seconds.