LR35902: No need for an intermediate timer counter.

Signed-off-by: Adrian Conlon <Adrian.conlon@gmail.com>
This commit is contained in:
Adrian Conlon 2019-08-16 18:07:24 +01:00
parent 7942ca7085
commit 1b9f65904a
1 changed files with 1 additions and 3 deletions

View File

@ -72,7 +72,6 @@ namespace EightBit.GameBoy
private readonly Register16 dmaAddress = new Register16();
private int timerCounter = 0;
private int timerRate = 0;
private bool dmaTransferActive = false;
@ -263,7 +262,7 @@ namespace EightBit.GameBoy
this.timerCounter -= cycles;
if (this.timerCounter <= 0)
{
this.timerCounter += this.timerRate;
this.timerCounter += this.TimerClockTicks;
this.IncrementTIMA();
}
}
@ -299,7 +298,6 @@ namespace EightBit.GameBoy
case TMA: // R/W
break;
case TAC: // R/W
this.timerRate = this.TimerClockTicks;
break;
case IF: // R/W