Correct both a linux warning, and some timing anomalies.

Signed-off-by: Adrian Conlon <Adrian.conlon@gmail.com>
This commit is contained in:
Adrian Conlon 2017-10-02 20:54:38 +01:00
parent 18d74b6f13
commit c21d66eba4

View File

@ -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();