only execute trap when MRR0_bit_9 AND MMR0_&_0xf000 == 0
This commit is contained in:
parent
10ce535813
commit
7ea2fa0033
1 changed files with 16 additions and 5 deletions
15
bus.cpp
15
bus.cpp
|
@ -433,11 +433,18 @@ uint32_t bus::calculate_physical_address(const int run_mode, const uint16_t a, c
|
|||
}
|
||||
|
||||
if (do_trap) {
|
||||
bool do_trap_250 = false;
|
||||
|
||||
if ((MMR0 & (1 << 9)) && (MMR0 & 0xf000) == 0) {
|
||||
DOLOG(debug, true, "TRAP(0250) (throw 1) for access_control %d on address %06o", access_control, a);
|
||||
|
||||
if ((MMR0 & (1 << 9)) && (MMR0 & 0xf000) == 0)
|
||||
c->schedule_trap(0250); // invalid address
|
||||
do_trap_250 = true;
|
||||
}
|
||||
else {
|
||||
DOLOG(debug, true, "A.C.F. triggger for %d on address %06o", access_control, a);
|
||||
}
|
||||
|
||||
if (access_control == 1 || access_control == 4 || access_control == 5)
|
||||
MMR0 |= 1 << 12; // set trap-flag
|
||||
|
||||
if (is_write)
|
||||
|
@ -459,9 +466,13 @@ uint32_t bus::calculate_physical_address(const int run_mode, const uint16_t a, c
|
|||
|
||||
DOLOG(debug, true, "MMR0: %06o", MMR0);
|
||||
|
||||
if (do_trap_250) {
|
||||
c->schedule_trap(0250); // invalid address
|
||||
|
||||
throw 1;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if (m_offset >= n_pages * 8192) {
|
||||
DOLOG(debug, !peek_only, "bus::calculate_physical_address %o >= %o", m_offset, n_pages * 8192);
|
||||
|
|
Loading…
Add table
Reference in a new issue