From: Toni Wilen Date: Wed, 1 Jul 2015 16:04:47 +0000 (+0300) Subject: uae_int_requested cleanup, added level 6 interrupt support. X-Git-Tag: 3200~160 X-Git-Url: https://git.unchartedbackwaters.co.uk/w/?a=commitdiff_plain;h=e339d5491ee75daca0f46aa0ca82f7614f040332;p=francis%2Fwinuae.git uae_int_requested cleanup, added level 6 interrupt support. --- diff --git a/custom.cpp b/custom.cpp index 79b70e8a..5de71af6 100644 --- a/custom.cpp +++ b/custom.cpp @@ -8100,7 +8100,10 @@ static void hsync_handler_post (bool onvsync) } if (uae_int_requested) { - INTREQ (0x8000 | 0x0008); + if (uae_int_requested & 0xff00) + INTREQ(0x8000 | 0x2000); + if (uae_int_requested & 0x0ff) + INTREQ(0x8000 | 0x0008); } { diff --git a/newcpu.cpp b/newcpu.cpp index f3adb33d..c345798b 100644 --- a/newcpu.cpp +++ b/newcpu.cpp @@ -3301,6 +3301,17 @@ static void do_trace (void) } } +static void check_uae_int_request(void) +{ + if (uae_int_requested || uaenet_int_requested) { + if ((uae_int_requested & 0x00ff) || uaenet_int_requested) + INTREQ_f(0x8000 | 0x0008); + if (uae_int_requested & 0xff00) + INTREQ_f(0x8000 | 0x2000); + set_special(SPCFLAG_INT); + } +} + void cpu_sleep_millis(int ms) { #ifdef WITH_PPC @@ -3360,6 +3371,7 @@ static bool haltloop(void) if (currprefs.ppc_cpu_idle >= 10 || (i == ev_max && vpos > 0 && vpos < maxvpos - maxlines)) { cpu_sleep_millis(1); } + check_uae_int_request(); uae_ppc_execute_check(); lines = (read_processor_time() - rpt_scanline) / vsynctimeline + 1; @@ -3395,6 +3407,7 @@ static bool haltloop(void) // sync chipset with real time for (;;) { + check_uae_int_request(); ppc_interrupt(intlev()); uae_ppc_execute_check(); if (event_wait) @@ -3573,11 +3586,8 @@ static int do_specialties (int cycles) } bool first = true; while ((regs.spcflags & SPCFLAG_STOP) && !(regs.spcflags & SPCFLAG_BRK)) { -isstopped: - if (uae_int_requested || uaenet_int_requested) { - INTREQ_f (0x8008); - set_special (SPCFLAG_INT); - } + isstopped: + check_uae_int_request(); { extern void bsdsock_fake_int_handler (void); extern int volatile bsd_int_requested; @@ -4064,10 +4074,7 @@ static void m68k_run_jit (void) for (;;) { ((compiled_handler*)(pushall_call_handler))(); /* Whenever we return from that, we should check spcflags */ - if (uae_int_requested || uaenet_int_requested) { - INTREQ_f (0x8008); - set_special (SPCFLAG_INT); - } + check_uae_int_request(); if (regs.spcflags) { if (do_specialties (0)) { return;