File2VDK anyone?

A place to discuss everything Dragon related that doesn't fall into the other categories.
User avatar
Bosco
Posts: 286
Joined: Tue Mar 04, 2014 11:49 pm
Location: Nottingham, UK

File2VDK anyone?

Post by Bosco » Sun Sep 13, 2015 1:35 pm

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

pser1
Posts: 1205
Joined: Sun Mar 25, 2012 7:32 pm
Location: Barcelona (SPAIN)

Re: File2VDK anyone?

Post by pser1 » Sun Sep 13, 2015 7:13 pm

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

User avatar
utz
Posts: 18
Joined: Mon Aug 31, 2015 8:49 pm
Location: Absurdistan
Contact:

Re: File2VDK anyone?

Post by utz » Sun Sep 13, 2015 7:22 pm

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?

User avatar
Bosco
Posts: 286
Joined: Tue Mar 04, 2014 11:49 pm
Location: Nottingham, UK

Re: File2VDK anyone?

Post by Bosco » Sun Sep 13, 2015 7:53 pm

The simpler the solution, the better for me.

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

pser1
Posts: 1205
Joined: Sun Mar 25, 2012 7:32 pm
Location: Barcelona (SPAIN)

Re: File2VDK anyone?

Post by pser1 » Sun Sep 13, 2015 8:12 pm

@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

User avatar
robcfg
Posts: 1221
Joined: Sat Apr 04, 2009 10:16 pm
Location: Stockholm, Sweden

Re: File2VDK anyone?

Post by robcfg » Sun Sep 13, 2015 8:25 pm

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.

User avatar
Stig
Posts: 74
Joined: Mon Mar 17, 2014 4:54 pm

Re: File2VDK anyone?

Post by Stig » Sun Sep 13, 2015 9:21 pm

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 :)

User avatar
utz
Posts: 18
Joined: Mon Aug 31, 2015 8:49 pm
Location: Absurdistan
Contact:

Re: File2VDK anyone?

Post by utz » Mon Sep 14, 2015 4:13 pm

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.

pser1
Posts: 1205
Joined: Sun Mar 25, 2012 7:32 pm
Location: Barcelona (SPAIN)

Re: File2VDK anyone?

Post by pser1 » Mon Sep 14, 2015 5:31 pm

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

Sarah
Posts: 165
Joined: Wed Apr 13, 2011 3:36 pm
Contact:

Re: File2VDK anyone?

Post by Sarah » Mon Sep 14, 2015 7:01 pm

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)

Post Reply