Open keirf opened 5 months ago
BTW, for those who still have Catweasels and use cw2dmk
, as the cw2dmk
maintainer (https://github.com/qbarnes/cw2dmk), I've been making considerable progress refactoring and rewriting cw2dmk
into gw2dmk
for the Greaseweazle. I've got gw2dmk
hobbling along using GW hardware to read floppy disks and it's writing out DMKs. There's still a lot to go though. I might be ready for some people to start being gw2dmk
alpha testers in a month or two. If anyone who has formerly or currently uses cw2dmk
and wants to volunteer, toss me an email.
As I've been deep-diving on the DMK format, I've been learning there's various subtleties and extensions, that as far as I can tell, have remained publicly undocumented. I have run across a copy of the informal standard on GitHub: https://github.com/lutris/openmsx/blob/master/doc/DMK-Format-Details.txt. I plan on getting these subtleties and extensions publicly documented. If the maintainer of this repo doesn't accept PRs, I'll start another repo for just documenting the DMK tweaks and mods that has happened over the years, mostly to support uncommon disk and encoding formats. Those extensions though shouldn't stop anyone from adding general DMK support to gw
. I too am very much looking forward to having DMK support added to gw
!
I put a first cut on branch dmk
but it's quite unsatisfactory for some old 8-inch FM images I've been sent. It's hard to know whether the format eg. has a different CRC algorithm for data, or I am misunderstanding some aspects of the DMK image format. Some other FM and MFM images I can decode fine.
Actually they were created with cw2dmk
using some fancy -q
option, so I guess I can share them and you can tell me what I'm doing wrong. A different scanning/streaming algorithm on the unencoded data, like you have, may make most sense rather than my search'n'replace hack on the post-encoded data array. I won't attach them here but I will email the zip file across to you. Then we have some images in common that we could iterate on.
I believe on the CZSDOS and CZMDOS disks, you're getting CRC errors because your sector size is too short by 4 bytes. You need to "lie" to your algorithms to add another 4 bytes. I did this to my own DMK utility (dmkdump) to +4 their sector size as a quick hack and then I got valid CRC reads from your example DMKs.
In cw2dmk
source, this is handled here: https://github.com/qbarnes/cw2dmk/blob/master/secsize.c#L57-L59
And is documented here: https://github.com/qbarnes/cw2dmk/blob/master/cw2dmk.man#L512-L518
DMK is also used on the TRS Color Computer emulators as well as a modified version of DMK for the CoCoSDC. :)
Discussed in https://github.com/keirf/greaseweazle/discussions/393