mm fixes
This commit is contained in:
parent
978709cd2e
commit
0b18a5e4cc
2 changed files with 4 additions and 6 deletions
4
bus.cpp
4
bus.cpp
|
@ -363,7 +363,7 @@ uint32_t bus::calculate_physical_address(const int run_mode, const uint16_t a, c
|
|||
throw 1;
|
||||
}
|
||||
|
||||
if ((p_offset > pdr_len && direction == true) || (p_offset < pdr_len && direction == false)) {
|
||||
if ((p_offset > pdr_len && direction == false) || (p_offset < pdr_len && direction == true)) {
|
||||
DOLOG(debug, !peek_only, "bus::calculate_physical_address::p_offset %o >= %o", p_offset, pdr_len);
|
||||
c->schedule_trap(0250); // invalid access
|
||||
|
||||
|
@ -404,7 +404,7 @@ uint16_t bus::write(const uint16_t a, const bool word_mode, uint16_t value, cons
|
|||
if (run_mode == 1 && c->get_34())
|
||||
run_mode = 3;
|
||||
|
||||
if (MMR0 & 1) {
|
||||
if ((MMR0 & 1) == 1 && (a & 1) == 0) {
|
||||
const uint8_t apf = a >> 13; // active page field
|
||||
|
||||
// TODO: D/I
|
||||
|
|
6
cpu.cpp
6
cpu.cpp
|
@ -1650,10 +1650,8 @@ void cpu::trap(const uint16_t vector, const int new_ipl)
|
|||
uint16_t before_psw = getPSW();
|
||||
uint16_t before_pc = getPC();
|
||||
|
||||
if (b->getMMR0() & 1) {
|
||||
// make sure the trap vector is retrieved from kernel space
|
||||
psw &= 037777; // mask off 14/15
|
||||
}
|
||||
// make sure the trap vector is retrieved from kernel space
|
||||
psw &= 037777; // mask off 14/15
|
||||
|
||||
if ((b->getMMR1() & 0160000) == 0) {
|
||||
b->setMMR2(vector);
|
||||
|
|
Loading…
Add table
Reference in a new issue