PPU: Reading $2137 should only latch h/v when bit 7 of $4201 is set

This commit is contained in:
Sour 2019-06-30 19:51:52 -04:00
parent 66c3d0a3b1
commit 57c31ad354

View file

@ -1247,7 +1247,10 @@ uint8_t Ppu::Read(uint16_t addr)
case 0x2137:
//SLHV - Software Latch for H/V Counter
//Latch values on read, and return open bus
LatchLocationValues();
if(_regs->GetIoPortOutput() & 0x80) {
//Only latch H/V counters if bit 7 of $4201 is set.
LatchLocationValues();
}
break;
case 0x2138: {