MMC5: Fixed extended attributes bug (broken by 80dd9ca8 in 0.2.1)

This commit is contained in:
Souryo 2016-06-12 11:32:57 -04:00
parent 36404116ea
commit 19edea40cd

View file

@ -358,6 +358,8 @@ protected:
//"Each byte of Expansion RAM is used to enhance the tile at the corresponding address in every nametable"
//When fetching NT data, we set a flag and then alter the VRAM values read by the PPU on the following 3 cycles (palette, tile low/high byte)
uint32_t cycle = PPU::GetCurrentCycle();
if(cycle < 257 || cycle > 320) {
if(addr >= 0x2000 && (addr & 0x3FF) < 0x3C0) {
//Nametable fetches
_exAttributeLastNametableFetch = addr & 0x03FF;
@ -388,6 +390,7 @@ protected:
}
}
}
}
return BaseMapper::ReadVRAM(addr);
}