diff --git a/BizHawk.Emulation/Computers/Commodore64/MemBus.cs b/BizHawk.Emulation/Computers/Commodore64/MemBus.cs index c861dfdf29..1be6dc0ea1 100644 --- a/BizHawk.Emulation/Computers/Commodore64/MemBus.cs +++ b/BizHawk.Emulation/Computers/Commodore64/MemBus.cs @@ -341,7 +341,7 @@ namespace BizHawk.Emulation.Computers.Commodore64 bool hiRom = ((cpuData & 0x02) != 0); bool ioEnable = ((cpuData & 0x04) != 0); - if (loRom && hiRom && exRomPin && gamePin) + if (loRom && hiRom && gamePin && exRomPin) { layout.Mem1000 = MemoryDesignation.RAM; layout.Mem8000 = MemoryDesignation.RAM; @@ -515,11 +515,16 @@ namespace BizHawk.Emulation.Computers.Commodore64 case MemoryDesignation.Expansion1: break; case MemoryDesignation.RAM: - ram[addr] = val; break; default: break; } + + // write through to ram + if (des != MemoryDesignation.Disabled) + { + ram[addr] = val; + } } busData = val; } diff --git a/BizHawk.Emulation/Computers/Commodore64/VicII.cs b/BizHawk.Emulation/Computers/Commodore64/VicII.cs index b301e346c0..cf7dca2e07 100644 --- a/BizHawk.Emulation/Computers/Commodore64/VicII.cs +++ b/BizHawk.Emulation/Computers/Commodore64/VicII.cs @@ -755,6 +755,12 @@ namespace BizHawk.Emulation.Computers.Commodore64 // sprite comparison for (int i = 0; i < 8; i++) { + if (regs.MYE[i] && regs.MCBASE[i] == 63) + { + regs.MD[i] = false; + regs.MDMA[i] = false; + } + if (regs.MxYE[i]) regs.MYE[i] = !regs.MYE[i]; @@ -797,11 +803,6 @@ namespace BizHawk.Emulation.Computers.Commodore64 if (regs.MD[i]) { regs.MCBASE[i] += 3; - if (regs.MCBASE[i] == 63) - { - regs.MD[i] = false; - regs.MDMA[i] = false; - } } } } @@ -1116,8 +1117,8 @@ namespace BizHawk.Emulation.Computers.Commodore64 if ((!regs.MxXE[j]) || ((rasterOffsetX & 0x1) != (regs.MxX[j] & 0x1))) { regs.MSR[j] <<= 1; + regs.MSRC[j]--; } - regs.MSRC[j]--; } // if not transparent, process collisions and color