commodore64: fix CIA timer bug, writes weren't always getting through to the registers
This commit is contained in:
parent
2a5be0d42c
commit
25edebfb80
|
@ -305,6 +305,7 @@ namespace BizHawk.Emulation.Computers.Commodore64
|
|||
public byte Read(ushort addr)
|
||||
{
|
||||
byte result;
|
||||
addr &= 0xF;
|
||||
|
||||
switch (addr)
|
||||
{
|
||||
|
@ -377,6 +378,7 @@ namespace BizHawk.Emulation.Computers.Commodore64
|
|||
|
||||
public void Write(ushort addr, byte val)
|
||||
{
|
||||
addr &= 0xF;
|
||||
switch (addr)
|
||||
{
|
||||
case 0x00:
|
||||
|
|
|
@ -267,6 +267,8 @@ namespace BizHawk.Emulation.Computers.Commodore64
|
|||
|
||||
public void Poke(ushort addr, byte val)
|
||||
{
|
||||
return;
|
||||
/*
|
||||
if (addr == 0x0000)
|
||||
{
|
||||
cpuPort.Direction = val;
|
||||
|
@ -315,6 +317,7 @@ namespace BizHawk.Emulation.Computers.Commodore64
|
|||
ram[addr] = val;
|
||||
}
|
||||
}
|
||||
*/
|
||||
}
|
||||
|
||||
public void PokeRam(int addr, byte val)
|
||||
|
|
|
@ -750,6 +750,7 @@ namespace BizHawk.Emulation.Computers.Commodore64
|
|||
PerformSpriteDataFetch(7);
|
||||
break;
|
||||
case 10:
|
||||
signal.VicAEC = true;
|
||||
PerformDRAMRefresh();
|
||||
break;
|
||||
case 11:
|
||||
|
@ -889,6 +890,7 @@ namespace BizHawk.Emulation.Computers.Commodore64
|
|||
PerformSpriteComparison();
|
||||
break;
|
||||
case 55:
|
||||
signal.VicAEC = true;
|
||||
PerformSpriteComparison();
|
||||
break;
|
||||
case 56:
|
||||
|
@ -960,9 +962,6 @@ namespace BizHawk.Emulation.Computers.Commodore64
|
|||
|
||||
private void PerformSpriteComparison()
|
||||
{
|
||||
// reenable cpu if disabled
|
||||
signal.VicAEC = true;
|
||||
|
||||
// sprite comparison
|
||||
for (int i = 0; i < 8; i++)
|
||||
{
|
||||
|
@ -985,7 +984,6 @@ namespace BizHawk.Emulation.Computers.Commodore64
|
|||
private void PerformSpriteDataFetch(int spriteIndex)
|
||||
{
|
||||
// second half of the fetch cycle
|
||||
signal.VicAEC = !regs.MDMA[spriteIndex];
|
||||
if (regs.MDMA[spriteIndex])
|
||||
{
|
||||
for (int i = 0; i < 2; i++)
|
||||
|
|
Loading…
Reference in New Issue