diff --git a/BizHawk.Emulation/Computers/Commodore64/MemBus.cs b/BizHawk.Emulation/Computers/Commodore64/MemBus.cs index d657e89d01..d6fb67f0e9 100644 --- a/BizHawk.Emulation/Computers/Commodore64/MemBus.cs +++ b/BizHawk.Emulation/Computers/Commodore64/MemBus.cs @@ -58,7 +58,7 @@ namespace BizHawk.Emulation.Computers.Commodore64 // ram public byte[] colorRam; public byte[] ram; - public int vicOffset; + public ushort vicOffset; // registers public byte busData; @@ -416,7 +416,11 @@ namespace BizHawk.Emulation.Computers.Commodore64 public byte VicRead(ushort addr) { - return Read(addr); + addr = (ushort)(addr & 0x1FFF); + if (addr >= 0x1000 && addr < 0x2000) + return charRom[addr & 0x0FFF]; + else + return ram[addr | vicOffset]; } public void WipeMemory() diff --git a/BizHawk.Emulation/Computers/Commodore64/VicII.cs b/BizHawk.Emulation/Computers/Commodore64/VicII.cs index 136bc989fb..b25a1c91ab 100644 --- a/BizHawk.Emulation/Computers/Commodore64/VicII.cs +++ b/BizHawk.Emulation/Computers/Commodore64/VicII.cs @@ -71,6 +71,7 @@ namespace BizHawk.Emulation.Computers.Commodore64 public int borderRight; public int borderTop; public byte[] charBuffer; + public int charBufferOffset; public bool extendHeight; public bool extendWidth; public int horizontalScroll; @@ -241,7 +242,6 @@ namespace BizHawk.Emulation.Computers.Commodore64 } } - interrupt = (rasterInterrupt & rasterInterruptEnabled) | (spriteSpriteInterrupt & spriteSpriteInterruptEnabled) |