A and B: as long as your NMI is short enough, A and B are the lower 8 bits of the X and Y coordinates of the initial (i.e. top of screen) scroll.raydempsey wrote:I have been trying unsuccessfully to create a banner. I don't know what the values in A thru F mean. I tried experimenting and I still don't get it. [...] What do A thru F mean and what should I put where?Code: Select all
[end of NMI] lda #0 ;<-------------------- A sta $2005 lda #0 ;<-------------------- B sta $2005 rts [... in IRQ for raster split] lda #0 ;<--------------- C sta $2006 lda #0 ;<--------------- D sta $2005 [... a small delay ...] lda #0 ;<--------------- E sta $2005 lda #0 ;<--------------- F sta $2006
C,D,E,F: This is a messy thing that is an artifact of how scrolling works on the NES.
wiki:PPU scrolling#Split X & Y scroll is an exactingly detailed explanation...
The easy ones:
C specifies the nametable, or equivalently the 256s bit of X scroll and the 240s bit of Y scroll
E and D (notice reversed order) are the same as A and B, but for the scroll values desired after the split.
F needs to be a bit-shifted and combined copy of your X and Y scroll values.
To the best of my knowledge, this thing you already have:What should I do to make it so I have a banner that starts 32 scanlines down where the top has no vert or horiz scroll while the last of the scanlines look shifted to the right n pixels.
Code: Select all
lda #31
sta $5203
lda #$80
sta $5204
It would help if you told us what you saw instead...What am I doing wrong?