diff options
author | Oxore <oxore@protonmail.com> | 2023-05-06 23:49:12 +0300 |
---|---|---|
committer | Oxore <oxore@protonmail.com> | 2023-05-06 23:49:12 +0300 |
commit | b56bb29d9ba8d0d4dfaf6371e81f7cf73f076a3b (patch) | |
tree | 3e7b658c20fc33ee3d7f6aebb309371677993be6 | |
parent | b834fe204108c549e576ffa7dfd2684225bbb7f7 (diff) |
Fix interrupt acknowledging
-rw-r--r-- | emulator.cpp | 6 | ||||
-rw-r--r-- | vdp.cpp | 3 |
2 files changed, 4 insertions, 5 deletions
diff --git a/emulator.cpp b/emulator.cpp index 7be1c8a..262f160 100644 --- a/emulator.cpp +++ b/emulator.cpp @@ -8,6 +8,7 @@ #include "gdbremote_parser.hpp" #include "utils.hpp" #include "musashi-m68k/m68k.h" +#include "musashi-m68k/m68kcpu.h" #include <arpa/inet.h> #include <algorithm> @@ -335,9 +336,8 @@ void m68k_reset_callback(void) int m68k_irq_ack(int level) { (void) level; - // TODO - printf("IRQ level %d acknowledged\n", level); - return level; + CPU_INT_LEVEL = 0; + return M68K_INT_ACK_AUTOVECTOR; } static void make_hex(char* buff, unsigned int pc, unsigned int length) @@ -259,8 +259,7 @@ bool VDP::Scanline() if (_lines_counter >= lines_per_screen) { _lines_counter = 0; if (MODESET2_IE0_GET(mode_set_2)) { - // TODO somehow this acknowledgment messes up the `hello word` example - //m68k_set_irq(6); + m68k_set_irq(M68K_IRQ_6); _status.vblank = true; return true; } |