I am working on a side scroller that is supposed to scroll from right to left. I want to start the display from the nametable-2 (i.e. nametable on the right).
Firstly, I am setting the last 2 bits of PPUCTRL to "01" so that second nametable is shown when the game starts. After this:
1) Nametable is updated with the new tiles(from right to left)
2) attribute table is updated
3) graphics are enabled using PPUSTATUS
4) PPUSCROLL is updated.
I expect nametable2 to be displayed after step 4 but that's not happening. Instead I am still seeing nametable-1 on the screen( I dont know if PPUCTRL got changed here somehow). If after step 4 I set last bits of PPUCTRL to "01" again then I am able to see nametable-2.
Perhaps my understanding about "how the contents of PPU registers are changed\retained through the different stages in an nes program" is lacking something.
Firstly, I am setting the last 2 bits of PPUCTRL to "01" so that second nametable is shown when the game starts. After this:
1) Nametable is updated with the new tiles(from right to left)
2) attribute table is updated
3) graphics are enabled using PPUSTATUS
4) PPUSCROLL is updated.
I expect nametable2 to be displayed after step 4 but that's not happening. Instead I am still seeing nametable-1 on the screen( I dont know if PPUCTRL got changed here somehow). If after step 4 I set last bits of PPUCTRL to "01" again then I am able to see nametable-2.
Perhaps my understanding about "how the contents of PPU registers are changed\retained through the different stages in an nes program" is lacking something.