Page 1 of 5

File2VDK anyone?

Posted: Sun Sep 13, 2015 1:35 pm
by Bosco
Hi.

I've just been playing with `File2DSK' by chipple and was impressed by how easy it is to use. It's a command line utility but, for ease of use, you can just drag `n' drop files onto the .exe and it'll kick out the dsk for you.

http://www.chipple.net/coco/file2dsk/

Is there anything this simple for making vdk files?

Btw. Thanks to pere for his guide to putting bin files onto vdk's. :)

viewtopic.php?f=5&t=5367&start=10#p13851

Re: File2VDK anyone?

Posted: Sun Sep 13, 2015 7:13 pm
by pser1
hello,

maybe this link could be usefull ...
viewtopic.php?f=5&t=530&p=2983&hilit=DragonTools#p2983
It's an utility from our collegue Rolf Michelsen
I remember having used it both to add and to extract files from an VDK image file

hope it helps
cheers
pere

Re: File2VDK anyone?

Posted: Sun Sep 13, 2015 7:22 pm
by utz
Didn't know about the file2dsk utility, so thanks for posting the link.
I could perhaps work out a script that would replace the dsk header with a vdk one, since the file format seems to be identical otherwise. But unfortunately I don't understand the header description at http://archive.worldofdragon.org/index. ... ile_Format. Is there a more detailed description somewhere?

Re: File2VDK anyone?

Posted: Sun Sep 13, 2015 7:53 pm
by Bosco
The simpler the solution, the better for me.

My knowledge of coding doesn't extend much beyond tinkering with the Dragon. :oops:

Re: File2VDK anyone?

Posted: Sun Sep 13, 2015 8:12 pm
by pser1
@utz,
the DSK format is exactly the same than the VDK but without the header.

cheers
pere

Ps. in order to have compatibility with XRoar and DW4 it is better having the VDK files have a 256byte header

Re: File2VDK anyone?

Posted: Sun Sep 13, 2015 8:25 pm
by robcfg
utz wrote:Didn't know about the file2dsk utility, so thanks for posting the link.
I could perhaps work out a script that would replace the dsk header with a vdk one, since the file format seems to be identical otherwise. But unfortunately I don't understand the header description at http://archive.worldofdragon.org/index. ... ile_Format. Is there a more detailed description somewhere?
What do you need to know? It's a fairly simple description of the disk.

Re: File2VDK anyone?

Posted: Sun Sep 13, 2015 9:21 pm
by Stig
I have a program called DIR master for managing disk files on the Commodore 64.

It allows you to open any disk image and drag / drop files across to any other disk image. It's a breeze to use and has come in very handy.

Something similar for managing .vdk file would be a dream

Hope one of you clever folks can put something together :)

Re: File2VDK anyone?

Posted: Mon Sep 14, 2015 4:13 pm
by utz
robcfg wrote:What do you need to know? It's a fairly simple description of the disk.
The following things are unclear to me: Version of VDK format, Backwards compatibility version, Identity of file source, Version of file source, Flags, Compression flags and name length.

Re: File2VDK anyone?

Posted: Mon Sep 14, 2015 5:31 pm
by pser1
Hi,
these are the fields and the values I use to put in them:

Code: Select all

* Fields description for VDK header
    * 0     2     signature               ('dk')         must be in lowercase
    * 2     2     Header length           ($0C,$00)      total header length (2 bytes, but first goes the LSB then the MSB)
    * 4     1     VDK version - actual    ($10)          VDK format version. By now $10 (VDK v1.0)
    * 5     1     VDK version - compat    ($10)          retro-compatibility, same value
    * 6     1     Source id               ($58)          Shows how has been created the VDK file. I put here a $58
    *                                                    0 = manually created    1 = header stub
    *                                                    2 = mkdsk.exe             3 = other tools
    *                                                    'P' = PC-Dragon           'T' = T3
    *                                                    'X' = XRoar ($58)         > $7F = other emulators
    * 7     1     Source version          ($00)          I always use $00 here
    * 8     1     Number of tracks        ($28)          number of tracks. 40 or 80 --> ($28 or $50). For a 180k always $28
    * 9     1     Number of sides         ($01)          number of sides. 1 or 2 (for a 180K disk always $01)
    * 10    1     Flags                   ($00)          Never used them, so value $00
    * 11    1     Comp & Name length      ($00)          same as previous one
    * 12    0-31  Disk name               (...)          (OPTIONAL) nothing at all 'cause no name to be added
So, if you are creating discs of 180k, you could use the same header for all of them, in fact you just have to append that header to a DSK image
to get the VDK. If you are planning to do that and want compatibility with Drivewire, it is recommended to make the header 256 byte length
by padding it with $00's and using in the length field: $00,$01 (for 256 bytes). This will work with XRoar as well.
Hope it helps

cheers
pere

Re: File2VDK anyone?

Posted: Mon Sep 14, 2015 7:01 pm
by Sarah
I'd recommend picking a different source ID value (e.g. 0x03 or something unique)! ;)

The flag and compression definitions can be found in DOSCART.C (pcd206s.zip):

#define VDKFLAGS_WP 0x01 // write protect
#define VDKFLAGS_ALOCK 0x02 // advisory lock (can be overridden)
#define VDKFLAGS_FLOCK 0x04 // forced lock (can't be overridden)
#define VDKFLAGS_DISKSET 0x08 // clear for single or last disk in file

#define VDK_COMPBITS 3 // number of compression flags (reserved)
#define VDK_COMPMASK 0x07 // name length uses upper bits (max 31)