c64- VIC bank switching via CIA2
This commit is contained in:
parent
5955976216
commit
8182da2fcd
|
@ -56,6 +56,8 @@ namespace BizHawk.Emulation.Computers.Commodore64
|
||||||
public MemoryLayout layout;
|
public MemoryLayout layout;
|
||||||
|
|
||||||
// ram
|
// ram
|
||||||
|
public byte cia2A;
|
||||||
|
public byte cia2B;
|
||||||
public byte[] colorRam;
|
public byte[] colorRam;
|
||||||
public byte[] ram;
|
public byte[] ram;
|
||||||
public ushort vicOffset;
|
public ushort vicOffset;
|
||||||
|
@ -103,20 +105,26 @@ namespace BizHawk.Emulation.Computers.Commodore64
|
||||||
|
|
||||||
public byte CIA2ReadPortA()
|
public byte CIA2ReadPortA()
|
||||||
{
|
{
|
||||||
return 0;
|
return cia2A;
|
||||||
}
|
}
|
||||||
|
|
||||||
public byte CIA2ReadPortB()
|
public byte CIA2ReadPortB()
|
||||||
{
|
{
|
||||||
return 0;
|
return cia2B;
|
||||||
}
|
}
|
||||||
|
|
||||||
public void CIA2WritePortA(byte val, byte direction)
|
public void CIA2WritePortA(byte val, byte direction)
|
||||||
{
|
{
|
||||||
|
cia2A &= (byte)~direction;
|
||||||
|
cia2A |= (byte)(val & direction);
|
||||||
|
|
||||||
|
vicOffset = (ushort)((cia2A & 0x03) << 14);
|
||||||
}
|
}
|
||||||
|
|
||||||
public void CIA2WritePortB(byte val, byte direction)
|
public void CIA2WritePortB(byte val, byte direction)
|
||||||
{
|
{
|
||||||
|
cia2B &= (byte)~direction;
|
||||||
|
cia2B |= (byte)(val & direction);
|
||||||
}
|
}
|
||||||
|
|
||||||
public MemoryDesignation GetDesignation(ushort addr)
|
public MemoryDesignation GetDesignation(ushort addr)
|
||||||
|
|
Loading…
Reference in New Issue