Machine Configuration Overrides
This release provides the ability to override selected properties of a machine XML configuration file.
For example, if you have a machine that auto-mounts a specific diskette in drive A, and you want to use that same machine on other pages with different preloaded diskettes, you can override the machine's autoMount property, by calling the embedPC() function with a parms object containing a new value for the property you wish to override.
For pages on the PCjs website, that happens automatically whenever an autoMount value is specified in the machines section of the page's Front Matter; eg:
---
layout: page
title: PC-DOS 1.00
permalink: /disks/pc/dos/ibm/1.00/
machines:
- type: pc
id: ibm5150-pcdos100
config: /devices/pc/machine/5150/mda/64kb/machine.xml
autoMount:
A:
name: PC-DOS 1.00
path: /disks/pc/dos/ibm/1.00/PCDOS100.json
---
That's all there is to it. The path property is required, and it must match the path of a disk image stored in the machine's disk XML file. The name property is optional, and in general, it's probably best to omit name, because if no disk with the same path AND name can be found, the auto-mount operation will fail.
The documentation for the embedPC() function will be updated eventually, along with a list of other machine XML properties that can be overridden in similar fashion.