First stab at factoring some common Debugger functionality into a shared component

This commit is contained in:
Jeff Parsons 2016-09-14 15:36:38 -07:00
commit a8bb0c7841
42 changed files with 3721 additions and 4457 deletions

View file

@ -68,7 +68,7 @@ if (NODE) {
* @extends Component
* @param {Object} parmsBus
* @param {X86CPU} cpu
* @param {Debugger} dbg
* @param {DebuggerX86} dbg
*/
function Bus(parmsBus, cpu, dbg)
{

View file

@ -1294,7 +1294,7 @@ ChipSet.prototype.setBinding = function(sHTMLType, sBinding, control, sValue)
* @param {Computer} cmp
* @param {Bus} bus
* @param {X86CPU} cpu
* @param {Debugger} dbg
* @param {DebuggerX86} dbg
*/
ChipSet.prototype.initBus = function(cmp, bus, cpu, dbg)
{

View file

@ -182,7 +182,7 @@ function Computer(parmsComputer, parmsMachine, fSuspended) {
Component.error("Unable to find CPU component");
return;
}
this.dbg = /** @type {Debugger} */ (Component.getComponentByType("Debugger", this.id));
this.dbg = /** @type {DebuggerX86} */ (Component.getComponentByType("Debugger", this.id));
/*
* Enumerate all Video components for future updateVideo() calls.

View file

@ -159,7 +159,7 @@ CPU.BUTTONS = ["power", "reset"];
* @param {Computer} cmp
* @param {Bus} bus
* @param {CPU} cpu
* @param {Debugger} dbg
* @param {DebuggerX86} dbg
*/
CPU.prototype.initBus = function(cmp, bus, cpu, dbg)
{

File diff suppressed because it is too large Load diff

View file

@ -34,12 +34,12 @@
/**
* @define {string}
*/
var APPCLASS = "pcx86"; // this @define is the default application class (eg, "pcx86", "c1pjs")
var APPCLASS = "pcx86"; // this @define is the default application class (eg, "pcx86", "c1pjs")
/**
* @define {string}
*/
var APPNAME = "PCx86"; // this @define is the default application name (eg, "PCx86", "C1Pjs")
var APPNAME = "PCx86"; // this @define is the default application name (eg, "PCx86", "C1Pjs")
/**
* @define {boolean}

View file

@ -811,7 +811,7 @@ var SectorInfo;
* @param {Computer} cmp
* @param {Bus} bus
* @param {X86CPU} cpu
* @param {Debugger} dbg
* @param {DebuggerX86} dbg
*/
Disk.prototype.initBus = function(cmp, bus, cpu, dbg) {
this.dbg = dbg;

View file

@ -623,7 +623,7 @@ FDC.prototype.setBinding = function(sHTMLType, sBinding, control, sValue)
* @param {Computer} cmp
* @param {Bus} bus
* @param {X86CPU} cpu
* @param {Debugger} dbg
* @param {DebuggerX86} dbg
*/
FDC.prototype.initBus = function(cmp, bus, cpu, dbg)
{

View file

@ -594,7 +594,7 @@ HDC.prototype.setBinding = function(sHTMLType, sBinding, control, sValue)
* @param {Computer} cmp
* @param {Bus} bus
* @param {X86CPU} cpu
* @param {Debugger} dbg
* @param {DebuggerX86} dbg
*/
HDC.prototype.initBus = function(cmp, bus, cpu, dbg)
{

View file

@ -31,22 +31,6 @@
"use strict";
/*
* Components that previously used Debugger interrupt definitions by including:
*
* var Debugger = require("./debugger");
*
* and using:
*
* Debugger.INT.FOO
*
* must now instead include:
*
* var Interrupts = require("./interrupts");
*
* and then replace all occurrences of "Debugger.INT.FOO" with "Interrupts.FOO".
*/
var Interrupts = {
VIDEO: 0x10,
DISK: 0x13,
@ -184,7 +168,7 @@ if (DEBUGGER) {
0x4A8: ["SAVE_PTR",4] // POINTER TO EGA PARAMETER CONTROL BLOCK
},
/*
* See Debugger.prototype.replaceRegs() for the rules governing how register contents are replaced in the strings below.
* See DebuggerX86.prototype.replaceRegs() for the rules governing how register contents are replaced in the strings below.
*
* Replacements occur in the following order:
*
@ -1546,7 +1530,7 @@ if (DEBUGGER) {
* INT 2E Execute command (*) (2.0+)
* Entry: DS:SI->command string-1 followed by a carriage return
* Exit: All registers except CS and IP are destroyed
* Note: This function is not re-enterant and should not be issued from a
* Note: This function is not re-entrant and should not be issued from a
* batch file.
*
* INT 2F Multiplex (3.0+)
@ -1922,7 +1906,7 @@ if (DEBUGGER) {
*
* Stacks descriptor (8 bytes)
* 00 Flag (0=free,1=in use)
* 02 Savearea for SS:SP
* 02 Save area for SS:SP
* 06 Offset of end of stack
*
* Device driver header (12h bytes)

View file

@ -1324,7 +1324,7 @@ Keyboard.prototype.findBinding = function(simCode, sType, fDown)
* @param {Computer} cmp
* @param {Bus} bus
* @param {X86CPU} cpu
* @param {Debugger} dbg
* @param {DebuggerX86} dbg
*/
Keyboard.prototype.initBus = function(cmp, bus, cpu, dbg)
{

View file

@ -288,7 +288,7 @@ Memory.prototype = {
* @this {Memory}
* @param {Memory} mem
* @param {number} [type]
* @param {Debugger} [dbg]
* @param {DebuggerX86} [dbg]
*/
clone: function(mem, type, dbg) {
/*
@ -620,7 +620,7 @@ Memory.prototype = {
* copyBreakpoints(dbg, mem)
*
* @this {Memory}
* @param {Debugger} [dbg]
* @param {DebuggerX86} [dbg]
* @param {Memory} [mem] (outgoing Memory block to copy breakpoints from, if any)
*/
copyBreakpoints: function(dbg, mem) {

View file

@ -31,22 +31,6 @@
"use strict";
/*
* Components that previously used Debugger messages definitions by including:
*
* var Debugger = require("./debugger");
*
* and using:
*
* Debugger.MESSAGE.FOO
*
* must now instead include:
*
* var Messages = require("./messages");
*
* and then replace all occurrences of "Debugger.MESSAGE.FOO" with "Messages.FOO".
*/
var Messages = {
CPU: 0x00000001,
SEG: 0x00000002,

View file

@ -181,7 +181,7 @@ Mouse.BUTTON = {
* @param {Computer} cmp
* @param {Bus} bus
* @param {X86CPU} cpu
* @param {Debugger} dbg
* @param {DebuggerX86} dbg
*/
Mouse.prototype.initBus = function(cmp, bus, cpu, dbg)
{

View file

@ -341,7 +341,7 @@ Panel.prototype.setBinding = function(sHTMLType, sBinding, control, sValue)
* @param {Computer} cmp
* @param {Bus} bus
* @param {X86CPU} cpu
* @param {Debugger} dbg
* @param {DebuggerX86} dbg
*/
Panel.prototype.initBus = function(cmp, bus, cpu, dbg)
{

View file

@ -230,7 +230,7 @@ ParallelPort.prototype.setBinding = function(sHTMLType, sBinding, control, sValu
* @param {Computer} cmp
* @param {Bus} bus
* @param {X86CPU} cpu
* @param {Debugger} dbg
* @param {DebuggerX86} dbg
*/
ParallelPort.prototype.initBus = function(cmp, bus, cpu, dbg)
{

View file

@ -77,7 +77,7 @@ Component.subclass(RAM);
* @param {Computer} cmp
* @param {Bus} bus
* @param {X86CPU} cpu
* @param {Debugger} dbg
* @param {DebuggerX86} dbg
*/
RAM.prototype.initBus = function(cmp, bus, cpu, dbg)
{

View file

@ -162,7 +162,7 @@ ROM.BIOS.RESET_FLAG_WARMBOOT = 0x1234; // value stored at ROM.BIOS.RESET_FLAG t
* @param {Computer} cmp
* @param {Bus} bus
* @param {X86CPU} cpu
* @param {Debugger} dbg
* @param {DebuggerX86} dbg
*/
ROM.prototype.initBus = function(cmp, bus, cpu, dbg)
{

View file

@ -456,7 +456,7 @@ SerialPort.prototype.setBinding = function(sHTMLType, sBinding, control, sValue)
* @param {Computer} cmp
* @param {Bus} bus
* @param {X86CPU} cpu
* @param {Debugger} dbg
* @param {DebuggerX86} dbg
*/
SerialPort.prototype.initBus = function(cmp, bus, cpu, dbg)
{

View file

@ -2899,7 +2899,7 @@ Video.TOUCH = {
* @param {Computer} cmp
* @param {Bus} bus
* @param {X86CPU} cpu
* @param {Debugger} dbg
* @param {DebuggerX86} dbg
*/
Video.prototype.initBus = function(cmp, bus, cpu, dbg)
{

View file

@ -163,7 +163,7 @@ Component.subclass(X86FPU);
* @param {Computer} cmp
* @param {Bus} bus
* @param {X86CPU} cpu
* @param {Debugger} dbg
* @param {DebuggerX86} dbg
*/
X86FPU.prototype.initBus = function(cmp, bus, cpu, dbg)
{