diff --git a/BizHawk.Emulation/Computers/Commodore64/Cia.cs b/BizHawk.Emulation/Computers/Commodore64/Cia.cs index 816a16f3b1..889e6a6db2 100644 --- a/BizHawk.Emulation/Computers/Commodore64/Cia.cs +++ b/BizHawk.Emulation/Computers/Commodore64/Cia.cs @@ -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: diff --git a/BizHawk.Emulation/Computers/Commodore64/MemBus.cs b/BizHawk.Emulation/Computers/Commodore64/MemBus.cs index 7c129c5b1e..39f57327bf 100644 --- a/BizHawk.Emulation/Computers/Commodore64/MemBus.cs +++ b/BizHawk.Emulation/Computers/Commodore64/MemBus.cs @@ -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) diff --git a/BizHawk.Emulation/Computers/Commodore64/VicII.cs b/BizHawk.Emulation/Computers/Commodore64/VicII.cs index 9fad93ac9e..d8fc017c60 100644 --- a/BizHawk.Emulation/Computers/Commodore64/VicII.cs +++ b/BizHawk.Emulation/Computers/Commodore64/VicII.cs @@ -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++)