Here is a screenshot :
After debugging, it seems that the problem is caused by the way I initialize the PPU VBlank status at power up.
Conforming to this doc, I implemented the PPU warm up by having a reset flag which is set on reset and reset at scanline 261 pixel 1, as long as the reset flag is set, I call the reset method on each clock so even if the registers changes they are reset to their initial state.
Also I set the VBlank status flag to true (often set in the doc) at the powerUp method and I leave it unchanged on the reset method.
But in Donkey Kong, it seems that the game wait only for 1 VBlank (Debugged with Nintaco, this code is called only once) :
Code: Select all
C7A8 : LDA $2002
C7AB : AND #$80
C7AD : BEQ $C7A8
So the nametable will not be filled with $24 but stays filled with $00 (default value) and this is why I have this wrong title screen.
If I reset the VBlank status flag on the power up, Donkey Kong will wait correctly the warm up and everything is fine :
But in real NES or other emulators, donkey kong works fine, and the doc says that this VBlank status flag is often set at the power up, so there is a big chance there is a problem elsewhere with my emulator.
But to be sure, can somebody tell me if donkey kong wait correctly the warm up ? or is it waiting incorrectly like mentioned above ? and if yes why the game works properly on real hardware ?
Thanks