Ported some PCjs drawing code to PC8080, still needs work though
This commit is contained in:
parent
98597a21da
commit
59b6dd3be6
23 changed files with 781 additions and 499 deletions
|
|
@ -9,7 +9,9 @@ PCjs ChipSet Component
|
|||
|
||||
Format
|
||||
---
|
||||
<chipset>...</chipset>
|
||||
```xml
|
||||
<chipset>...</chipset>
|
||||
```
|
||||
|
||||
Purpose
|
||||
---
|
||||
|
|
@ -103,15 +105,20 @@ Bindings
|
|||
|
||||
Example
|
||||
---
|
||||
<chipset id="chipset" model="5150" sw1="01000001" sw2="11110000"/>
|
||||
```xml
|
||||
<chipset id="chipset" model="5150" sw1="01000001" sw2="11110000"/>
|
||||
```
|
||||
|
||||
Output
|
||||
---
|
||||
<div id="..." class="pc-chipset pc-component">
|
||||
<div class="pc-container">
|
||||
<div class="pcjs-chipset" data-value="id:'...',name:'...',model:'...',sw1:'...',sw2:'...'"></div>
|
||||
</div>
|
||||
</div>
|
||||
```html
|
||||
<div id="..." class="pc-chipset pc-component">
|
||||
<div class="pc-container">
|
||||
<div class="pcjs-chipset" data-value="id:'...',name:'...',model:'...',sw1:'...',sw2:'...'">
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
```
|
||||
|
||||
Also, if any controls are defined, another <div> of class="pc-controls" is created in the container <div>,
|
||||
with each control inside a <div> of class="pc-control".
|
||||
|
|
|
|||
|
|
@ -9,7 +9,9 @@ PCjs Component
|
|||
|
||||
Format
|
||||
---
|
||||
<component>...</component>
|
||||
```xml
|
||||
<component>...</component>
|
||||
```
|
||||
|
||||
Purpose
|
||||
---
|
||||
|
|
@ -35,14 +37,20 @@ Attributes
|
|||
|
||||
Example
|
||||
---
|
||||
<component id="ibm5150" class="pcjs" width="740px" pos="center" border="1">...</component>
|
||||
```xml
|
||||
<component id="ibm5150" class="pcjs" width="740px" pos="center" border="1">
|
||||
...
|
||||
</component>
|
||||
```
|
||||
|
||||
Output
|
||||
---
|
||||
<div id="..." class="pc-component">
|
||||
<div class="pc-container">
|
||||
...
|
||||
</div>
|
||||
</div>
|
||||
```html
|
||||
<div id="..." class="pc-component">
|
||||
<div class="pc-container">
|
||||
...
|
||||
</div>
|
||||
</div>
|
||||
```
|
||||
|
||||
[Return to [PCjs Documentation](..)]
|
||||
|
|
|
|||
|
|
@ -9,7 +9,9 @@ PCjs Computer Component
|
|||
|
||||
Format
|
||||
---
|
||||
<computer>...</computer>
|
||||
```xml
|
||||
<computer>...</computer>
|
||||
```
|
||||
|
||||
Purpose
|
||||
---
|
||||
|
|
@ -51,16 +53,20 @@ Bindings
|
|||
|
||||
Example
|
||||
---
|
||||
<computer id="pc" name="IBM PC"/>
|
||||
```xml
|
||||
<computer id="pc" name="IBM PC"/>
|
||||
```
|
||||
|
||||
Output
|
||||
---
|
||||
<div id="..." class="pc-computer pc-component" style="">
|
||||
<div class="pc-container" style="">
|
||||
<div class="pcjs-computer" data-value="id:'...',name:'...',resume:'...',state:'...'">
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
```html
|
||||
<div id="..." class="pc-computer pc-component" style="">
|
||||
<div class="pc-container" style="">
|
||||
<div class="pcjs-computer" data-value="id:'...',name:'...',resume:'...',state:'...'">
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
```
|
||||
|
||||
Also, if any controls are defined, another <div> of class="pc-controls" is created in the container <div>,
|
||||
with each control inside a <div> of class="pc-control".
|
||||
|
|
|
|||
|
|
@ -9,7 +9,9 @@ PCjs CPU Component
|
|||
|
||||
Format
|
||||
---
|
||||
<cpu>...</cpu>
|
||||
```xml
|
||||
<cpu>...</cpu>
|
||||
```
|
||||
|
||||
Purpose
|
||||
---
|
||||
|
|
@ -19,7 +21,7 @@ Attributes
|
|||
---
|
||||
* *model* (optional; default is 8088; supported values include: 8086, 8088, 80186, 80286, and 80386)
|
||||
* Defines the CPU model, adjusting the CPU's capabilities accordingly.
|
||||
* *stepping* (optional; if specified, it must be a 2-character string, such as "A0" or "B1")
|
||||
* *stepping* (optional; if specified, it should be a 2-character string, such as "A0" or "B1")
|
||||
* Defines the CPU stepping, adjusting the CPU's capabilities accordingly.
|
||||
* Currently supported only on the 80386 model.
|
||||
* *cycles* (optional; default is 4772727)
|
||||
|
|
@ -44,26 +46,30 @@ Bindings
|
|||
*[Computer](/docs/pcjs/computer/)* component, because every component is reset, but the CPU offers the binding
|
||||
for convenience.
|
||||
* *speed*
|
||||
* For use with any control with an *innerHTML* property, to display the current CPU speed.
|
||||
* For use with any control with an *textContent* property, to display the current CPU speed.
|
||||
* *setSpeed*
|
||||
* For use with a control of type *button*, to increase the CPU speed.
|
||||
* *AX*, *BX*, *CX*, *DX*, *SP*, *BP*, *SI*, *DI*, *CS*, *DS*, *SS*, *ES*, *PC*, *PS*, *C*, *P*, *A*, *Z*, *S*, *T*, *I*, *D*, *O*
|
||||
* For use with any control with an *innerHTML* property, to display the corresponding register's contents.
|
||||
* For use with any control with an *textContent* property, to display the corresponding register's contents.
|
||||
|
||||
Example
|
||||
---
|
||||
<cpu id="cpu8088" model="8088" autoStart="true">
|
||||
<control type="button" class="input" binding="run">Run</control>
|
||||
</cpu>
|
||||
```xml
|
||||
<cpu id="cpu8088" model="8088" autoStart="true">
|
||||
<control type="button" class="input" binding="run">Run</control>
|
||||
</cpu>
|
||||
```
|
||||
|
||||
Output
|
||||
---
|
||||
<div id="..." class="pc-cpu pc-component" style="">
|
||||
<div class="pc-container" style="">
|
||||
<div class="pcjs-cpu" data-value="id:'...',name:'...',model:'...',cycles:'...',multiplier:'...',autoStart:'...'">
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
```html
|
||||
<div id="..." class="pc-cpu pc-component" style="">
|
||||
<div class="pc-container" style="">
|
||||
<div class="pcjs-cpu" data-value="id:'...',name:'...',model:'...',cycles:'...',multiplier:'...',autoStart:'...'">
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
```
|
||||
|
||||
Also, if any controls are defined, another <div> of class="pc-controls" is created in the container <div>,
|
||||
with each control inside a <div> of class="pc-control".
|
||||
|
|
|
|||
|
|
@ -9,7 +9,9 @@ PCjs Debugger Component
|
|||
|
||||
Format
|
||||
---
|
||||
<debugger>...</debugger>
|
||||
```xml
|
||||
<debugger>...</debugger>
|
||||
```
|
||||
|
||||
Purpose
|
||||
---
|
||||
|
|
@ -17,7 +19,7 @@ Creates an instance of the Debugger component.
|
|||
|
||||
Attributes
|
||||
---
|
||||
* *message* (optional)
|
||||
* *messages* (optional)
|
||||
* One or more message categories to enable, separated by |. By default, all message categories are disabled.
|
||||
See the Debugger's "m" command for a current list of message categories.
|
||||
|
||||
|
|
@ -40,16 +42,20 @@ Use the Debugger's built-in help for a list of commands.
|
|||
|
||||
Example
|
||||
---
|
||||
<debugger/>
|
||||
```xml
|
||||
<debugger/>
|
||||
```
|
||||
|
||||
Output
|
||||
---
|
||||
<div id="..." class="pc-debugger pc-component" style="">
|
||||
<div class="pc-container" style="">
|
||||
<div class="pcjs-debugger" data-value="id:'...',name:'...',message:'...'">
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
```html
|
||||
<div id="..." class="pc-debugger pc-component" style="">
|
||||
<div class="pc-container" style="">
|
||||
<div class="pcjs-debugger" data-value="id:'...',name:'...',messages:'...'">
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
```
|
||||
|
||||
Also, if any controls are defined, another <div> of class="pc-controls" is created in the container <div>,
|
||||
with each control inside a <div> of class="pc-control".
|
||||
|
|
|
|||
|
|
@ -624,7 +624,7 @@ function Ip(a){a.xb++;a.xb>=a.Of+1&&(a.xb=1,a.kb++,a.kb>=a.Nf&&(a.kb=0,a.Qb++))}
|
|||
function Kp(a){Ua.call(this,"HDC",a,Kp,1048576);this.dmaRead=this.yk;this.dmaWrite=this.zk;this.dmaWriteBuffer=this.Mk;this.dmaWriteFormat=this.Nk;this.ua=[];this.Fa=a.drives;this.ja="at"==a.type}db(Kp);
|
||||
var Lp=["XTC","ATC","COMPAQ"],Mp=[{0:[306,2],1:[375,8],2:[306,6],3:[306,4]},{1:[306,4],2:[615,4],3:[615,6],4:[940,8],5:[940,6],6:[615,4],7:[462,8],8:[733,5],9:[900,15],10:[820,3],11:[855,5],12:[855,7],13:[306,8],14:[733,7],16:[612,4],17:[977,5],18:[977,7],19:[1024,7],20:[733,5],21:[733,7],22:[733,5],23:[306,4]},{1:[306,4],2:[615,4],3:[615,6],4:[1023,8],5:[940,6],6:[697,5],7:[462,8],8:[925,5],9:[900,15],10:[980,5],11:[925,7],12:[925,9],13:[612,8],14:[980,4],16:[612,4],17:[980,5],18:[966,6],19:[1023,
|
||||
8],20:[733,5],21:[733,7],22:[524,4,40],23:[924,8],24:[966,14],25:[966,16],26:[1023,14],27:[832,6,33],28:[1222,15,34],29:[1240,7,34],30:[615,4,25],31:[615,8,25],32:[905,9,25],33:[832,8,33],34:[966,7,34],35:[966,8,34],36:[966,9,34],37:[966,5,34],38:[612,16,63],39:[1023,11,33],40:[1023,15,34],41:[1630,15,52],42:[1023,16,63],43:[805,4,26],44:[805,2,26],45:[748,8,33],46:[748,6,33],47:[966,5,25]}];m=Kp.prototype;
|
||||
m.Pb=function(a,b,c){var d=this;switch(b){case "saveHD0":case "saveHD1":return this.qa[b]=c,c.onclick=function(a){return function(){var b=d.A&&d.A[a];b&&b.za?(b=b.za,b=Ia(pp(b),"octet-stream",!0,b.Ng.replace(".json",".img")),w(b)):d.Na("Hard disk "+a+" is not available.")}}(+b.slice(-1)),!0}return!1};
|
||||
m.Pb=function(a,b,c){var d=this;switch(b){case "saveHD0":case "saveHD1":return this.qa[b]=c,c.onclick=function(a){return function(){var b=d.A&&d.A[a];b&&b.za?(b=b.za,b=Ia(pp(b),"octet-stream",!0,b.Ng.replace(".json",".img")),w(b)):d.Na("Hard drive "+a+" is not available.")}}(+b.slice(-1)),!0}return!1};
|
||||
m.Ic=function(a,b,c,d){this.ea=b;this.F=c;this.ha=d;this.V=a;if(d=Nc(a,"drives"))this.ua=d;else if(this.Fa)try{this.ua=eval("("+this.Fa+")")}catch(e){w("HDC drive configuration error: "+e.message+" ("+this.Fa+")")}this.N=Eb(a,"ChipSet");this.U=0;this.Ia=3;hc(b,this,this.ja?Np:Op);lc(b,this,this.ja?Pp:Qp);this.ja&&(this.U++,this.N&&5180==this.N.ia&&this.U++,this.Ia=2,b.aa[496]=2,b.fa[496]=2);Te(c,19,this.Zl.bind(this));Te(c,64,this.$l.bind(this));this.reset();Rp(this)||rb(this)};
|
||||
m.ic=function(a,b){if(!b)if(!a||!this.restore)Sp(this),this.V.dh&&Rp(this,!0);else if(!this.restore(a))return!1;return!0};m.hc=function(a){return a?this.save():!0};m.ff=function(){return this.V?this.V.ff():""};m.ke=function(){return this.V?this.V.ke():""};m.reset=function(){Sp(this,null,!0)};
|
||||
m.save=function(){var a=new hf(this),b=0,c=[];this.ja?(c[b++]=this.X,c[b++]=this.Pa,c[b++]=this.aa,c[b++]=this.Ca,c[b++]=this.ya,c[b++]=this.wa,c[b++]=this.ra,c[b++]=this.ma,c[b++]=this.Ea,c[b++]=[this.ga,this.hb]):(c[b++]=this.pa,c[b++]=this.ma,c[b++]=this.W,c[b++]=this.L,c[b++]=this.C,c[b++]=this.Oa,c[b++]=this.Ka,c[b++]=this.Ja,c[b++]=this.ka);for(var d=0,e=[],f=0;f<this.A.length;f++){var g=d++,h=this.A[f],k=0,l=[];l[k++]=h.errorCode;l[k++]=h.mk;l[k++]=h.bf;l[k++]=h.Qe;l[k++]=h.Re;l[k++]=h.kb;
|
||||
|
|
|
|||
|
|
@ -570,7 +570,7 @@ function Im(a){a.mb++;a.mb>=a.Ve+1&&(a.mb=1,a.Ya++,a.Ya>=a.Ue&&(a.Ya=0,a.wb++))}
|
|||
function Z(a){Ia.call(this,"HDC",a,Z);this.dmaRead=this.sj;this.dmaWrite=this.tj;this.dmaWriteBuffer=this.Dj;this.dmaWriteFormat=this.Ej;this.ia=[];this.qa=a.drives;this.W="at"==a.type}Qa(Z);
|
||||
var Km=["XTC","ATC","COMPAQ"],Lm=[{0:[306,2],1:[375,8],2:[306,6],3:[306,4]},{1:[306,4],2:[615,4],3:[615,6],4:[940,8],5:[940,6],6:[615,4],7:[462,8],8:[733,5],9:[900,15],10:[820,3],11:[855,5],12:[855,7],13:[306,8],14:[733,7],16:[612,4],17:[977,5],18:[977,7],19:[1024,7],20:[733,5],21:[733,7],22:[733,5],23:[306,4]},{1:[306,4],2:[615,4],3:[615,6],4:[1023,8],5:[940,6],6:[697,5],7:[462,8],8:[925,5],9:[900,15],10:[980,5],11:[925,7],12:[925,9],13:[612,8],14:[980,4],16:[612,4],17:[980,5],18:[966,6],19:[1023,
|
||||
8],20:[733,5],21:[733,7],22:[524,4,40],23:[924,8],24:[966,14],25:[966,16],26:[1023,14],27:[832,6,33],28:[1222,15,34],29:[1240,7,34],30:[615,4,25],31:[615,8,25],32:[905,9,25],33:[832,8,33],34:[966,7,34],35:[966,8,34],36:[966,9,34],37:[966,5,34],38:[612,16,63],39:[1023,11,33],40:[1023,15,34],41:[1630,15,52],42:[1023,16,63],43:[805,4,26],44:[805,2,26],45:[748,8,33],46:[748,6,33],47:[966,5,25]}];l=Z.prototype;
|
||||
l.zb=function(a,b,c){var d=this;switch(b){case "saveHD0":case "saveHD1":return this.ka[b]=c,c.onclick=function(a){return function(){var b=d.B&&d.B[a];b&&b.ta?(b=b.ta,b=za(pm(b),"octet-stream",!0,b.nh.replace(".json",".img")),n(b)):d.Ba("Hard disk "+a+" is not available.")}}(+b.slice(-1)),!0}return!1};
|
||||
l.zb=function(a,b,c){var d=this;switch(b){case "saveHD0":case "saveHD1":return this.ka[b]=c,c.onclick=function(a){return function(){var b=d.B&&d.B[a];b&&b.ta?(b=b.ta,b=za(pm(b),"octet-stream",!0,b.nh.replace(".json",".img")),n(b)):d.Ba("Hard drive "+a+" is not available.")}}(+b.slice(-1)),!0}return!1};
|
||||
l.pc=function(a,b,c,d){this.ha=b;this.A=c;this.Ia=d;this.ba=a;if(d=jc(a,"drives"))this.ia=d;else if(this.qa)try{this.ia=eval("("+this.qa+")")}catch(e){n("HDC drive configuration error: "+e.message+" ("+this.qa+")")}this.P=kb(a,"ChipSet");this.H=0;this.ra=3;Nb(b,this,this.W?Mm:Nm);Pb(b,this,this.W?Om:Pm);this.W&&(this.H++,this.P&&5180==this.P.ca&&this.H++,this.ra=2,b.P[496]=2,b.R[496]=2);Yd(c,19,this.Rk.bind(this));Yd(c,64,this.Sk.bind(this));this.reset();Qm(this)||ab(this)};
|
||||
l.Vb=function(a,b){if(!b)if(!a||!this.restore)Rm(this),this.ba.jg&&Qm(this,!0);else if(!this.restore(a))return!1;return!0};l.Ub=function(a){return a?this.save():!0};l.se=function(){return this.ba?this.ba.se():""};l.Ad=function(){return this.ba?this.ba.Ad():""};l.reset=function(){Rm(this,null,!0)};
|
||||
l.save=function(){var a=new be(this),b=0,c=[];this.W?(c[b++]=this.K,c[b++]=this.za,c[b++]=this.L,c[b++]=this.oa,c[b++]=this.ma,c[b++]=this.la,c[b++]=this.Z,c[b++]=this.aa,c[b++]=this.pa,c[b++]=[this.R,this.Qa]):(c[b++]=this.da,c[b++]=this.aa,c[b++]=this.I,c[b++]=this.G,c[b++]=this.D,c[b++]=this.xa,c[b++]=this.va,c[b++]=this.ua,c[b++]=this.Y);for(var d=0,e=[],f=0;f<this.B.length;f++){var g=d++,h=this.B[f],k=0,m=[];m[k++]=h.errorCode;m[k++]=h.jj;m[k++]=h.oe;m[k++]=h.de;m[k++]=h.ee;m[k++]=h.Ya;m[k++]=
|
||||
|
|
|
|||
|
|
@ -9,7 +9,9 @@ PCjs Floppy Drive Controller (FDC) Component
|
|||
|
||||
Format
|
||||
---
|
||||
<fdc>...</fdc>
|
||||
```xml
|
||||
<fdc>...</fdc>
|
||||
```
|
||||
|
||||
Purpose
|
||||
---
|
||||
|
|
@ -53,24 +55,28 @@ Bindings
|
|||
|
||||
Example
|
||||
---
|
||||
<fdc id="fdcNEC" autoMount="'{A: {name: "PC-DOS 1.0", path: "pcdos-1.00.json"}}'">
|
||||
<control type="container">
|
||||
<control type="list" class="input" binding="listDrives"/>
|
||||
<control type="list" class="input" binding="listDisks">
|
||||
<disk path="">None</disk>
|
||||
<disk path="pcdos-1.00.json">PC-DOS 1.0</disk>
|
||||
</control>
|
||||
<control type="button" class="input" binding="loadDrive">Load Drive</control>
|
||||
</control>
|
||||
</fdc>
|
||||
```xml
|
||||
<fdc id="fdcNEC" autoMount="'{A: {name: "PC-DOS 1.0", path: "pcdos-1.00.json"}}'">
|
||||
<control type="container">
|
||||
<control type="list" class="input" binding="listDrives"/>
|
||||
<control type="list" class="input" binding="listDisks">
|
||||
<disk path="pcdos-1.00.json">PC-DOS 1.0</disk>
|
||||
</control>
|
||||
<control type="button" class="input" binding="loadDrive">Load Drive</control>
|
||||
</control>
|
||||
</fdc>
|
||||
```
|
||||
|
||||
Output
|
||||
---
|
||||
<div id="..." class="pc-fdc pc-component">
|
||||
<div class="pc-container">
|
||||
<div class="pcjs-fdc" data-value="id:'...',name:'...',listDrives:'...',listDisks:'...',loadDrive:'...'"></div>
|
||||
</div>
|
||||
</div>
|
||||
```html
|
||||
<div id="..." class="pc-fdc pc-component">
|
||||
<div class="pc-container">
|
||||
<div class="pcjs-fdc" data-value="id:'...',name:'...',listDrives:'...',listDisks:'...',loadDrive:'...'">
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
```
|
||||
|
||||
Also, if any controls are defined, another <div> of class="pc-controls" is created in the container <div>,
|
||||
with each control inside a <div> of class="pc-control".
|
||||
|
|
|
|||
|
|
@ -9,7 +9,9 @@ PCjs Hard Drive Controller (HDC) Component
|
|||
|
||||
Format
|
||||
---
|
||||
<hdc>...</hdc>
|
||||
```xml
|
||||
<hdc>...</hdc>
|
||||
```
|
||||
|
||||
Purpose
|
||||
---
|
||||
|
|
@ -46,11 +48,15 @@ Attributes
|
|||
|
||||
For the Xebec (*'xt'*) controller, you should install the Xebec ROM; eg:
|
||||
|
||||
```xml
|
||||
<rom id="romHDC" addr="0xc8000" size="0x2000" file="/devices/pc/hdc/ibm-xebec-1982.json"/>
|
||||
```
|
||||
|
||||
For the Western Digital (*'at'*) controller, use a Model 5170 (or newer) ROM module; eg:
|
||||
|
||||
```xml
|
||||
<rom id="romBIOS" addr="0xf0000" size="0x10000" alias="0xff0000" file="/devices/pc/rom/5170/1984-01-10/1984-01-10.json"/>
|
||||
```
|
||||
|
||||
The default *type* setting is *'xt'*.
|
||||
|
||||
|
|
@ -62,15 +68,20 @@ This component has no bindings. Fixed disks cannot be loaded or unloaded once th
|
|||
|
||||
Example
|
||||
---
|
||||
<hdc id="hdcXT" drives="[{name:'10Mb Hard Drive',type:3}]"/>
|
||||
```xml
|
||||
<hdc id="hdcXT" drives="[{name:'10Mb Hard Drive',type:3}]"/>
|
||||
```
|
||||
|
||||
Output
|
||||
---
|
||||
<div id="..." class="pc-hdc pc-component">
|
||||
<div class="pc-container">
|
||||
<div class="pcjs-hdc" data-value="id:'...',name:'...',drives:'...'"></div>
|
||||
</div>
|
||||
</div>
|
||||
```html
|
||||
<div id="..." class="pc-hdc pc-component">
|
||||
<div class="pc-container">
|
||||
<div class="pcjs-hdc" data-value="id:'...',name:'...',drives:'...'">
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
```
|
||||
|
||||
Also, if any controls are defined, another <div> of class="pc-controls" is created in the container <div>,
|
||||
with each control inside a <div> of class="pc-control".
|
||||
|
|
|
|||
|
|
@ -9,7 +9,9 @@ PCjs Keyboard Component
|
|||
|
||||
Format
|
||||
---
|
||||
<keyboard>...</keyboard>
|
||||
```xml
|
||||
<keyboard>...</keyboard>
|
||||
```
|
||||
|
||||
Purpose
|
||||
---
|
||||
|
|
@ -41,18 +43,23 @@ for the specified model.
|
|||
|
||||
Example
|
||||
---
|
||||
<keyboard id="keyboard" model="us83"/>
|
||||
```xml
|
||||
<keyboard id="keyboard" model="us83"/>
|
||||
```
|
||||
|
||||
See [/devices/pc/keyboard/us83-softkeys.xml](/devices/pc/keyboard/us83-softkeys.xml) for an example that provides a
|
||||
complete "soft keyboard".
|
||||
|
||||
Output
|
||||
---
|
||||
<div id="..." class="pc-keyboard pc-component">
|
||||
<div class="pc-container">
|
||||
<div class="pcjs-keyboard" data-value="id:'...',name:'...',model:'...',sw1:'...',sw2:'...'"></div>
|
||||
</div>
|
||||
</div>
|
||||
```html
|
||||
<div id="..." class="pc-keyboard pc-component">
|
||||
<div class="pc-container">
|
||||
<div class="pcjs-keyboard" data-value="id:'...',name:'...',model:'...',sw1:'...',sw2:'...'">
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
```
|
||||
|
||||
Also, if any controls are defined, another <div> of class="pc-controls" is created in the container <div>,
|
||||
with each control inside a <div> of class="pc-control".
|
||||
|
|
|
|||
|
|
@ -9,7 +9,9 @@ PCjs Machine Component
|
|||
|
||||
Format
|
||||
---
|
||||
<machine>...</machine>
|
||||
```xml
|
||||
<machine>...</machine>
|
||||
```
|
||||
|
||||
Purpose
|
||||
---
|
||||
|
|
@ -32,14 +34,18 @@ None.
|
|||
|
||||
Example
|
||||
---
|
||||
<machine id="ibm5150" class="pcjs" width="740px" pos="center" border="1" style="background-color:#FAEBD7">...</machine>
|
||||
```xml
|
||||
<machine id="ibm5150" class="pcjs" width="740px" pos="center" border="1" style="background-color:#FAEBD7">...</machine>
|
||||
```
|
||||
|
||||
Output
|
||||
---
|
||||
<div id="..." class="pc-machine pc-component" style="">
|
||||
<div class="pc-container" style="">
|
||||
...
|
||||
</div>
|
||||
</div>
|
||||
```html
|
||||
<div id="..." class="pc-machine pc-component" style="">
|
||||
<div class="pc-container" style="">
|
||||
...
|
||||
</div>
|
||||
</div>
|
||||
```
|
||||
|
||||
[Return to [PCjs Documentation](..)]
|
||||
|
|
|
|||
|
|
@ -9,7 +9,9 @@ PCjs Mouse Component
|
|||
|
||||
Format
|
||||
---
|
||||
<mouse>...</mouse>
|
||||
```xml
|
||||
<mouse>...</mouse>
|
||||
```
|
||||
|
||||
Purpose
|
||||
---
|
||||
|
|
@ -30,14 +32,19 @@ None.
|
|||
|
||||
Example
|
||||
---
|
||||
<mouse serial="com1"/>
|
||||
```xml
|
||||
<mouse serial="com1"/>
|
||||
```
|
||||
|
||||
Output
|
||||
---
|
||||
<div id="..." class="pc-mouse pc-component">
|
||||
<div class="pc-container">
|
||||
<div class="pcjs-mouse" data-value="id:'...',name:'...',serial:'...'></div>
|
||||
</div>
|
||||
</div>
|
||||
```html
|
||||
<div id="..." class="pc-mouse pc-component">
|
||||
<div class="pc-container">
|
||||
<div class="pcjs-mouse" data-value="id:'...',name:'...',serial:'...'>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
```
|
||||
|
||||
[Return to [PCjs Documentation](..)]
|
||||
|
|
|
|||
|
|
@ -9,7 +9,9 @@ PCjs Control Panel Component
|
|||
|
||||
Format
|
||||
---
|
||||
<panel>...</panel>
|
||||
```xml
|
||||
<panel>...</panel>
|
||||
```
|
||||
|
||||
Purpose
|
||||
---
|
||||
|
|
@ -28,27 +30,32 @@ and [Debugger](/docs/pcjs/debugger/) components.
|
|||
|
||||
Example
|
||||
---
|
||||
<panel id="panel" pos="center" width="900px" padleft="8px">
|
||||
<name>Control Panel</name>
|
||||
<control type="container" width="500px" pos="left" padbottom="10px">
|
||||
<control type="textarea" class="output" binding="print" width="480px" height="200px"/>
|
||||
<control type="container">
|
||||
<control type="text" class="input" binding="debugInput" width="360px"/>
|
||||
<control type="button" class="input" binding="debugEnter">Enter</control>
|
||||
<control type="button" class="input" binding="clear">Clear</control>
|
||||
</control>
|
||||
</control>
|
||||
</panel>
|
||||
```xml
|
||||
<panel id="panel" pos="center" width="900px" padleft="8px">
|
||||
<name>Control Panel</name>
|
||||
<control type="container" width="500px" pos="left" padbottom="10px">
|
||||
<control type="textarea" class="output" binding="print" width="480px" height="200px"/>
|
||||
<control type="container">
|
||||
control type="text" class="input" binding="debugInput" width="360px"/>
|
||||
<control type="button" class="input" binding="debugEnter">Enter</control>
|
||||
<control type="button" class="input" binding="clear">Clear</control>
|
||||
</control>
|
||||
</control>
|
||||
</panel>
|
||||
```
|
||||
|
||||
See [/devices/pc/panel/default.xml](/devices/pc/panel/default.xml) for a more complete example.
|
||||
|
||||
Output
|
||||
---
|
||||
<div id="..." class="pc-panel pc-component">
|
||||
<div class="pc-container">
|
||||
<div class="pcjs-panel" data-value="id:'...',name:'...'"></div>
|
||||
</div>
|
||||
</div>
|
||||
```html
|
||||
<div id="..." class="pc-panel pc-component">
|
||||
<div class="pc-container">
|
||||
<div class="pcjs-panel" data-value="id:'...',name:'...'">
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
```
|
||||
|
||||
Also, if any controls are defined, another <div> of class="pc-controls" is created in the container <div>,
|
||||
with each control inside a <div> of class="pc-control".
|
||||
|
|
|
|||
|
|
@ -9,7 +9,9 @@ PCjs ParallelPort Component
|
|||
|
||||
Format
|
||||
---
|
||||
<parallel>...</parallel>
|
||||
```xml
|
||||
<parallel>...</parallel>
|
||||
```
|
||||
|
||||
Purpose
|
||||
---
|
||||
|
|
@ -39,14 +41,19 @@ Bindings
|
|||
|
||||
Example
|
||||
---
|
||||
<parallel id="lpt1" adapter="2" binding="print"/>
|
||||
```xml
|
||||
<parallel id="lpt1" adapter="2" binding="print"/>
|
||||
```
|
||||
|
||||
Output
|
||||
---
|
||||
<div id="..." class="pc-parallel pc-component">
|
||||
<div class="pc-container">
|
||||
<div class="pcjs-parallel" data-value="id:'...',name:'...',adapter:'...',binding:'...'"></div>
|
||||
</div>
|
||||
</div>
|
||||
```html
|
||||
<div id="..." class="pc-parallel pc-component">
|
||||
<div class="pc-container">
|
||||
<div class="pcjs-parallel" data-value="id:'...',name:'...',adapter:'...',binding:'...'">
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
```
|
||||
|
||||
[Return to [PCjs Documentation](..)]
|
||||
|
|
|
|||
|
|
@ -9,7 +9,9 @@ PCjs Random-Access Memory (RAM) Component
|
|||
|
||||
Format
|
||||
---
|
||||
<ram>...</ram>
|
||||
```xml
|
||||
<ram>...</ram>
|
||||
```
|
||||
|
||||
Purpose
|
||||
---
|
||||
|
|
@ -43,15 +45,20 @@ Bindings
|
|||
|
||||
Example
|
||||
---
|
||||
<ram id="ramLow" addr="0x00000"/>
|
||||
```xml
|
||||
<ram id="ramLow" addr="0x00000"/>
|
||||
```
|
||||
|
||||
Output
|
||||
---
|
||||
<div id="..." class="pc-ram pc-component">
|
||||
<div class="pc-container">
|
||||
<div class="pcjs-ram" data-value="id:'...',name:'...',addr:'...',size:'...',test:'...'"></div>
|
||||
</div>
|
||||
</div>
|
||||
```html
|
||||
<div id="..." class="pc-ram pc-component">
|
||||
<div class="pc-container">
|
||||
<div class="pcjs-ram" data-value="id:'...',name:'...',addr:'...',size:'...',test:'...'">
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
```
|
||||
|
||||
Also, if any controls are defined, another <div> of class="pc-controls" is created in the container <div>,
|
||||
with each control inside a <div> of class="pc-control".
|
||||
|
|
|
|||
|
|
@ -9,7 +9,9 @@ PCjs Read-Only Memory (ROM) Component
|
|||
|
||||
Format
|
||||
---
|
||||
<rom>...</rom>
|
||||
```xml
|
||||
<rom>...</rom>
|
||||
```
|
||||
|
||||
Purpose
|
||||
---
|
||||
|
|
@ -43,14 +45,19 @@ None.
|
|||
|
||||
Example
|
||||
---
|
||||
<rom id="romBIOS" addr="0xfe000" size="0x02000" file="/devices/pc/rom/5150/bios/1981-04-24.json"/>
|
||||
```xml
|
||||
<rom id="romBIOS" addr="0xfe000" size="0x02000" file="/devices/pc/rom/5150/bios/1981-04-24.json"/>
|
||||
```
|
||||
|
||||
Output
|
||||
---
|
||||
<div id="..." class="pc-rom pc-component">
|
||||
<div class="pc-container">
|
||||
<div class="pcjs-rom" data-value="id:'...',name:'...',addr:'...',size:'...',test:'...'"></div>
|
||||
</div>
|
||||
</div>
|
||||
```html
|
||||
<div id="..." class="pc-rom pc-component">
|
||||
<div class="pc-container">
|
||||
<div class="pcjs-rom" data-value="id:'...',name:'...',addr:'...',size:'...',test:'...'">
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
```
|
||||
|
||||
[Return to [PCjs Documentation](..)]
|
||||
|
|
|
|||
|
|
@ -9,7 +9,9 @@ PCjs SerialPort Component
|
|||
|
||||
Format
|
||||
---
|
||||
<serial>...</serial>
|
||||
```xml
|
||||
<serial>...</serial>
|
||||
```
|
||||
|
||||
Purpose
|
||||
---
|
||||
|
|
@ -39,14 +41,19 @@ Bindings
|
|||
|
||||
Example
|
||||
---
|
||||
<serial id="com1" adapter="1" binding="print"/>
|
||||
```xml
|
||||
<serial id="com1" adapter="1" binding="print"/>
|
||||
```
|
||||
|
||||
Output
|
||||
---
|
||||
<div id="..." class="pc-serial pc-component">
|
||||
<div class="pc-container">
|
||||
<div class="pcjs-serial" data-value="id:'...',name:'...',adapter:'...',binding:'...'"></div>
|
||||
</div>
|
||||
</div>
|
||||
```html
|
||||
<div id="..." class="pc-serial pc-component">
|
||||
<div class="pc-container">
|
||||
<div class="pcjs-serial" data-value="id:'...',name:'...',adapter:'...',binding:'...'">
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
```
|
||||
|
||||
[Return to [PCjs Documentation](..)]
|
||||
|
|
|
|||
|
|
@ -9,7 +9,9 @@ PCjs Video Component
|
|||
|
||||
Format
|
||||
---
|
||||
<video>...</video>
|
||||
```xml
|
||||
<video>...</video>
|
||||
```
|
||||
|
||||
Purpose
|
||||
---
|
||||
|
|
@ -22,24 +24,6 @@ Creates an instance of the Video component. This component is responsible for:
|
|||
|
||||
Attributes
|
||||
---
|
||||
* *addr* (required)
|
||||
|
||||
The ROM starting address (e.g., 0xfe000).
|
||||
|
||||
* *size* (required)
|
||||
|
||||
The length of ROM, in bytes (e.g., 0x02000 for an 8Kb ROM). This must match the length of the ROM image file.
|
||||
|
||||
* *file* (required)
|
||||
|
||||
URL of the ROM image file to load at the specified addr.
|
||||
|
||||
* *notify* (optional)
|
||||
|
||||
The *id* of a component to notify when *file* has been loaded. For example, the Video component may need
|
||||
to know when an external video ROM has been loaded. Any component can load its own files, including ROM image files,
|
||||
but it's simpler to use the ROM component and request notification.
|
||||
|
||||
* *model* (optional)
|
||||
|
||||
* "mda" (Monochrome Display Adapter)
|
||||
|
|
@ -49,17 +33,13 @@ Attributes
|
|||
If *model* is not set, the SW1 switch block settings from the [ChipSet](/docs/pcjs/chipset/) component will
|
||||
determine the video model to use ("mda" or "cga" only).
|
||||
|
||||
* *scale* (optional; default is false)
|
||||
|
||||
true scales text modes to fill the canvas;
|
||||
false centers text modes on the canvas (this generally provides the sharpest rendering).
|
||||
|
||||
* *screenwidth*, *screenheight* (required)
|
||||
* *screenWidth*, *screenHeight* (required)
|
||||
|
||||
The width and height of the canvas, in pixels (these are numbers, not style attributes, so do not include
|
||||
a "px" suffix).
|
||||
a "px" suffix); the canvas resolution does not need to match the *model* resolution (in fact, it should probably
|
||||
be closer to the resolution of modern monitors, but still proportional to the resolution of the *model* being used).
|
||||
|
||||
* *fontrom* (formerly *charset*; required for models "mda" and "cga")
|
||||
* *fontROM* (formerly *charset*; required for models "mda" and "cga")
|
||||
|
||||
The name of a character generator (font ROM) file. The MDA and CGA adapters did not contain a separate
|
||||
system ROM, but they did contain on-board font data in ROM that the adapter used internally to generate character
|
||||
|
|
@ -67,6 +47,11 @@ Attributes
|
|||
|
||||
The EGA uses font data stored in its system ROM, which is loaded by the ROM component, so do not use this
|
||||
setting with model "ega".
|
||||
|
||||
* *scale* (optional; default is false)
|
||||
|
||||
true scales text modes to fill the canvas;
|
||||
false centers text modes on the canvas (this generally provides the sharpest rendering).
|
||||
|
||||
Also supports the attributes of *[Component](/docs/pcjs/component/)*.
|
||||
|
||||
|
|
@ -79,17 +64,22 @@ Bindings
|
|||
|
||||
Example
|
||||
---
|
||||
<video id="videoMDA" screenwidth="720" screenheight="350" scale="true" fontrom="ibm-mda-cga.json">
|
||||
<name>Monochrome Display</name>
|
||||
</video>
|
||||
```xml
|
||||
<video id="videoMDA" screenWidth="720" screenHeight="350" fontROM="ibm-mda-cga.json" scale="true">
|
||||
<name>Monochrome Display</name>
|
||||
</video>
|
||||
```
|
||||
|
||||
Output
|
||||
---
|
||||
<div id="..." class="pc-video pc-component">
|
||||
<div class="pc-container">
|
||||
<div class="pcjs-video" data-value="id:'...',name:'...',addr:'...',size:'...',test:'...'"></div>
|
||||
</div>
|
||||
</div>
|
||||
```html
|
||||
<div id="..." class="pc-video pc-component">
|
||||
<div class="pc-container">
|
||||
<div class="pcjs-video" data-value="...">
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
```
|
||||
|
||||
Also, if any controls are defined, another <div> of class="pc-controls" is created in the container <div>,
|
||||
with each control inside a <div> of class="pc-control".
|
||||
|
|
|
|||
Loading…
Reference in a new issue