Error graphic

Are you new to 6502, NES, or even programming in general? Post any of your questions here. Remember - the only dumb question is the question that remains unasked.

Moderator: Moderators

Locked
lidnariq
Posts: 11432
Joined: Sun Apr 13, 2008 11:12 am

Re: Error graphic

Post by lidnariq »

Y scroll values of 240 through 255 render the attribute table as though it were part of the nametable.

You probably actually wanted to use 232 (or maybe 488??) instead of 248.
User avatar
tokumaru
Posts: 12427
Joined: Sat Feb 12, 2005 9:43 pm
Location: Rio de Janeiro - Brazil

Re: Error graphic

Post by tokumaru »

Values 240-255 are "invalid" for the vertical scroll because name tables are only 240 pixels tall. What that does is force the PPU to render attribute table data as if it were name table data (hence why the glitch doesn't show up in the NT viewer).

Also, there are no guarantees as to how many scanlines will be hidden by the overscan in NTSC, but FCEUX is pre-configured to hide 8 scanlines at the top and bottom, which is hardly accurate. I suggest you go into the video settings and configure it to show all scanlines in NTSC as well as PAL, and code your game to not have glitches at the top or bottom, whenever possible. In scrolling games, glitches are sometimes unavoidable, but one-screen games should not have any trouble always generating clean backgrounds.
Locked