From d62f2ac3fe0897bef9f0f0ae4979d28cadea4207 Mon Sep 17 00:00:00 2001 From: SaxxonPike Date: Sat, 13 Jul 2019 01:41:58 -0500 Subject: [PATCH] C64: 0F7 is a badline eligible raster (fixes 26-line text demo in Frodo test suite) --- .../Computers/Commodore64/MOS/Vic.Registers.cs | 2 +- .../Computers/Commodore64/MOS/Vic.TimingBuilder.cs | 4 ++-- BizHawk.Emulation.Cores/Computers/Commodore64/MOS/Vic.cs | 4 ++-- 3 files changed, 5 insertions(+), 5 deletions(-) diff --git a/BizHawk.Emulation.Cores/Computers/Commodore64/MOS/Vic.Registers.cs b/BizHawk.Emulation.Cores/Computers/Commodore64/MOS/Vic.Registers.cs index f8b8d78508..98985bc44a 100644 --- a/BizHawk.Emulation.Cores/Computers/Commodore64/MOS/Vic.Registers.cs +++ b/BizHawk.Emulation.Cores/Computers/Commodore64/MOS/Vic.Registers.cs @@ -289,7 +289,7 @@ _rasterInterruptLine &= 0xFF; _rasterInterruptLine |= (val & 0x80) << 1; - if (_rasterLine == FirstDmaLine) + if (_rasterLine == BadLineEnableRaster) _badlineEnable |= _displayEnable; if (_badlineEnable) diff --git a/BizHawk.Emulation.Cores/Computers/Commodore64/MOS/Vic.TimingBuilder.cs b/BizHawk.Emulation.Cores/Computers/Commodore64/MOS/Vic.TimingBuilder.cs index 4a3715b4d1..9a3109db89 100644 --- a/BizHawk.Emulation.Cores/Computers/Commodore64/MOS/Vic.TimingBuilder.cs +++ b/BizHawk.Emulation.Cores/Computers/Commodore64/MOS/Vic.TimingBuilder.cs @@ -13,8 +13,8 @@ namespace BizHawk.Emulation.Cores.Computers.Commodore64.MOS private const int BorderTop24 = 0x037; private const int BorderBottom25 = 0x0FB; private const int BorderBottom24 = 0x0F7; - private const int FirstDmaLine = 0x030; - private const int LastDmaLine = 0x0F7; + private const int BadLineEnableRaster = 0x030; + private const int BadLineDisableRaster = 0x0F8; // The special actions taken by the Vic are in the same order and interval on all chips, just different offsets. private static readonly int[] TimingBuilderCycle14Act = diff --git a/BizHawk.Emulation.Cores/Computers/Commodore64/MOS/Vic.cs b/BizHawk.Emulation.Cores/Computers/Commodore64/MOS/Vic.cs index c9cbc09747..4c69d69863 100644 --- a/BizHawk.Emulation.Cores/Computers/Commodore64/MOS/Vic.cs +++ b/BizHawk.Emulation.Cores/Computers/Commodore64/MOS/Vic.cs @@ -252,7 +252,7 @@ namespace BizHawk.Emulation.Cores.Computers.Commodore64.MOS // start of rasterline if ((_cycle == RasterIrqLineXCycle && _rasterLine > 0) || (_cycle == RasterIrqLine0Cycle && _rasterLine == 0)) { - if (_rasterLine == LastDmaLine) + if (_rasterLine == BadLineDisableRaster) _badlineEnable = false; // raster compares are done here @@ -284,7 +284,7 @@ namespace BizHawk.Emulation.Cores.Computers.Commodore64.MOS } // display enable compare - if (_rasterLine == FirstDmaLine) + if (_rasterLine == BadLineEnableRaster) { _badlineEnable |= _displayEnable; }