Debugging
This commit is contained in:
parent
7e1f7a8102
commit
f4d991e86a
2 changed files with 5 additions and 7 deletions
6
bus.cpp
6
bus.cpp
|
@ -343,16 +343,14 @@ uint32_t bus::calculate_physical_address(const int run_mode, const uint16_t a, c
|
||||||
const uint8_t apf = a >> 13; // active page field
|
const uint8_t apf = a >> 13; // active page field
|
||||||
|
|
||||||
if ((a & 1) && word_mode == 0 && peek_only == false) {
|
if ((a & 1) && word_mode == 0 && peek_only == false) {
|
||||||
DOLOG(debug, !peek_only, "bus::calculate_physical_address::m_offset %o run mode %d", a, run_mode);
|
DOLOG(debug, true, "TRAP(004) (throw 5) on address %06o, page %d, run mode %d, MMR0 %06o, MMR2 %06o", a, apf, run_mode, MMR0, MMR2);
|
||||||
DOLOG(debug, true, "TRAP(004) (throw 5) on address %06o, page %d", a, apf);
|
|
||||||
c->schedule_trap(004); // invalid access
|
|
||||||
|
|
||||||
pages[run_mode][0][apf].pdr |= 1 << 7; // TODO: D/I
|
pages[run_mode][0][apf].pdr |= 1 << 7; // TODO: D/I
|
||||||
|
|
||||||
MMR0 &= ~14; // add current page
|
MMR0 &= ~14; // add current page
|
||||||
MMR0 |= apf << 1;
|
MMR0 |= apf << 1;
|
||||||
|
|
||||||
// DOLOG(info, true, "MMR0 %06o, MMR1 %06o, MMR2 %06o, MMR3 %06o", MMR0, MMR1, MMR2, MMR3);
|
c->schedule_trap(004); // invalid access
|
||||||
|
|
||||||
throw 5;
|
throw 5;
|
||||||
}
|
}
|
||||||
|
|
6
cpu.cpp
6
cpu.cpp
|
@ -1285,7 +1285,7 @@ bool cpu::single_operand_instructions(const uint16_t instr)
|
||||||
|
|
||||||
case 0b00110101: { // MFPD/MFPI
|
case 0b00110101: { // MFPD/MFPI
|
||||||
// always words: word_mode-bit is to select between MFPI and MFPD
|
// always words: word_mode-bit is to select between MFPI and MFPD
|
||||||
assert(!word_mode); // TODO
|
// NOTE: this code does not work for D/I split setups! TODO
|
||||||
|
|
||||||
if ((b->getMMR0() & 0160000) == 0)
|
if ((b->getMMR0() & 0160000) == 0)
|
||||||
b->addToMMR1(-2, 6);
|
b->addToMMR1(-2, 6);
|
||||||
|
@ -1319,7 +1319,7 @@ bool cpu::single_operand_instructions(const uint16_t instr)
|
||||||
|
|
||||||
case 0b00110110: { // MTPI/MTPD
|
case 0b00110110: { // MTPI/MTPD
|
||||||
// always words: word_mode-bit is to select between MTPI and MTPD
|
// always words: word_mode-bit is to select between MTPI and MTPD
|
||||||
assert(!word_mode); // TODO
|
// NOTE: this code does not work for D/I split setups! TODO
|
||||||
|
|
||||||
if ((b->getMMR0() & 0160000) == 0)
|
if ((b->getMMR0() & 0160000) == 0)
|
||||||
b->addToMMR1(2, 6);
|
b->addToMMR1(2, 6);
|
||||||
|
@ -1689,7 +1689,7 @@ void cpu::trap(const uint16_t vector, const int new_ipl, const bool is_interrupt
|
||||||
|
|
||||||
pushStack(before_psw);
|
pushStack(before_psw);
|
||||||
pushStack(before_pc);
|
pushStack(before_pc);
|
||||||
DOLOG(debug, true, "*** CPU::TRAP fin ***");
|
DOLOG(debug, true, "*** CPU::TRAP FIN, MMR0: %06o, MMR2: %06o ***", b->getMMR0(), b->getMMR2());
|
||||||
}
|
}
|
||||||
|
|
||||||
cpu::operand_parameters cpu::addressing_to_string(const uint8_t mode_register, const uint16_t pc, const bool word_mode) const
|
cpu::operand_parameters cpu::addressing_to_string(const uint8_t mode_register, const uint16_t pc, const bool word_mode) const
|
||||||
|
|
Loading…
Add table
Reference in a new issue