From 017339a7688624ae19849ead5cf6579ec074fa34 Mon Sep 17 00:00:00 2001 From: folkert van heusden Date: Sat, 25 Mar 2023 21:05:10 +0100 Subject: [PATCH] abort should remember d/i-page in bit 4 of mmr0 --- bus.cpp | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/bus.cpp b/bus.cpp index aea4ef5..f380e26 100644 --- a/bus.cpp +++ b/bus.cpp @@ -562,6 +562,8 @@ uint32_t bus::calculate_physical_address(const int run_mode, const uint16_t a, c MMR0 |= run_mode << 5; // TODO: kernel-mode or user-mode when a trap occurs in user-mode? MMR0 |= apf << 1; // add current page + + MMR0 |= d << 4; } DOLOG(debug, true, "MMR0: %06o", MMR0); @@ -618,6 +620,8 @@ uint32_t bus::calculate_physical_address(const int run_mode, const uint16_t a, c MMR0 &= ~(3 << 5); MMR0 |= run_mode << 5; + + MMR0 |= d << 4; } if (is_write)