Updated Disks README

This commit is contained in:
Jeff Parsons 2014-11-03 08:45:57 -08:00 • committed by jeffpar
commit 766f31263b

View file

@ -9,32 +9,36 @@ Below are selected Disk Sets featuring "Ready-to-Boot" machine configurations:
You can browse the rest of our disk archives by type. There is no search capability at this time. You can browse the rest of our disk archives by type. There is no search capability at this time.
Learn more about PCjs disk image formats [here](/disks/). ### Disk Sets and Manifests
Disk Sets Collections of related disks are organized into *Disk Sets* which can then be loaded from the
--- [FDC (Floppy Disk Controller)](/docs/pcjs/fdc/) component of an [IBM PC Machine Configuration](/devices/pc/machine/).
Disks can be organized into *Disk Sets* (manifests) which can then be loaded by the FDC component of Disk Sets are stored in their own folders, along with a **manifest.xml** file listing the individual diskettes.
[IBM PC Machine Configurations](/devices/pc/machine/). Manifests also record a variety of metadata about the software; more information about the manifest format
is available in [Application Archives](/apps/).
### Example A simple FDC XML file, such as [samples.xml](samples.xml), *could* contain <disk> entries like:
An FDC (Floppy Disk Controller) XML file, such as [samples.xml](samples.xml), typically contains <disk> entries like:
<disk path="/disks/pc/dos/ibm/1.00/PCDOS100.json">PC-DOS 1.0</disk> <disk path="/disks/pc/dos/ibm/1.00/PCDOS100.json">PC-DOS 1.0</disk>
<disk path="/disks/pc/dos/ibm/1.10/PCDOS110.json">PC-DOS 1.1</disk> <disk path="/disks/pc/dos/ibm/1.10/PCDOS110.json">PC-DOS 1.1</disk>
<disk path="/disks/pc/dos/ibm/2.00/PCDOS200-DISK1.json">PC-DOS 2.0 (Disk 1)</disk> <disk path="/disks/pc/dos/ibm/2.00/PCDOS200-DISK1.json">PC-DOS 2.0 (Disk 1)</disk>
<disk path="/disks/pc/dos/ibm/2.00/PCDOS200-DISK2.json">PC-DOS 2.0 (Disk 2)</disk> <disk path="/disks/pc/dos/ibm/2.00/PCDOS200-DISK2.json">PC-DOS 2.0 (Disk 2)</disk>
<disk path="/disks/pc/games/microsoft/adventure/adventure-1981.json">Microsoft Adventure</disk> ...
<disk path="/apps/pc/1981/visicalc/disk.json" href="http://www.bricklin.com/history/vclicense.htm" desc="VisiCalc License">VisiCalc</disk>
However, if you wanted to load VisiCalc directly from the /apps folder, rather than using a pre-generated disk image, listing all the diskettes available for the machine to load. However, listing individual diskettes is tedious,
you could do that with an &lt;manifest&gt; entry that references the application's manifest.xml: so the FDC also supports **manifest.xml** files. Instead of listing the PC-DOS 2.0 diskettes individually,
they can be added to [samples.xml](samples.xml) with a single line:
<manifest ref="/disks/pc/dos/ibm/2.00/manifest.xml" disk="*"/>
The same feature works with [Application Manifests](/apps/#software-application-manifests). Here's how you might
add [VisiCalc](/apps/pc/1981/visicalc/) to [samples.xml](samples.xml):
<manifest ref="/apps/pc/1981/visicalc/manifest.xml" disk="disk"/> <manifest ref="/apps/pc/1981/visicalc/manifest.xml" disk="disk"/>
The application must have a **manifest.xml** with &lt;disk&gt; section containing an *id* value that matches the *disk* value The application must have a **manifest.xml** with &lt;disk&gt; section containing an *id* value that matches the
specified above: *disk* value specified above:
<disk id="disk" dir="/apps/pc/1981/visicalc/bin/"> <disk id="disk" dir="/apps/pc/1981/visicalc/bin/">
<file>VC.COM</file> <file>VC.COM</file>
@ -49,8 +53,8 @@ If multiple disks are defined in the manifest, and you want to include them all,
As an added bonus, PCjs will automatically display the descriptive &lt;link&gt; whenever this item is selected, and it will As an added bonus, PCjs will automatically display the descriptive &lt;link&gt; whenever this item is selected, and it will
dynamically generate a disk image containing all the specified &lt;file&gt; entries when the selected item is loaded. dynamically generate a disk image containing all the specified &lt;file&gt; entries when the selected item is loaded.
Pre-generated images are still preferred, and you can now include those in the application **manifest.xml** as well, by adding Pre-generated disk images are preferred to dynamically-generated images, and you can now include those in the application
an *href* value to the &lt;disk&gt; section that was used to create the image: **manifest.xml** as well, by adding an *href* value to the &lt;disk&gt; section that was used to create the image:
<disk id="disk" dir="/apps/pc/1981/visicalc/bin/" href="/apps/pc/1981/visicalc/disk.json"> <disk id="disk" dir="/apps/pc/1981/visicalc/bin/" href="/apps/pc/1981/visicalc/disk.json">
<file>VC.COM</file> <file>VC.COM</file>
@ -58,9 +62,9 @@ an *href* value to the &lt;disk&gt; section that was used to create the image:
<link href="http://www.bricklin.com/history/vclicense.htm">VisiCalc License</link> <link href="http://www.bricklin.com/history/vclicense.htm">VisiCalc License</link>
</disk> </disk>
The PCjs DiskDump module is used to create all our pre-generated JSON-encoded disk images. In the above example, a The PCjs [DiskDump](/my_modules/diskdump/) module is used to create all our pre-generated JSON-encoded disk images.
pre-generated disk image could be created from the command-line with either the "--dir" option (which will traverse all In the above example, a pre-generated disk image could be created from the command-line with either the "--dir" option
subdirectories as well): (which will traverse all subdirectories as well):
node diskdump --dir=./apps/pc/1981/visicalc/bin/ --format=json --output=./apps/pc/1981/visicalc/disk.json node diskdump --dir=./apps/pc/1981/visicalc/bin/ --format=json --output=./apps/pc/1981/visicalc/disk.json
@ -71,3 +75,5 @@ or with the "--path" option, which specifies either a single file or a set files
or via the PCjs server's DiskDump API: or via the PCjs server's DiskDump API:
http://www.pcjs.org/api/v1/dump?path=/apps/pc/1981/visicalc/bin/vc.com&format=json http://www.pcjs.org/api/v1/dump?path=/apps/pc/1981/visicalc/bin/vc.com&format=json
Learn more about PCjs disk image formats [here](/disks/).