From 0bd7c841d9e42edf5a677eefd17715f3bc8aaaf4 Mon Sep 17 00:00:00 2001 From: Raimon Zamora Date: Mon, 22 Apr 2024 14:46:47 +0200 Subject: [PATCH] =?UTF-8?q?-=20[NEW]=20IM2=20te=C3=B2ricament=20funcionant?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- z80.cpp | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/z80.cpp b/z80.cpp index 107e7e7..f2b59aa 100644 --- a/z80.cpp +++ b/z80.cpp @@ -643,7 +643,11 @@ namespace z80 if (!iff1) return; exit_from_halt = true; PUSH(rPC); - rPC = 0x38; + if (im==1) { + rPC = 0x38; + } else if (im==2) { + rPC = (rI<<8) | 0xFF; + } } void RST(uint8_t vec)