This commit is contained in:
folkert van heusden 2022-06-15 12:08:13 +02:00
parent 978709cd2e
commit 0b18a5e4cc
2 changed files with 4 additions and 6 deletions

View file

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

View file

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