diff --git a/BizHawk.Emulation/Computers/Commodore64/C64.Core.cs b/BizHawk.Emulation/Computers/Commodore64/C64.Core.cs index f638daee42..5cb758f714 100644 --- a/BizHawk.Emulation/Computers/Commodore64/C64.Core.cs +++ b/BizHawk.Emulation/Computers/Commodore64/C64.Core.cs @@ -96,16 +96,6 @@ namespace BizHawk.Emulation.Computers.Commodore64 chips.HardReset(); } - //private byte Peek(int addr) - //{ - // return chips.cpu.Peek(addr); - //} - - //private void Poke(int addr, byte val) - //{ - // chips.cpu.Poke(addr, val); - //} - // ------------------------------------ } @@ -118,7 +108,7 @@ namespace BizHawk.Emulation.Computers.Commodore64 public Chip2114 colorRam; //u19 public MOS6510 cpu; //u6 public Chip23XX kernalRom; //u4 - public MOSPLA pla; // + public MOSPLA pla; public Chip4864 ram; //u10+11 public Sid sid; //u9 public Vic vic; //u7 diff --git a/BizHawk.Emulation/Computers/Commodore64/MOS/Chip4864.cs b/BizHawk.Emulation/Computers/Commodore64/MOS/Chip4864.cs index 6b52524f5d..94f65b541a 100644 --- a/BizHawk.Emulation/Computers/Commodore64/MOS/Chip4864.cs +++ b/BizHawk.Emulation/Computers/Commodore64/MOS/Chip4864.cs @@ -14,6 +14,8 @@ namespace BizHawk.Emulation.Computers.Commodore64.MOS // use one 4864, the C64 can use sets of 4164 or // 4464 typically + // memory is striped 00/FF at intervals of 0x40 + public class Chip4864 : IStandardIO { private byte[] ram; @@ -26,6 +28,10 @@ namespace BizHawk.Emulation.Computers.Commodore64.MOS public void HardReset() { ram = new byte[0x10000]; + + // stripe the ram + for (int i = 0; i < 10000; i++) + ram[i] = ((i & 0x40) != 0) ? (byte)0xFF : (byte)0x00; } public byte Peek(int addr)