commodore64: RAM striping 00/FF

This commit is contained in:
saxxonpike 2012-11-27 20:47:03 +00:00
parent da00dfa99c
commit e44c6cfa55
2 changed files with 7 additions and 11 deletions

View File

@ -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

View File

@ -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)