console switches: debug-mode in -d
This commit is contained in:
parent
b8c7d78ed6
commit
4bf488212b
3 changed files with 15 additions and 8 deletions
3
bus.cpp
3
bus.cpp
|
@ -64,7 +64,8 @@ uint16_t bus::read(const uint16_t a, const bool word_mode, const bool use_prev,
|
|||
|
||||
if (a == 0177570) { // console switch & display register
|
||||
D(fprintf(stderr, "read console switch\n");)
|
||||
return 128; // educated guess
|
||||
|
||||
return debug_mode ? 128 : 0;
|
||||
}
|
||||
|
||||
if (a == 0172540) { // KW11P programmable clock
|
||||
|
|
4
bus.h
4
bus.h
|
@ -36,12 +36,16 @@ private:
|
|||
|
||||
uint16_t switch_register { 0 };
|
||||
|
||||
bool debug_mode { false };
|
||||
|
||||
public:
|
||||
bus();
|
||||
~bus();
|
||||
|
||||
void clearmem();
|
||||
|
||||
void set_debug_mode(const bool state) { debug_mode = state; }
|
||||
|
||||
void add_cpu(cpu *const c) { this -> c = c; }
|
||||
void add_tm11(tm_11 *tm11) { this -> tm11 = tm11; }
|
||||
void add_rk05(rk05 *rk05_) { this -> rk05_ = rk05_; }
|
||||
|
|
|
@ -76,6 +76,8 @@ void debugger(console *const cnsl, bus *const b, std::atomic_bool *const interru
|
|||
{
|
||||
cpu *const c = b->getCpu();
|
||||
|
||||
b->set_debug_mode(true);
|
||||
|
||||
bool single_step = false;
|
||||
|
||||
while(!terminate) {
|
||||
|
|
Loading…
Add table
Reference in a new issue