DMK2SCP bug report thread

Por Louthrax

Prophet (2167)

imagem de Louthrax

18-07-2017, 02:03

I've just release a little command-line tool that allows to convert .DMK disk images to SuperCard Pro .SCP format. The generated .SCP files can then be written back to a real floppy disk, assuming of course you own a SuperCard Pro device. DMK2SCP can be downloaded from my website. Sources are also available and can be easily recompiled for other platforms (that's very standard C).

I wrote back several DMK files to real floppies this way, it worked fine for all of them, except for Ys II, which was working, but only on the Sony HB-G900AP. On turboR, the demo of the game does not even launch. On VG8235, the demo works, but the game is stuck on a black screen after pressing space (no moving drive heads sounds from the drive). On HB-F1XDJ, demo works too, game is also stuck on black screen after pressing space, but the drive heads keep moving back and forth forever.

Here's the log of the conversion process by DMK2SCP:

Here's the bitcell timing vizualization of the original track 144:

A SuperCard Pro device stores the timings for each bitcell on 16 bits. You can see here that this track has 11 sectors by counting the different separated clouds of points.

And here's the bitcell timing vizualization of the track 144 generated from the DMK file:

A .SCP file generated from DMK is only using a set of 3 different exact values, which are not floating around a median value, that's why you see lines here, and not a could of points. But you can still see that there are 11 parts here.

My explanation so far is that those small timing differences are not handled the same way on all MSX machines. Also, I fogot to mention that the DMK file used to generate the SCP file is working on openMSX.

An attempt of fix would be to add some artificial randomness in the bitcell timings when generating the SCP file (in order to recreate the "cloud of points" aspect). I tried that with different parameters but with no success yet.

As an additionnal note, here's what a standard track formatted on VG-8235 looks like:

It appears clearly that the timings are not as widely spread as for Ys II. So maybe that's part of the protection mechanism.

Entrar ou registrar-se para comentar

Por wouter_

Champion (422)

imagem de wouter_

18-07-2017, 18:55

Very interesting! The typical MSX Floppy Disk Controllers (WD2793 or TC8566AF) don't return any information about this low level bitcell timing. So I strongly doubt this 'randomness' in the timing can be used by the copy protection.

That very clean timing visualization (2nd image in the post above), is that from the DMK2SCP generated .scp file? Or from writing that .scp to a real disk and then re-extracting it?

To the best of my knowledge (almost) all the info that can be extracted from a real floppy disk by a WD2793 is present in a .dmk file. So maybe you could try to re-dump the written disk with READ-DMK or Dmk Creator and see if you get the same (or similar) .dmk back? The difference might give a hint of what's going wrong.

Detail: the track length in the output of dmk2scp (6372 bytes) is weird. Could it be that you forgot to subtract the length of the dmk track header (128 bytes).

Or maybe it's a typo and the length is 6272 bytes? Current versions of Dmk Creator always dump tracks of length 6272 bytes even if the original disk had a different track length. In theory this length could be checked by the MSX software, but I doubt Ys2 is doing that. (And you said the .dmk worked fine in openMSX, so this can't be it).

Por Louthrax

Prophet (2167)

imagem de Louthrax

18-07-2017, 20:42

Hi Wouter,

The 2nd image is indeed the one generated from the DMK file. No image read from a real disk with a SuperCard Pro device is that clean (there are always slight variations in the timings).

Thanks for the hint, I'll try to make another DMK dump from Ys, maybe using one of the machines on which the written-back SCP file did not work.

Let me check the track length question, not sure anymore of what I display here...

EDIT: Maybe the track length in the DMK file is a bit different because of the protection patterns on some track ? (that #144 track contains 11 sectors).

Por wernerkai

Champion (357)

imagem de wernerkai

19-11-2018, 02:39

Hello folks,

Now, I also have a SuperCard Pro. It will help to shed a light in brazilian disk copy protections.

Regards

Por Louthrax

Prophet (2167)

imagem de Louthrax

19-11-2018, 22:22

I’d be interested to know if those games can be converted to DMKs ?

Por wernerkai

Champion (357)

imagem de wernerkai

21-11-2018, 04:10

Hello,

Last year, I was testing READ-DMK and DMK Creator, then I made some images of games with "brazilian" copy protections. These disks run only with brazilian CDX-2 (like DDX 3.0) type FD interfaces (I/O access). There's some info on page 2 of this topic, and you will find the DMK, IMD and PDI files here.

That DMK images work in OpenMSX, so I guess copy protection is preserved.