Import/Export between DSK and PC Directory

Utility Name     Version   Date         Author       Home Site
TRSTools v1.08
TRSTools v1.13
March 21, 2016 Matthew Reed TRSTools Page
This is a utility that makes it easier to work with virtual disk images. Features Include:

  • Open an existing virtual disk image (including hard drives)
  • Create a new virtual disk image
  • Add files to or extract files from the disk image (with file dates preserved)
  • Integrated File Viewer to Preview files. Supported Views:
  •      • Text files, with any line ending
         • Tokenized Model III BASIC programs
         • Model III and Model 4 high-resolution images (/HR)
         • Model 4 compressed high-resolution images (/CHR)
         • Model 4 super-compressed high-resolution images (/SHR)
         • EDTASM source files
         • CMD program files, displayed as a Z80 disassembly
         • Binary files (which can be viewed as a hexadecimal dump)
         • MULTIDOS high-resolution images

  • Rename files
  • Delete files
  • Change the disk label and volume date
  • Drag and Drop support to and from Windows Explorer
  • Patch LDOS to Accept File Dates Beyond 2012 (v1.05)
  • Read-only support for Color Computer RSDOS disks (v1.06)
  • Read and Write support for NEWDOS/86 (v1.07)
  • Read and Write support for TRSDOS v2.7 and v2.8 (v1.08)
  • Display PDRIVE Information for NEWDOS/80 Disks (v1.08)
  • Read and write support for over thirty-two TRS-80 CP/M formats, including Holmes, Lobo, LNW, Radio Shack, and Montezuma Micro (v1.08)
  • Read FreHD Partitions (v1.13)
  • Read support for TRSDOS v2.3B (v1.13)
  • Utility Name     Version   Date         Author       Home Site
    TRSRead v4.32
    TRSREAD and TRSWRITE v4.35
    March 21, 2016 Matthew Reed TRSREAD/TRSWRITE Page
    TRSREAD and TRSWRITE are command line utilities which allow for the import and export of files to/from DSK and DMK images. Matthew’s TRS-80 emulators, like most emulators, use virtual disk images rather than actual floppy disks or hard drives. Virtual disk images are representations of floppy and hard disks and contain the same information as real disks.
    TRSREAD usage is TRSREAD [options] virtual disk [files] where the [options] are

          ‑s       Include system files
          ‑i       Include invisible files
          ‑e       Extract files from virtual disk
          ‑v       Display directory of virtual disk (default)
          ‑o       Overwrite Existing Files
          ‑p       Select Partition (New in v4.35)

    Platform         Utility Name     Version   Date         Author       Home Site
    Windows Virtual Disk Kit-80 (Command Line)
    Virtual Disk Kit-80 (Source Code)
    v1.6 February 1, 2013 Miguel Dutra
    Intended to allow one to perform a series of operations (read, write, rename, delete etc.) on files stored in a TRS-80 virtual disk image.
  • Supports all known TRS-80 model I/III/4 Operating Systems, except CP/M
  • Display the directory of files from the disks
  • Extract files from the disks
  • Add new files to the disks
  • Rename existing disk files
  • Delete files
  • Show the contents of a file (Hex/ASCII dump)
  • Show the contents of an entire disk (Hex/ASCII dump)
  • Note: Requires “libgcc_s_dw2-1.dll” (not included)
  • -l  List directory (default)
  • -r  Read files
  • -w  Write files
  • -n  Rename files
  • -k  Delete files
  • -f  Dump file contents
  • -d  Dump disk contents

  • VDisk v1.3

    Platform         Utility Name     Version   Date         Author       Home Site
    Windows Virtual Floppy Disk Manager (Command Line)
    Virtual Floppy Disk Manager (Source Code)
    v1.7 March 24, 2016 Miguel Dutra
    This is a small utility which allows you to access virtual TRS-80 DSK/DMK images at a file level, as if they were normal PC disks. A virtual TRS-80 disk is actually a PC file encoded with information extracted from a real TRS-80 floppy, in order to preserve its content and also to enable its use with TRS-80 emulators.
    The TRS-80 Virtual Disk Manager shows the file name, size, date and attributes of each directory item, supports reading both .DSK and .DMK image files, and allows exporting TRS-80 files to the Windows file system.
    Notice that only read support is implemented at this moment.

    Floppy Disk Manager v0.5

    Platform         Utility Name     Version   Date         Author       Home Site
    Windows VREAD and VWRITE v1.0 1993 Jeff Vavasour Site
    VREAD and VWRITE were the first DSK import/export utilities, packaged by Jeff Vavasour with his Model I emulator. These utilities cannot process only single density DSK files.
    VWRITE v1.0

    Platform         Utility Name     Version   Date         Author       Home Site
    Windows Emulator File Read and Copy v3.1 2006 Phil Ereaut
    This program reads DSK files, and displays the disk filenames in a list box. Clicking on a file, allows the file to be saved to a PC folder. It can be used just to view the Files on a DSK/DMK, if you dont want to copy the files.

    It doesn’t always work, but it has definitely helped me extract files from DSK images which the emulator would not recognize.

    File Copy for Emulator v3.1

    Platform         Utility Name     Version   Date         Author       Home Site
    X/CMD   April 20, 2001 Knut Roll-Lund
    Transfer utility for David Keil’s emulator between the emulator and DOS

    Virtual Disk Image Format Converters
    Platform         Utility Name     Version   Date         Author       Home Site
    Windows DiskManip v1.0.6.41 October 11, 2012 Aaron Brockbank None
    This is a utility that converts from TD0 (Teledisk) or IMD (ImageDisk) to DMK Format. Features include:

  • Convert TD0, IMD, D88, and DMK Images to DMK and D88
  • Identify virtual disk errors (Note: Exports CRC and BadID sectors as read, doesn’t attempt to ‘fix’ nor ‘repair’ them)
  • DMK Repair (automatically merge good tracks/sectors from two different DMK images into one fixed image)
  • Import real Double Density (NO SD) disks into DMK and D88 formats using the built in floppy disk controller (install “fdinstall” beforehand)
  • Display directory of Model II disks (TRSDOS 1.2 and 2.0, LS-DOS 6.3.1 and DOSPLUS II A.00)

    DiskManip v1.0.4.60

    DOS ImageDisk v1.8 March 7, 2012 Dave Dunfield Home Site
    While this is a complete ImageDisk package, it includes utilities which will convert from BIN (Binary), DMK (TRS-80 Standard), and TD0 (TeleDisk) to IMG.
    ImageDisk v1.18

    DOS CW2DMK Utilites v4.4/32 December 14, 2011 Tim Mann Home Site
    Will convert between DSK and DMK formats under Windows (current release within the CW2DMK package cannot run in x64 Windows)
    DMK2JV3 v4.4/32

    DSK/DMK Display Utilities
    Platform         Utility Name     Version   Date         Author       Home Site
    Windows DMK File Viewer/Editor v1.01 March 16, 2014 Alan Page None
    A small DMK file editor/viewer which is also able to compare two different DMK files. Works on tracks and sectors only and does not deal with file name or directories. Handles mixed density disks and displays both single-density and double-density sectors, even if they have the same sector numbers. Displays the CRC for each sector and indicates whether the CRC is bad or not. If you edit a sector the CRC is automatically updated (and corrected). Of course you have to know what you are doing when modifying disk sectors, especially when they contain program files. Can edit using either hexadecimal or ASCII input.
    DMK File Viewer/Editor v1.01

    Platform         Utility Name     Version   Date         Author       Home Site
    Linux or
    CP/M Disk Directory v1.7 July 6, 2007 Jeff Post None
    Will display the contents of a CP/M DSK image.
    Linux USAGE: ./dskdir MMCPM231.DSK

    DSKDIR v1.7

    Platform         Utility Name     Version   Date         Author       Home Site
    Windows Emulator File and Sector Display v5.0 February 1, 2009 Phil Ereaut
    Mode 1:
         This program reads .DSK and DMK files, and displays the disk parameters, such as, Type of Emulator file, No of sides, Density, Tracks, Dual density, Tracks start at sector 1, etc. For Newdos disks, it will show the Pdrive paramters of the disk. You can step through, and view the sector information, and the sector density for Dual Density disks. Stepping a Newdos disk, the present lump will be displayed Clicking the directory button, will display the start of the directory. Stepping through the directory sectors will show the File names in the directory, and also in colour, the bytes, that show where the files are located on the disk.

    Mode 2: Sector display
         This mode displays the sector, numbers and Density, on each track, in numerical order, or in the actual interleave order. It also shows the sectors with differing Data address marks. Handy to see the tracks densities, and no. of sectors. On most disks, this can show the Directory sectors, but some early disks have weird combinations of data address marks.

    Mode 3: Hex Editor
         Will display the Hex and Ascii bytes of any file. This was a for myself, to have a look at the funny files that could not be read by the program. I left it in, as it may be handy for someone. For Emulator Dmk, and JV files, it shows the headers, Blocks, Idams, etc, in different colours to easily identify the set up of these files.

    File Display v5.0

    DSK/DMK Analysis Utilities

    Platform         Utility Name     Version   Date         Author       Home Site
    Windows PDRIVE Finder v0.5 2009 Phil Ereaut
    Will display the PDRIVE settings of any DSK or DMK image which was “formatted” by NEWDOS/80.
    PDRIVE Finder v5.0

    Platform         Utility Name     Version   Date         Author       Home Site
    Windows Emulator File Type and Format Finder 2009 v1.0 February 1, 2009 Phil Ereaut
    This utility analyzes DSK and DMK files and shows filename, DOS, PDRIVES, Tracks, Density, Sides, Sec/Cyl and SPG. Will also note where Track Sectors start at 1.
    Type and Format Finder v1.0

    DMK Format Details
    Files with a .DSK extension could be JV1, JV3, or DMK format. The DMK format is a format developed by David Keil which allows for the storing of TRS-80 disks in pure form, which would allow for the representation of copy protected disks into emulator images. The DMK format gives the ability to support any FM or MFM encoded format that is reasonably close to the IBM 3740 or IBM System 34 standards.
    DMK format disks are easy to discern because of its 16 byte header. Emulators made after 2005 should handle the DMK format.
    The DMK virtual disk format is as close to the way data on a real disk is stored as possible. There is very little added overhead and the data is easily examined and edited using PC based hex editors. The actual design is really quite simple and enables support of ALL the WD-17xx controller functions and formats. While the design is simple however the programming requirements for this format are much more extensive then for the JV1/JV3 formats.

    Disk header:

    Virtual disks have a 16 byte disk header which is initialized when the user creates a new virtual disk. This header may be modified before or after a virtual disk has been formatted to change some of its characteristics.

    Byte 0 If this byte is set to FFH the disk is `write protected’, 00H allows writing.
    Byte 1 Number of tracks on virtual disk. Since tracks start at 0 this value will be one greater than the highest track written to the disk. So a disk with 40 tracks will have a value of 40 (28H) in this field after formatting while the highest track written would be 39. This field is updated after a track is formatted if the track formatted is greater than or equal to the current number of tracks. Re-formatting a disk with fewer tracks will NOT reduce the number of tracks on the virtual disk. Once a virtual disk has allocated space for a track it will NEVER release it. Formatting a virtual disk with 80 tracks then re-formatting it with 40 tracks would waste space just like formatting only 40 tracks on an 80 track drive. The emulator and TRS-80 operating system don’t care. To re-format a virtual disk with fewer tracks use the /I option at start-up to delete and re-create the virtual disk first, then re-format to save space.

    Note: This field should NEVER be modified. Changing this number will cause TRS-80 operating system disk errors. (Like reading an 80 track disk in a 40 track drive)

    Byte 2 & 3 This is the track length for the virtual disk. By default the value is 1900H, 80H bytes more than the actual track length, this gives a track length of 6272 bytes. A real double density track length is aprox. 6250 bytes. This is the default value when a virtual disk is created. Values for other disk and format types are 0CC0H for single density 5.25″ floppies, 14E0H for single density 8″ floppies and 2940H for double density 8″ floppies. The max value is 2940H. For normal formatting of disks the values of 1900H and 2940H for 5.25″ and 8″ are used. The emulator will write two bytes and read every second byte when  in single density to maintain proper sector spacing, allowing mixed density disks. Setting the track length must be done before a virtual disk is formatted or the disk will have to be re-formatted and since the space for the disk has already been allocated no space will be saved.

    WARNING: Bytes are entered in reverse order (ex. 2940H would be entered, byte 2=40, byte 3=29).

    Note: No modification of the track length is necessary, doing so only saves space and is not necessary to normal operation. The values for all normal 5.25″ and 8″ disks are set when the virtual disk is created. DON’T modify the track length unless you understand these instructions completely. Nothing in the PC world can be messed up by improper modification but any other virtual disk mounted in the emulator with an improperly modified disk could have their data scrambled.

    Byte 4 Virtual disk option flags.

    Bit 4 of this byte, if set, means this is a single sided ONLY disk. This bit is set if the user selects single sided during disk creation and should not require modification. This flag is used only to save PC hard disk space and is never required.

    Bit 6 of this byte, if set, means this disk is to be single density size and the emulator will access one byte instead of two when doing I/O in single density. Double density can still be written to a single density disk but with half the track length only 10 256 byte sectors can be written in either density. Mixed density is also possible but sector timing may be off so protected disks may not work, a maximum of 10 256 byte sectors of mixed density can be written to a single density disk. A program like “Spook House” which has a mixed density track 0 with 1 SD sector and 1 DD sector and the rest of the disk consisting of 10 SD sectors/track will work with this flag set and save half the PC hard disk space. The protected disk “Super Utility + 3.0” however has 6 SD and 6 DD sectors/track for a total of 12 256 byte sectors/track. This disk cannot be single density.

    This bit is set if the user selects single density during disk creation and should not require modification. This flag is used only to save PC hard disk space and is never required.

    Bit 7 of this byte, if set, means density is to be ignored when accessing this disk. The disk MUST be formatted in double density but the emulator will then read and write the sectors in either density. The emulator will access one byte instead of two when doing I/O in single density.

    This flag was an early way to support mixed density disks it is no longer needed for this purpose. It is now used for compatibility with old virtual disks created without the double byte now used when in single density. This bit can be set manually in a hex editor to access old virtual disks written in single density.

    Byte 5-B reserved for future options
    Byte C-F Must be zero if virtual disk is in emulator’s native format.

    Must be 12345678h if virtual disk is a REAL disk specification file used to access REAL TRS-80 floppies in compatible PC drives.

    Track Header Each track has a 128 (80H) byte header which contains an offset to each IDAM in the track. This is created during format and should NEVER require modification. The actual track data follows this header and can be viewed with a hex editor showing the raw data on the track. Modification should not be done as each IDAM and sector has a CRC, this is just like a real disk, and modifying the sector data without updating the CRC value will cause CRC errors when accessing the virtual disk within the emulator.

    Note: Modification within MSDOS could however be done to emulate a protected disk in the TRS-80 emulator.

    Track header:

    Each side of each track has a 128 (80H) byte header which contains an offset pointer to each IDAM in the track. This allows a maximum of 64 sector IDAMs/track. This is more than twice what an 8 inch disk would require and 3.5 times that of a normal TRS-80 5 inch DD disk. This should more than enough for any protected disk also.

    These IDAM pointers MUST adhere to the following rules.

    Each pointer is a 2 byte offset to the FEh byte of the IDAM. In double byte single density the pointer is to the first FEh.
    The offset includes the 128 byte header. For example, an IDAM 10h bytes into the track would have a pointer of 90h, 10h+80h=90h.
    The IDAM offsets MUST be in ascending order with no unused or bad pointers.
    If all the entries are not used the header is terminated with a 0000h entry. Unused entries must also be zero filled.
    Any IDAMs overwritten during a sector write command should have their entry removed from the header and all other pointer entries shifted to fill in.
    The IDAM pointers are created during the track write command (format). A completed track write MUST remove all previous IDAM pointers. A partial track write (aborted with the forced interrupt command) MUST have it’s previous pointers that were not overwritten added to the new IDAM pointers.
    The pointer bytes are stored in reverse order (LSB/MSB).
    Each IDAM pointer has two flags. Bit 15 is set if the sector is double density. Bit 14 is currently undefined. These bits must be masked to get the actual sector offset. For example, an offset to an IDAM at byte 90h would be 0090h if single density and 8090h if double density.

    Track data:

    The actual track data follows the header and can be viewed with a hex editor showing the raw data on the track. If the virtual disk doesn’t have bits 6 or 7 set of byte 4 of the disk header then each single density data byte is written twice, this includes IDAMs and CRCs (the CRCs are calculated as if only 1 byte was written however). The IDAM and sector data each have CRCs, this is just like on a real disk.

    Modification should not be done since doing so without updating  the CRCs would cause data errors. Modification could be done however to create protected tracks for importing protected disks to virtual disk format. Examples of disks created using this technique are “Super Utility+ 3.0” and “Forbidden City”.