From c21d66eba40654b9679c817797ffda8cf9e3773b Mon Sep 17 00:00:00 2001 From: Adrian Conlon Date: Mon, 2 Oct 2017 20:54:38 +0100 Subject: [PATCH] Correct both a linux warning, and some timing anomalies. Signed-off-by: Adrian Conlon --- LR35902/src/LR35902.cpp | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/LR35902/src/LR35902.cpp b/LR35902/src/LR35902.cpp index ae73d6d..e62c085 100644 --- a/LR35902/src/LR35902.cpp +++ b/LR35902/src/LR35902.cpp @@ -296,7 +296,6 @@ int EightBit::GameBoy::LR35902::runRasterLines() { int EightBit::GameBoy::LR35902::runRasterLines(int limit, int lines) { int count = 0; - int executed = 0; int allowed = Bus::CyclesPerLine; for (int line = 0; line < lines; ++line) { auto executed = runRasterLine(allowed); @@ -351,7 +350,7 @@ int EightBit::GameBoy::LR35902::runRasterLine(int limit) { m_bus.updateLcdStatusMode(Bus::LcdStatusMode::HBlank); if (m_bus.peekRegister(Bus::STAT) & Bit3) m_bus.triggerInterrupt(Bus::Interrupts::DisplayControlStatus); - count += run(203); // ~48.6us + count += run(limit - count); // ~48.6us m_bus.incrementLY();