From 6ffe43a8ccee6f3e2d6fda5062901f16c54ddaad Mon Sep 17 00:00:00 2001 From: Julian Blake Kongslie Date: Mon, 31 Oct 2022 19:26:35 -0700 Subject: Level-trigger on TTO_FLAG instead of edge-trigger. --- io/model.cpp | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) (limited to 'io') diff --git a/io/model.cpp b/io/model.cpp index 3bea59e..fcabbd2 100644 --- a/io/model.cpp +++ b/io/model.cpp @@ -29,7 +29,7 @@ bool iomodel::interact(std::array &ctlregs) { interrupt = true; } if (ctlregs[TT_INT_ENABLE]) { - if ((ctlregs[TT_BITS] & (TTO_FLAG|TTO_FLAG_OLD)) == TTO_FLAG) + if (ctlregs[TT_BITS] & TTO_FLAG) interrupt = true; } ctlregs[INT_PENDING] = interrupt; @@ -40,7 +40,6 @@ bool iomodel::interact(std::array &ctlregs) { ctlregs[DATA_INSTRUCTION_FIELD_BUFFER] = 0; ctlregs[HALTED] = 0; ctlregs[INT_ENABLE] = 0; - ctlregs[TT_BITS] |= (ctlregs[TT_BITS] & TTO_FLAG) ? TTO_FLAG_OLD : 0; } else { ctlregs[INT_ENABLE] = (ctlregs[INT_ENABLE] >> 1) * 3; } -- cgit v1.2.3