Changed a part of the AT NVR code, inspired by the recent VARCem changes.

This commit is contained in:
OBattler
2020-10-21 16:27:31 +02:00
parent 806f55b055
commit 5b3e13f50c

View File

@@ -515,21 +515,18 @@ timer_intr(void *priv)
timer_advance_u64(&local->rtc_timer, RTCCONST);
if (local->state == 1) {
local->count--;
if (local->count == 0)
if (--local->count == 0) {
timer_load_count(nvr);
else
return;
} else
return;
nvr->regs[RTC_REGC] |= REGC_PF;
if (nvr->regs[RTC_REGB] & REGB_PIE) {
nvr->regs[RTC_REGC] |= REGC_IRQF;
nvr->regs[RTC_REGC] |= REGC_PF;
if (nvr->regs[RTC_REGB] & REGB_PIE) {
nvr->regs[RTC_REGC] |= REGC_IRQF;
/* Generate an interrupt. */
if (nvr->irq != -1)
picint(1 << nvr->irq);
/* Generate an interrupt. */
if (nvr->irq != -1)
picint(1 << nvr->irq);
}
}
}
}