LIBDSK homepage (original) (raw)
[ Introduction | Linux floppy support |Changelog |Information |Download |Lib765 |Diskette Tools |Serial Port Server ]
LIBDSK page
LIBDSK is a library for accessing floppy discs and disc image files. It is intended for use in:
- Emulator tools - converting between real floppy discs and disc images, as CPCTRANS / PCWTRANS do under DOS.
- Filesystem utilities - CPMTOOLS is configurable to use LIBDSK, thus allowing the use of CPMTOOLS on emulator .DSK images. To do this, install LIBDSK and then build CPMTOOLS, using "./configure --with-libdsk". For CPMTOOLS 1.9 or 2.0, you will also need to apply this patch.
- Emulators - it is possible to use LIBDSK as part of an emulator's floppy controller emulation, thus giving the emulator transparent access to .DSK files or real discs.
Linux floppy support
In 2022, it was announced that Linux kernel support for raw floppy commands (FDRAWCMD) would be deprecated in Linux 5.18+ and removed altogether in a future release. If you want to use LIBDSK to access the floppy drive under Linux, you will need to do one of:
- Build a custom kernel with FDRAWCMD support (until it gets dropped altogether).
- Install an older Linux kernel that includes FDRAWCMD support.
New in 1.4.x
- Bugfixes: Corrected various faults in the IMD file driver.
- Added a 'complement' flag to the recording mode, allowing support of disk images where all bytes are stored complemented.
- New backend: JV3 (for TRS-80 disc images in the JV3 format) .
New in 1.5.x
Data loss warning: If you use the 'rcpmfs' driver with files that exceed 16k in size and are not an exact multiple of 128 bytes, you must update LibDsk to v1.5.18 or later, as earlier versions have been known to corrupt such files.
- New backend: D64 and D64CPM for disk images in Commodore 64 format. D64 is aimed at native C64 disks, D64CPM at disks used by the C64 CP/M cartridge.
- When converting to TD0 format, attempt to guess drive type (3.5" / 5.25") from drive geometry.
- When probing geometry on disc image files that do not record the data rate, prefer the rate specified in the boot sector.
- Fix for integer underflow issues in the POSIX / raw driver.
- The LDBS format has been updated to support round-trip compatibility with the further EDSK extensions.
- DSK, EDSK, ApriDisk, CFI, IMD, JV3, CopyQM and TeleDisk drivers have all been rewritten to use LDBS for intermediate storage.
- New utility: dskconv (convert a disc image file from one format to another)
- New backend: QRST (for the Compaq Quick Release Sector Transfer format)
- New backend: LDBS (for the LDBS format)
- New backend: SAP (for the System D'Archivage Pukall format)
- dskform(1) can create a blank FAT12 filesystem when formatting.
- New backends: gotek1440 and gotek720 (for accessing disc images on a Gotek-formatted USB drive)
- New utilities: lsgotek(1) lists the disc images present on a Gotek-formatted USB drive. dsklabel(1) can view or set the disk label on DOS, CP/M or Acorn DFS filesystems.
- New backend: dc42 for Apple Disk Copy 4.2
- QRST backend supports QRST v5 compression (read-only).
- Fix for geometry detection on LDBS backend where the sector size is not a power of 2.
- Gracefully handle disk images that report sector sizes greater than 32k.
- Fix for APRIDISK driver, which had not been working since rewrite in 1.5.3
- New disk image format: LDBST (LDBS as human-readable text)
- dsktrans(1): The -md3 option now supports 180k MicroDesign floppies.
- Bugfix in the rcpmfs driver: When generating a directory entry, do not allow RC to exceed 80h.
- Bugfix in the rcpmfs driver: Fixed corruption of files greater than 16k with a file size not a multiple of 128 bytes.
- Fix to the CopyQM driver allowing it to handle disk images where the number of tracks stored is less than the number of tracks in total.
- New dskparse(1) utility allowing a diagnostic dump of most disk image types.
- New disk image format: D88.
- Bug fix: dskparse showed the wrong data when parsing RLE sequences in the CopyQM driver [Ralf-Peter Nerlich]
- Made the geometry detection of Opus Discovery disc images more discerning.
- Teledisk compression: Detect and reject disc images compressed with the 'Old advanced' method.
Disc types supported
LIBDSK has drivers for:
- Raw files (including /dev/fdn).
- Raw files, rearranged into logical filesystem order.
- .DSK files, as used in CPCEMU, JOYCE and other Sinclair/Amstrad emulators.
- MYZ80 hard drive image files.
- NanoWasp floppy image files.
- .CFI (Compressed Floppy Image) files, as created by FDCOPY.COM under DOS.
- The Linux floppy drive (supports CPC System and Data formats, which the standard "Raw file" driver does not).
- The Windows 3.x/95/98/ME/NT/2000 floppy drive.
- The DOS floppy drive (via the PC BIOS).
- CopyQM files
- TeleDisk files
- Compaq QRST files
- APRIDISKimage files
- The LDBS format
- rcpmfs - a backend that makes a Unix/Windows directory appear to be a CP/M disc image.
- Another instance of LibDsk over a serial line.
Download
Stable Version
Stable version: libdsk-1.4.2.tar.gz
LibDsk 1.4.2 executables for Windows
LibDsk 1.4.0 executables for DOS
Development Version
Development version: libdsk-1.5.21.tar.gz
LibDsk 1.5.21 executables for Windows
LibDsk 1.5.21 executables for DOS
Packages
Debian packages by Darren Salt.
Packages for Fedora Core 2 and Redhat 9 by Ian Chapman.
LIB765
Lib765 is the floppy controller emulation from JOYCE, separately packaged. It is (in some sense) the reverse of LibDsk; it converts uPD765a commands into LibDsk API calls. It should come in handy if you're writing a PCW, CPC or Spectrum+3 emulator; if you want to use it in a PC emulator, you'll need to add features such as DMA.
New in v0.4.x
- (v0.4.2) Increased buffer size to fix multisector reads on high-density disc images.
- (v0.4.1) Removed spurious references to LIBDSK_EXPOSES_DIRTY.
- (v0.4.0) Initial support for multisector reads.
<lib765-0.4.2.tar.gz>
Diskette Tools
The Diskette Tools program is a GUI front-end to LibDsk. It doesn't do any more than the provided sample utilities, but it looks nicer.
<dsktool-1.0.5.tar.gz> (38k): Source code - suitable for Linux, Windows and probably other platforms. Requires wxWidgets to compile.
dsktool103.zip(1473k): Compiled version for Windows, including source code.
Serial Port Server
AUXD is a server for CP/M, allowing drives from CP/M systems to be made available to LibDsk over a serial link. Two versions are included - a generic CP/M server, and one for Amstrad PCW/CPC/Spectrum +3 CP/M.
<auxd.zip> (62k) - source code and compiled programs.
John Elliott2024-11-11