Sunday, 16 March 2014

DMK File Viewer/Editor

My Raspberry Pi system converts TRS-80 floppy disks to DMK files. One of the challenges of working with DMK files is ensuring that they are workable and comparing them to existing samples from other systems. In order to help with this work I wrote a small DMK file editor/viewer which is also able to compare two different DMK files.

This viewer works on tracks and sectors only and does not deal with file name or directories. It has several unique features that I have not found on existing software.

It handles mixed density disks and displays both single-density and double-density sectors, even if they have the same sector numbers.

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

You can compare DMK files sector by sector and the software steps through the differences between each sector. Sector data is displayed as both hexadecimal and ASCII format. You can edit using either hexadecimal or ASCII input, though hexadecimal is recommended for non-ASCII files.

DMK Viewer/Editor
The screenshot above shows two DMK files being compared. One from and one that I created myself using my Raspberry Pi interface board. In this sector the difference is in the serial number which was written to each disk.

The installer can be downloaded here from my Dropbox public folder. Or, if you don't want to install, download this zipfile containing the program and a support dll.

Update: version 1.01 now includes clipboard support for binary copy and paste (sector editor only) and F7 and F8 to move through all sector differences. Note that if there is a sector or track in the right hand view (the file being compared) that isn't in the left hand view (the main view) it won't be displayed.

defensePiFixed.dmk  is a DMK file created using a Raspberry Pi. The original DMK file had two data CRC errors but I was able to fix them using the editor and copying from single-density sectors to the corresponding double-density sectors. The disk is Defense Command which is available on the software archive.

Please note that the editor is written in C# and requires the .NET framework 3.5.