c64- VIC memory read function

This commit is contained in:
saxxonpike 2012-11-03 15:57:32 +00:00
parent 1e2ee5f0b5
commit 5955976216
2 changed files with 7 additions and 3 deletions
BizHawk.Emulation/Computers/Commodore64

View File

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

View File

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