Add resume property to more machines
This commit is contained in:
parent
6854c4c8ba
commit
83ff5375e5
9 changed files with 103 additions and 50 deletions
|
|
@ -2,7 +2,7 @@
|
||||||
<?xml-stylesheet type="text/xsl" href="/versions/pc8080/1.32.2/machine.xsl"?>
|
<?xml-stylesheet type="text/xsl" href="/versions/pc8080/1.32.2/machine.xsl"?>
|
||||||
<machine id="vt100" class="pc8080 machine-right" border="1" pos="center" background="#FAEBD7">
|
<machine id="vt100" class="pc8080 machine-right" border="1" pos="center" background="#FAEBD7">
|
||||||
<name pos="center">VT100 Terminal</name>
|
<name pos="center">VT100 Terminal</name>
|
||||||
<computer id="computer" busWidth="16"/>
|
<computer id="computer" busWidth="16" resume="1"/>
|
||||||
<cpu id="cpu8080" model="8080" cycles="2764800" autoStart="true"/>
|
<cpu id="cpu8080" model="8080" cycles="2764800" autoStart="true"/>
|
||||||
<rom id="rom" addr="0x0000" size="0x2000" file="/devices/pc8080/rom/vt100/VT100.json"/>
|
<rom id="rom" addr="0x0000" size="0x2000" file="/devices/pc8080/rom/vt100/VT100.json"/>
|
||||||
<ram id="ram" addr="0x2000" size="0x0C00"/>
|
<ram id="ram" addr="0x2000" size="0x0C00"/>
|
||||||
|
|
|
||||||
|
|
@ -2,7 +2,7 @@
|
||||||
<?xml-stylesheet type="text/xsl" href="/versions/pc8080/1.32.2/machine.xsl"?>
|
<?xml-stylesheet type="text/xsl" href="/versions/pc8080/1.32.2/machine.xsl"?>
|
||||||
<machine id="vt100" class="pc8080" border="1" pos="center" background="#FAEBD7">
|
<machine id="vt100" class="pc8080" border="1" pos="center" background="#FAEBD7">
|
||||||
<name pos="center">VT100 Terminal</name>
|
<name pos="center">VT100 Terminal</name>
|
||||||
<computer id="computer" busWidth="16"/>
|
<computer id="computer" busWidth="16" resume="1"/>
|
||||||
<cpu id="cpu8080" model="8080" cycles="2764800" autoStart="true"/>
|
<cpu id="cpu8080" model="8080" cycles="2764800" autoStart="true"/>
|
||||||
<rom id="rom" addr="0x0000" size="0x2000" file="/devices/pc8080/rom/vt100/VT100.json"/>
|
<rom id="rom" addr="0x0000" size="0x2000" file="/devices/pc8080/rom/vt100/VT100.json"/>
|
||||||
<ram id="ram" addr="0x2000" size="0x0C00"/>
|
<ram id="ram" addr="0x2000" size="0x0C00"/>
|
||||||
|
|
|
||||||
|
|
@ -2,8 +2,7 @@
|
||||||
<?xml-stylesheet type="text/xsl" href="/versions/pc8080/1.32.2/machine.xsl"?>
|
<?xml-stylesheet type="text/xsl" href="/versions/pc8080/1.32.2/machine.xsl"?>
|
||||||
<machine id="vt100" class="pc8080 machine-right" border="1" pos="center" background="#FAEBD7">
|
<machine id="vt100" class="pc8080 machine-right" border="1" pos="center" background="#FAEBD7">
|
||||||
<name pos="center">VT100 Terminal</name>
|
<name pos="center">VT100 Terminal</name>
|
||||||
<computer id="computer" busWidth="16"/>
|
<computer id="computer" busWidth="16" resume="1"/>
|
||||||
<cpu id="cpu8080" model="8080" cycles="2764800"/>
|
|
||||||
<rom id="rom" addr="0x0000" size="0x2000" file="/devices/pc8080/rom/vt100/VT100.json"/>
|
<rom id="rom" addr="0x0000" size="0x2000" file="/devices/pc8080/rom/vt100/VT100.json"/>
|
||||||
<ram id="ram" addr="0x2000" size="0x0C00"/>
|
<ram id="ram" addr="0x2000" size="0x0C00"/>
|
||||||
<video id="video" screenWidth="1600" screenHeight="960" smoothing="false" interruptRate="60"
|
<video id="video" screenWidth="1600" screenHeight="960" smoothing="false" interruptRate="60"
|
||||||
|
|
@ -28,7 +27,8 @@
|
||||||
<keyboard id="keyboard" model="VT100">
|
<keyboard id="keyboard" model="VT100">
|
||||||
<control type="button" binding="setup" padLeft="8px" padBottom="8px">SET-UP</control>
|
<control type="button" binding="setup" padLeft="8px" padBottom="8px">SET-UP</control>
|
||||||
</keyboard>
|
</keyboard>
|
||||||
<serial id="serialPort" adapter="0" binding="print">
|
<cpu id="cpu8080" model="8080" cycles="2764800">
|
||||||
<control type="button" binding="test" value="HELLO WORLD!\r\n" padLeft="8px">TEST RECEIVER</control>
|
<control type="button" binding="reset">RESET</control>
|
||||||
</serial>
|
</cpu>
|
||||||
|
<serial id="serialPort" adapter="0"/>
|
||||||
</machine>
|
</machine>
|
||||||
|
|
|
||||||
|
|
@ -2,8 +2,7 @@
|
||||||
<?xml-stylesheet type="text/xsl" href="/versions/pc8080/1.32.2/machine.xsl"?>
|
<?xml-stylesheet type="text/xsl" href="/versions/pc8080/1.32.2/machine.xsl"?>
|
||||||
<machine id="vt100" class="pc8080" border="1" pos="center" background="#FAEBD7">
|
<machine id="vt100" class="pc8080" border="1" pos="center" background="#FAEBD7">
|
||||||
<name pos="center">VT100 Terminal</name>
|
<name pos="center">VT100 Terminal</name>
|
||||||
<computer id="computer" busWidth="16"/>
|
<computer id="computer" busWidth="16" resume="1"/>
|
||||||
<cpu id="cpu8080" model="8080" cycles="2764800"/>
|
|
||||||
<rom id="rom" addr="0x0000" size="0x2000" file="/devices/pc8080/rom/vt100/VT100.json"/>
|
<rom id="rom" addr="0x0000" size="0x2000" file="/devices/pc8080/rom/vt100/VT100.json"/>
|
||||||
<ram id="ram" addr="0x2000" size="0x0C00"/>
|
<ram id="ram" addr="0x2000" size="0x0C00"/>
|
||||||
<video id="video" screenWidth="1600" screenHeight="960" smoothing="false" interruptRate="60"
|
<video id="video" screenWidth="1600" screenHeight="960" smoothing="false" interruptRate="60"
|
||||||
|
|
@ -28,7 +27,8 @@
|
||||||
<keyboard id="keyboard" model="VT100">
|
<keyboard id="keyboard" model="VT100">
|
||||||
<control type="button" binding="setup" padLeft="8px" padBottom="8px">SET-UP</control>
|
<control type="button" binding="setup" padLeft="8px" padBottom="8px">SET-UP</control>
|
||||||
</keyboard>
|
</keyboard>
|
||||||
<serial id="serialPort" adapter="0" binding="print">
|
<cpu id="cpu8080" model="8080" cycles="2764800">
|
||||||
<control type="button" binding="test" value="HELLO WORLD!\r\n" padLeft="8px">TEST RECEIVER</control>
|
<control type="button" binding="reset">RESET</control>
|
||||||
</serial>
|
</cpu>
|
||||||
|
<serial id="serialPort" adapter="0"/>
|
||||||
</machine>
|
</machine>
|
||||||
|
|
|
||||||
|
|
@ -13,8 +13,10 @@ machines:
|
||||||
connection: serialPort->test1170.dl11
|
connection: serialPort->test1170.dl11
|
||||||
---
|
---
|
||||||
|
|
||||||
{% include machine.html id="test1170" %}
|
This VT100 Terminal is connected to the PDP-11/70 below.
|
||||||
|
|
||||||
|
Machine configurations with the [PCjs Debugger](debugger/) are also available.
|
||||||
|
|
||||||
{% include machine.html id="vt100" %}
|
{% include machine.html id="vt100" %}
|
||||||
|
|
||||||
This PDP-11/70 is also available with our built-in [Debugger](debugger/).
|
{% include machine.html id="test1170" %}
|
||||||
|
|
|
||||||
|
|
@ -15,6 +15,10 @@ machines:
|
||||||
connection: serialPort->test1170.dl11
|
connection: serialPort->test1170.dl11
|
||||||
---
|
---
|
||||||
|
|
||||||
{% include machine.html id="test1170" %}
|
This VT100 Terminal is connected to the PDP-11/70 below.
|
||||||
|
|
||||||
|
Both machines include a Debugger. Machine configurations [without Debuggers](../) are also available.
|
||||||
|
|
||||||
{% include machine.html id="vt100" %}
|
{% include machine.html id="vt100" %}
|
||||||
|
|
||||||
|
{% include machine.html id="test1170" %}
|
||||||
|
|
|
||||||
|
|
@ -2,7 +2,7 @@
|
||||||
<?xml-stylesheet type="text/xsl" href="/versions/pdpjs/1.32.2/machine.xsl"?>
|
<?xml-stylesheet type="text/xsl" href="/versions/pdpjs/1.32.2/machine.xsl"?>
|
||||||
<machine id="test1170" class="pdp11 machine-left" border="1" pos="center" background="#FAEBD7">
|
<machine id="test1170" class="pdp11 machine-left" border="1" pos="center" background="#FAEBD7">
|
||||||
<name pos="center">PDP-11/70 with 256Kb, Front Panel, and Debugger</name>
|
<name pos="center">PDP-11/70 with 256Kb, Front Panel, and Debugger</name>
|
||||||
<computer id="computer" busWidth="22"/>
|
<computer id="computer" busWidth="22" resume="1"/>
|
||||||
<cpu id="cpu" model="1170" cycles="6666667" autoStart="true"/>
|
<cpu id="cpu" model="1170" cycles="6666667" autoStart="true"/>
|
||||||
<ram id="ram" addr="0x00000" size="0x40000" file="/apps/pdp11/boot/monitor/BOOTMON.json"/>
|
<ram id="ram" addr="0x00000" size="0x40000" file="/apps/pdp11/boot/monitor/BOOTMON.json"/>
|
||||||
<device id="default" type="default"/>
|
<device id="default" type="default"/>
|
||||||
|
|
|
||||||
|
|
@ -2,7 +2,7 @@
|
||||||
<?xml-stylesheet type="text/xsl" href="/versions/pdpjs/1.32.2/machine.xsl"?>
|
<?xml-stylesheet type="text/xsl" href="/versions/pdpjs/1.32.2/machine.xsl"?>
|
||||||
<machine id="test1170" class="pdp11 machine-left" border="1" pos="center" background="#FAEBD7">
|
<machine id="test1170" class="pdp11 machine-left" border="1" pos="center" background="#FAEBD7">
|
||||||
<name pos="center">PDP-11/70 with 256Kb and Front Panel</name>
|
<name pos="center">PDP-11/70 with 256Kb and Front Panel</name>
|
||||||
<computer id="computer" busWidth="22"/>
|
<computer id="computer" busWidth="22" resume="1"/>
|
||||||
<cpu id="cpu" model="1170" cycles="6666667" autoStart="true"/>
|
<cpu id="cpu" model="1170" cycles="6666667" autoStart="true"/>
|
||||||
<ram id="ram" addr="0x00000" size="0x40000" file="/apps/pdp11/boot/monitor/BOOTMON.json"/>
|
<ram id="ram" addr="0x00000" size="0x40000" file="/apps/pdp11/boot/monitor/BOOTMON.json"/>
|
||||||
<device id="default" type="default"/>
|
<device id="default" type="default"/>
|
||||||
|
|
|
||||||
|
|
@ -355,6 +355,48 @@ class Video8080 extends Component {
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* setBinding(sHTMLType, sBinding, control, sValue)
|
||||||
|
*
|
||||||
|
* @this {Video8080}
|
||||||
|
* @param {string|null} sHTMLType is the type of the HTML control (eg, "button", "list", "text", "submit", "textarea", "canvas")
|
||||||
|
* @param {string} sBinding is the value of the 'binding' parameter stored in the HTML control's "data-value" attribute (eg, "refresh")
|
||||||
|
* @param {Object} control is the HTML control DOM object (eg, HTMLButtonElement)
|
||||||
|
* @param {string} [sValue] optional data value
|
||||||
|
* @return {boolean} true if binding was successful, false if unrecognized binding request
|
||||||
|
*/
|
||||||
|
setBinding(sHTMLType, sBinding, control, sValue)
|
||||||
|
{
|
||||||
|
var video = this;
|
||||||
|
|
||||||
|
/*
|
||||||
|
* TODO: A more general-purpose binding mechanism would be nice someday....
|
||||||
|
*/
|
||||||
|
if (sHTMLType == "led" || sHTMLType == "rled") {
|
||||||
|
this.ledBindings[sBinding] = control;
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
|
||||||
|
switch (sBinding) {
|
||||||
|
case "fullScreen":
|
||||||
|
this.bindings[sBinding] = control;
|
||||||
|
if (this.container && this.container.doFullScreen) {
|
||||||
|
control.onclick = function onClickFullScreen() {
|
||||||
|
if (DEBUG) video.printMessage("fullScreen()");
|
||||||
|
video.doFullScreen();
|
||||||
|
};
|
||||||
|
} else {
|
||||||
|
if (DEBUG) this.log("FullScreen API not available");
|
||||||
|
control.parentNode.removeChild(/** @type {Node} */ (control));
|
||||||
|
}
|
||||||
|
return true;
|
||||||
|
|
||||||
|
default:
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* initBus(cmp, bus, cpu, dbg)
|
* initBus(cmp, bus, cpu, dbg)
|
||||||
*
|
*
|
||||||
|
|
@ -581,6 +623,11 @@ class Video8080 extends Component {
|
||||||
*/
|
*/
|
||||||
powerUp(data, fRepower)
|
powerUp(data, fRepower)
|
||||||
{
|
{
|
||||||
|
if (!fRepower) {
|
||||||
|
if (data) {
|
||||||
|
if (!this.restore(data)) return false;
|
||||||
|
}
|
||||||
|
}
|
||||||
/*
|
/*
|
||||||
* Because the VT100 frame buffer can be located anywhere in RAM (above 0x2000), we must defer this
|
* Because the VT100 frame buffer can be located anywhere in RAM (above 0x2000), we must defer this
|
||||||
* test code until the powerUp() notification handler is called, when all RAM has (hopefully) been allocated.
|
* test code until the powerUp() notification handler is called, when all RAM has (hopefully) been allocated.
|
||||||
|
|
@ -653,45 +700,45 @@ class Video8080 extends Component {
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* setBinding(sHTMLType, sBinding, control, sValue)
|
* powerDown(fSave, fShutdown)
|
||||||
*
|
*
|
||||||
* @this {Video8080}
|
* @this {Video8080}
|
||||||
* @param {string|null} sHTMLType is the type of the HTML control (eg, "button", "list", "text", "submit", "textarea", "canvas")
|
* @param {boolean} [fSave]
|
||||||
* @param {string} sBinding is the value of the 'binding' parameter stored in the HTML control's "data-value" attribute (eg, "refresh")
|
* @param {boolean} [fShutdown]
|
||||||
* @param {Object} control is the HTML control DOM object (eg, HTMLButtonElement)
|
* @return {Object|boolean} component state if fSave; otherwise, true if successful, false if failure
|
||||||
* @param {string} [sValue] optional data value
|
|
||||||
* @return {boolean} true if binding was successful, false if unrecognized binding request
|
|
||||||
*/
|
*/
|
||||||
setBinding(sHTMLType, sBinding, control, sValue)
|
powerDown(fSave, fShutdown)
|
||||||
{
|
{
|
||||||
var video = this;
|
return !fSave || this.save();
|
||||||
|
}
|
||||||
|
|
||||||
/*
|
/**
|
||||||
* TODO: A more general-purpose binding mechanism would be nice someday....
|
* save()
|
||||||
*/
|
*
|
||||||
if (sHTMLType == "led" || sHTMLType == "rled") {
|
* This implements save support for the Video8080 component.
|
||||||
this.ledBindings[sBinding] = control;
|
*
|
||||||
return true;
|
* @this {Video8080}
|
||||||
}
|
* @return {Object|null}
|
||||||
|
*/
|
||||||
|
save()
|
||||||
|
{
|
||||||
|
var state = new State(this);
|
||||||
|
state.set(0, []);
|
||||||
|
return state.data();
|
||||||
|
}
|
||||||
|
|
||||||
switch (sBinding) {
|
/**
|
||||||
case "fullScreen":
|
* restore(data)
|
||||||
this.bindings[sBinding] = control;
|
*
|
||||||
if (this.container && this.container.doFullScreen) {
|
* This implements restore support for the Video8080 component.
|
||||||
control.onclick = function onClickFullScreen() {
|
*
|
||||||
if (DEBUG) video.printMessage("fullScreen()");
|
* @this {Video8080}
|
||||||
video.doFullScreen();
|
* @param {Object} data
|
||||||
};
|
* @return {boolean} true if restore successful, false if not
|
||||||
} else {
|
*/
|
||||||
if (DEBUG) this.log("FullScreen API not available");
|
restore(data)
|
||||||
control.parentNode.removeChild(/** @type {Node} */ (control));
|
{
|
||||||
}
|
return true;
|
||||||
return true;
|
|
||||||
|
|
||||||
default:
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
return false;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue