
I have read in other threads that a likely cause is failing to buffer reads from $2007 on the PPU bus. However, I'm fairly confident I have properly implemented the buffered read, but I still see the error. See my code pasted below:
Code: Select all
case 0x2007: // PPU data
// Most data reads are one cycle behind. Return the previous value and fetch the next.
result = mReadBuffer;
mReadBuffer = read(mVRAMAddress.value);
// If the address is in the palette range, however, the read is immediate. For reference
// on the palette address range, see:
// https://wiki.nesdev.com/w/index.php/PPU_registers#The_PPUDATA_read_buffer_.28post-fetch.29
if (0x3F00 <= mVRAMAddress.value && mVRAMAddress.value <= 0x3FFF) {
result = mReadBuffer;
}
// Reads and writes automatically increment the video memory address either by 1 or by
// 32, depending on the control register.
mVRAMAddress.value += mCtrlRegister.incrementMode == 0 ? 1 : 32;
break;
Any ideas of what else I can try?