From d5c4d2f0375482ca4aa28640769cafd965c64fcd Mon Sep 17 00:00:00 2001 From: alyosha-tas Date: Fri, 27 May 2016 08:53:37 -0400 Subject: [PATCH] Add poke flag the point of this is to protect the data bus state --- BizHawk.Emulation.Cores/Consoles/Atari/2600/Tia/TIA.cs | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/BizHawk.Emulation.Cores/Consoles/Atari/2600/Tia/TIA.cs b/BizHawk.Emulation.Cores/Consoles/Atari/2600/Tia/TIA.cs index 8abe34a3b8..d381e798f8 100644 --- a/BizHawk.Emulation.Cores/Consoles/Atari/2600/Tia/TIA.cs +++ b/BizHawk.Emulation.Cores/Consoles/Atari/2600/Tia/TIA.cs @@ -1151,16 +1151,14 @@ namespace BizHawk.Emulation.Cores.Atari.Atari2600 //assigned in some other bus access, so let's go with that. coll+=(byte)(mask & bus_state); - // this might need to be peek protected, let's just make a note of it for now - bus_state = (int)coll; + if (!peek) bus_state = (int)coll; return coll; } - public void WriteMemory(ushort addr, byte value) + public void WriteMemory(ushort addr, byte value, bool poke) { var maskedAddr = (ushort)(addr & 0x3f); - // this might need to be poke protected, let's just make a note of it for now - bus_state = value; + if (!poke) bus_state = value; if (maskedAddr == 0x00) // VSYNC {