From f77e1715a67295b0cbb8942a5541c4024efe90a9 Mon Sep 17 00:00:00 2001 From: beeanyew Date: Tue, 8 Jun 2021 22:23:26 +0200 Subject: [PATCH] Reduce lag of repeatedly triggered interrupts a bit Please tell me if this breaks everything. --- emulator.c | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/emulator.c b/emulator.c index 23247fe..b72c243 100644 --- a/emulator.c +++ b/emulator.c @@ -126,11 +126,13 @@ void *ipl_task(void *args) { value = *(gpio + 13); if (!(value & (1 << PIN_IPL_ZERO))) { - irq = 1; old_irq = irq_delay; //NOP - M68K_END_TIMESLICE; - NOP + if (!irq) { + M68K_END_TIMESLICE; + NOP + irq = 1; + } //usleep(0); } else { -- 2.39.2