Support for overriding machine hard drive(s)
This commit is contained in:
parent
0735ea8186
commit
e9e7ccf6f2
17 changed files with 370 additions and 310 deletions
|
|
@ -17,7 +17,7 @@ right_brace: "}"
|
|||
|
||||
# Build settings
|
||||
|
||||
exclude: ["index.html", "**/index.html", "**/archive", "**/c64", "blog/posts", "logs", "node_modules", "**/private", "src", "**/src", "tmp", "videos", "web", ".git", ".idea"]
|
||||
exclude: ["index.html", "**/index.html", "**/archive", "**/c64", "logs", "node_modules", "**/private", "src", "**/src", "tmp", "**/tmp", "videos", "web", ".git", ".idea"]
|
||||
markdown: kramdown
|
||||
kramdown:
|
||||
input: GFM
|
||||
|
|
|
|||
|
|
@ -17,8 +17,6 @@ pcjs:
|
|||
#
|
||||
# bundle exec jekyll serve --config _config.yml,_developer.yml
|
||||
#
|
||||
# so deal with it! ;-)
|
||||
#
|
||||
# NOTE: If you're debugging PCjs source code, you'll probably be happier using a JetBrains IDE like WebStorm,
|
||||
# launching PCjs pages via Node rather than Jekyll, and using the JetBrains Chrome debugger plug-in.
|
||||
#
|
||||
|
|
|
|||
|
|
@ -14,7 +14,8 @@ in the Front Matter of Markdown files, for compatibility with the Jekyll web ser
|
|||
And the following properties (along with any property not listed above) will be added to the 'parms' property:
|
||||
|
||||
'autoPower' (eg, "true")
|
||||
'autoMount' (eg, {"A":{"name":"OS/2 FOOTBALL Boot Disk (v7.68.17)","path":"/disks/pc/os2/misc/football/debugger/FOOTBALL-7.68.17.json"}})
|
||||
'autoMount' (eg, {"A":{"name":"OS/2 FOOTBALL (v7.68.17)","path":"/disks/pc/os2/misc/football/FOOTBALL-76817.json"}})
|
||||
'drives' (eg, '[{name:"68Mb Hard Disk",type:4,path:"http://archive.pcjs.org/disks/pc/fixed/68mb/win95.json"}]')
|
||||
'state' (eg, "state.json")
|
||||
'messages' (eg, "disk")
|
||||
|
||||
|
|
@ -31,10 +32,18 @@ here and in markout.js. Examples include 'autopower' ('autoPower') and 'automou
|
|||
{% endif %}
|
||||
{% capture machine_embed %}embed{{ machine_type | upcase }}{% endcapture %}
|
||||
{% if machine.automount != nil %}
|
||||
{% if machine.automount == '' %}
|
||||
{% assign machine_autoMount = '{}' %}
|
||||
{% else %}
|
||||
{% capture machine_autoMount %}{{ machine.automount|jsonify }}{% endcapture %}
|
||||
{% endif %}
|
||||
{% else %}
|
||||
{% if machine.autoMount == '' %}
|
||||
{% assign machine_autoMount = '{}' %}
|
||||
{% else %}
|
||||
{% capture machine_autoMount %}{{ machine.autoMount|jsonify }}{% endcapture %}
|
||||
{% endif %}
|
||||
{% endif %}
|
||||
{% if machine.autopower != nil %}
|
||||
{% capture machine_autoPower %}{{ machine.autopower }}{% endcapture %}
|
||||
{% elsif machine.autoPower != nil %}
|
||||
|
|
@ -47,12 +56,21 @@ here and in markout.js. Examples include 'autopower' ('autoPower') and 'automou
|
|||
{% else %}
|
||||
{% assign machine_config = machine.config %}
|
||||
{% endunless %}
|
||||
{% if machine.drives != nil %}
|
||||
{% if machine.drives == '' %}
|
||||
{% assign machine_drives = '[]' %}
|
||||
{% else %}
|
||||
{% capture machine_drives %}{{ machine.drives }}{% endcapture %}
|
||||
{% endif %}
|
||||
{% else %}
|
||||
{% capture machine_drives %}null{% endcapture %}
|
||||
{% endif %}
|
||||
{% unless machine.template %}
|
||||
{% assign machine_template = '' %}
|
||||
{% else %}
|
||||
{% assign machine_template = machine.template %}
|
||||
{% endunless %}
|
||||
{% capture machine_parms %}{{ site.left_brace }}autoPower:{{ machine_autoPower }},state:"{{ machine.state }}",autoMount:{{ machine_autoMount }},messages:"{{ machine.messages }}"{{ site.right_brace }}{% endcapture %}
|
||||
{% capture machine_parms %}{{ site.left_brace }}autoMount:{{ machine_autoMount }},autoPower:{{ machine_autoPower }},drives:{{ machine_drives }},state:"{{ machine.state }}",messages:"{{ machine.messages }}"{{ site.right_brace }}{% endcapture %}
|
||||
{% if site.pcjs.compiled == true and machine.uncompiled != true %}
|
||||
{% capture machine_script %}<script type="text/javascript" src="{{ site.baseurl }}/versions/{{ machine_type }}js/{{ site.pcjs.version }}/{{ machine_file }}.js"></script>{% endcapture %}
|
||||
{% unless machine_scripts contains machine_script %}
|
||||
|
|
|
|||
|
|
@ -4,6 +4,14 @@ title: Windows 95
|
|||
date: 2015-07-17 11:00:00
|
||||
category: Windows 95
|
||||
permalink: /blog/2015/07/17/
|
||||
machines:
|
||||
- type: pc
|
||||
id: deskpro386
|
||||
debugger: true
|
||||
state: /disks/pc/windows/win95/4.00.950/deskpro386.json
|
||||
config: /devices/pc/machine/compaq/deskpro386/vga/4096kb/machine.xml
|
||||
drives: '[{name:"68Mb Hard Disk",type:4,path:"http://archive.pcjs.org/disks/pc/fixed/68mb/win95.json"}]'
|
||||
autoMount: ''
|
||||
---
|
||||
|
||||
This week (July 14, 2015) was the 20th anniversary of Windows 95 RTM ("Release To Manufacturing"). So I decided to
|
||||
|
|
@ -186,9 +194,9 @@ Lots of bugs have been squashed in the past few weeks -- not enough to finish se
|
|||
closer. More details on recent releases can be found [here](https://github.com/jeffpar/pcjs/releases).
|
||||
|
||||
The machine below has been reconfigured with a hard disk image containing all the Windows 95 Setup files. The machine
|
||||
is at the point where Windows 95 SETUP has just rebooted. Click the "Run" button to start the machine.
|
||||
is at the point where Windows 95 SETUP has just rebooted.
|
||||
|
||||
[Embedded DeskPro 386](/devices/pc/machine/compaq/deskpro386/vga/4096kb/machine.xml "PCjs:deskpro386:::debugger")
|
||||
{% include machine.html id="deskpro386" %}
|
||||
|
||||
*[@jeffpar](http://twitter.com/jeffpar)*
|
||||
*July 17, 2015 (updated September 12, 2015)*
|
||||
|
|
|
|||
|
|
@ -8,7 +8,10 @@ machines:
|
|||
- type: pc
|
||||
id: deskpro386
|
||||
debugger: true
|
||||
state: /disks/pc/windows/win95/4.00.950/deskpro386.json
|
||||
config: /devices/pc/machine/compaq/deskpro386/vga/4096kb/machine.xml
|
||||
drives: '[{name:"68Mb Hard Disk",type:4,path:"http://archive.pcjs.org/disks/pc/fixed/68mb/win95.json"}]'
|
||||
autoMount: ''
|
||||
---
|
||||
|
||||
Today, the last serious bug preventing a successful boot of Windows 95 was fixed. I won't bore you with
|
||||
|
|
@ -19,7 +22,7 @@ converts an immediate signed byte into a signed word. Those variations were fai
|
|||
a 16-bit operand size was in effect, and if the destination was a register, the upper 16 bits of that register
|
||||
could become corrupted.
|
||||
|
||||
The [Windows 95 Test Machine](/devices/pc/machine/compaq/deskpro386/vga/4096kb/) hard disk has been updated
|
||||
The [Windows 95 Test Machine](/disks/pc/windows/win95/4.00.950/) hard disk has been updated
|
||||
with a complete set of Windows 95 files from a "Compact" installation, and first boot has finished, so instead
|
||||
of the initial "Getting ready to run Windows 95 for the first time..." splash screen, you'll see the normal
|
||||
Windows 95 startup screen.
|
||||
|
|
|
|||
|
|
@ -74,8 +74,8 @@ You may also use `config` to specify a machine XML configuration file if not usi
|
|||
a JSON-encoded machine state file if the machine requires a predefined state; and `uncompiled` may be set to *true*
|
||||
to force a machine to use uncompiled sources, overriding the value of `site.pcjs.compiled` in **_config.yml**.
|
||||
|
||||
For example, the PCjs home page contains two machines, so this appears at the top of the root
|
||||
[README.md](https://raw.githubusercontent.com/jeffpar/pcjs/master/README.md):
|
||||
For example, the PCjs Home page contains two machines, so this appears at the top of the
|
||||
[Markdown file](https://raw.githubusercontent.com/jeffpar/pcjs/master/index.md):
|
||||
|
||||
machines:
|
||||
- type: pc
|
||||
|
|
@ -92,13 +92,21 @@ FDC `autoMount` setting, making it easy to reuse the same machine XML file with
|
|||
- type: pc
|
||||
id: deskpro386
|
||||
debugger: true
|
||||
config: /devices/pc/machine/compaq/deskpro386/ega/4096kb/machine.xml
|
||||
autoMount:
|
||||
A:
|
||||
path: /disks/pc/os2/misc/football/FOOTBALL-76817.json
|
||||
config: /devices/pc/machine/compaq/deskpro386/ega/4096kb/machine.xml
|
||||
|
||||
`messages`, `state`, and `autoPower` are some other settings that can be overridden, and support for more can
|
||||
easily be added.
|
||||
Other settings that can currently be overridden include:
|
||||
|
||||
+ `autoPower`
|
||||
+ `drives`
|
||||
+ `messages`
|
||||
+ `state`
|
||||
|
||||
Additional overrides will be added as needed. See the [Windows 95 Demo](/disks/pc/windows/win95/4.00.950/)
|
||||
machine and its associated [Markdown file](https://raw.githubusercontent.com/jeffpar/pcjs/master/disks/pc/windows/win95/4.00.950/README.md)
|
||||
for more override examples, including how to set `autoMount` to *not* mount any diskettes.
|
||||
|
||||
I will continue to include a Node web server with the PCjs project, but it's now intended for development
|
||||
purposes only (not production servers). I've updated the PCjs MarkOut component to parse any "Front Matter"
|
||||
|
|
|
|||
|
|
@ -10,4 +10,5 @@ COMPAQ DeskPro 386 Machines
|
|||
* [COMPAQ DeskPro 386 with 2Mb RAM and COMPAQ EGA](ega/2048kb/)
|
||||
* [COMPAQ DeskPro 386 with 4Mb RAM and COMPAQ EGA](ega/4096kb/)
|
||||
* [COMPAQ DeskPro 386 with 2Mb RAM and IBM VGA](vga/2048kb/)
|
||||
* [COMPAQ DeskPro 386 with 4Mb RAM and IBM VGA, running Windows 95](vga/4096kb/)
|
||||
* [COMPAQ DeskPro 386 with 4Mb RAM and IBM VGA](vga/4096kb/)
|
||||
* [COMPAQ DeskPro 386 with 4Mb RAM and IBM VGA running Windows 95](/disks/pc/windows/win95/4.00.950/)
|
||||
|
|
|
|||
|
|
@ -8,7 +8,4 @@ machines:
|
|||
debugger: true
|
||||
---
|
||||
|
||||
Windows 95 Test Machine
|
||||
---
|
||||
|
||||
{% include machine.html id="deskpro386" %}
|
||||
|
|
@ -2,18 +2,18 @@
|
|||
<?xml-stylesheet type="text/xsl" href="/versions/pcjs/1.21.1/machine.xsl"?>
|
||||
<machine id="deskpro386" class="pc" border="1" pos="center" background="#FAEBD7">
|
||||
<name pos="center">COMPAQ DeskPro 386, 4Mb RAM, IBM VGA, 20Mb Hard Disk</name>
|
||||
<computer id="deskpro386-vga-4096k" name="COMPAQ DeskPro 386" buswidth="32" state="/devices/pc/machine/compaq/deskpro386/vga/4096kb/state.json"/>
|
||||
<computer id="deskpro386-vga-4096k" name="COMPAQ DeskPro 386" buswidth="32"/>
|
||||
<cpu id="cpu386" model="80386" autostart="true"/>
|
||||
<ram id="ramLow" addr="0x00000" test="false" size="0xa0000" comment="ROM BIOS memory test has been disabled"/>
|
||||
<ram id="ramCPQ" addr="0xfa0000" size="0x60000" comment="COMPAQ memory at 0xFA0000"/>
|
||||
<ram id="ramExt" addr="0x100000" size="0x300000" comment="Extended memory at 0x100000"/>
|
||||
<rom id="romBIOS" addr="0xf8000" size="0x8000" alias="[0xf0000,0xffff0000,0xffff8000]" file="/devices/pc/rom/compaq/bios/deskpro386/1988-01-28/1988-01-28.json"/>
|
||||
<video ref="/devices/pc/video/ibm/vga/1986-10-27/256kb-autolockfs.xml"/>
|
||||
<fdc ref="/disks/pc/compiled/library.xml" automount=''/>
|
||||
<fdc ref="/disks/pc/compiled/library.xml" automount='{A: {name: "PC-DOS 3.30 (Disk 1)", path: "/disks/pc/dos/ibm/3.30/PCDOS330-DISK1.json"}, B: {name: "PC-DOS 3.30 (Disk 2)", path: "/disks/pc/dos/ibm/3.30/PCDOS330-DISK2.json"}}'/>
|
||||
<keyboard id="keyboard"/>
|
||||
<debugger id="debugger" messages="" commands=''/>
|
||||
<panel ref="/devices/pc/panel/wide386.xml"/>
|
||||
<hdc id="hdcAT" type="at" drives='[{name:"68Mb Hard Disk",type:4,path:"http://archive.pcjs.org/disks/pc/fixed/68mb/win95.json"}]'/>
|
||||
<hdc id="hdcAT" type="at" drives='[{name:"20Mb Hard Disk",type:2,path:"/disks/pc/fixed/20mb/pcdos330-empty.json"}]'/>
|
||||
<chipset id="chipset" model="deskpro386" floppies="[1200,1200]" monitor="vga"/>
|
||||
<serial id="com1" adapter="1"/>
|
||||
<serial id="com2" adapter="2" binding="print"/>
|
||||
|
|
|
|||
|
|
@ -6,11 +6,11 @@ machines:
|
|||
- id: deskpro386
|
||||
type: pc
|
||||
debugger: true
|
||||
config: /devices/pc/machine/compaq/deskpro386/ega/4096kb/machine.xml
|
||||
autoMount:
|
||||
A:
|
||||
path: /disks/pc/os2/misc/football/FOOTBALL-76817.json
|
||||
messages: warn
|
||||
config: /devices/pc/machine/compaq/deskpro386/ega/4096kb/machine.xml
|
||||
---
|
||||
|
||||
OS/2 FOOTBALL Boot Disk (v7.68.17)
|
||||
|
|
|
|||
|
|
@ -6,7 +6,10 @@ machines:
|
|||
- type: pc
|
||||
id: deskpro386
|
||||
debugger: true
|
||||
state: deskpro386.json
|
||||
config: /devices/pc/machine/compaq/deskpro386/vga/4096kb/machine.xml
|
||||
drives: '[{name:"68Mb Hard Disk",type:4,path:"http://archive.pcjs.org/disks/pc/fixed/68mb/win95.json"}]'
|
||||
autoMount: ''
|
||||
---
|
||||
|
||||
Microsoft Windows 95 (First Retail Release)
|
||||
|
|
|
|||
|
|
@ -11,7 +11,7 @@
|
|||
|
||||
<xsl:variable name="MACHINECLASS">pc</xsl:variable>
|
||||
<xsl:variable name="APPCLASS">pcjs</xsl:variable>
|
||||
<xsl:variable name="APPVERSION">1.21.0</xsl:variable>
|
||||
<xsl:variable name="APPVERSION">1.21.1</xsl:variable>
|
||||
<xsl:variable name="SITEHOST">www.pcjs.org</xsl:variable>
|
||||
|
||||
<xsl:template name="componentStyles">
|
||||
|
|
|
|||
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
|
|
@ -333,6 +333,7 @@ MarkOut.aHTMLEntities = {
|
|||
* 'template' (eg, "machine.xsl")
|
||||
* 'uncompiled' (eg, true)
|
||||
* 'autoMount' (eg, {"A":{"name":"OS/2 FOOTBALL Boot Disk (v7.68.17)","path":"/disks/pc/os2/misc/football/debugger/FOOTBALL-7.68.17.json"}})
|
||||
* 'drives' (eg, [{name:"68Mb Hard Disk",type:4,path:"http://archive.pcjs.org/disks/pc/fixed/68mb/win95.json"}])
|
||||
* 'parms'
|
||||
*
|
||||
* Non-reserved properties include:
|
||||
|
|
@ -356,7 +357,7 @@ MarkOut.aHTMLEntities = {
|
|||
MarkOut.aFMBooleanMachineProps = {
|
||||
'autopower': "autoPower"
|
||||
};
|
||||
MarkOut.aFMReservedMachineProps = ['id', 'name', 'type', 'debugger', 'config', 'template', 'uncompiled', 'autoMount', 'parms'];
|
||||
MarkOut.aFMReservedMachineProps = ['id', 'name', 'type', 'debugger', 'config', 'template', 'uncompiled', 'autoMount', 'drives', 'parms'];
|
||||
|
||||
/**
|
||||
* convertMD()
|
||||
|
|
@ -480,6 +481,7 @@ MarkOut.prototype.convertMD = function(sIndent)
|
|||
/*
|
||||
* Any "non-reserved" properties are now merged into the 'parms' property; 'autoMount'
|
||||
* is treated as reserved only because it must be encoded as an object rather than a string.
|
||||
* Ditto for 'drives'.
|
||||
*/
|
||||
machine['parms'] = '{';
|
||||
for (sProp in machine) {
|
||||
|
|
@ -491,7 +493,19 @@ MarkOut.prototype.convertMD = function(sIndent)
|
|||
machine['parms'] += sProp + ':"' + machine[sProp] + '",';
|
||||
}
|
||||
}
|
||||
machine['parms'] += 'autoMount:' + machine['autoMount'] + '}';
|
||||
var sDrives = machine['drives'];
|
||||
if (sDrives) {
|
||||
var matchQuotes = sDrives.match(/(['"])(.*)\1/);
|
||||
if (matchQuotes) {
|
||||
sDrives = matchQuotes[2];
|
||||
if (!sDrives) {
|
||||
sDrives = '[]';
|
||||
} else {
|
||||
sDrives = sDrives.replace(/'/g, '"');
|
||||
}
|
||||
}
|
||||
}
|
||||
machine['parms'] += 'autoMount:' + (machine['autoMount'] || "null") + ',drives:' + (sDrives || "null") + '}';
|
||||
if (id) this.aMachineDefs[id] = machine;
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -88,21 +88,11 @@ function HDC(parmsHDC) {
|
|||
|
||||
this.aDriveConfigs = [];
|
||||
|
||||
if (parmsHDC['drives']) {
|
||||
try {
|
||||
/*
|
||||
* The most likely source of any exception will be right here, where we're parsing
|
||||
* the JSON-encoded drive data.
|
||||
* We used to eval() sDriveConfigs immediately, but now we wait until initBus()
|
||||
* is called, so that we can check for any machine overrides.
|
||||
*/
|
||||
this.aDriveConfigs = eval("(" + parmsHDC['drives'] + ")");
|
||||
/*
|
||||
* Nothing more to do with aDriveConfigs now. initController() and autoMount() (if there are
|
||||
* any disk image "path" properties to process) will take care of the rest.
|
||||
*/
|
||||
} catch (e) {
|
||||
Component.error("HDC drive configuration error: " + e.message + " (" + parmsHDC['drives'] + ")");
|
||||
}
|
||||
}
|
||||
this.sDriveConfigs = parmsHDC['drives'];
|
||||
|
||||
/*
|
||||
* Set fATC (AT Controller flag) according to the 'type' parameter. This in turn determines other
|
||||
|
|
@ -112,7 +102,7 @@ function HDC(parmsHDC) {
|
|||
this.fATC = (parmsHDC['type'] == "at");
|
||||
|
||||
/*
|
||||
* The remainder of HDC initialization now takes place in our initBus() handler
|
||||
* The remainder of HDC initialization now takes place in our initBus() handler.
|
||||
*/
|
||||
}
|
||||
|
||||
|
|
@ -586,6 +576,26 @@ HDC.prototype.initBus = function(cmp, bus, cpu, dbg)
|
|||
this.dbg = dbg;
|
||||
this.cmp = cmp;
|
||||
|
||||
var aDriveConfigs = cmp.getMachineParm('drives');
|
||||
if (aDriveConfigs) {
|
||||
this.aDriveConfigs = aDriveConfigs;
|
||||
}
|
||||
else if (this.sDriveConfigs) {
|
||||
try {
|
||||
/*
|
||||
* The most likely source of any exception will be right here, where we're parsing
|
||||
* the JSON-encoded drive data.
|
||||
*/
|
||||
this.aDriveConfigs = eval("(" + this.sDriveConfigs + ")");
|
||||
/*
|
||||
* Nothing more to do with aDriveConfigs now. initController() and autoMount() (if there are
|
||||
* any disk image "path" properties to process) will take care of the rest.
|
||||
*/
|
||||
} catch (e) {
|
||||
Component.error("HDC drive configuration error: " + e.message + " (" + this.sDriveConfigs + ")");
|
||||
}
|
||||
}
|
||||
|
||||
/*
|
||||
* We need access to the ChipSet component, because we need to communicate with
|
||||
* the PIC and DMA controller.
|
||||
|
|
|
|||
Loading…
Reference in a new issue