diff options
Diffstat (limited to 'emulator.cpp')
-rw-r--r-- | emulator.cpp | 20 |
1 files changed, 11 insertions, 9 deletions
diff --git a/emulator.cpp b/emulator.cpp index b5ad031..de9be02 100644 --- a/emulator.cpp +++ b/emulator.cpp @@ -328,8 +328,8 @@ int m68k_irq_ack(int level) { (void) level; // TODO - exit_error("IRQ ack"); - return M68K_INT_ACK_SPURIOUS; + printf("IRQ ack\n"); + return level; } static void make_hex(char* buff, unsigned int pc, unsigned int length) @@ -480,17 +480,19 @@ int emulator(M68KDebuggingControl& m68k_debug) break; } if (m68k_debug.IsRunning()) { - m68k_execute(10000); + do { + m68k_execute(100000); + } while(!g_vdp.Scanline()); } if (m68k_debug.HasBreakpoint()) { m68k_debug.SetRunning(false); m68k_debug.ResetPendingBreakpoint(); - const auto response = - exchange_ctx.WrapDataToSend("S05"); - if (DEBUG_TRACE_GDB_REMOTE) - printf("-> \"%s\"\n", response.c_str()); - if (send(conn_fd, &response[0], response.length(), 0) == -1) - perror("Send failed (response)"); + const auto response = + exchange_ctx.WrapDataToSend("S05"); + if (DEBUG_TRACE_GDB_REMOTE) + printf("-> \"%s\"\n", response.c_str()); + if (send(conn_fd, &response[0], response.length(), 0) == -1) + perror("Send failed (response)"); } // TODO turn off O_NONBLOCK and poll instead of sleep, only use // nonlock when freerunning |