From 0a7dc52aa08f10ec47dc2a25865835088af36846 Mon Sep 17 00:00:00 2001 From: SaxxonPike Date: Tue, 9 Jul 2019 22:41:12 -0500 Subject: [PATCH] C64: BA and raster IRQ cleanup --- .../Computers/Commodore64/MOS/Vic.Parse.cs | 7 +++---- BizHawk.Emulation.Cores/Computers/Commodore64/MOS/Vic.cs | 4 +--- 2 files changed, 4 insertions(+), 7 deletions(-) diff --git a/BizHawk.Emulation.Cores/Computers/Commodore64/MOS/Vic.Parse.cs b/BizHawk.Emulation.Cores/Computers/Commodore64/MOS/Vic.Parse.cs index 33c5f29a48..6337dc022f 100644 --- a/BizHawk.Emulation.Cores/Computers/Commodore64/MOS/Vic.Parse.cs +++ b/BizHawk.Emulation.Cores/Computers/Commodore64/MOS/Vic.Parse.cs @@ -336,10 +336,10 @@ } // perform BA flag manipulation - _ba = true; switch (_parseBa) { case BaTypeNone: + _ba = true; break; case BaTypeCharacter: _ba = !_badline; @@ -348,10 +348,9 @@ _parseCycleBaSprite0 = _parseBa & BaTypeMaskSprite0; _parseCycleBaSprite1 = (_parseBa & BaTypeMaskSprite1) >> 4; _parseCycleBaSprite2 = (_parseBa & BaTypeMaskSprite2) >> 8; - if ((_parseCycleBaSprite0 < 8 && _sprites[_parseCycleBaSprite0].Dma) || + _ba = !((_parseCycleBaSprite0 < 8 && _sprites[_parseCycleBaSprite0].Dma) || (_parseCycleBaSprite1 < 8 && _sprites[_parseCycleBaSprite1].Dma) || - (_parseCycleBaSprite2 < 8 && _sprites[_parseCycleBaSprite2].Dma)) - _ba = false; + (_parseCycleBaSprite2 < 8 && _sprites[_parseCycleBaSprite2].Dma)); break; } diff --git a/BizHawk.Emulation.Cores/Computers/Commodore64/MOS/Vic.cs b/BizHawk.Emulation.Cores/Computers/Commodore64/MOS/Vic.cs index 18c2ab846d..b1a27fe757 100644 --- a/BizHawk.Emulation.Cores/Computers/Commodore64/MOS/Vic.cs +++ b/BizHawk.Emulation.Cores/Computers/Commodore64/MOS/Vic.cs @@ -254,12 +254,10 @@ namespace BizHawk.Emulation.Cores.Computers.Commodore64.MOS // start of rasterline if ((_cycle == RasterIrqLineXCycle && _rasterLine > 0) || (_cycle == RasterIrqLine0Cycle && _rasterLine == 0)) { - //_rasterInterruptTriggered = false; - if (_rasterLine == LastDmaLine) _badlineEnable = false; - // IRQ compares are done here + // raster compares are done here if (_rasterLine == _rasterInterruptLine) { _intRaster = true;