From 56eae1aca17d9cc91e95f1704c1c3b682729a9b0 Mon Sep 17 00:00:00 2001 From: Maurizio Porrato Date: Wed, 22 Jan 2020 08:01:09 +0000 Subject: [PATCH] Added debug hardware IRQ to replace non standard HLT opcode --- dsim.c | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/dsim.c b/dsim.c index 017ce46..883a0ee 100644 --- a/dsim.c +++ b/dsim.c @@ -62,8 +62,13 @@ struct dev_entry { void (*tick)(); }; +void debug_irqh() +{ + running = false; +} + struct dev_entry iodevs[] = { - { 0, 0, 0, NULL, NULL, NULL, NULL} + { 0x6d53647c, 0x62e037d3, 0x00000000, debug_irqh, NULL, NULL, NULL }, /* Debug device */ }; uint16_t lit[] = { @@ -421,11 +426,6 @@ void oHWI(uint16_t *a, uint16_t *b) } } -void oHLT(uint16_t *a, uint16_t *b) -{ - running = false; -} - typedef void (*op_t)(uint16_t *, uint16_t *); const op_t ops[] = { @@ -439,7 +439,7 @@ const op_t sops[] = { oNOP, oJSR, oNOP, oNOP, oNOP, oNOP, oNOP, oNOP, /* 00-07 */ oINT, oIAG, oIAS, oRFI, oIAQ, oNOP, oNOP, oNOP, /* 08-0f */ oHWN, oHWQ, oHWI, oNOP, oNOP, oNOP, oNOP, oNOP, /* 10-17 */ - oNOP, oNOP, oNOP, oNOP, oNOP, oNOP, oNOP, oHLT /* 18-1f */ + oNOP, oNOP, oNOP, oNOP, oNOP, oNOP, oNOP, oNOP /* 18-1f */ }; void dumpregs()