Also I have never used a message board before so sorry if my formatting is wack.






Moderator: Moderators
Ok. It looks like your Y scroll value is somewhere between 240 - 255, and is showing pieces of the attribute table as tiles. My guess is that your scroll value update is coming after vBlank is over, which will corrupt the scroll position. You can test this in the step through debugger. Hit [Run Line] and [Step Into] as you follow your code and make sure that your ($2005) scroll values are both the last thing being set after ($2007) writes are done and before the scanline = -1
No problem!
Code: Select all
VBLANK:
; Do all graphics related updates here
LDA #$02
STA $4014 ; Reloads sprite stuff
; Set your scroll position after $2007 writes, etc.
LDA #$00
STA $2005
STA $2005
; Do everything else here...
JSR ResetController
JSR ReadUserInput
JSR CheckRightPressed
RTI
Yep. The screen is 256x240. The Y position goes right from 239 to 0 when drawing the screen. If you set the Y position from 240 - 255, the NES gets very confused and draws the end of the attribute table as tiles.Randomletters367 wrote: ↑Wed Feb 03, 2021 10:16 pmAlso do you know the reason why those junk tiles were being loaded when the scroll wasnt set?