Changed the last embedPC() parameter from sStateFile to sParms, although for backward compatibility, if sParms is not a JSON object definition (ie, beginning with a brace), it continues to be treated as a state filename.

This change allows us to pass any number of additional properties to embedPC(), which in turn can override properties contained in the XML file; the only property overrides currently supported are 'state' (which overrides any 'state' property set in the XML's <computer> element) and 'automount' (which overrides any 'automount' property set in the XML's <fdc> element).  The goal is to make it easier to reuse XML machine definitions, by allowing commonly altered component attributes to be overridden.
This commit is contained in:
Jeff Parsons 2016-01-18 16:11:08 -08:00
commit 12b760f912
28 changed files with 2187 additions and 2059 deletions

View file

@ -1,7 +1,6 @@
<?xml version="1.0" encoding="UTF-8"?>
<keyboard id="keyboard" padleft="8px">
<control type="button" binding="esc">ESC</control>
<control type="button" binding="ctrl-c">CTRL-C</control>
<control type="button" binding="f1">F1</control>
<control type="button" binding="f10">F10</control>
</keyboard>

View file

@ -37,8 +37,13 @@ Machines from our [IBM PC Application Archive](/apps/pc/):
And here are some machines from our [IBM PC Disk Archive](/disks/pc/):
* [CP/M-86 v1.1B](/disks/pc/cpm/1.1b/)
* [PC-DOS 1.00](/disks/pc/dos/ibm/1.00/)
* [PC-DOS 1.10](/disks/pc/dos/ibm/1.10/)
* [Multitasking MS-DOS 4.00](/disks/pc/dos/microsoft/4.0M/)
* [IBM Diagnostics v2.20](/disks/pc/diags/ibm/2.20/)
* [IBM OS/2 1.0](/disks/pc/os2/ibm/1.0/)
* [OS/2 1.0 Debugger Boot Disk](/disks/pc/os2/misc/1.0/debugger/)
* [CP/M-86 v1.1B](/disks/pc/cpm/1.1b/)
* [Infocom Zork I](/disks/pc/games/infocom/zork1/)
---

View file

@ -3,16 +3,16 @@
<machine id="deskpro386" class="pc" border="1" pos="center" background="#FAEBD7">
<computer id="deskpro386-ega-2048k" name="Compaq DeskPro 386" buswidth="32"/>
<cpu id="cpu386" model="80386" autostart="false"/>
<ram id="ramLow" addr="0x00000" test="true" size="0xa0000" comment="ROM BIOS memory test has NOT been disabled"/>
<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="0x100000" comment="Extended memory at 0x100000"/>
<rom id="romEGA" addr="0xc0000" size="0x4000" file="/devices/pc/video/ibm/ega/ibm-ega.json" notify="videoEGA"/>
<rom id="romBIOS" addr="0xf8000" size="0x8000" alias="[0xf0000,0xffff0000,0xffff8000]" file="/devices/pc/bios/compaq/deskpro386/1988-01-28/1988-01-28.json"/>
<video ref="/devices/pc/video/ibm/ega/ibm-ega-128kb-autolockfs.xml"/>
<keyboard ref="/devices/pc/keyboard/keyboard-minimal-functions.xml"/>
<debugger id="debugger" messages="fault|port" commands=""/>
<panel ref="/devices/pc/panel/btpanel.xml"/>
<fdc ref="/disks/pc/library.xml" automount='{A: {name: "PC-DOS 3.00 (Disk 1)", path: "/disks/pc/dos/ibm/3.00/PCDOS300-DISK1.json"}, B: {name: "PC-DOS 3.00 (Disk 2)", path: "/disks/pc/dos/ibm/3.00/PCDOS300-DISK2.json"}}'/>
<debugger id="debugger" messages="fault" commands=""/>
<panel ref="/devices/pc/panel/wide386.xml"/>
<fdc ref="/disks/pc/library.xml" automount='{A: {name: "PC-DOS 3.20 (Disk 1)", path: "/disks/pc/dos/ibm/3.20/PCDOS320-DISK1.json"}, B: {name: "PC-DOS 3.20 (Disk 2)", path: "/disks/pc/dos/ibm/3.20/PCDOS320-DISK2.json"}}'/>
<hdcFoo id="hdcAT" type="at" drives='[{name:"20Mb Hard Disk",type:2}]'/>
<chipset id="chipset" model="deskpro386" floppies="[1200,1200]"/>
<serial id="com1" adapter="1"/>