throw 3/4: add run mode

This commit is contained in:
folkert van heusden 2022-06-18 09:10:51 +02:00
parent 9d55740a0f
commit 7605c934c2

View file

@ -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;