And more PCjs/PCx86 disambiguation
This commit is contained in:
parent
a1e999e0c4
commit
2629e48bdf
57 changed files with 200 additions and 134 deletions
60
_config.yml
60
_config.yml
|
|
@ -66,36 +66,36 @@ pcjs:
|
|||
- /modules/shared/lib/usrlib.js
|
||||
- /modules/shared/lib/weblib.js
|
||||
- /modules/shared/lib/component.js
|
||||
- /modules/pcjs/lib/defines.js
|
||||
- /modules/pcjs/lib/x86.js
|
||||
- /modules/pcjs/lib/interrupts.js
|
||||
- /modules/pcjs/lib/messages.js
|
||||
- /modules/pcjs/lib/panel.js
|
||||
- /modules/pcjs/lib/bus.js
|
||||
- /modules/pcjs/lib/memory.js
|
||||
- /modules/pcjs/lib/cpu.js
|
||||
- /modules/pcjs/lib/x86seg.js
|
||||
- /modules/pcjs/lib/x86cpu.js
|
||||
- /modules/pcjs/lib/x86fpu.js
|
||||
- /modules/pcjs/lib/x86func.js
|
||||
- /modules/pcjs/lib/x86help.js
|
||||
- /modules/pcjs/lib/x86mods.js
|
||||
- /modules/pcjs/lib/x86ops.js
|
||||
- /modules/pcjs/lib/x86op0f.js
|
||||
- /modules/pcjs/lib/chipset.js
|
||||
- /modules/pcjs/lib/rom.js
|
||||
- /modules/pcjs/lib/ram.js
|
||||
- /modules/pcjs/lib/keyboard.js
|
||||
- /modules/pcjs/lib/video.js
|
||||
- /modules/pcjs/lib/parallelport.js
|
||||
- /modules/pcjs/lib/serialport.js
|
||||
- /modules/pcjs/lib/mouse.js
|
||||
- /modules/pcjs/lib/disk.js
|
||||
- /modules/pcjs/lib/fdc.js
|
||||
- /modules/pcjs/lib/hdc.js
|
||||
- /modules/pcjs/lib/debugger.js
|
||||
- /modules/pcjs/lib/state.js
|
||||
- /modules/pcjs/lib/computer.js
|
||||
- /modules/pcx86/lib/defines.js
|
||||
- /modules/pcx86/lib/x86.js
|
||||
- /modules/pcx86/lib/interrupts.js
|
||||
- /modules/pcx86/lib/messages.js
|
||||
- /modules/pcx86/lib/panel.js
|
||||
- /modules/pcx86/lib/bus.js
|
||||
- /modules/pcx86/lib/memory.js
|
||||
- /modules/pcx86/lib/cpu.js
|
||||
- /modules/pcx86/lib/x86seg.js
|
||||
- /modules/pcx86/lib/x86cpu.js
|
||||
- /modules/pcx86/lib/x86fpu.js
|
||||
- /modules/pcx86/lib/x86func.js
|
||||
- /modules/pcx86/lib/x86help.js
|
||||
- /modules/pcx86/lib/x86mods.js
|
||||
- /modules/pcx86/lib/x86ops.js
|
||||
- /modules/pcx86/lib/x86op0f.js
|
||||
- /modules/pcx86/lib/chipset.js
|
||||
- /modules/pcx86/lib/rom.js
|
||||
- /modules/pcx86/lib/ram.js
|
||||
- /modules/pcx86/lib/keyboard.js
|
||||
- /modules/pcx86/lib/video.js
|
||||
- /modules/pcx86/lib/parallelport.js
|
||||
- /modules/pcx86/lib/serialport.js
|
||||
- /modules/pcx86/lib/mouse.js
|
||||
- /modules/pcx86/lib/disk.js
|
||||
- /modules/pcx86/lib/fdc.js
|
||||
- /modules/pcx86/lib/hdc.js
|
||||
- /modules/pcx86/lib/debugger.js
|
||||
- /modules/pcx86/lib/state.js
|
||||
- /modules/pcx86/lib/computer.js
|
||||
- /modules/shared/lib/embed.js
|
||||
- /modules/shared/lib/save.js
|
||||
pc8080_scripts:
|
||||
|
|
|
|||
|
|
@ -5,7 +5,7 @@ in the Front Matter of our Markdown documents, for compatibility with the Jekyll
|
|||
|
||||
'id' (eg, "ibm5150")
|
||||
'name' (eg, "IBM PC (Model 5150) with Monochrome Display")
|
||||
'type' (eg. "c1p", "pcx86", "pc8080")
|
||||
'type' (eg, "c1p", "pcx86", "pc8080")
|
||||
'debugger' (default is false)
|
||||
'config' (default is "machine.xml")
|
||||
'template' (default is "machine.xsl")
|
||||
|
|
@ -35,16 +35,22 @@ of our Markdown or XML documents. Examples: 'automount' becomes 'autoMount', 'a
|
|||
{% for machine in page.machines %}
|
||||
{% capture machine_type %}{{ machine.type | remove:"-dbg" }}{% endcapture %}
|
||||
{% if machine_type != "c1p" %}
|
||||
{% capture machine_app %}{{ machine_type }}{% endcapture %}
|
||||
{% else %}
|
||||
{% capture machine_app %}{{ machine_type }}js{% endcapture %}
|
||||
{% capture machine_app %}{{ machine_type }}{% endcapture %}
|
||||
{% else %}
|
||||
{% capture machine_app %}{{ machine_type }}js{% endcapture %}
|
||||
{% endif %}
|
||||
{% if machine.debugger %}
|
||||
{% capture machine_file %}{{ machine_type }}-dbg{% endcapture %}
|
||||
{% assign machine_debugger = true %}
|
||||
{% else %}
|
||||
{% capture machine_file %}{{ machine.type }}{% endcapture %}
|
||||
{% if machine.type != machine_type %}
|
||||
{% assign machine_debugger = true %}
|
||||
{% else %}
|
||||
{% assign machine_debugger = false %}
|
||||
{% endif %}
|
||||
{% endif %}
|
||||
{% capture machine_embed %}embed{{ machine_type | upcase }}{% endcapture %}
|
||||
{% capture machine_embed %}embed{{ machine_type | upcase | replace:"X86","x86" }}{% endcapture %}
|
||||
{% if machine.automount != nil %}
|
||||
{% if machine.automount == "" %}
|
||||
{% assign machine_autoMount = "{}" %}
|
||||
|
|
@ -116,7 +122,7 @@ of our Markdown or XML documents. Examples: 'automount' becomes 'autoMount', 'a
|
|||
{% endif %}
|
||||
{% endif %}
|
||||
{% if script contains "js/lib/defines.js" %}
|
||||
{% if machine.debugger != true %}
|
||||
{% if machine_debugger != true %}
|
||||
{{ machine_script | replace:"defines.js","nodebugger.js" }}
|
||||
{% endif %}
|
||||
{% endif %}
|
||||
|
|
|
|||
|
|
@ -3,8 +3,9 @@ layout: page
|
|||
title: OSI Challenger 1P (32Kb) with Disk Support
|
||||
permalink: /devices/c1p/machine/32kb/
|
||||
machines:
|
||||
- type: c1p-dbg
|
||||
- type: c1p
|
||||
id: c1p32kb
|
||||
debugger: true
|
||||
---
|
||||
|
||||
{% include machine.html id="c1p32kb" %}
|
||||
|
|
|
|||
|
|
@ -3,8 +3,9 @@ layout: page
|
|||
title: OSI Challenger 1P (8Kb) with Additional Software
|
||||
permalink: /devices/c1p/machine/8kb/all/debugger/
|
||||
machines:
|
||||
- type: c1p-dbg
|
||||
- type: c1p
|
||||
id: c1p8kb
|
||||
debugger: true
|
||||
---
|
||||
|
||||
{% include machine.html id="c1p8kb" %}
|
||||
|
|
|
|||
|
|
@ -3,8 +3,9 @@ layout: page
|
|||
title: OSI Challenger 1P (8Kb) with Large Display
|
||||
permalink: /devices/c1p/machine/8kb/large/debugger/
|
||||
machines:
|
||||
- type: c1p-dbg
|
||||
- type: c1p
|
||||
id: c1p8kb
|
||||
debugger: true
|
||||
---
|
||||
|
||||
{% include machine.html id="c1p8kb" %}
|
||||
|
|
|
|||
|
|
@ -72,7 +72,7 @@ Space Invaders Hardware Notes
|
|||
bit 0 invader movement 1
|
||||
06 w watchdog timer clear
|
||||
|
||||
Note that, unlike most emulators, PC8080 (like PCjs) has a *[Bus](/modules/pc8080/lib/bus.js)* architecture,
|
||||
Note that, unlike most emulators, PC8080 (like PCx86) has a *[Bus](/modules/pc8080/lib/bus.js)* architecture,
|
||||
allowing components to "plug in" different kinds of memory or memory-mapped devices at different addresses,
|
||||
and to register specific functions for specific I/O ports.
|
||||
|
||||
|
|
@ -81,7 +81,7 @@ attempts to write to those addresses, nothing should happen. Unfortunately, mos
|
|||
space as one contiguous array of bytes. Which means either that the ROM is susceptible to corruption *or* that every
|
||||
write operation must check the address to determine its validity, which hurts the performance of *all* writes.
|
||||
|
||||
In PC8080 (and PCjs), all writes are equally fast, and all ROMs are fully protected. An exception is made for the
|
||||
In PC8080 (and PCx86), all writes are equally fast, and all ROMs are fully protected. An exception is made for the
|
||||
Debugger, which allows you to use the "e" command to modify ("patch") ROM code on the fly, but that is completely
|
||||
outside and independent of the 8080 code being emulated.
|
||||
|
||||
|
|
|
|||
|
|
@ -3,7 +3,7 @@ layout: page
|
|||
title: IBM PC Keyboard Devices
|
||||
permalink: /devices/pcx86/keyboard/
|
||||
redirect_from:
|
||||
- /devices/pcx86/keyboard/
|
||||
- /devices/pc/keyboard/
|
||||
---
|
||||
|
||||
IBM PC Keyboard Devices
|
||||
|
|
|
|||
|
|
@ -4,6 +4,7 @@ title: IBM PC (Model 5150) Machines
|
|||
permalink: /devices/pcx86/machine/5150/
|
||||
redirect_from:
|
||||
- /configs/pc/machines/5150/
|
||||
- /devices/pc/machine/5150/
|
||||
---
|
||||
|
||||
IBM PC (Model 5150) Machines
|
||||
|
|
|
|||
|
|
@ -3,7 +3,7 @@ layout: page
|
|||
title: IBM PC (Model 5150, 384Kb) with Color Display and Soft Keyboard
|
||||
permalink: /devices/pcx86/machine/5150/cga/384kb/softkbd/
|
||||
redirect_from:
|
||||
- /devices/pcx86/machine/5150/cga/384kb/
|
||||
- /devices/pc/machine/5150/cga/384kb/softkbd/
|
||||
machines:
|
||||
- type: pcx86
|
||||
id: ibm5150
|
||||
|
|
|
|||
|
|
@ -4,6 +4,7 @@ title: IBM PC (Model 5150, 64Kb) with Color Display
|
|||
permalink: /devices/pcx86/machine/5150/cga/64kb/
|
||||
redirect_from:
|
||||
- /configs/pc/machines/5150/cga/64kb/
|
||||
- /devices/pc/machine/5150/cga/64kb/
|
||||
---
|
||||
|
||||
IBM PC with Color Graphics (CGA) Display
|
||||
|
|
|
|||
|
|
@ -6,6 +6,7 @@ redirect_from:
|
|||
- /configs/pc/machines/5150/cga/64kb/donkey/
|
||||
- /configs/pc/machines/5150/cga/64kb/donkey/machine.xml/
|
||||
- /demos/pc/donkey/
|
||||
- /devices/pc/machine/5150/cga/64kb/donkey/
|
||||
machines:
|
||||
- type: pcx86
|
||||
id: ibm5150
|
||||
|
|
@ -20,9 +21,9 @@ The above simulation is configured for a clock speed of 4.77Mhz, with 64Kb of RA
|
|||
using the original IBM PC Model 5150 ROM BIOS and CGA font ROM. This configuration also includes a
|
||||
predefined state, with PC-DOS 1.0 already booted and DONKEY.BAS ready to run.
|
||||
|
||||
And now that PCjs automatically saves all your changes (subject to the limits of your browser's local
|
||||
And now that PCx86 automatically saves all your changes (subject to the limits of your browser's local
|
||||
storage), you can even close the browser in the middle of a game of DONKEY, and the next time you load
|
||||
this page, your progress (and the donkey) will be perfectly restored.
|
||||
|
||||
For more control over this machine, try the [Control Panel](debugger/) configuration, featuring the
|
||||
built-in PCjs Debugger.
|
||||
built-in PCx86 Debugger.
|
||||
|
|
|
|||
|
|
@ -3,7 +3,7 @@ layout: page
|
|||
title: IBM PC (Model 5150, 64Kb) with Color Display and Debugger
|
||||
permalink: /devices/pcx86/machine/5150/cga/64kb/donkey/debugger/
|
||||
redirect_from:
|
||||
- /devices/pcx86/machine/5150/cga/64kb/donkey/debugger/
|
||||
- /devices/pc/machine/5150/cga/64kb/donkey/debugger/
|
||||
machines:
|
||||
- type: pcx86
|
||||
id: ibm5150
|
||||
|
|
|
|||
File diff suppressed because one or more lines are too long
|
|
@ -2,6 +2,8 @@
|
|||
layout: page
|
||||
title: IBM PC (Model 5150, 64Kb) with Color Display and Soft Keyboard
|
||||
permalink: /devices/pcx86/machine/5150/cga/64kb/softkbd/
|
||||
redirect_from:
|
||||
- /devices/pc/machine/5150/cga/64kb/softkbd/
|
||||
machines:
|
||||
- type: pcx86
|
||||
id: ibm5150
|
||||
|
|
|
|||
|
|
@ -5,6 +5,7 @@ permalink: /devices/pcx86/machine/5150/cga/
|
|||
redirect_from:
|
||||
- /configs/pc/machines/5150/cga/
|
||||
- /demos/pc/cga/
|
||||
- /devices/pc/machine/5150/cga/
|
||||
---
|
||||
|
||||
IBM PC with Color Graphics (CGA) Display
|
||||
|
|
|
|||
|
|
@ -2,6 +2,8 @@
|
|||
layout: page
|
||||
title: IBM PC (Model 5150, 64Kb) with Dual Displays
|
||||
permalink: /devices/pcx86/machine/5150/dual/64kb/
|
||||
redirect_from:
|
||||
- /devices/pc/machine/5150/dual/64kb/
|
||||
machines:
|
||||
- type: pcx86
|
||||
id: ibm5150
|
||||
|
|
|
|||
|
|
@ -4,6 +4,7 @@ title: IBM PC (Model 5150) with Dual Displays
|
|||
permalink: /devices/pcx86/machine/5150/dual/
|
||||
redirect_from:
|
||||
- /configs/pc/machines/5150/dual/
|
||||
- /devices/pc/machine/5150/dual/
|
||||
---
|
||||
|
||||
IBM PC with Dual Displays
|
||||
|
|
|
|||
|
|
@ -4,6 +4,7 @@ title: IBM PC (Model 5150, 64Kb) with Monochrome Display and Debugger
|
|||
permalink: /devices/pcx86/machine/5150/mda/64kb/debugger/
|
||||
redirect_from:
|
||||
- /configs/pc/machines/5150/mda/64kb/debugger/
|
||||
- /devices/pc/machine/5150/mda/64kb/debugger/
|
||||
machines:
|
||||
- type: pcx86
|
||||
id: ibm5150
|
||||
|
|
|
|||
|
|
@ -6,6 +6,7 @@ redirect_from:
|
|||
- /configs/pc/machines/5150/mda/64kb/
|
||||
- /configs/pc/machines/5150/mda/64kb/index.xml/
|
||||
- /configs/pc/machines/5150/mda/64kb/machine.xml/
|
||||
- /devices/pc/machine/5150/mda/64kb/
|
||||
machines:
|
||||
- type: pcx86
|
||||
id: ibm5150
|
||||
|
|
|
|||
|
|
@ -2,6 +2,8 @@
|
|||
layout: page
|
||||
title: IBM PC (Model 5150, 64Kb) with Monochrome Display and Soft Keyboard
|
||||
permalink: /devices/pcx86/machine/5150/mda/64kb/softkbd/
|
||||
redirect_from:
|
||||
- /devices/pc/machine/5150/mda/64kb/softkbd/
|
||||
machines:
|
||||
- type: pcx86
|
||||
id: ibm5150
|
||||
|
|
|
|||
|
|
@ -4,6 +4,7 @@ title: IBM PC (Model 5150) with Monochrome (MDA) Display
|
|||
permalink: /devices/pcx86/machine/5150/mda/
|
||||
redirect_from:
|
||||
- /configs/pc/machines/5150/mda/
|
||||
- /devices/pc/machine/5150/mda/
|
||||
machines:
|
||||
- type: pcx86
|
||||
id: ibm5150
|
||||
|
|
|
|||
|
|
@ -4,6 +4,7 @@ title: IBM PC XT (Model 5160)
|
|||
permalink: /devices/pcx86/machine/5160/cga/256kb/
|
||||
redirect_from:
|
||||
- /configs/pc/machines/5160/cga/256kb/
|
||||
- /devices/pc/machine/5160/cga/256kb/
|
||||
---
|
||||
|
||||
IBM PC XT (256Kb) with Color Display
|
||||
|
|
|
|||
|
|
@ -2,6 +2,8 @@
|
|||
layout: page
|
||||
title: IBM PC XT (Model 5160, 256Kb, 10Mb Drive) Machine Array with CGA Displays
|
||||
permalink: /devices/pcx86/machine/5160/cga/256kb/array/
|
||||
redirect_from:
|
||||
- /devices/pc/machine/5160/cga/256kb/array/
|
||||
machines:
|
||||
- type: pcx86
|
||||
id: ibm5160a
|
||||
|
|
|
|||
|
|
@ -4,6 +4,7 @@ title: IBM PC XT (Model 5160, 256Kb, 10Mb Drive) with Color Display
|
|||
permalink: /devices/pcx86/machine/5160/cga/256kb/demo/
|
||||
redirect_from:
|
||||
- /configs/pc/machines/5160/cga/256kb/demo/
|
||||
- /devices/pc/machine/5160/cga/256kb/demo/
|
||||
machines:
|
||||
- type: pcx86
|
||||
id: ibm5160
|
||||
|
|
|
|||
|
|
@ -4,6 +4,7 @@ title: IBM PC XT (Model 5160, 256Kb, 10Mb Drive) with Color Display and Debugger
|
|||
permalink: /devices/pcx86/machine/5160/cga/256kb/demo/debugger/
|
||||
redirect_from:
|
||||
- /configs/pc/machines/5160/cga/256kb/demo/debugger/
|
||||
- /devices/pc/machine/5160/cga/256kb/demo/debugger/
|
||||
machines:
|
||||
- type: pcx86
|
||||
id: ibm5160
|
||||
|
|
|
|||
|
|
@ -2,6 +2,8 @@
|
|||
layout: page
|
||||
title: IBM PC XT (Model 5160, 256Kb, 10Mb Drive) with Color Display and Soft Keyboard
|
||||
permalink: /devices/pcx86/machine/5160/cga/256kb/softkbd/
|
||||
redirect_from:
|
||||
- /devices/pc/machine/5160/cga/256kb/softkbd/
|
||||
machines:
|
||||
- type: pcx86
|
||||
id: ibm5160
|
||||
|
|
|
|||
|
|
@ -7,6 +7,7 @@ redirect_from:
|
|||
- /configs/pc/machines/5160/cga/256kb/win101/machine.xml/
|
||||
- /demos/pc/cga-win101/xt-cga-win101.xml/
|
||||
- /demos/pc/cga-win101/
|
||||
- /devices/pc/machine/5160/cga/256kb/win101/
|
||||
machines:
|
||||
- type: pcx86
|
||||
id: ibm5160
|
||||
|
|
|
|||
|
|
@ -4,6 +4,7 @@ title: IBM PC XT (Model 5160, 256Kb, 10Mb Drive) with Color Display and Debugger
|
|||
permalink: /devices/pcx86/machine/5160/cga/256kb/win101/debugger/
|
||||
redirect_from:
|
||||
- /configs/pc/machines/5160/cga/256kb/win101/debugger/
|
||||
- /devices/pc/machine/5160/cga/256kb/win101/debugger/
|
||||
machines:
|
||||
- type: pcx86
|
||||
id: ibm5160
|
||||
|
|
|
|||
|
|
@ -5,6 +5,7 @@ permalink: /devices/pcx86/machine/5160/cga/256kb/win101/softkbd/
|
|||
redirect_from:
|
||||
- /configs/pc/machines/5160/cga/256kb/win101/softkbd/index.xml/
|
||||
- /configs/pc/machines/5160/cga/256kb/win101/softkbd/machine.xml/
|
||||
- /devices/pc/machine/5160/cga/256kb/win101/softkbd/
|
||||
machines:
|
||||
- type: pcx86
|
||||
id: ibm5160
|
||||
|
|
|
|||
File diff suppressed because one or more lines are too long
|
|
@ -4,8 +4,9 @@ title: IBM PC XT (Model 5160, 512Kb, 10Mb Drive) with Color Display and Soft Key
|
|||
permalink: /devices/pcx86/machine/5160/cga/512kb/win101/softkbd/
|
||||
redirect_from:
|
||||
- /configs/pc/machines/5160/cga/512kb/win101/softkbd/
|
||||
- /devices/pcx86/machine/5160/cga/512kb/
|
||||
- /devices/pcx86/machine/5160/cga/512kb/win101/
|
||||
- /devices/pc/machine/5160/cga/512kb/
|
||||
- /devices/pc/machine/5160/cga/512kb/win101/
|
||||
- /devices/pc/machine/5160/cga/512kb/win101/softkbd/
|
||||
machines:
|
||||
- type: pcx86
|
||||
id: ibm5160
|
||||
|
|
|
|||
|
|
@ -2,6 +2,8 @@
|
|||
layout: page
|
||||
title: IBM PC XT (Model 5160, 640Kb, 10Mb Drive) with Color Display and Debugger
|
||||
permalink: /devices/pcx86/machine/5160/cga/640kb/debugger/
|
||||
redirect_from:
|
||||
- /devices/pc/machine/5160/cga/640kb/debugger/
|
||||
machines:
|
||||
- type: pcx86
|
||||
id: ibm5160
|
||||
|
|
|
|||
|
|
@ -2,6 +2,8 @@
|
|||
layout: page
|
||||
title: IBM PC XT (Model 5160, 640Kb, 10Mb Drive) with Color Display
|
||||
permalink: /devices/pcx86/machine/5160/cga/640kb/
|
||||
redirect_from:
|
||||
- /devices/pc/machine/5160/cga/640kb/
|
||||
machines:
|
||||
- type: pcx86
|
||||
id: ibm5160
|
||||
|
|
|
|||
|
|
@ -2,6 +2,8 @@
|
|||
layout: page
|
||||
title: IBM PC XT (Model 5160, 640Kb, 10Mb Drive) with Color Display and Soft Keyboard
|
||||
permalink: /devices/pcx86/machine/5160/cga/640kb/softkbd/
|
||||
redirect_from:
|
||||
- /devices/pc/machine/5160/cga/640kb/softkbd/
|
||||
machines:
|
||||
- type: pcx86
|
||||
id: ibm5160
|
||||
|
|
|
|||
|
|
@ -4,6 +4,7 @@ title: IBM PC (Model 5160) with Color Display
|
|||
permalink: /devices/pcx86/machine/5160/cga/
|
||||
redirect_from:
|
||||
- /configs/pc/machines/5160/cga/
|
||||
- /devices/pc/machine/5160/cga/
|
||||
---
|
||||
|
||||
IBM PC XT with Color Graphics (CGA) Display
|
||||
|
|
|
|||
|
|
@ -381,10 +381,10 @@ b[4],this.Ka=b[5];if(b=a[6])this.ra=b[1],this.ra[7]=b[0],this.pa=b[2],this.A=b[3
|
|||
function al(a,b,c){var d=a.Dc[b];d||(d={jg:[0,0],Fc:[0,0],Eb:[0,0],Ab:[0,0]});c=c&&8==c.length?c:bl;d.Ee=c[0];d.jg[0]=c[1][0];d.jg[1]=c[1][1];d.Fc[0]=c[2][0];d.Fc[1]=c[2][1];d.Eb[0]=c[3][0];d.Eb[1]=c[3][1];d.Ab[0]=c[4][0];d.Ab[1]=c[4][1];d.mode=c[5];d.lg=c[6];d.controller=a;d.Ti=b;cl(d,c[8],c[9]);a.Dc[b]=d}function cl(a,b,c,d){"string"==typeof b&&(b=hb(b));b&&(a.done=null,a.rn=b.id,a.sn=c,a.qg=b,a.fh=b[c],a.Fg=d)}var dl=[0,Array(4)];
|
||||
function Rk(a,b,c,d){var e=a.vc[b];e||(e={Yc:[null,null,null,null]});d=d&&8==d.length?d:dl;e.port=c;e.xo=b<<3;e.nf=d[0];e.Yc[0]=d[1][0];e.Yc[1]=d[1][1];e.Yc[2]=d[1][2];e.Yc[3]=d[1][3];e.Zd=d[2];e.Bd=d[3];e.mc=d[4];e.Pc=d[5];e.ye=d[6];e.Cf=d[7];a.vc[b]=e}var el=[[0,0],[0,0],[0,0],[0,0]];
|
||||
function Sk(a,b,c){var d=a.W[b];d||(d={Fc:[0,0],$c:[0,0],Ab:[0,0],ze:[0,0]});c=c&&13<=c.length?c:el;d.Fc[0]=c[0][0];d.Fc[1]=c[0][1];d.$c[0]=c[1][0];d.$c[1]=c[1][1];d.Ab[0]=c[2][0];d.Ab[1]=c[2][1];d.ze[0]=c[3][0];d.ze[1]=c[3][1];d.Zg=c[4];d.mode=c[5];d.eg=c[6];d.Fd=c[7];d.nd=c[8];d.vd=c[9];d.Ze=c[10];d.Be=c[11];d.xd=c[12];d.Yb=c[13]||0;d.df=c[14]||!1;a.W[b]=d}
|
||||
function Bk(a,b,c){for(var d="",e=a.qa[c],f=1;8>=f;f++){var g="pcx86-bitCell";f||(g+=" pcx86-bitCellLeft");d+='<div id="'+(c+"-"+f)+'" class="'+g+'" data-value="0">'+f+"</div>\n"}e.innerHTML=d;fl(a,b,c,!0)}function gl(a,b,c){if(b=(a=Ak[a.ja|0])&&a[b])for(var d in b)if(a=b[d],a.Lc&1<<c)return a;return null}
|
||||
function Bk(a,b,c){for(var d="",e=a.qa[c],f=1;8>=f;f++){var g="pcjs-bitCell";f||(g+=" pcjs-bitCellLeft");d+='<div id="'+(c+"-"+f)+'" class="'+g+'" data-value="0">'+f+"</div>\n"}e.innerHTML=d;fl(a,b,c,!0)}function gl(a,b,c){if(b=(a=Ak[a.ja|0])&&a[b])for(var d in b)if(a=b[d],a.Lc&1<<c)return a;return null}
|
||||
function Uk(a,b,c){for(var d=null,e=Ak[a.ja]||Ak[a.ja|0]||Ak[5150],f=0;f<e.length;f++){var g=e[f];if(g&&(g=g[b])){a=a.C[f][c?0:1]&g.Lc;for(var h in g.hd)if(g.hd[h]==a&&(d=h,"number"==typeof+d))break;break}}return d}function Wk(a,b){if(b<+Uk(a,vk,void 0)){if(!a.ia)return 1;if(b<a.ia.length)switch(a.ia[b]){case 160:case 180:case 320:case 360:return 1;case 720:return 3;case 1200:return 2;case 1440:return 4}}return 0}function Tk(a,b){return+Uk(a,5,b)+ +Uk(a,6,b)}
|
||||
function sk(a,b){var c=b;if(a)for(var c=0,d=1,e=0;e<a.length;e++)"0"==a.charAt(e)&&(c|=d),d<<=1;return c}function uk(a,b,c,d){for(var e=Ak[a.ja]||Ak[a.ja|0]||Ak[5150],f=0;f<e.length;f++){var g=e[f];if(g&&(g=g[b]))for(var h in g.hd)if(h==c){a.C[f][d?0:1]&=~g.Lc;a.C[f][d?0:1]|=g.hd[h];return}}}function hl(a,b){a.setAttribute("data-value",b?"1":"0");a.style.color=b?"#ffffff":"#000000";a.style.backgroundColor=b?"#000000":"#ffffff"}function Pk(a){fl(a,0,tk);fl(a,1,xk);il(a)}
|
||||
function fl(a,b,c,d){if(c=a.qa[c]){d=d?a.C[b][0]:a.C[b][1]=a.C[b][0];c=nb(c,"pcx86-bitCell");for(var e=0;e<c.length;e++){var f=gl(a,b,e);c[e].setAttribute("title",f&&f.Qd||"Reserved");hl(c[e],d&1<<e?!1:!0);c[e].onclick=function(a,b){return function(){var c="1"!=b.getAttribute("data-value");hl(b,c);var d=b.getAttribute("id").split("-"),e=1<<+d[1]-1;switch(d[0]){case tk:a.C[0][0]=a.C[0][0]&~e|(c?0:e);break;case xk:a.C[1][0]=a.C[1][0]&~e|(c?0:e)}il(a)}}(a,c[e])}}}
|
||||
function fl(a,b,c,d){if(c=a.qa[c]){d=d?a.C[b][0]:a.C[b][1]=a.C[b][0];c=nb(c,"pcjs-bitCell");for(var e=0;e<c.length;e++){var f=gl(a,b,e);c[e].setAttribute("title",f&&f.Qd||"Reserved");hl(c[e],d&1<<e?!1:!0);c[e].onclick=function(a,b){return function(){var c="1"!=b.getAttribute("data-value");hl(b,c);var d=b.getAttribute("id").split("-"),e=1<<+d[1]-1;switch(d[0]){case tk:a.C[0][0]=a.C[0][0]&~e|(c?0:e);break;case xk:a.C[1][0]=a.C[1][0]&~e|(c?0:e)}il(a)}}(a,c[e])}}}
|
||||
function il(a){var b=a.qa.swdesc;if(null!=b){var c;c=""+(Tk(a,!0)+"Kb");c+=", "+(+ +Uk(a,3,!0)?"":"No ")+"Coprocessor";c+=", "+{0:"Enhanced Color",1:"TV",2:"Color",3:"Monochrome"}[+Uk(a,wk,!0)]+" Monitor";c+=", "+ +Uk(a,vk,!0)+" Floppy Drives";if(null!=a.C[0][1]&&a.C[0][1]!=a.C[0][0]||null!=a.C[1][1]&&a.C[1][1]!=a.C[1][0])c+=" (Reset required)";b.textContent=c}}
|
||||
function jl(a,b,c,d,e){var f=a.L[b],g=f.Dc[c],h=g.Eb[f.Kb];A(a,768)&&x(a,d,null,e,"DMA"+b+".CHANNEL"+c+".ADDR["+f.Kb+"]",h,!0);f.Kb^=1;b||0!=c||f.Kb||(g.Eb[0]++,255<g.Eb[0]&&(g.Eb[0]=0,g.Eb[1]++,255<g.Eb[1]&&(g.Eb[1]=0)));return h}function kl(a,b,c,d,e,f){var g=a.L[b];A(a,768)&&x(a,d,e,f,"DMA"+b+".CHANNEL"+c+".ADDR["+g.Kb+"]",null,!0);a=g.Dc[c];a.Eb[g.Kb]=a.jg[g.Kb]=e;g.Kb^=1}
|
||||
function ll(a,b,c,d,e){var f=a.L[b],g=f.Dc[c],h=g.Ab[f.Kb];A(a,768)&&x(a,d,null,e,"DMA"+b+".CHANNEL"+c+".COUNT["+f.Kb+"]",h,!0);f.Kb^=1;b||0!=c||f.Kb||(g.Ab[0]--,0>g.Ab[0]&&(g.Ab[0]=255,g.Ab[1]--,0>g.Ab[1]&&(g.Ab[1]=255)));return h}function ml(a,b,c,d,e,f){var g=a.L[b];A(a,768)&&x(a,d,e,f,"DMA"+b+".CHANNEL"+c+".COUNT["+g.Kb+"]",null,!0);a=g.Dc[c];a.Ab[g.Kb]=a.Fc[g.Kb]=e;g.Kb^=1}function nl(a,b,c,d){var e=a.L[b],f=e.Yb|1;e.Yb&=-16;A(a,768)&&x(a,c,null,d,"DMA"+b+".STATUS",f,!0);return f}
|
||||
|
|
@ -608,7 +608,7 @@ n[q++];g.he=n[q++];g.Ib=n[q++];g.eb=n[q++];g.pb=null;g.za||(g.Le="");p=n[q++];10
|
|||
m.lk=function(a,b,c){if(a.za){var d=a.za.info(),e=d[2],f=d[1]*e;if(b+c<=d[0]*f)return a.Qb=Math.floor(b/f),b%=f,a.kb=Math.floor(b/e),a.xb=b%e+1,a.Ib=c*d[3],a.Cb=0,!0}return!1};
|
||||
function zp(a,b){b||(a.fa=0);if(a.U)for(var c in a.U){var d=a.U[c],e=d.path,f;if(!(f=d.name))a:{if((f=a.qa.listDisks)&&f.options)for(var g=0;g<f.options.length;g++){var h=f.options[g];if(h.value==e){f=h.text;break a}}f=fa(e,!0)}if(e&&f&&(g=c.charCodeAt(0)-65,0<=g&&g<a.A.length)){!Cp(a,g,f,e,!0)&&b&&rb(a,!1);continue}a.Na("Incorrect auto-mount settings for drive "+c+" ("+JSON.stringify(d)+")")}return!!a.fa}
|
||||
function up(a,b,c,d){var e,f=a.qa.listDrives;if(f&&!isNaN(e=ca(f.value,10))&&0<=e&&e<a.A.length)if(c)if("?"==c)a.Na('Use "Choose File" and "Mount" to select and load a local disk.');else{if("??"==c){c=window.prompt("Enter the URL of a remote disk image.","")||"";if(!c)return;b=fa(c)}for(;0>Cp(a,e,b,c,!1,d)&&window.confirm("Click OK to reload the original disk.\n(WARNING: All disk changes will be discarded)");){for(var f=a,g=c,h=void 0,h=0;h<f.B.length;h++)if(f.B[h][1]==g){f.B.splice(h,1);break}Ap(a,
|
||||
e,!1,!0)}}else Ap(a,e);else a.Na("Unable to load the selected drive")}function Cp(a,b,c,d,e,f){var g=a.A[b];if(d&&g.Le!=d){Ap(a,b,e,!0);if(g.bd)return a.Na("Drive "+b+" busy"),0;g.bd=!0;e&&(g.Ae=!0,a.fa++,A(a)&&y(a,"loading diskette '"+c+"'"));g.$e=!!f;return(new Ho(a,g,"preload")).load(c,d,f,a.Hi)?1:0}return-1}
|
||||
e,!1,!0)}}else Ap(a,e);else a.Na("Unable to load the selected drive")}function Cp(a,b,c,d,e,f){var g=a.A[b];if(d&&(d=d.replace("/disks/pc/","/disks/pcx86/"),g.Le!=d)){Ap(a,b,e,!0);if(g.bd)return a.Na("Drive "+b+" busy"),0;g.bd=!0;e&&(g.Ae=!0,a.fa++,A(a)&&y(a,"loading diskette '"+c+"'"));g.$e=!!f;return(new Ho(a,g,"preload")).load(c,d,f,a.Hi)?1:0}return-1}
|
||||
m.Hi=function(a,b,c,d,e){var f;a.bd=!1;b&&(f=b.info(),b&&f[0]>a.Bb||f[1]>a.ub)&&(this.Na('Diskette "'+c+'" too large for drive '+String.fromCharCode(65+a.hb)),b=null);b?(a.za=b,a.kk=c,a.Le=d,Dp(this,c,d,b),f=b.info(),this.X|=128,this.Na('Mounted diskette "'+c+'" in drive '+String.fromCharCode(65+a.hb),a.Ae||e),a.zg=f[0],a.Nf=f[1],a.Of=f[2],this.V&&this.V.yd()):a.$e=!1;a.Ae&&(a.Ae=!1,--this.fa||rb(this));tp(this,a.hb)};
|
||||
function yp(a,b,c,d){if((a=a.qa.listDisks)&&a.options){for(var e=0;e<a.options.length;e++)if(a.options[e].value==c)return;e=document.createElement("option");e.text=b;e.value=c;d&&a.childNodes[0]?a.insertBefore(e,a.childNodes[0]):a.appendChild(e)}}
|
||||
function tp(a,b){if(0<=b&&b<a.A.length){var c=a.A[b],d=a.qa.listDisks,e=a.qa.listDrives;if(d&&e&&d.options&&e.options&&(e=ca(e.value,10),c=c.$e?"?":c.Le,!isNaN(e)&&e==b)){for(e=0;e<d.options.length;e++)if(d.options[e].value==c){d.selectedIndex!=e&&(d.selectedIndex=e);break}e==d.options.length&&(d.selectedIndex=0)}}}function Ap(a,b,c,d){var e=a.A[b];e.za&&(Bp(a,e.Le,e.za),e.kk="",e.Le="",e.za=null,e.$e=!1,a.X|=128,d||a.Na("Drive "+String.fromCharCode(65+b)+" unloaded",c),c||d||tp(a,b))}
|
||||
|
|
|
|||
|
|
@ -364,10 +364,10 @@ this.va=b[5];if(b=a[6])this.I=b[1],this.I[7]=b[0],this.ea=b[2],this.B=b[3],this.
|
|||
function ej(a,b,c){var d=a.$b[b];d||(d={sf:[0,0],jc:[0,0],gb:[0,0],hb:[0,0]});c=c&&8==c.length?c:fj;d.Qd=c[0];d.sf[0]=c[1][0];d.sf[1]=c[1][1];d.jc[0]=c[2][0];d.jc[1]=c[2][1];d.gb[0]=c[3][0];d.gb[1]=c[3][1];d.hb[0]=c[4][0];d.hb[1]=c[4][1];d.mode=c[5];d.tf=c[6];d.controller=a;d.Vh=b;gj(d,c[8],c[9]);a.$b[b]=d}function gj(a,b,c,d){"string"==typeof b&&(b=Ua(b));b&&(a.done=null,a.$l=b.id,a.am=c,a.yf=b,a.kg=b[c],a.Mf=d)}var hj=[0,Array(4)];
|
||||
function Vi(a,b,c,d){var e=a.gc[b];e||(e={Sc:[null,null,null,null]});d=d&&8==d.length?d:hj;e.port=c;e.bn=b<<3;e.Te=d[0];e.Sc[0]=d[1][0];e.Sc[1]=d[1][1];e.Sc[2]=d[1][2];e.Sc[3]=d[1][3];e.md=d[2];e.Vc=d[3];e.ac=d[4];e.Cc=d[5];e.Ld=d[6];e.Je=d[7];a.gc[b]=e}var ij=[[0,0],[0,0],[0,0],[0,0]];
|
||||
function Wi(a,b,c){var d=a.K[b];d||(d={jc:[0,0],Ec:[0,0],hb:[0,0],Md:[0,0]});c=c&&13<=c.length?c:ij;d.jc[0]=c[0][0];d.jc[1]=c[0][1];d.Ec[0]=c[1][0];d.Ec[1]=c[1][1];d.hb[0]=c[2][0];d.hb[1]=c[2][1];d.Md[0]=c[3][0];d.Md[1]=c[3][1];d.eg=c[4];d.mode=c[5];d.hf=c[6];d.Xc=c[7];d.kd=c[8];d.Tc=c[9];d.le=c[10];d.Od=c[11];d.ld=c[12];d.Db=c[13]||0;d.qe=c[14]||!1;a.K[b]=d}
|
||||
function Ii(a,b,c){for(var d="",e=a.ka[c],f=1;8>=f;f++){var g="pcx86-bitCell";f||(g+=" pcx86-bitCellLeft");d+='<div id="'+(c+"-"+f)+'" class="'+g+'" data-value="0">'+f+"</div>\n"}e.innerHTML=d;jj(a,b,c,!0)}function kj(a,b,c){if(b=(a=T[a.ca|0])&&a[b])for(var d in b)if(a=b[d],a.lc&1<<c)return a;return null}
|
||||
function Ii(a,b,c){for(var d="",e=a.ka[c],f=1;8>=f;f++){var g="pcjs-bitCell";f||(g+=" pcjs-bitCellLeft");d+='<div id="'+(c+"-"+f)+'" class="'+g+'" data-value="0">'+f+"</div>\n"}e.innerHTML=d;jj(a,b,c,!0)}function kj(a,b,c){if(b=(a=T[a.ca|0])&&a[b])for(var d in b)if(a=b[d],a.lc&1<<c)return a;return null}
|
||||
function Yi(a,b,c){for(var d=null,e=T[a.ca]||T[a.ca|0]||T[5150],f=0;f<e.length;f++){var g=e[f];if(g&&(g=g[b])){a=a.D[f][c?0:1]&g.lc;for(var h in g.Oc)if(g.Oc[h]==a&&(d=h,"number"==typeof+d))break;break}}return d}function $i(a,b){if(b<+Yi(a,Di,void 0)){if(!a.Y)return 1;if(b<a.Y.length)switch(a.Y[b]){case 160:case 180:case 320:case 360:return 1;case 720:return 3;case 1200:return 2;case 1440:return 4}}return 0}function Xi(a,b){return+Yi(a,5,b)+ +Yi(a,6,b)}
|
||||
function Ai(a,b){var c=b;if(a)for(var c=0,d=1,e=0;e<a.length;e++)"0"==a.charAt(e)&&(c|=d),d<<=1;return c}function Ci(a,b,c,d){for(var e=T[a.ca]||T[a.ca|0]||T[5150],f=0;f<e.length;f++){var g=e[f];if(g&&(g=g[b]))for(var h in g.Oc)if(h==c){a.D[f][d?0:1]&=~g.lc;a.D[f][d?0:1]|=g.Oc[h];return}}}function lj(a,b){a.setAttribute("data-value",b?"1":"0");a.style.color=b?"#ffffff":"#000000";a.style.backgroundColor=b?"#000000":"#ffffff"}function Ti(a){jj(a,0,Bi);jj(a,1,Fi);mj(a)}
|
||||
function jj(a,b,c,d){if(c=a.ka[c]){d=d?a.D[b][0]:a.D[b][1]=a.D[b][0];c=Za(c,"pcx86-bitCell");for(var e=0;e<c.length;e++){var f=kj(a,b,e);c[e].setAttribute("title",f&&f.gd||"Reserved");lj(c[e],d&1<<e?!1:!0);c[e].onclick=function(a,b){return function(){var c="1"!=b.getAttribute("data-value");lj(b,c);var d=b.getAttribute("id").split("-"),e=1<<+d[1]-1;switch(d[0]){case Bi:a.D[0][0]=a.D[0][0]&~e|(c?0:e);break;case Fi:a.D[1][0]=a.D[1][0]&~e|(c?0:e)}mj(a)}}(a,c[e])}}}
|
||||
function jj(a,b,c,d){if(c=a.ka[c]){d=d?a.D[b][0]:a.D[b][1]=a.D[b][0];c=Za(c,"pcjs-bitCell");for(var e=0;e<c.length;e++){var f=kj(a,b,e);c[e].setAttribute("title",f&&f.gd||"Reserved");lj(c[e],d&1<<e?!1:!0);c[e].onclick=function(a,b){return function(){var c="1"!=b.getAttribute("data-value");lj(b,c);var d=b.getAttribute("id").split("-"),e=1<<+d[1]-1;switch(d[0]){case Bi:a.D[0][0]=a.D[0][0]&~e|(c?0:e);break;case Fi:a.D[1][0]=a.D[1][0]&~e|(c?0:e)}mj(a)}}(a,c[e])}}}
|
||||
function mj(a){var b=a.ka.swdesc;if(null!=b){var c;c=""+(Xi(a,!0)+"Kb");c+=", "+(+ +Yi(a,3,!0)?"":"No ")+"Coprocessor";c+=", "+{0:"Enhanced Color",1:"TV",2:"Color",3:"Monochrome"}[+Yi(a,Ei,!0)]+" Monitor";c+=", "+ +Yi(a,Di,!0)+" Floppy Drives";if(null!=a.D[0][1]&&a.D[0][1]!=a.D[0][0]||null!=a.D[1][1]&&a.D[1][1]!=a.D[1][0])c+=" (Reset required)";b.textContent=c}}
|
||||
function nj(a,b,c){a=a.G[b];var d=a.$b[c],e=d.gb[a.Ib];a.Ib^=1;b||0!=c||a.Ib||(d.gb[0]++,255<d.gb[0]&&(d.gb[0]=0,d.gb[1]++,255<d.gb[1]&&(d.gb[1]=0)));return e}function oj(a,b,c,d){a=a.G[b];c=a.$b[c];c.gb[a.Ib]=c.sf[a.Ib]=d;a.Ib^=1}function pj(a,b,c){a=a.G[b];var d=a.$b[c],e=d.hb[a.Ib];a.Ib^=1;b||0!=c||a.Ib||(d.hb[0]--,0>d.hb[0]&&(d.hb[0]=255,d.hb[1]--,0>d.hb[1]&&(d.hb[1]=255)));return e}function qj(a,b,c,d){a=a.G[b];c=a.$b[c];c.hb[a.Ib]=c.jc[a.Ib]=d;a.Ib^=1}
|
||||
function rj(a,b){var c=a.G[b],d=c.Db|1;c.Db&=-16;return d}function sj(a,b,c){a=a.G[b];b=c&3;a.Db=a.Db&~(16<<b)|(c&4)<<b+2;a.Gh=c}function xj(a,b,c){b=a.G[b];var d=c&3,e=b.$b[d];e.Qd=!!(c&4);e.Qd||yj(a,b.Vk+d)}function zj(a,b){for(var c=a.G[b],d=0;d<c.$b.length;d++)ej(c,d)}function Aj(a,b,c){return a.G[b].$b[c].tf}function Bj(a,b,c,d){a.G[b].$b[c].tf=d}function Cj(a,b,c,d,e){gj(a.G[b>>2].$b[b&3],c,d,e)}
|
||||
|
|
@ -556,7 +556,7 @@ function vm(a,b){var c=0,d,e=!0;void 0===b&&(b=[0,0,128,Array(9),0,0,0,[]]);a.Qa
|
|||
g.vb=n[x++];g.Ua=n[x++];g.Wa=null;g.ta||(g.Vd="");r=n[x++];102==r&&(r=!1);if("boolean"==typeof r){var z=r,r=n[x++],n=n[x];z?(x=r,r=k.B[m],Am(k,m,!0,!0),r.me=!0,m=new am(k,r,"preload"),k.Mh(r,m,x,n,!0)):Cm(k,m,r,n,!0)?g.ta&&n&&Dm(k,r,n,g.ta):ab(k,!1)}else void 0!==r&&g.ta&&0>g.ta.restore(r)&&(h=!1);h&&g.ta&&void 0!==g.Ua&&(g.Wa=g.ta.seek(g.wb,g.Ya,g.mb));h||(e=!1)}a.L=b[c++]||0;a.H=b[c]||0;return e}
|
||||
function zm(a,b){b||(a.R=0);if(a.K)for(var c in a.K){var d=a.K[c],e=d.path,f;if(!(f=d.name))a:{if((f=a.ka.listDisks)&&f.options)for(var g=0;g<f.options.length;g++){var h=f.options[g];if(h.value==e){f=h.text;break a}}f=fa(e,!0)}if(e&&f&&(g=c.charCodeAt(0)-65,0<=g&&g<a.B.length)){!Cm(a,g,f,e,!0)&&b&&ab(a,!1);continue}a.Ba("Incorrect auto-mount settings for drive "+c+" ("+JSON.stringify(d)+")")}return!!a.R}
|
||||
function um(a,b,c,d){var e,f=a.ka.listDrives;if(f&&!isNaN(e=ca(f.value,10))&&0<=e&&e<a.B.length)if(c)if("?"==c)a.Ba('Use "Choose File" and "Mount" to select and load a local disk.');else{if("??"==c){c=window.prompt("Enter the URL of a remote disk image.","")||"";if(!c)return;b=fa(c)}for(;0>Cm(a,e,b,c,!1,d)&&window.confirm("Click OK to reload the original disk.\n(WARNING: All disk changes will be discarded)");){for(var f=a,g=c,h=void 0,h=0;h<f.C.length;h++)if(f.C[h][1]==g){f.C.splice(h,1);break}Am(a,
|
||||
e,!1,!0)}}else Am(a,e);else a.Ba("Unable to load the selected drive")}function Cm(a,b,c,d,e,f){var g=a.B[b];if(d&&g.Vd!=d){Am(a,b,e,!0);if(g.Qc)return a.Ba("Drive "+b+" busy"),0;g.Qc=!0;e&&(g.Nd=!0,a.R++);g.me=!!f;return(new am(a,g,"preload")).load(c,d,f,a.Mh)?1:0}return-1}
|
||||
e,!1,!0)}}else Am(a,e);else a.Ba("Unable to load the selected drive")}function Cm(a,b,c,d,e,f){var g=a.B[b];if(d&&(d=d.replace("/disks/pc/","/disks/pcx86/"),g.Vd!=d)){Am(a,b,e,!0);if(g.Qc)return a.Ba("Drive "+b+" busy"),0;g.Qc=!0;e&&(g.Nd=!0,a.R++);g.me=!!f;return(new am(a,g,"preload")).load(c,d,f,a.Mh)?1:0}return-1}
|
||||
l.Mh=function(a,b,c,d,e){var f;a.Qc=!1;b&&(f=b.info(),b&&f[0]>a.ib||f[1]>a.jb)&&(this.Ba('Diskette "'+c+'" too large for drive '+String.fromCharCode(65+a.Qa)),b=null);b?(a.ta=b,a.ij=c,a.Vd=d,Dm(this,c,d,b),f=b.info(),this.L|=128,this.Ba('Mounted diskette "'+c+'" in drive '+String.fromCharCode(65+a.Qa),a.Nd||e),a.Hf=f[0],a.Ue=f[1],a.Ve=f[2],this.ba&&uc(this.ba)):a.me=!1;a.Nd&&(a.Nd=!1,--this.R||ab(this));tm(this,a.Qa)};
|
||||
function ym(a,b,c,d){if((a=a.ka.listDisks)&&a.options){for(var e=0;e<a.options.length;e++)if(a.options[e].value==c)return;e=document.createElement("option");e.text=b;e.value=c;d&&a.childNodes[0]?a.insertBefore(e,a.childNodes[0]):a.appendChild(e)}}
|
||||
function tm(a,b){if(0<=b&&b<a.B.length){var c=a.B[b],d=a.ka.listDisks,e=a.ka.listDrives;if(d&&e&&d.options&&e.options&&(e=ca(e.value,10),c=c.me?"?":c.Vd,!isNaN(e)&&e==b)){for(e=0;e<d.options.length;e++)if(d.options[e].value==c){d.selectedIndex!=e&&(d.selectedIndex=e);break}e==d.options.length&&(d.selectedIndex=0)}}}function Am(a,b,c,d){var e=a.B[b];e.ta&&(Bm(a,e.Vd,e.ta),e.ij="",e.Vd="",e.ta=null,e.me=!1,a.L|=128,d||a.Ba("Drive "+String.fromCharCode(65+b)+" unloaded",c),c||d||tm(a,b))}
|
||||
|
|
|
|||
|
|
@ -65,6 +65,7 @@ var C1PJS = {
|
|||
APPNAME: APPNAME,
|
||||
APPVERSION: APPVERSION, // shared
|
||||
COMPILED: COMPILED, // shared
|
||||
CSSCLASS: CSSCLASS, // shared
|
||||
DEBUG: DEBUG, // shared
|
||||
DEBUGGER: DEBUGGER,
|
||||
MAXDEBUG: MAXDEBUG, // shared
|
||||
|
|
|
|||
|
|
@ -153,7 +153,7 @@ var sMachineXMLFile = "machine.xml";
|
|||
var sManifestXMLFile = "manifest.xml";
|
||||
|
||||
/*
|
||||
* We need lists of the uncompiled scripts for C1Pjs and PCx86, indexed by machine class, so that if we have
|
||||
* We need lists of the uncompiled scripts for C1P and PCx86, indexed by machine type, so that if we have
|
||||
* to inject those individual scripts into the current document, all the ordering dependencies will be honored
|
||||
* (which is why processMachines() can't simply enumerate all the .js files in the respective script folder).
|
||||
*
|
||||
|
|
@ -165,9 +165,10 @@ var sManifestXMLFile = "manifest.xml";
|
|||
* the closing </head> tag, and JS files are added just before the closing </body> tag.
|
||||
*/
|
||||
var aMachineFiles = {
|
||||
'c1p': pkg.c1pCSSFiles.concat(pkg.c1pJSFiles),
|
||||
'pcx86': pkg.pcCSSFiles.concat(pkg.pcX86Files),
|
||||
'pc8080': pkg.pcCSSFiles.concat(pkg.pc8080Files)
|
||||
'C1P': pkg.c1pCSSFiles.concat(pkg.c1pJSFiles), // will be deprecated when PC6502 becomes available
|
||||
'PC': pkg.pcCSSFiles.concat(pkg.pcX86Files), // deprecated (same as PCx86)
|
||||
'PCx86': pkg.pcCSSFiles.concat(pkg.pcX86Files),
|
||||
'PC8080': pkg.pcCSSFiles.concat(pkg.pc8080Files)
|
||||
};
|
||||
var aMachineFileTypes = {
|
||||
'head': [".css"], // put BOTH ".css" and ".js" here if convertMDMachineLinks() embeds its own scripts
|
||||
|
|
@ -1427,15 +1428,15 @@ HTMLOut.prototype.getMachineXML = function(sToken, sIndent, aParms, sXMLFile, sS
|
|||
if (aMatch) {
|
||||
var sStyleSheet = aMatch[1];
|
||||
/*
|
||||
* Recognized machine stylesheets are either "production" stylesheets in ("/versions/pcx86"|"/versions/c1pjs")
|
||||
* or "development" stylesheets in ("/modules/pcx86/templates"|"/modules/c1pjs/templates").
|
||||
* Recognized machine stylesheets are either production stylesheets in ("/versions/pcx86"|"/versions/c1pjs")
|
||||
* or development stylesheets in ("/modules/pcx86/templates"|"/modules/c1pjs/templates").
|
||||
*
|
||||
* The common denominator in both sets is either "/pc" or "/c1p", which in turn indicates the class of machine
|
||||
* (ie, "PCx86" or "C1Pjs").
|
||||
* The common denominator in both sets is either "/pc" or "/c1p", which in turn indicates the type of machine
|
||||
* (eg, "PC", "C1P", etc).
|
||||
*/
|
||||
aMatch = sStyleSheet.match(/\/(pc|c1p)([^/]*)/);
|
||||
if (aMatch) {
|
||||
var sMachineClass = aMatch[1].toUpperCase() + aMatch[2];
|
||||
var sMachineType = aMatch[1].toUpperCase() + (aMatch[2] != "js"? aMatch[2] : "");
|
||||
/*
|
||||
* Since the MarkOut module already contains the ability to embed a machine definition with
|
||||
* one simple line of Markdown-like magic, we'll create such a line and let MarkOut do the rest.
|
||||
|
|
@ -1443,14 +1444,14 @@ HTMLOut.prototype.getMachineXML = function(sToken, sIndent, aParms, sXMLFile, sS
|
|||
* The string we initialize the MarkOut object should look like one of
|
||||
*
|
||||
* '[Embedded PC](machine.xml "PCx86:machineID:stylesheet:version:options:state")'
|
||||
* '[Embedded C1P](machine.xml "C1Pjs:machineID:stylesheet:version:options:state")'
|
||||
* '[Embedded C1P](machine.xml "C1P:machineID:stylesheet:version:options:state")'
|
||||
*
|
||||
* where machineID is the machine "id" embedded in the XML, stylesheet is the path to the XML stylesheet,
|
||||
* version is a version number ('*' or blank for the latest version, which is all we support here), and
|
||||
* options is a comma-delimited series of, well, options; the only option we currently output is "debugger"
|
||||
* if a <debugger> element is present in the machine XML.
|
||||
*/
|
||||
var sMachineID = "machine" + sMachineClass; // fallback to either "machinePCx86" or "machineC1Pjs" if no ID found
|
||||
var sMachineID = "machine" + sMachineType; // fallback to either "machinePCx86" or "machineC1P" if no ID found
|
||||
aMatch = sXML.match(/<machine.*?\sid=(['"])(.*?)\1[^>]*>/);
|
||||
if (aMatch) sMachineID = aMatch[2];
|
||||
|
||||
|
|
@ -1460,11 +1461,11 @@ HTMLOut.prototype.getMachineXML = function(sToken, sIndent, aParms, sXMLFile, sS
|
|||
* embedding inside an existing HTML document, so any "machine.xsl" stylesheet must be remapped
|
||||
* to a corresponding "components.xsl" stylesheet (which is what the next line does).
|
||||
*/
|
||||
var sMachineDef = sMachineClass + ":" + sMachineID + ":" + sStyleSheet.replace("machine.xsl", "components.xsl");
|
||||
var sMachineDef = sMachineType + ":" + sMachineID + ":" + sStyleSheet.replace("machine.xsl", "components.xsl");
|
||||
sMachineDef += (sXML.indexOf("<debugger") > 0? ":*:debugger" : ":*:none");
|
||||
sMachineDef += (sStateFile? ":" + sStateFile : "");
|
||||
|
||||
s = '[Embedded ' + sMachineClass + '](' + sXMLFile + ' "' + sMachineDef + '")';
|
||||
s = '[Embedded ' + sMachineType + '](' + sXMLFile + ' "' + sMachineDef + '")';
|
||||
var m = new MarkOut(s, sIndent, obj.req, null, obj.fDebug);
|
||||
s = m.convertMD(" ").trim();
|
||||
|
||||
|
|
@ -1832,7 +1833,7 @@ HTMLOut.prototype.getRandomString = function(sIndent)
|
|||
*
|
||||
* At a minimum, each machine object should contain the following properties:
|
||||
*
|
||||
* 'class' (eg, a machine class, such as "pc" or "c1p")
|
||||
* 'type' (eg, a machine type, such as "PCx86" or "C1P")
|
||||
* 'version' (eg, "1.10", "*" to select the current version, or "uncompiled"; "*" is the default)
|
||||
* 'debugger' (eg, true or false; false is the default)
|
||||
*
|
||||
|
|
@ -1849,7 +1850,7 @@ HTMLOut.prototype.processMachines = function(aMachines, buildOptions, done)
|
|||
|
||||
HTMLOut.logDebug('HTMLOut.processMachines(' + JSON.stringify(infoMachine) + ')');
|
||||
|
||||
var sClass = infoMachine['class']; // aka the machine class
|
||||
var sType = infoMachine['type'];
|
||||
|
||||
var fCompiled = !this.fDebug;
|
||||
var sVersion = infoMachine['version'];
|
||||
|
|
@ -1878,13 +1879,14 @@ HTMLOut.prototype.processMachines = function(aMachines, buildOptions, done)
|
|||
|
||||
var asFiles = [];
|
||||
if (fCompiled) {
|
||||
var sScriptFolder = sClass + "js"; // aka the app class
|
||||
var sScriptFile = sClass + (fDebugger? "-dbg" : "") + ".js";
|
||||
var sScriptName = sType.toLowerCase();
|
||||
var sScriptFile = sScriptName + (fDebugger? "-dbg" : "") + ".js";
|
||||
var sScriptFolder = sScriptName + ((sType == "C1P" || sType == "PC")? "js" : "");
|
||||
asFiles.push("/versions/" + sScriptFolder + "/" + sVersion + "/components.css");
|
||||
asFiles.push("/versions/" + sScriptFolder + "/" + sVersion + "/" + sScriptFile);
|
||||
this.addFilesToHTML(asFiles, sScriptEmbed);
|
||||
}
|
||||
else if (asFiles = aMachineFiles[sClass]) {
|
||||
else if (asFiles = aMachineFiles[sType]) {
|
||||
/*
|
||||
* SIDEBAR: Why the "slice()"? It's a handy way to create a copy of the array, and we need a copy,
|
||||
* because if it turns out we need to "cut out" some of the files below (using splice), we don't want that
|
||||
|
|
@ -1935,6 +1937,9 @@ HTMLOut.prototype.processMachines = function(aMachines, buildOptions, done)
|
|||
this.addFilesToHTML(asFiles, sScriptEmbed);
|
||||
}
|
||||
}
|
||||
else {
|
||||
HTMLOut.logDebug('HTMLOut.processMachines(): unrecognized machine type "' + sType + '"');
|
||||
}
|
||||
}
|
||||
if (done) done();
|
||||
};
|
||||
|
|
|
|||
|
|
@ -232,7 +232,7 @@ MarkOut.setOptions = function(options)
|
|||
* The infoMachine object should contain, at a minimum:
|
||||
*
|
||||
* {
|
||||
* 'class': sMachineClass, // eg, "pcx86"
|
||||
* 'type': sMachineType, // eg, "PCx86"
|
||||
* 'func': sMachineFunc,
|
||||
* 'id': sMachineID,
|
||||
* 'xml': sMachineXMLFile,
|
||||
|
|
@ -951,7 +951,7 @@ MarkOut.prototype.convertMDLinks = function(sBlock)
|
|||
}
|
||||
sURL = sURL.replace(/\*/g, pkg.version);
|
||||
/*
|
||||
* My own goofy way of defining a named anchor (by using an exclamation point) in Markdown....
|
||||
* Check for my own syntax for defining a named anchor (by using an exclamation point) in Markdown....
|
||||
*/
|
||||
if (sURL.charAt(0) == '!') {
|
||||
sTag = "span"; // using <a> to name an anchor is deprecated
|
||||
|
|
@ -1097,9 +1097,9 @@ MarkOut.prototype.convertMDImageLinks = function(sBlock, sIndent)
|
|||
*
|
||||
* where a special title attribute triggers generation of an embedded machine rather than a link.
|
||||
*
|
||||
* Use "PCx86" or "C1Pjs" to automatically include the latest version of either "pcx86.js" or "c1p.js", followed
|
||||
* Use "PCx86" or "C1P" to automatically include the latest version of either "pcx86.js" or "c1p.js", followed
|
||||
* by a colon and the ID you want to use for the embedded <div>. If you need to use the script with the built-in
|
||||
* Debugger (ie, either "pc-dbg.js" or "c1p-dbg.js"), then include "debugger" in the list of comma-delimited
|
||||
* Debugger (ie, either "pcx86-dbg.js" or "c1p-dbg.js"), then include "debugger" in the list of comma-delimited
|
||||
* options, as in:
|
||||
*
|
||||
* [IBM PC](/devices/pcx86/machine/5150/mda/64kb/ "PCx86:demoPC:::debugger")
|
||||
|
|
@ -1135,7 +1135,7 @@ MarkOut.prototype.convertMDImageLinks = function(sBlock, sIndent)
|
|||
MarkOut.prototype.convertMDMachineLinks = function(sBlock)
|
||||
{
|
||||
var aMatch, sReplacement;
|
||||
var sMachine, sMachineID, sMachineXMLFile, sMachineXSLFile, sMachineVersion, sMachineOptions, sMachineParms;
|
||||
var sMachineType, sMachineID, sMachineXMLFile, sMachineXSLFile, sMachineVersion, sMachineOptions, sMachineParms;
|
||||
|
||||
/*
|
||||
* Before we start looking for Markdown-style machine links, see if there are any Liquid-style machines,
|
||||
|
|
@ -1149,16 +1149,15 @@ MarkOut.prototype.convertMDMachineLinks = function(sBlock)
|
|||
sMachineID = aMatch[2];
|
||||
if (this.aMachineDefs[sMachineID]) {
|
||||
var machine = this.aMachineDefs[sMachineID];
|
||||
sMachine = machine['type'] || "pcx86";
|
||||
sMachineOptions = ((sMachine.indexOf("-dbg") > 0 || machine['debugger'] == "true")? "debugger" : "");
|
||||
sMachine = sMachine.replace("-dbg", "").toUpperCase();
|
||||
sMachineType = machine['type'] || "PCx86";
|
||||
sMachineOptions = ((sMachineType.indexOf("-dbg") > 0 || machine['debugger'] == "true")? "debugger" : "");
|
||||
sMachineType = sMachineType.replace("-dbg", "");
|
||||
sMachineXMLFile = machine['config'] || this.sMachineFile || "machine.xml";
|
||||
sMachineXSLFile = machine['template'] || "";
|
||||
sMachineVersion = ((machine['uncompiled'] == "true")? "uncompiled" : "");
|
||||
sMachineParms = machine['parms'] || "";
|
||||
sReplacement = machine['name'] || "Embedded PC";
|
||||
if (sMachine == "pc" || sMachine == "c1p") sMachine += "js";
|
||||
sReplacement = "[" + sReplacement + "](" + sMachineXMLFile + ' "' + sMachine + '!' + sMachineID + '!' + sMachineXSLFile + '!!' + sMachineOptions + '!' + sMachineParms + '")';
|
||||
sReplacement = "[" + sReplacement + "](" + sMachineXMLFile + ' "' + sMachineType + '!' + sMachineID + '!' + sMachineXSLFile + '!!' + sMachineOptions + '!' + sMachineParms + '")';
|
||||
}
|
||||
sBlock = sBlock.replace(aMatch[0], sReplacement);
|
||||
reIncludes.lastIndex = 0; // reset lastIndex, since we just modified the string that reIncludes is iterating over
|
||||
|
|
@ -1170,20 +1169,17 @@ MarkOut.prototype.convertMDMachineLinks = function(sBlock)
|
|||
* Start looking for Markdown-style machine links now...
|
||||
*/
|
||||
var cMatches = 0;
|
||||
var reMachines = /\[(.*?)]\((.*?)\s*"(PC|C1P)([a-z0-9-]*)([:!|])(.*?)"\)/gi;
|
||||
var reMachines = /\[(.*?)]\((.*?)\s*"(PC|C1P)([^:!|]*)([:!|])(.*?)"\)/gi;
|
||||
|
||||
while ((aMatch = reMachines.exec(sBlock))) {
|
||||
|
||||
sMachineXMLFile = aMatch[2];
|
||||
if (sMachineXMLFile.slice(-1) == "/") sMachineXMLFile += "machine.xml";
|
||||
|
||||
sMachine = aMatch[3].toUpperCase();
|
||||
if (aMatch[4] != "js") sMachine += aMatch[4];
|
||||
var sMachineFunc = "embed" + sMachine;
|
||||
var sMachineClass = sMachine.toLowerCase();
|
||||
sMachineType = aMatch[3].toUpperCase() + (aMatch[4] != "js"? aMatch[4] : "");
|
||||
var sMachineFunc = "embed" + sMachineType;
|
||||
var aMachineParms = aMatch[6].split(aMatch[5]);
|
||||
if (aMatch[4] == "js") sMachine += aMatch[4];
|
||||
var sMachineMessage = "Waiting for " + sMachine + " to load";
|
||||
var sMachineMessage = "Waiting for " + sMachineType + " to load";
|
||||
|
||||
sMachineID = aMachineParms[0];
|
||||
sMachineXSLFile = aMachineParms[1] || "";
|
||||
|
|
@ -1199,7 +1195,7 @@ MarkOut.prototype.convertMDMachineLinks = function(sBlock)
|
|||
sReplacement = '<div id="' + sMachineID + '" class="machine-placeholder"><p>' + aMatch[1] + '</p><p class="machine-warning">' + sMachineMessage + '</p></div>\n';
|
||||
|
||||
/*
|
||||
* The embedPC()/embedC1P functions take an XSL file as the 3rd parameter, which defaults to:
|
||||
* The embedXXX() functions take an XSL file as the 3rd parameter, which defaults to:
|
||||
*
|
||||
* "/versions/" + APPCLASS + "/" + APPVERSION + "/components.xsl"
|
||||
*
|
||||
|
|
@ -1208,7 +1204,7 @@ MarkOut.prototype.convertMDMachineLinks = function(sBlock)
|
|||
*/
|
||||
if (!sMachineXSLFile || sMachineXSLFile.indexOf("components.xsl") >= 0) {
|
||||
if (this.fDebug) {
|
||||
if (sMachineClass == "c1p") {
|
||||
if (sMachineType == "C1P") {
|
||||
sMachineXSLFile = "/modules/c1pjs/templates/components.xsl";
|
||||
} else {
|
||||
sMachineXSLFile = "/modules/shared/templates/components.xsl";
|
||||
|
|
@ -1228,7 +1224,7 @@ MarkOut.prototype.convertMDMachineLinks = function(sBlock)
|
|||
cMatches++;
|
||||
|
||||
this.addMachine({
|
||||
'class': sMachineClass, // eg, a machine class, such as "pc" or "c1p"
|
||||
'type': sMachineType, // eg, a machine type, such as "PCx86" or "C1P"
|
||||
'func': sMachineFunc,
|
||||
'id': sMachineID,
|
||||
'xml': sMachineXMLFile,
|
||||
|
|
|
|||
|
|
@ -84,6 +84,7 @@ var PC8080 = {
|
|||
APPVERSION: APPVERSION, // shared
|
||||
BYTEARRAYS: BYTEARRAYS,
|
||||
COMPILED: COMPILED, // shared
|
||||
CSSCLASS: CSSCLASS, // shared
|
||||
DEBUG: DEBUG, // shared
|
||||
DEBUGGER: DEBUGGER,
|
||||
MAXDEBUG: MAXDEBUG, // shared
|
||||
|
|
|
|||
|
|
@ -130,7 +130,7 @@ function ChipSet(parmsChipSet)
|
|||
bSwitches = this.parseDIPSwitches(parmsChipSet[ChipSet.CONTROLS.SW2]);
|
||||
this.aDIPSwitches[1] = [bSwitches, bSwitches];
|
||||
|
||||
this.sCellClass = PCX86.APPCLASS + "-bitCell";
|
||||
this.sCellClass = PCX86.CSSCLASS + "-bitCell";
|
||||
|
||||
this.cDMACs = this.cPICs = 1;
|
||||
if (this.model >= ChipSet.MODEL_5170) {
|
||||
|
|
|
|||
|
|
@ -159,6 +159,7 @@ var PCX86 = {
|
|||
BUGS_8086: BUGS_8086,
|
||||
BYTEARRAYS: BYTEARRAYS,
|
||||
COMPILED: COMPILED, // shared
|
||||
CSSCLASS: CSSCLASS, // shared
|
||||
DEBUG: DEBUG, // shared
|
||||
DEBUGGER: DEBUGGER,
|
||||
DESKPRO386: DESKPRO386,
|
||||
|
|
|
|||
|
|
@ -1399,24 +1399,27 @@ FDC.prototype.mountDiskette = function(iDrive, sDisketteName, sDiskettePath)
|
|||
FDC.prototype.loadDiskette = function(iDrive, sDisketteName, sDiskettePath, fAutoMount, file)
|
||||
{
|
||||
var drive = this.aDrives[iDrive];
|
||||
if (sDiskettePath && drive.sDiskettePath != sDiskettePath) {
|
||||
this.unloadDrive(iDrive, fAutoMount, true);
|
||||
if (drive.fBusy) {
|
||||
this.notice("Drive " + iDrive + " busy");
|
||||
return 0;
|
||||
if (sDiskettePath) {
|
||||
sDiskettePath = sDiskettePath.replace("/disks/pc/", "/disks/pcx86/");
|
||||
if (drive.sDiskettePath != sDiskettePath) {
|
||||
this.unloadDrive(iDrive, fAutoMount, true);
|
||||
if (drive.fBusy) {
|
||||
this.notice("Drive " + iDrive + " busy");
|
||||
return 0;
|
||||
}
|
||||
drive.fBusy = true;
|
||||
if (fAutoMount) {
|
||||
drive.fAutoMount = true;
|
||||
this.cAutoMount++;
|
||||
if (this.messageEnabled()) this.printMessage("loading diskette '" + sDisketteName + "'");
|
||||
}
|
||||
drive.fLocal = !!file;
|
||||
var disk = new Disk(this, drive, DiskAPI.MODE.PRELOAD);
|
||||
if (!disk.load(sDisketteName, sDiskettePath, file, this.doneLoadDiskette)) {
|
||||
return 0;
|
||||
}
|
||||
return 1;
|
||||
}
|
||||
drive.fBusy = true;
|
||||
if (fAutoMount) {
|
||||
drive.fAutoMount = true;
|
||||
this.cAutoMount++;
|
||||
if (this.messageEnabled()) this.printMessage("loading diskette '" + sDisketteName + "'");
|
||||
}
|
||||
drive.fLocal = !!file;
|
||||
var disk = new Disk(this, drive, DiskAPI.MODE.PRELOAD);
|
||||
if (!disk.load(sDisketteName, sDiskettePath, file, this.doneLoadDiskette)) {
|
||||
return 0;
|
||||
}
|
||||
return 1;
|
||||
}
|
||||
return -1;
|
||||
};
|
||||
|
|
|
|||
|
|
@ -42,6 +42,8 @@ var COPYRIGHT = "Copyright © 2012-2016 Jeff Parsons <Jeff@pcjs.org>";
|
|||
|
||||
var LICENSE = "License: GPL version 3 or later <http://gnu.org/licenses/gpl.html>";
|
||||
|
||||
var CSSCLASS = "pcjs";
|
||||
|
||||
/**
|
||||
* @define {string}
|
||||
*/
|
||||
|
|
@ -80,6 +82,8 @@ if (NODE) {
|
|||
global.APPVERSION = APPVERSION;
|
||||
global.XMLVERSION = XMLVERSION;
|
||||
global.COPYRIGHT = COPYRIGHT;
|
||||
global.LICENSE = LICENSE;
|
||||
global.CSSCLASS = CSSCLASS;
|
||||
global.SITEHOST = SITEHOST;
|
||||
global.COMPILED = COMPILED;
|
||||
global.DEBUG = DEBUG;
|
||||
|
|
|
|||
|
|
@ -488,6 +488,20 @@ function embedMachine(sName, sVersion, idMachine, sXMLFile, sXSLFile, sParms)
|
|||
eMachine.parentNode.replaceChild(eFragment, eMachine);
|
||||
doneMachine();
|
||||
} else {
|
||||
/*
|
||||
* NOTE: This error can occur if our Node web server, when processing a folder with
|
||||
* both a manifest.xml with a machine.xml reference AND a README.md containing a
|
||||
* machine link, generates duplicate embedXXX() calls for the same machine; if the
|
||||
* first embedXXX() call finds its target, subsequent calls for the same target will
|
||||
* fail.
|
||||
*
|
||||
* Technically, such a folder is in a misconfigured state, but it happens, in part
|
||||
* because when we switched to the Jekyll web server, we had to add machine links to
|
||||
* all README.md files where we had previously relied on manifest.xml or machine.xml
|
||||
* processing. This is because the Jekyll web server currently doesn't process XML
|
||||
* files, nor is support for that likely to be added any time soon; it was a nice
|
||||
* feature of the Node web server, but it's not clear that it's worth doing for Jekyll.
|
||||
*/
|
||||
displayError("invalid machine element: " + idMachine);
|
||||
}
|
||||
} else {
|
||||
|
|
|
|||
|
|
@ -1,6 +1,6 @@
|
|||
<!DOCTYPE html>
|
||||
<!-- Some browsers tend to display a white page before displaying one of our dark pages, which causes annoying "flashes";
|
||||
setting a background color as early as possible seems to help -->
|
||||
<!-- Some browsers tend to display a white page before displaying one of our dark pages,
|
||||
which causes annoying "flashes"; setting a background color as early as possible seems to help -->
|
||||
<html style="background-color: #1d1d1d">
|
||||
<head>
|
||||
<title>pcjs.org | <!-- pcjs:title("The Original IBM PC In Your Web Browser") --></title>
|
||||
|
|
@ -31,9 +31,9 @@
|
|||
<div class="common-top-left">
|
||||
<ul>
|
||||
<li><a href="/">PCjs</a></li>
|
||||
<li><a href="/apps/pc/">Demos</a></li>
|
||||
<li><a href="/apps/pcx86/">Demos</a></li>
|
||||
<li><a href="/devices/">Devices</a></li>
|
||||
<li><a href="/disks/pc/">Disks</a></li>
|
||||
<li><a href="/disks/pcx86/">Disks</a></li>
|
||||
<li><a href="/docs/">Docs</a></li>
|
||||
<li><a href="/pubs/">Pubs</a></li>
|
||||
<li><a href="/blog/">Blog</a></li>
|
||||
|
|
|
|||
|
|
@ -33,9 +33,9 @@
|
|||
<div class="common-top-left">
|
||||
<ul>
|
||||
<li><a href="/">PCjs</a></li>
|
||||
<li><a href="/apps/pc/">Demos</a></li>
|
||||
<li><a href="/apps/pcx86/">Demos</a></li>
|
||||
<li><a href="/devices/">Devices</a></li>
|
||||
<li><a href="/disks/pc/">Disks</a></li>
|
||||
<li><a href="/disks/pcx86/">Disks</a></li>
|
||||
<li><a href="/docs/">Docs</a></li>
|
||||
<li><a href="/pubs/">Pubs</a></li>
|
||||
<li><a href="/blog/">Blog</a></li>
|
||||
|
|
|
|||
|
|
@ -64,7 +64,7 @@
|
|||
<xsl:variable name="machineClass">
|
||||
<xsl:choose>
|
||||
<xsl:when test="machine/@class"><xsl:value-of select="machine/@class"/></xsl:when>
|
||||
<xsl:otherwise><xsl:value-of select="$MACHINECLASS"/></xsl:otherwise>
|
||||
<xsl:otherwise><xsl:value-of select="$APPCLASS"/></xsl:otherwise>
|
||||
</xsl:choose>
|
||||
</xsl:variable>
|
||||
<html lang="en">
|
||||
|
|
|
|||
|
|
@ -31,9 +31,9 @@
|
|||
<div class="common-top-left">
|
||||
<ul>
|
||||
<li><a href="/">PCjs</a></li>
|
||||
<li><a href="/apps/pc/">Demos</a></li>
|
||||
<li><a href="/apps/pcx86/">Demos</a></li>
|
||||
<li><a href="/devices/">Devices</a></li>
|
||||
<li><a href="/disks/pc/">Disks</a></li>
|
||||
<li><a href="/disks/pcx86/">Disks</a></li>
|
||||
<li><a href="/docs/">Docs</a></li>
|
||||
<li><a href="/pubs/">Pubs</a></li>
|
||||
<li><a href="/blog/">Blog</a></li>
|
||||
|
|
|
|||
|
|
@ -61,7 +61,7 @@
|
|||
<xsl:variable name="machineClass">
|
||||
<xsl:choose>
|
||||
<xsl:when test="machine/@class"><xsl:value-of select="machine/@class"/></xsl:when>
|
||||
<xsl:otherwise><xsl:value-of select="$MACHINECLASS"/></xsl:otherwise>
|
||||
<xsl:otherwise><xsl:value-of select="$APPCLASS"/></xsl:otherwise>
|
||||
</xsl:choose>
|
||||
</xsl:variable>
|
||||
<html lang="en">
|
||||
|
|
|
|||
|
|
@ -31,9 +31,9 @@
|
|||
<div class="common-top-left">
|
||||
<ul>
|
||||
<li><a href="/">PCjs</a></li>
|
||||
<li><a href="/apps/pc/">Demos</a></li>
|
||||
<li><a href="/apps/pcx86/">Demos</a></li>
|
||||
<li><a href="/devices/">Devices</a></li>
|
||||
<li><a href="/disks/pc/">Disks</a></li>
|
||||
<li><a href="/disks/pcx86/">Disks</a></li>
|
||||
<li><a href="/docs/">Docs</a></li>
|
||||
<li><a href="/pubs/">Pubs</a></li>
|
||||
<li><a href="/blog/">Blog</a></li>
|
||||
|
|
|
|||
|
|
@ -61,7 +61,7 @@
|
|||
<xsl:variable name="machineClass">
|
||||
<xsl:choose>
|
||||
<xsl:when test="machine/@class"><xsl:value-of select="machine/@class"/></xsl:when>
|
||||
<xsl:otherwise><xsl:value-of select="$MACHINECLASS"/></xsl:otherwise>
|
||||
<xsl:otherwise><xsl:value-of select="$APPCLASS"/></xsl:otherwise>
|
||||
</xsl:choose>
|
||||
</xsl:variable>
|
||||
<html lang="en">
|
||||
|
|
|
|||
|
|
@ -31,9 +31,9 @@
|
|||
<div class="common-top-left">
|
||||
<ul>
|
||||
<li><a href="/">PCjs</a></li>
|
||||
<li><a href="/apps/pc/">Demos</a></li>
|
||||
<li><a href="/apps/pcx86/">Demos</a></li>
|
||||
<li><a href="/devices/">Devices</a></li>
|
||||
<li><a href="/disks/pc/">Disks</a></li>
|
||||
<li><a href="/disks/pcx86/">Disks</a></li>
|
||||
<li><a href="/docs/">Docs</a></li>
|
||||
<li><a href="/pubs/">Pubs</a></li>
|
||||
<li><a href="/blog/">Blog</a></li>
|
||||
|
|
|
|||
|
|
@ -61,7 +61,7 @@
|
|||
<xsl:variable name="machineClass">
|
||||
<xsl:choose>
|
||||
<xsl:when test="machine/@class"><xsl:value-of select="machine/@class"/></xsl:when>
|
||||
<xsl:otherwise><xsl:value-of select="$MACHINECLASS"/></xsl:otherwise>
|
||||
<xsl:otherwise><xsl:value-of select="$APPCLASS"/></xsl:otherwise>
|
||||
</xsl:choose>
|
||||
</xsl:variable>
|
||||
<html lang="en">
|
||||
|
|
|
|||
|
|
@ -381,10 +381,10 @@ b[4],this.Ka=b[5];if(b=a[6])this.ra=b[1],this.ra[7]=b[0],this.pa=b[2],this.A=b[3
|
|||
function al(a,b,c){var d=a.Dc[b];d||(d={jg:[0,0],Fc:[0,0],Eb:[0,0],Ab:[0,0]});c=c&&8==c.length?c:bl;d.Ee=c[0];d.jg[0]=c[1][0];d.jg[1]=c[1][1];d.Fc[0]=c[2][0];d.Fc[1]=c[2][1];d.Eb[0]=c[3][0];d.Eb[1]=c[3][1];d.Ab[0]=c[4][0];d.Ab[1]=c[4][1];d.mode=c[5];d.lg=c[6];d.controller=a;d.Ti=b;cl(d,c[8],c[9]);a.Dc[b]=d}function cl(a,b,c,d){"string"==typeof b&&(b=hb(b));b&&(a.done=null,a.rn=b.id,a.sn=c,a.qg=b,a.fh=b[c],a.Fg=d)}var dl=[0,Array(4)];
|
||||
function Rk(a,b,c,d){var e=a.vc[b];e||(e={Yc:[null,null,null,null]});d=d&&8==d.length?d:dl;e.port=c;e.xo=b<<3;e.nf=d[0];e.Yc[0]=d[1][0];e.Yc[1]=d[1][1];e.Yc[2]=d[1][2];e.Yc[3]=d[1][3];e.Zd=d[2];e.Bd=d[3];e.mc=d[4];e.Pc=d[5];e.ye=d[6];e.Cf=d[7];a.vc[b]=e}var el=[[0,0],[0,0],[0,0],[0,0]];
|
||||
function Sk(a,b,c){var d=a.W[b];d||(d={Fc:[0,0],$c:[0,0],Ab:[0,0],ze:[0,0]});c=c&&13<=c.length?c:el;d.Fc[0]=c[0][0];d.Fc[1]=c[0][1];d.$c[0]=c[1][0];d.$c[1]=c[1][1];d.Ab[0]=c[2][0];d.Ab[1]=c[2][1];d.ze[0]=c[3][0];d.ze[1]=c[3][1];d.Zg=c[4];d.mode=c[5];d.eg=c[6];d.Fd=c[7];d.nd=c[8];d.vd=c[9];d.Ze=c[10];d.Be=c[11];d.xd=c[12];d.Yb=c[13]||0;d.df=c[14]||!1;a.W[b]=d}
|
||||
function Bk(a,b,c){for(var d="",e=a.qa[c],f=1;8>=f;f++){var g="pcx86-bitCell";f||(g+=" pcx86-bitCellLeft");d+='<div id="'+(c+"-"+f)+'" class="'+g+'" data-value="0">'+f+"</div>\n"}e.innerHTML=d;fl(a,b,c,!0)}function gl(a,b,c){if(b=(a=Ak[a.ja|0])&&a[b])for(var d in b)if(a=b[d],a.Lc&1<<c)return a;return null}
|
||||
function Bk(a,b,c){for(var d="",e=a.qa[c],f=1;8>=f;f++){var g="pcjs-bitCell";f||(g+=" pcjs-bitCellLeft");d+='<div id="'+(c+"-"+f)+'" class="'+g+'" data-value="0">'+f+"</div>\n"}e.innerHTML=d;fl(a,b,c,!0)}function gl(a,b,c){if(b=(a=Ak[a.ja|0])&&a[b])for(var d in b)if(a=b[d],a.Lc&1<<c)return a;return null}
|
||||
function Uk(a,b,c){for(var d=null,e=Ak[a.ja]||Ak[a.ja|0]||Ak[5150],f=0;f<e.length;f++){var g=e[f];if(g&&(g=g[b])){a=a.C[f][c?0:1]&g.Lc;for(var h in g.hd)if(g.hd[h]==a&&(d=h,"number"==typeof+d))break;break}}return d}function Wk(a,b){if(b<+Uk(a,vk,void 0)){if(!a.ia)return 1;if(b<a.ia.length)switch(a.ia[b]){case 160:case 180:case 320:case 360:return 1;case 720:return 3;case 1200:return 2;case 1440:return 4}}return 0}function Tk(a,b){return+Uk(a,5,b)+ +Uk(a,6,b)}
|
||||
function sk(a,b){var c=b;if(a)for(var c=0,d=1,e=0;e<a.length;e++)"0"==a.charAt(e)&&(c|=d),d<<=1;return c}function uk(a,b,c,d){for(var e=Ak[a.ja]||Ak[a.ja|0]||Ak[5150],f=0;f<e.length;f++){var g=e[f];if(g&&(g=g[b]))for(var h in g.hd)if(h==c){a.C[f][d?0:1]&=~g.Lc;a.C[f][d?0:1]|=g.hd[h];return}}}function hl(a,b){a.setAttribute("data-value",b?"1":"0");a.style.color=b?"#ffffff":"#000000";a.style.backgroundColor=b?"#000000":"#ffffff"}function Pk(a){fl(a,0,tk);fl(a,1,xk);il(a)}
|
||||
function fl(a,b,c,d){if(c=a.qa[c]){d=d?a.C[b][0]:a.C[b][1]=a.C[b][0];c=nb(c,"pcx86-bitCell");for(var e=0;e<c.length;e++){var f=gl(a,b,e);c[e].setAttribute("title",f&&f.Qd||"Reserved");hl(c[e],d&1<<e?!1:!0);c[e].onclick=function(a,b){return function(){var c="1"!=b.getAttribute("data-value");hl(b,c);var d=b.getAttribute("id").split("-"),e=1<<+d[1]-1;switch(d[0]){case tk:a.C[0][0]=a.C[0][0]&~e|(c?0:e);break;case xk:a.C[1][0]=a.C[1][0]&~e|(c?0:e)}il(a)}}(a,c[e])}}}
|
||||
function fl(a,b,c,d){if(c=a.qa[c]){d=d?a.C[b][0]:a.C[b][1]=a.C[b][0];c=nb(c,"pcjs-bitCell");for(var e=0;e<c.length;e++){var f=gl(a,b,e);c[e].setAttribute("title",f&&f.Qd||"Reserved");hl(c[e],d&1<<e?!1:!0);c[e].onclick=function(a,b){return function(){var c="1"!=b.getAttribute("data-value");hl(b,c);var d=b.getAttribute("id").split("-"),e=1<<+d[1]-1;switch(d[0]){case tk:a.C[0][0]=a.C[0][0]&~e|(c?0:e);break;case xk:a.C[1][0]=a.C[1][0]&~e|(c?0:e)}il(a)}}(a,c[e])}}}
|
||||
function il(a){var b=a.qa.swdesc;if(null!=b){var c;c=""+(Tk(a,!0)+"Kb");c+=", "+(+ +Uk(a,3,!0)?"":"No ")+"Coprocessor";c+=", "+{0:"Enhanced Color",1:"TV",2:"Color",3:"Monochrome"}[+Uk(a,wk,!0)]+" Monitor";c+=", "+ +Uk(a,vk,!0)+" Floppy Drives";if(null!=a.C[0][1]&&a.C[0][1]!=a.C[0][0]||null!=a.C[1][1]&&a.C[1][1]!=a.C[1][0])c+=" (Reset required)";b.textContent=c}}
|
||||
function jl(a,b,c,d,e){var f=a.L[b],g=f.Dc[c],h=g.Eb[f.Kb];A(a,768)&&x(a,d,null,e,"DMA"+b+".CHANNEL"+c+".ADDR["+f.Kb+"]",h,!0);f.Kb^=1;b||0!=c||f.Kb||(g.Eb[0]++,255<g.Eb[0]&&(g.Eb[0]=0,g.Eb[1]++,255<g.Eb[1]&&(g.Eb[1]=0)));return h}function kl(a,b,c,d,e,f){var g=a.L[b];A(a,768)&&x(a,d,e,f,"DMA"+b+".CHANNEL"+c+".ADDR["+g.Kb+"]",null,!0);a=g.Dc[c];a.Eb[g.Kb]=a.jg[g.Kb]=e;g.Kb^=1}
|
||||
function ll(a,b,c,d,e){var f=a.L[b],g=f.Dc[c],h=g.Ab[f.Kb];A(a,768)&&x(a,d,null,e,"DMA"+b+".CHANNEL"+c+".COUNT["+f.Kb+"]",h,!0);f.Kb^=1;b||0!=c||f.Kb||(g.Ab[0]--,0>g.Ab[0]&&(g.Ab[0]=255,g.Ab[1]--,0>g.Ab[1]&&(g.Ab[1]=255)));return h}function ml(a,b,c,d,e,f){var g=a.L[b];A(a,768)&&x(a,d,e,f,"DMA"+b+".CHANNEL"+c+".COUNT["+g.Kb+"]",null,!0);a=g.Dc[c];a.Ab[g.Kb]=a.Fc[g.Kb]=e;g.Kb^=1}function nl(a,b,c,d){var e=a.L[b],f=e.Yb|1;e.Yb&=-16;A(a,768)&&x(a,c,null,d,"DMA"+b+".STATUS",f,!0);return f}
|
||||
|
|
@ -608,7 +608,7 @@ n[q++];g.he=n[q++];g.Ib=n[q++];g.eb=n[q++];g.pb=null;g.za||(g.Le="");p=n[q++];10
|
|||
m.lk=function(a,b,c){if(a.za){var d=a.za.info(),e=d[2],f=d[1]*e;if(b+c<=d[0]*f)return a.Qb=Math.floor(b/f),b%=f,a.kb=Math.floor(b/e),a.xb=b%e+1,a.Ib=c*d[3],a.Cb=0,!0}return!1};
|
||||
function zp(a,b){b||(a.fa=0);if(a.U)for(var c in a.U){var d=a.U[c],e=d.path,f;if(!(f=d.name))a:{if((f=a.qa.listDisks)&&f.options)for(var g=0;g<f.options.length;g++){var h=f.options[g];if(h.value==e){f=h.text;break a}}f=fa(e,!0)}if(e&&f&&(g=c.charCodeAt(0)-65,0<=g&&g<a.A.length)){!Cp(a,g,f,e,!0)&&b&&rb(a,!1);continue}a.Na("Incorrect auto-mount settings for drive "+c+" ("+JSON.stringify(d)+")")}return!!a.fa}
|
||||
function up(a,b,c,d){var e,f=a.qa.listDrives;if(f&&!isNaN(e=ca(f.value,10))&&0<=e&&e<a.A.length)if(c)if("?"==c)a.Na('Use "Choose File" and "Mount" to select and load a local disk.');else{if("??"==c){c=window.prompt("Enter the URL of a remote disk image.","")||"";if(!c)return;b=fa(c)}for(;0>Cp(a,e,b,c,!1,d)&&window.confirm("Click OK to reload the original disk.\n(WARNING: All disk changes will be discarded)");){for(var f=a,g=c,h=void 0,h=0;h<f.B.length;h++)if(f.B[h][1]==g){f.B.splice(h,1);break}Ap(a,
|
||||
e,!1,!0)}}else Ap(a,e);else a.Na("Unable to load the selected drive")}function Cp(a,b,c,d,e,f){var g=a.A[b];if(d&&g.Le!=d){Ap(a,b,e,!0);if(g.bd)return a.Na("Drive "+b+" busy"),0;g.bd=!0;e&&(g.Ae=!0,a.fa++,A(a)&&y(a,"loading diskette '"+c+"'"));g.$e=!!f;return(new Ho(a,g,"preload")).load(c,d,f,a.Hi)?1:0}return-1}
|
||||
e,!1,!0)}}else Ap(a,e);else a.Na("Unable to load the selected drive")}function Cp(a,b,c,d,e,f){var g=a.A[b];if(d&&(d=d.replace("/disks/pc/","/disks/pcx86/"),g.Le!=d)){Ap(a,b,e,!0);if(g.bd)return a.Na("Drive "+b+" busy"),0;g.bd=!0;e&&(g.Ae=!0,a.fa++,A(a)&&y(a,"loading diskette '"+c+"'"));g.$e=!!f;return(new Ho(a,g,"preload")).load(c,d,f,a.Hi)?1:0}return-1}
|
||||
m.Hi=function(a,b,c,d,e){var f;a.bd=!1;b&&(f=b.info(),b&&f[0]>a.Bb||f[1]>a.ub)&&(this.Na('Diskette "'+c+'" too large for drive '+String.fromCharCode(65+a.hb)),b=null);b?(a.za=b,a.kk=c,a.Le=d,Dp(this,c,d,b),f=b.info(),this.X|=128,this.Na('Mounted diskette "'+c+'" in drive '+String.fromCharCode(65+a.hb),a.Ae||e),a.zg=f[0],a.Nf=f[1],a.Of=f[2],this.V&&this.V.yd()):a.$e=!1;a.Ae&&(a.Ae=!1,--this.fa||rb(this));tp(this,a.hb)};
|
||||
function yp(a,b,c,d){if((a=a.qa.listDisks)&&a.options){for(var e=0;e<a.options.length;e++)if(a.options[e].value==c)return;e=document.createElement("option");e.text=b;e.value=c;d&&a.childNodes[0]?a.insertBefore(e,a.childNodes[0]):a.appendChild(e)}}
|
||||
function tp(a,b){if(0<=b&&b<a.A.length){var c=a.A[b],d=a.qa.listDisks,e=a.qa.listDrives;if(d&&e&&d.options&&e.options&&(e=ca(e.value,10),c=c.$e?"?":c.Le,!isNaN(e)&&e==b)){for(e=0;e<d.options.length;e++)if(d.options[e].value==c){d.selectedIndex!=e&&(d.selectedIndex=e);break}e==d.options.length&&(d.selectedIndex=0)}}}function Ap(a,b,c,d){var e=a.A[b];e.za&&(Bp(a,e.Le,e.za),e.kk="",e.Le="",e.za=null,e.$e=!1,a.X|=128,d||a.Na("Drive "+String.fromCharCode(65+b)+" unloaded",c),c||d||tp(a,b))}
|
||||
|
|
|
|||
|
|
@ -364,10 +364,10 @@ this.va=b[5];if(b=a[6])this.I=b[1],this.I[7]=b[0],this.ea=b[2],this.B=b[3],this.
|
|||
function ej(a,b,c){var d=a.$b[b];d||(d={sf:[0,0],jc:[0,0],gb:[0,0],hb:[0,0]});c=c&&8==c.length?c:fj;d.Qd=c[0];d.sf[0]=c[1][0];d.sf[1]=c[1][1];d.jc[0]=c[2][0];d.jc[1]=c[2][1];d.gb[0]=c[3][0];d.gb[1]=c[3][1];d.hb[0]=c[4][0];d.hb[1]=c[4][1];d.mode=c[5];d.tf=c[6];d.controller=a;d.Vh=b;gj(d,c[8],c[9]);a.$b[b]=d}function gj(a,b,c,d){"string"==typeof b&&(b=Ua(b));b&&(a.done=null,a.$l=b.id,a.am=c,a.yf=b,a.kg=b[c],a.Mf=d)}var hj=[0,Array(4)];
|
||||
function Vi(a,b,c,d){var e=a.gc[b];e||(e={Sc:[null,null,null,null]});d=d&&8==d.length?d:hj;e.port=c;e.bn=b<<3;e.Te=d[0];e.Sc[0]=d[1][0];e.Sc[1]=d[1][1];e.Sc[2]=d[1][2];e.Sc[3]=d[1][3];e.md=d[2];e.Vc=d[3];e.ac=d[4];e.Cc=d[5];e.Ld=d[6];e.Je=d[7];a.gc[b]=e}var ij=[[0,0],[0,0],[0,0],[0,0]];
|
||||
function Wi(a,b,c){var d=a.K[b];d||(d={jc:[0,0],Ec:[0,0],hb:[0,0],Md:[0,0]});c=c&&13<=c.length?c:ij;d.jc[0]=c[0][0];d.jc[1]=c[0][1];d.Ec[0]=c[1][0];d.Ec[1]=c[1][1];d.hb[0]=c[2][0];d.hb[1]=c[2][1];d.Md[0]=c[3][0];d.Md[1]=c[3][1];d.eg=c[4];d.mode=c[5];d.hf=c[6];d.Xc=c[7];d.kd=c[8];d.Tc=c[9];d.le=c[10];d.Od=c[11];d.ld=c[12];d.Db=c[13]||0;d.qe=c[14]||!1;a.K[b]=d}
|
||||
function Ii(a,b,c){for(var d="",e=a.ka[c],f=1;8>=f;f++){var g="pcx86-bitCell";f||(g+=" pcx86-bitCellLeft");d+='<div id="'+(c+"-"+f)+'" class="'+g+'" data-value="0">'+f+"</div>\n"}e.innerHTML=d;jj(a,b,c,!0)}function kj(a,b,c){if(b=(a=T[a.ca|0])&&a[b])for(var d in b)if(a=b[d],a.lc&1<<c)return a;return null}
|
||||
function Ii(a,b,c){for(var d="",e=a.ka[c],f=1;8>=f;f++){var g="pcjs-bitCell";f||(g+=" pcjs-bitCellLeft");d+='<div id="'+(c+"-"+f)+'" class="'+g+'" data-value="0">'+f+"</div>\n"}e.innerHTML=d;jj(a,b,c,!0)}function kj(a,b,c){if(b=(a=T[a.ca|0])&&a[b])for(var d in b)if(a=b[d],a.lc&1<<c)return a;return null}
|
||||
function Yi(a,b,c){for(var d=null,e=T[a.ca]||T[a.ca|0]||T[5150],f=0;f<e.length;f++){var g=e[f];if(g&&(g=g[b])){a=a.D[f][c?0:1]&g.lc;for(var h in g.Oc)if(g.Oc[h]==a&&(d=h,"number"==typeof+d))break;break}}return d}function $i(a,b){if(b<+Yi(a,Di,void 0)){if(!a.Y)return 1;if(b<a.Y.length)switch(a.Y[b]){case 160:case 180:case 320:case 360:return 1;case 720:return 3;case 1200:return 2;case 1440:return 4}}return 0}function Xi(a,b){return+Yi(a,5,b)+ +Yi(a,6,b)}
|
||||
function Ai(a,b){var c=b;if(a)for(var c=0,d=1,e=0;e<a.length;e++)"0"==a.charAt(e)&&(c|=d),d<<=1;return c}function Ci(a,b,c,d){for(var e=T[a.ca]||T[a.ca|0]||T[5150],f=0;f<e.length;f++){var g=e[f];if(g&&(g=g[b]))for(var h in g.Oc)if(h==c){a.D[f][d?0:1]&=~g.lc;a.D[f][d?0:1]|=g.Oc[h];return}}}function lj(a,b){a.setAttribute("data-value",b?"1":"0");a.style.color=b?"#ffffff":"#000000";a.style.backgroundColor=b?"#000000":"#ffffff"}function Ti(a){jj(a,0,Bi);jj(a,1,Fi);mj(a)}
|
||||
function jj(a,b,c,d){if(c=a.ka[c]){d=d?a.D[b][0]:a.D[b][1]=a.D[b][0];c=Za(c,"pcx86-bitCell");for(var e=0;e<c.length;e++){var f=kj(a,b,e);c[e].setAttribute("title",f&&f.gd||"Reserved");lj(c[e],d&1<<e?!1:!0);c[e].onclick=function(a,b){return function(){var c="1"!=b.getAttribute("data-value");lj(b,c);var d=b.getAttribute("id").split("-"),e=1<<+d[1]-1;switch(d[0]){case Bi:a.D[0][0]=a.D[0][0]&~e|(c?0:e);break;case Fi:a.D[1][0]=a.D[1][0]&~e|(c?0:e)}mj(a)}}(a,c[e])}}}
|
||||
function jj(a,b,c,d){if(c=a.ka[c]){d=d?a.D[b][0]:a.D[b][1]=a.D[b][0];c=Za(c,"pcjs-bitCell");for(var e=0;e<c.length;e++){var f=kj(a,b,e);c[e].setAttribute("title",f&&f.gd||"Reserved");lj(c[e],d&1<<e?!1:!0);c[e].onclick=function(a,b){return function(){var c="1"!=b.getAttribute("data-value");lj(b,c);var d=b.getAttribute("id").split("-"),e=1<<+d[1]-1;switch(d[0]){case Bi:a.D[0][0]=a.D[0][0]&~e|(c?0:e);break;case Fi:a.D[1][0]=a.D[1][0]&~e|(c?0:e)}mj(a)}}(a,c[e])}}}
|
||||
function mj(a){var b=a.ka.swdesc;if(null!=b){var c;c=""+(Xi(a,!0)+"Kb");c+=", "+(+ +Yi(a,3,!0)?"":"No ")+"Coprocessor";c+=", "+{0:"Enhanced Color",1:"TV",2:"Color",3:"Monochrome"}[+Yi(a,Ei,!0)]+" Monitor";c+=", "+ +Yi(a,Di,!0)+" Floppy Drives";if(null!=a.D[0][1]&&a.D[0][1]!=a.D[0][0]||null!=a.D[1][1]&&a.D[1][1]!=a.D[1][0])c+=" (Reset required)";b.textContent=c}}
|
||||
function nj(a,b,c){a=a.G[b];var d=a.$b[c],e=d.gb[a.Ib];a.Ib^=1;b||0!=c||a.Ib||(d.gb[0]++,255<d.gb[0]&&(d.gb[0]=0,d.gb[1]++,255<d.gb[1]&&(d.gb[1]=0)));return e}function oj(a,b,c,d){a=a.G[b];c=a.$b[c];c.gb[a.Ib]=c.sf[a.Ib]=d;a.Ib^=1}function pj(a,b,c){a=a.G[b];var d=a.$b[c],e=d.hb[a.Ib];a.Ib^=1;b||0!=c||a.Ib||(d.hb[0]--,0>d.hb[0]&&(d.hb[0]=255,d.hb[1]--,0>d.hb[1]&&(d.hb[1]=255)));return e}function qj(a,b,c,d){a=a.G[b];c=a.$b[c];c.hb[a.Ib]=c.jc[a.Ib]=d;a.Ib^=1}
|
||||
function rj(a,b){var c=a.G[b],d=c.Db|1;c.Db&=-16;return d}function sj(a,b,c){a=a.G[b];b=c&3;a.Db=a.Db&~(16<<b)|(c&4)<<b+2;a.Gh=c}function xj(a,b,c){b=a.G[b];var d=c&3,e=b.$b[d];e.Qd=!!(c&4);e.Qd||yj(a,b.Vk+d)}function zj(a,b){for(var c=a.G[b],d=0;d<c.$b.length;d++)ej(c,d)}function Aj(a,b,c){return a.G[b].$b[c].tf}function Bj(a,b,c,d){a.G[b].$b[c].tf=d}function Cj(a,b,c,d,e){gj(a.G[b>>2].$b[b&3],c,d,e)}
|
||||
|
|
@ -556,7 +556,7 @@ function vm(a,b){var c=0,d,e=!0;void 0===b&&(b=[0,0,128,Array(9),0,0,0,[]]);a.Qa
|
|||
g.vb=n[x++];g.Ua=n[x++];g.Wa=null;g.ta||(g.Vd="");r=n[x++];102==r&&(r=!1);if("boolean"==typeof r){var z=r,r=n[x++],n=n[x];z?(x=r,r=k.B[m],Am(k,m,!0,!0),r.me=!0,m=new am(k,r,"preload"),k.Mh(r,m,x,n,!0)):Cm(k,m,r,n,!0)?g.ta&&n&&Dm(k,r,n,g.ta):ab(k,!1)}else void 0!==r&&g.ta&&0>g.ta.restore(r)&&(h=!1);h&&g.ta&&void 0!==g.Ua&&(g.Wa=g.ta.seek(g.wb,g.Ya,g.mb));h||(e=!1)}a.L=b[c++]||0;a.H=b[c]||0;return e}
|
||||
function zm(a,b){b||(a.R=0);if(a.K)for(var c in a.K){var d=a.K[c],e=d.path,f;if(!(f=d.name))a:{if((f=a.ka.listDisks)&&f.options)for(var g=0;g<f.options.length;g++){var h=f.options[g];if(h.value==e){f=h.text;break a}}f=fa(e,!0)}if(e&&f&&(g=c.charCodeAt(0)-65,0<=g&&g<a.B.length)){!Cm(a,g,f,e,!0)&&b&&ab(a,!1);continue}a.Ba("Incorrect auto-mount settings for drive "+c+" ("+JSON.stringify(d)+")")}return!!a.R}
|
||||
function um(a,b,c,d){var e,f=a.ka.listDrives;if(f&&!isNaN(e=ca(f.value,10))&&0<=e&&e<a.B.length)if(c)if("?"==c)a.Ba('Use "Choose File" and "Mount" to select and load a local disk.');else{if("??"==c){c=window.prompt("Enter the URL of a remote disk image.","")||"";if(!c)return;b=fa(c)}for(;0>Cm(a,e,b,c,!1,d)&&window.confirm("Click OK to reload the original disk.\n(WARNING: All disk changes will be discarded)");){for(var f=a,g=c,h=void 0,h=0;h<f.C.length;h++)if(f.C[h][1]==g){f.C.splice(h,1);break}Am(a,
|
||||
e,!1,!0)}}else Am(a,e);else a.Ba("Unable to load the selected drive")}function Cm(a,b,c,d,e,f){var g=a.B[b];if(d&&g.Vd!=d){Am(a,b,e,!0);if(g.Qc)return a.Ba("Drive "+b+" busy"),0;g.Qc=!0;e&&(g.Nd=!0,a.R++);g.me=!!f;return(new am(a,g,"preload")).load(c,d,f,a.Mh)?1:0}return-1}
|
||||
e,!1,!0)}}else Am(a,e);else a.Ba("Unable to load the selected drive")}function Cm(a,b,c,d,e,f){var g=a.B[b];if(d&&(d=d.replace("/disks/pc/","/disks/pcx86/"),g.Vd!=d)){Am(a,b,e,!0);if(g.Qc)return a.Ba("Drive "+b+" busy"),0;g.Qc=!0;e&&(g.Nd=!0,a.R++);g.me=!!f;return(new am(a,g,"preload")).load(c,d,f,a.Mh)?1:0}return-1}
|
||||
l.Mh=function(a,b,c,d,e){var f;a.Qc=!1;b&&(f=b.info(),b&&f[0]>a.ib||f[1]>a.jb)&&(this.Ba('Diskette "'+c+'" too large for drive '+String.fromCharCode(65+a.Qa)),b=null);b?(a.ta=b,a.ij=c,a.Vd=d,Dm(this,c,d,b),f=b.info(),this.L|=128,this.Ba('Mounted diskette "'+c+'" in drive '+String.fromCharCode(65+a.Qa),a.Nd||e),a.Hf=f[0],a.Ue=f[1],a.Ve=f[2],this.ba&&uc(this.ba)):a.me=!1;a.Nd&&(a.Nd=!1,--this.R||ab(this));tm(this,a.Qa)};
|
||||
function ym(a,b,c,d){if((a=a.ka.listDisks)&&a.options){for(var e=0;e<a.options.length;e++)if(a.options[e].value==c)return;e=document.createElement("option");e.text=b;e.value=c;d&&a.childNodes[0]?a.insertBefore(e,a.childNodes[0]):a.appendChild(e)}}
|
||||
function tm(a,b){if(0<=b&&b<a.B.length){var c=a.B[b],d=a.ka.listDisks,e=a.ka.listDrives;if(d&&e&&d.options&&e.options&&(e=ca(e.value,10),c=c.me?"?":c.Vd,!isNaN(e)&&e==b)){for(e=0;e<d.options.length;e++)if(d.options[e].value==c){d.selectedIndex!=e&&(d.selectedIndex=e);break}e==d.options.length&&(d.selectedIndex=0)}}}function Am(a,b,c,d){var e=a.B[b];e.ta&&(Bm(a,e.Vd,e.ta),e.ij="",e.Vd="",e.ta=null,e.me=!1,a.L|=128,d||a.Ba("Drive "+String.fromCharCode(65+b)+" unloaded",c),c||d||tm(a,b))}
|
||||
|
|
|
|||
Loading…
Reference in a new issue