LoadDskF/SaveDskF
(Created page with "{{FormatInfo |formattype=electronic |subcat=Disk Image Formats |extensions={{ext|dsk}}, {{ext|1dk}}, {{ext|2dk}}, ... }} '''LoadDskF''' and '''SaveDskF''' are floppy disk imag...") |
|||
(8 intermediate revisions by 4 users not shown) | |||
Line 7: | Line 7: | ||
It most likely contains an image of a [[FAT12]] filesystem. | It most likely contains an image of a [[FAT12]] filesystem. | ||
− | |||
− | |||
== Format details == | == Format details == | ||
− | The LoadDskF documentation says "all diskette sectors are written up to and including the highest occupied data sector". So, uncompressed files can | + | The LoadDskF documentation says "all diskette sectors are written [to the image file] up to and including the highest occupied data sector". So, uncompressed files can be converted to raw [[FAT]]/[[IMA]] format by deleting the header, and appending padding if needed. |
+ | |||
+ | === File structure === | ||
+ | The following information is from a [https://www.vcfed.org/forum/forum/technical-support/vintage-computer-software/13222-savedskf-exe-meaning-of-1-sector-leader#post183877 forum post]. | ||
+ | <pre> | ||
+ | +0 DW magic [all words are in Intel little-endian order] | ||
+ | 0x5AAA => Compressed | ||
+ | 0x59AA => No compression | ||
+ | 0x58AA => Older format (no compression), with sector data | ||
+ | beginning at fixed offset 0x200 rather than immediately | ||
+ | after the comment. Created by SAVEDSKF with the | ||
+ | undocumented /C option. | ||
+ | |||
+ | (In fact, LOADDSKF accepts any magic number in the range | ||
+ | 58AAh-5AAAh, but these are the ones SAVEDSKF generates). | ||
+ | |||
+ | +2 DW media type | ||
+ | The first byte of the FAT. | ||
+ | +4 DW sector size, bytes | ||
+ | +6 DB cluster mask | ||
+ | The number of sectors per cluster, minus 1. | ||
+ | +7 DB cluster shift | ||
+ | = log2(cluster size / sector size) | ||
+ | +8 DW reserved sectors | ||
+ | As in the BIOS parameter block | ||
+ | +10 DB FAT copies | ||
+ | As in the BIOS parameter block | ||
+ | +11 DW Root directory entries | ||
+ | As in the BIOS parameter block | ||
+ | +13 DW Sector number of first cluster (ie, count of sectors used by boot | ||
+ | sector, FATs and root directory) | ||
+ | +15 DW Number of clusters in image. This is probably less than the number of | ||
+ | clusters the disc can hold, since empty clusters at the end are not | ||
+ | saved. | ||
+ | +17 DB sectors/FAT | ||
+ | As in the BIOS parameter block | ||
+ | +18 DW Sector number of root directory (ie, count of sectors used by | ||
+ | boot sector and FATs) | ||
+ | +20 DD checksum | ||
+ | Sum of all bytes in the file. | ||
+ | +24 DW cylinders | ||
+ | Number of cylinders, 40 or 80 | ||
+ | +26 DW heads | ||
+ | Number of heads, 1 or 2 | ||
+ | +28 DW sectors/track | ||
+ | Number of sectors per track | ||
+ | +30 DB 0,0,0,0 | ||
+ | Do not appear to be used. | ||
+ | +34 DW number of sectors in image | ||
+ | +36 DW offset to comment | ||
+ | +38 DW offset to the first sector. If this is 0, assume it is 0x200. | ||
+ | |||
+ | After the header, an ASCII comment may follow. | ||
+ | |||
+ | The sectors then follow, stored in cylinder/head/sector order. If the magic | ||
+ | number is 5AAAh, the data will be compressed using a 12-bit LZW scheme. | ||
+ | </pre> | ||
+ | |||
+ | === Compression scheme === | ||
+ | The compression scheme is the same [[LZW]] scheme used by [[OS/2 PACK archive]]. | ||
+ | |||
+ | === Checksum === | ||
+ | The checksum is derived from the payload data, interpreted as an array of 16-bit little-endian integers. If the file is compressed, it is based on the decompressed data. | ||
== Identification == | == Identification == | ||
Line 19: | Line 79: | ||
New format compressed files start with {{magic|0xaa 0x5a}}. | New format compressed files start with {{magic|0xaa 0x5a}}. | ||
+ | |||
+ | The value of the media descriptor byte is stored as 2 byte integer at offset two. | ||
+ | So the upper byte of the media type at offset 3 is not used and therefore always seems to contain the value 0. | ||
+ | |||
+ | The number of cylinders is stored as a 2-byte integer at offset 24. | ||
+ | Relatively small values appear here, with these often hovering around 40 or 80. | ||
+ | Since the mid-nineties there exist super floppy disks with a capacity of several hundred MB with a correspondingly large number of cylinders in the thousands. | ||
+ | Since the software for creating such disk images was designed for operation under DOS or OS/2 before that time, | ||
+ | you will not find such high cylinder values in real examples. | ||
+ | |||
+ | The number of heads is stored as a 2-byte integer at offset 26. | ||
+ | Only relatively small values like one or two appear here. | ||
+ | |||
+ | At offset 30 there are four bytes which are apparently not used and probably therefore always contain the value zero. | ||
== Software == | == Software == | ||
Line 25: | Line 99: | ||
* [http://www.os2site.com/sw/util/disk/floppy/dskxtr13.zip DSKXTRCT] - Exracts files (uncompressed disk images only) (OS/2 software) | * [http://www.os2site.com/sw/util/disk/floppy/dskxtr13.zip DSKXTRCT] - Exracts files (uncompressed disk images only) (OS/2 software) | ||
* [http://www.os2site.com/sw/util/disk/floppy/dskdcmps.zip dskdcmps] - Decompresses compressed disk images (source code) | * [http://www.os2site.com/sw/util/disk/floppy/dskdcmps.zip dskdcmps] - Decompresses compressed disk images (source code) | ||
+ | * {{Deark}} - Can convert to raw, decompress (based on dskdcmps), etc. | ||
* {{CdTextfiles|swextrav4/swextrav4-4/os2utilf/makedskf.zip|MAKEDSKF}} - Utility for creating disk images (OS/2 software) | * {{CdTextfiles|swextrav4/swextrav4-4/os2utilf/makedskf.zip|MAKEDSKF}} - Utility for creating disk images (OS/2 software) | ||
+ | * [[7-Zip]]'s support for FAT is robust enough that it can often handle uncompressed LoadDskF files. | ||
== Sample files == | == Sample files == | ||
* {{CdTextfilesURL|hobbesos2/2_1/SERVPAK/}} - Old format | * {{CdTextfilesURL|hobbesos2/2_1/SERVPAK/}} - Old format | ||
− | * https://archive.org/details/IBMOS22.11XR06200EnglishDiskettes | + | * https://archive.org/details/IBMOS22.11XR06200EnglishDiskettes → "IBM OS2 2.11 - XR06200 - English - Diskettes.zip" → *.DSK - Examples of new format, uncompressed |
* https://archive.org/details/OS2_Install_Disks → OS2_W3B-D1CD_2000-03-19.zip → DISK1.DSK - Example of compressed format | * https://archive.org/details/OS2_Install_Disks → OS2_W3B-D1CD_2000-03-19.zip → DISK1.DSK - Example of compressed format | ||
+ | * {{DexvertSamples|archive/ibmSaveDsk}} | ||
+ | |||
+ | ==Resources== | ||
+ | * [[Wikipedia:Design of the FAT file system|Wikipedia - FAT file system]] | ||
[[Category:IBM]] | [[Category:IBM]] | ||
[[Category:OS/2]] | [[Category:OS/2]] |
Latest revision as of 18:06, 17 March 2024
LoadDskF and SaveDskF are floppy disk imaging utilities by IBM. They have an associated file format, sometimes called DSK or SKF. The format was notably used for OS/2 service packs.
It most likely contains an image of a FAT12 filesystem.
Contents |
[edit] Format details
The LoadDskF documentation says "all diskette sectors are written [to the image file] up to and including the highest occupied data sector". So, uncompressed files can be converted to raw FAT/IMA format by deleting the header, and appending padding if needed.
[edit] File structure
The following information is from a forum post.
+0 DW magic [all words are in Intel little-endian order] 0x5AAA => Compressed 0x59AA => No compression 0x58AA => Older format (no compression), with sector data beginning at fixed offset 0x200 rather than immediately after the comment. Created by SAVEDSKF with the undocumented /C option. (In fact, LOADDSKF accepts any magic number in the range 58AAh-5AAAh, but these are the ones SAVEDSKF generates). +2 DW media type The first byte of the FAT. +4 DW sector size, bytes +6 DB cluster mask The number of sectors per cluster, minus 1. +7 DB cluster shift = log2(cluster size / sector size) +8 DW reserved sectors As in the BIOS parameter block +10 DB FAT copies As in the BIOS parameter block +11 DW Root directory entries As in the BIOS parameter block +13 DW Sector number of first cluster (ie, count of sectors used by boot sector, FATs and root directory) +15 DW Number of clusters in image. This is probably less than the number of clusters the disc can hold, since empty clusters at the end are not saved. +17 DB sectors/FAT As in the BIOS parameter block +18 DW Sector number of root directory (ie, count of sectors used by boot sector and FATs) +20 DD checksum Sum of all bytes in the file. +24 DW cylinders Number of cylinders, 40 or 80 +26 DW heads Number of heads, 1 or 2 +28 DW sectors/track Number of sectors per track +30 DB 0,0,0,0 Do not appear to be used. +34 DW number of sectors in image +36 DW offset to comment +38 DW offset to the first sector. If this is 0, assume it is 0x200. After the header, an ASCII comment may follow. The sectors then follow, stored in cylinder/head/sector order. If the magic number is 5AAAh, the data will be compressed using a 12-bit LZW scheme.
[edit] Compression scheme
The compression scheme is the same LZW scheme used by OS/2 PACK archive.
[edit] Checksum
The checksum is derived from the payload data, interpreted as an array of 16-bit little-endian integers. If the file is compressed, it is based on the decompressed data.
[edit] Identification
Old format files start with bytes 0xaa 0x58
.
New format uncompressed files start with 0xaa 0x59
.
New format compressed files start with 0xaa 0x5a
.
The value of the media descriptor byte is stored as 2 byte integer at offset two. So the upper byte of the media type at offset 3 is not used and therefore always seems to contain the value 0.
The number of cylinders is stored as a 2-byte integer at offset 24. Relatively small values appear here, with these often hovering around 40 or 80. Since the mid-nineties there exist super floppy disks with a capacity of several hundred MB with a correspondingly large number of cylinders in the thousands. Since the software for creating such disk images was designed for operation under DOS or OS/2 before that time, you will not find such high cylinder values in real examples.
The number of heads is stored as a 2-byte integer at offset 26. Only relatively small values like one or two appear here.
At offset 30 there are four bytes which are apparently not used and probably therefore always contain the value zero.
[edit] Software
- DIUNPACK Rel. 3.03 (1996-01-30) (OS/2 software)
- loaddf.zip - LoadDskF 1.16r (1993-01-14) and SaveDskF 1.14r (1992-05-26) - DOS and OS/2-compatible binaries; probably requires a floppy disk + drive.
- DSKXTRCT - Exracts files (uncompressed disk images only) (OS/2 software)
- dskdcmps - Decompresses compressed disk images (source code)
- Deark - Can convert to raw, decompress (based on dskdcmps), etc.
- MAKEDSKF - Utility for creating disk images (OS/2 software)
- 7-Zip's support for FAT is robust enough that it can often handle uncompressed LoadDskF files.
[edit] Sample files
- http://cd.textfiles.com/hobbesos2/2_1/SERVPAK/ - Old format
- https://archive.org/details/IBMOS22.11XR06200EnglishDiskettes → "IBM OS2 2.11 - XR06200 - English - Diskettes.zip" → *.DSK - Examples of new format, uncompressed
- https://archive.org/details/OS2_Install_Disks → OS2_W3B-D1CD_2000-03-19.zip → DISK1.DSK - Example of compressed format
- dexvert samples — archive/ibmSaveDsk