What's going on here? What am I doing wrong? I want the technical explanation.
When loading a different background the screen flashes for a split second showing the top of the new background graphics in the middle of the screen before the new background is completely loaded.
Here's an example rom and source file: background-flash-example.zip
NESASM syntax.
Press A or B to change between background 1 & 2. Notice there's a slight flicker in the middle of the screen. Or if you hold one of the buttons down the new background graphics will stay in the middle of the screen.
I'm having an identical issue in the pong game I'm developing. When the game state changes and a new background is loaded I see the same mid-screen flash for a split second.
In the pong game:
Toward the top of NMI (after DMA sprite transfer) I jump to a subroutine to check scores. If someone has won I then:
Shut the screen off
Load the "game over" background
Change the game state to "game over"
Turn the screen on
Then it returns from these subroutines to the place it left off in NMI and right after that section is the PPU clean up section of code (like my simple example here). I have a feeling this PPU clean up section of code might be the issue.. is it turning the screen on too soon or something?
When loading a different background the screen flashes for a split second showing the top of the new background graphics in the middle of the screen before the new background is completely loaded.
Here's an example rom and source file: background-flash-example.zip
NESASM syntax.
Press A or B to change between background 1 & 2. Notice there's a slight flicker in the middle of the screen. Or if you hold one of the buttons down the new background graphics will stay in the middle of the screen.
I'm having an identical issue in the pong game I'm developing. When the game state changes and a new background is loaded I see the same mid-screen flash for a split second.
In the pong game:
Toward the top of NMI (after DMA sprite transfer) I jump to a subroutine to check scores. If someone has won I then:
Shut the screen off
Load the "game over" background
Change the game state to "game over"
Turn the screen on
Then it returns from these subroutines to the place it left off in NMI and right after that section is the PPU clean up section of code (like my simple example here). I have a feeling this PPU clean up section of code might be the issue.. is it turning the screen on too soon or something?