pvbemu/app/Debugger.js

44 lines
974 B
JavaScript
Raw Normal View History

2021-08-30 02:14:06 +00:00
"use strict";
// Debugging UI manager
globalThis.Debugger = class Debugger {
// Object constructor
constructor(app, sim) {
// Configure instance fields
this.app = app;
this.core = app.core;
this.gui = app.gui;
this.sim = sim;
// Configure Memory window
this.memory = new MemoryWindow(this, {
title : "{sim}{memory._}",
center : true,
height : 300,
visible: false,
width : 400
});
this.memory.addCloseListener(e=>this.memory.setVisible(false));
app.desktop.add(this.memory);
}
///////////////////////////// Package Methods /////////////////////////////
// Message received from emulation thread
message(msg) {
switch (msg.debug) {
case "Memory": this.memory.message(msg); break;
}
}
// Reload all output
refresh() {
this.memory.refresh();
}
};