diff --git a/bus.cpp b/bus.cpp index e3cb197..c31a944 100644 --- a/bus.cpp +++ b/bus.cpp @@ -419,8 +419,11 @@ uint32_t bus::calculate_physical_address(const int run_mode, const uint16_t a, c MMR0 &= ~14; // add current page MMR0 |= apf << 1; + MMR0 &= ~(3 << 5); + MMR0 |= run_mode << 5; + pages[run_mode][0][apf].pdr |= 1 << 7; // TODO: D/I - // + c->schedule_trap(04); throw 3; @@ -437,6 +440,9 @@ uint32_t bus::calculate_physical_address(const int run_mode, const uint16_t a, c MMR0 &= ~14; // add current page MMR0 |= apf << 1; + MMR0 &= ~(3 << 5); + MMR0 |= run_mode << 5; + pages[run_mode][0][apf].pdr |= 1 << 7; // TODO: D/I throw 4;