LoadDskF/SaveDskF

From Just Solve the File Format Problem
(Difference between revisions)
Jump to: navigation, search
(Sample files)
 
(4 intermediate revisions by one user not shown)
Line 11: Line 11:
  
 
== 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 probably be converted to raw [[FAT]]/[[IMA]] format by deleting the header, and appending padding if needed.
+
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 =&gt; Compressed
 +
            0x59AA =&gt; No compression
 +
            0x58AA =&gt; 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>
  
 
== Identification ==
 
== Identification ==
Line 25: Line 81:
 
* [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]] can often handle uncompressed LoadDskF files, using its generic support for FAT.
+
* [[7-Zip]]'s support for FAT is robust enough that it can often handle uncompressed LoadDskF files.
  
 
== Sample files ==
 
== Sample files ==
Line 32: Line 89:
 
* https://archive.org/details/IBMOS22.11XR06200EnglishDiskettes → "IBM OS2 2.11 - XR06200 - English - Diskettes.zip" → *.DSK - Examples of new format, uncompressed
 
* 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
 +
* https://telparia.com/fileFormatSamples/archive/ibmSaveDsk/
 +
  
 
[[Category:IBM]]
 
[[Category:IBM]]
 
[[Category:OS/2]]
 
[[Category:OS/2]]

Latest revision as of 20:17, 13 September 2021

File Format
Name LoadDskF/SaveDskF
Ontology
Extension(s) .dsk, .1dk, .2dk, ...

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.

Some files are compressed. The compression scheme is some form of LZW.

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] 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.

[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

Personal tools
Namespaces

Variants
Actions
Navigation
Toolbox