DMK file format and tools

Page 2/2
1 |

By Louthrax

Prophet (2406)

Louthrax's picture

02-07-2017, 00:06

So I just increased the location of the "unique_buffer" in READ-DMK.COM from #BE00 to #C200 and managed to get a working DMK image of SD Snatcher with that.

Fix is to replace all text occurences of "#BE" with "#C2" in READ-DMK.Z80, and replace

debug_buffer equ #BF00 ; must be 256-bytes aligned

with

debug_buffer equ #C300 ; must be 256-bytes aligned

That fits in memory with Nextor, should also work in MSX-DOS1.

I'm a bit surprised because there are no extra sectors on the tracks on this disk, only invalid CRCs on the data field on tracks 1 and 65 (scroll to the right in the code boxes below, computed CRCs are surrounded with parenthesis):

Track 1:
	Sector #1: track 0 side 1 number 1 size 2 idcrc fd5f (fd5f) datacrc 92f1 (92f1)
	Sector #2: track 0 side 1 number 2 size 2 idcrc a80c (a80c) datacrc 87c5 (87c5)
	Sector #3: track 0 side 1 number 3 size 2 idcrc 9b3d (9b3d) datacrc 41e5 (41e5)
	Sector #4: track 0 side 1 number 4 size 2 idcrc 02aa (02aa) datacrc 08c4 (08c4)
	Sector #5: track 0 side 1 number 5 size 2 idcrc 319b (319b) datacrc 977c (977c)
	Sector #6: track 0 side 1 number 6 size 2 idcrc 64c8 (64c8) datacrc e5e5 (1885) *IDC
	Sector #7: track 0 side 1 number 7 size 2 idcrc 57f9 (57f9) datacrc 7b89 (7b89)
	Sector #8: track 0 side 1 number 8 size 2 idcrc 47c7 (47c7) datacrc b1c9 (b1c9)
	Sector #9: track 0 side 1 number 9 size 2 idcrc 74f6 (74f6) datacrc e985 (e985)
Track 65:
	Sector #1: track 32 side 1 number 1 size 2 idcrc ca11 (ca11) datacrc be37 (e6ec) *IDC
	Sector #2: track 32 side 1 number 2 size 2 idcrc 9f42 (9f42) datacrc aed8 (aed8)
	Sector #3: track 32 side 1 number 3 size 2 idcrc ac73 (ac73) datacrc 1d0a (1d0a)
	Sector #4: track 32 side 1 number 4 size 2 idcrc 35e4 (35e4) datacrc 0e2c (0e2c)
	Sector #5: track 32 side 1 number 5 size 2 idcrc 06d5 (06d5) datacrc 86b5 (86b5)
	Sector #6: track 32 side 1 number 6 size 2 idcrc 5386 (5386) datacrc 3c99 (3c99)
	Sector #7: track 32 side 1 number 7 size 2 idcrc 60b7 (60b7) datacrc e1eb (e1eb)
	Sector #8: track 32 side 1 number 8 size 2 idcrc 7089 (7089) datacrc 57a1 (57a1)
	Sector #9: track 32 side 1 number 9 size 2 idcrc 43b8 (43b8) datacrc e6e1 (e6e1)

The rest of the tracks are looking normal.

By Louthrax

Prophet (2406)

Louthrax's picture

02-07-2017, 00:56

Looks like the CRC error on track 65 was a real error and not part of the protection mechanism (have not been able to reproduce that one on another MSX machine).

By cbsfox

Champion (386)

cbsfox's picture

02-07-2017, 01:32

Try to use DMK Creator 5.3.
It should copy it.
Download link: https://1drv.ms/u/s!AlpEtfGjLbhmkyvJ4Qf1F4xG6cM-

By wouter_

Champion (470)

wouter_'s picture

02-07-2017, 10:17

Louthrax wrote:

... and that the PC tool that does the concatenation computes the biggest track size to generate a smaller DMK file (as the track size is global for the DMK file). Is that correct?

It's close. Instead of the biggest combine-dmk takes the most frequent track size. I found that usually there's one size that occurs a lot and fewer tracks are 1 or 2 bytes shorter or longer. So instead of enlarging most tracks, combine-dmk will shrink/enlarge fewer tracks.

Note that you cannot always just insert/remove bytes at the end of the track. Because tracks are circular, and there might be a sector that wraps from the end to the start of the track. (Actually a circle has no real start or end, but we define the start as the point where the index pulse occurs). So what combine-dmk does is search for the largest gap between sectors and insert/remove bytes there.

By Manuel

Ascended (18385)

Manuel's picture

02-07-2017, 12:11

So, was that larger buffer really needed, or was it due to the track 65 issue?

By Louthrax

Prophet (2406)

Louthrax's picture

02-07-2017, 18:52

Manuel wrote:

So, was that larger buffer really needed, or was it due to the track 65 issue?

Not sure yet, will do some more tests with the small and bigger buffer versions and let you know.

By Manuel

Ascended (18385)

Manuel's picture

03-03-2020, 21:23

Any news about this, Louthrax?

Page 2/2
1 |