do not run trap when 4 upper bits of MMR0 are set (any of them), also set bit 12 when there is a case for traping

This commit is contained in:
folkert van heusden 2023-03-21 15:07:51 +01:00
parent 2afa705209
commit 06b5c027d3
Signed by untrusted user who does not match committer: folkert
GPG key ID: 6B6455EDFEED3BD1

View file

@ -435,9 +435,11 @@ uint32_t bus::calculate_physical_address(const int run_mode, const uint16_t a, c
if (do_trap) { if (do_trap) {
DOLOG(debug, true, "TRAP(0250) (throw 1) for access_control %d on address %06o", access_control, a); DOLOG(debug, true, "TRAP(0250) (throw 1) for access_control %d on address %06o", access_control, a);
if (MMR0 & (1 << 9)) if ((MMR0 & (1 << 9)) && (MMR0 & 0xf000) == 0)
c->schedule_trap(0250); // invalid address c->schedule_trap(0250); // invalid address
MMR0 |= 1 << 12; // set trap-flag
if (is_write) if (is_write)
pages[run_mode][d][apf].pdr |= 1 << 7; pages[run_mode][d][apf].pdr |= 1 << 7;