mirror of
https://github.com/MoleskiCoder/EightBit.git
synced 2025-01-10 10:29:43 +00:00
Correct both a linux warning, and some timing anomalies.
Signed-off-by: Adrian Conlon <Adrian.conlon@gmail.com>
This commit is contained in:
parent
18d74b6f13
commit
c21d66eba4
@ -296,7 +296,6 @@ int EightBit::GameBoy::LR35902::runRasterLines() {
|
|||||||
|
|
||||||
int EightBit::GameBoy::LR35902::runRasterLines(int limit, int lines) {
|
int EightBit::GameBoy::LR35902::runRasterLines(int limit, int lines) {
|
||||||
int count = 0;
|
int count = 0;
|
||||||
int executed = 0;
|
|
||||||
int allowed = Bus::CyclesPerLine;
|
int allowed = Bus::CyclesPerLine;
|
||||||
for (int line = 0; line < lines; ++line) {
|
for (int line = 0; line < lines; ++line) {
|
||||||
auto executed = runRasterLine(allowed);
|
auto executed = runRasterLine(allowed);
|
||||||
@ -351,7 +350,7 @@ int EightBit::GameBoy::LR35902::runRasterLine(int limit) {
|
|||||||
m_bus.updateLcdStatusMode(Bus::LcdStatusMode::HBlank);
|
m_bus.updateLcdStatusMode(Bus::LcdStatusMode::HBlank);
|
||||||
if (m_bus.peekRegister(Bus::STAT) & Bit3)
|
if (m_bus.peekRegister(Bus::STAT) & Bit3)
|
||||||
m_bus.triggerInterrupt(Bus::Interrupts::DisplayControlStatus);
|
m_bus.triggerInterrupt(Bus::Interrupts::DisplayControlStatus);
|
||||||
count += run(203); // ~48.6us
|
count += run(limit - count); // ~48.6us
|
||||||
|
|
||||||
m_bus.incrementLY();
|
m_bus.incrementLY();
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user