A *.DSK file contains all sectors of a disk. A wide range of track/sector combinations is supported. Following table shows typical used disk formats:
Disk size [inch] | Sides | Density *) | Tracks | Sectors | File size [KByte] |
---|---|---|---|---|---|
5 1/4 | 1 | SD | 35 | 10 | 87.5 |
5 1/4 | 2 | SD | 35 | 20 | 175 |
5 1/4 | 1 | SD | 40 | 10 | 100 |
5 1/4 | 1 | DD | 40 | 18 | 180 |
5 1/4 | 2 | SD | 40 | 20 | 200 |
5 1/4 | 2 | DD | 40 | 36 | 360 |
5 1/4 | 1 | DD | 80 | 18 | 360 |
5 1/4 | 2 | SD | 80 | 20 | 400 |
5 1/4 | 2 | DD | 80 | 36 | 720 |
5 1/4 | 2 | QD | 80 | 72 | 1440 |
8 | 1 | SD | 77 | 15 | 288.75 |
8 | 1 | DD | 77 | 26 | 500.5 |
8 | 2 | SD | 77 | 30 | 577.5 |
8 | 2 | DD | 77 | 52 | 1001 |
**) | - | - | 255 | 255 | 16256.25 |
**) | - | - | 256 | 255 | 16320 |
*) SD = single density, DS = double density, QD = quad density
**) Harddisk
The sector size is always 256 Byte. The size of the file can simply be computed with <nr_of_tracks> * <nr_of_sectors> * 256 Byte. If the DSK-file is write protected the drive within flexemu is write protected too.
Optionally a JVC file header is supported. The header can contain 1 up to 5 bytes. flexemu supports the following JVC header values:
Byte offset | Description | Default | Supported values |
---|---|---|---|
0 | Sectors per track | - | 5-255 |
1 | Side count | 1 | 1,2 |
2 | Sector size code | 1 *) | 1 |
3 | First sector ID | 1 **) | 1 |
4 | Sector attr. flag | 0 ***) | 0 |
*) A sector size code of 1 means a sector size of 256 Byte
**) For FLEX compatibility the first sector ID always should be 1
***) Sector attribute flag should be 0 (A sector attribute byte is unsupported)
bytes | name | description |
---|---|---|
4 | magic_number | always 0x485C9A33 |
1 | write_protect | flag for write protection |
1 | size code | 128 * 2 ^ n Bytes/sector |
1 | sides0 | nr of sides on track 0 |
1 | sectors0 | nr of sect. on track 0 |
1 | sides | nr of sides on track != 0 |
1 | sectors | nr of sect. on track != 0 |
1 | tracks | nr of tracks total |
5 | dummy1 - dummy 5 | for stuffing |
The header allows to have a different number of sectors on track 0 as on other tracks. For the actual format look at struct s_flex_header.
The boot sector (on track 0, sector 1 and optionally sector 2) is contained in the file boot. If there is no such file the disk can't be booted. The link to FLEX.SYS will be generated dynamically by flexemu. The user does not have to care about it.
Version | Random file detection |
---|---|
< V3.22 | On a read-write directory disk random files are identified by the user execute attribute set (UNIX) or the hidden attribute set (Windows). On a read-only filesystem like a CDFS these attributes may not be available. So for any read-only directory disk a file random can be created containing the lowercase filenames of all random files. |
V3.22 | The bahaviour is the same as in older versions. Additionaly, to avoid crashes in flexemu in addition to the file attributes a file only is detected as random file if it has a size of three sectors minimum. FLEX does not support random files with one or two sectors. In addition the sector map of a random file is verified and has to be valid. |
≥ V3.25 |
The detection of random files used in older flexemu versions has some
downsides. It depends on file system capabilities, is a kind of misuse of
filesystem attributes and error phrone. For this reason a completly new
strategy is introduced. To decide which strategy to use the following checks are done in this order:
In flexplorer and dsktool also the directories used for injecting or extracting files a file .random is created and updated to support random file detection in these directories. |