|
@@ -20,6 +20,7 @@ module.exports = class Computer {
|
|
|
* @param {boolean} options.debug.followPointer When true, the memory will be dumped during every call to Execute with the current instruction highlighted
|
|
|
* @param {boolean} options.debug.followRuntimeInput When true, the runtime input array will be dumped during every call to Execute
|
|
|
* @param {boolean} options.debug.followOutputValues When true, the output values array will be dumped during every call to Execute
|
|
|
+ * @param {boolean} options.debug.followRelativeBaseOffset When true, the stack's relative base offset will be dumped during every call to Execute
|
|
|
* @param {boolean} options.inputFromConsole When true, the computer will prompt for input on the console. If false, it will check for an linked computer and, if one exists, will wait for input from that computer.
|
|
|
* @param {boolean} options.outputToConsole When true, the computer will print the output of opcode 4 to the console. If false, it will check for an linked computer and, if one exists, pass the output to that computer.
|
|
|
* @param {number[]} options.inputModeMap Map calls to the INPUT opcode to user input or the input array
|
|
@@ -61,6 +62,7 @@ module.exports = class Computer {
|
|
|
followPointer: options?.debug?.followPointer ?? false,
|
|
|
followRuntimeInput: options?.debug?.followRuntimeInput ?? false,
|
|
|
followOutputValues: options?.debug?.followOutputValues ?? false,
|
|
|
+ followRelativeBaseOffset: options?.debug?.followRelativeBaseOffset ?? false,
|
|
|
tickRate: options?.debug?.tickRate ?? 0,
|
|
|
},
|
|
|
inputFromConsole: options.inputFromConsole ?? false,
|
|
@@ -459,6 +461,7 @@ module.exports = class Computer {
|
|
|
if (this.options.debug.followPointer) { this.DumpMemory(true); }
|
|
|
if (this.options.debug.followRuntimeInput) { this.InspectProperty("Inputs", "runtimeInput"); }
|
|
|
if (this.options.debug.followOutputValues) { this.InspectProperty("Outputs", "outputValues"); }
|
|
|
+ if (this.options.debug.followRelativeBaseOffset) { this.InspectProperty("Relative Base Offset", null, this.stack.relativeBaseOffset); }
|
|
|
}
|
|
|
|
|
|
/**
|