pcjs/docs/pcx86/fdc
Repository files (latest commit first)
Filename Latest commit message Latest commit date
2016-12-03 14:49:51 -08:00
..
README.md Numerous changes to make paper tape configurations more consistent with disk configurations. This allows all devices to share the machine-wide "autoMount" configuration object, now that the PC11 has a proper device name ("PTR"), making its properties distinguishable from those for RK11 and RL11 drives (eg, "RK0", "RL0", etc). And all the tape/disk components now use "Load" functions to connect a tape or disk to a device ("Attach" is deprecated). And finally, all tape/disk components now support operations to deposit their media directly into memory -- although in this case, the names of the operations are necessarily different: "Read" for tape images, "Boot" for disk images. The difference is partly historical convention but also reflects the fact that a "Boot" operation is more limited: paper tapes were designed to be completely loaded into memory, whereas bootable disks are designed for only the first sector to be loaded and executed. Also, paper tape images are now flagged as non-auto-starting, because they often require some user action (eg, loading another tape, setting some switches, etc), whereas disk boot sectors are flagged as auto-starting (see the fStart parameter of the loadImage() interface in the RAM component). 2016-12-03 14:49:51 -08:00

layout title permalink redirect_from
page PCx86 <fdc> Element /docs/pcx86/fdc/
/docs/pcjs/fdc/

PCx86 Floppy Drive Controller (FDC) Component

Format

<fdc>...</fdc>

Purpose

Creates an instance of the Floppy Drive Controller (FDC) component. The FDC is responsible for:

  • Automatically loading diskette image files at boot;
  • Simulating the appropriate controller hardware ports;
  • Providing user controls to display available diskettes and load/unload diskettes;
  • Saving/restoring all user diskette modifications in browser local storage.

Attributes

  • autoMount (optional)

    This is an object definition containing one or more drive-letter properties. Each drive-letter property should contain, in turn, another object definition with 'name' and 'path' properties. For example:

     '{A: {name: "PC-DOS 1.0", path: "pcdos-1.00.json"}}'
    

Also supports the attributes of Component.

Bindings

  • listDrives

    For use with a control of type list. The list will be populated automatically with a series of <option> elements based on the number of floppy drives, as determined by the SW1 settings obtained from the ChipSet component.

  • listDisks

    For use with a control of type list. This list must be manually populated, using <disk> tags. See the example below.

  • loadDisk

    For use with a control of type button, to load the selected diskette image into the selected drive. This control is also used to unload diskette images. Select the diskette you want to unload, then select "None" from the list of diskettes, and click this button.

Example

<fdc id="fdcNEC" autoMount="'{A: {name: "PC-DOS 1.0", path: "pcdos-1.00.json"}}'">
    <control type="container">
        <control type="list" class="input" binding="listDrives"/>
        <control type="list" class="input" binding="listDisks">
            <disk path="pcdos-1.00.json">PC-DOS 1.0</disk>
        </control>
        <control type="button" class="input" binding="loadDisk">Load</control>
    </control>
</fdc>

Output

<div id="..." class="pc-fdc pc-component">
    <div class="pc-container">
        <div class="pcx86-fdc" data-value="id:'...',name:'...',listDrives:'...',listDisks:'...',loadDisk:'...'">
        </div>
    </div>
</div>

Also, if any controls are defined, another <div> of class="pc-controls" is created in the container <div>, with each control inside a <div> of class="pc-control".

[Return to PCx86 Documentation]