DTC Assistant

3rd Party Software, Tools & Add-ons for KryoFlux
Post Reply
Posts: 8
Joined: Sun Apr 18, 2021 1:37 pm

DTC Assistant

Post by evanevery »

I really don't know if anyone will find this useful, but it gave me something to do while I was swapping disks as I archived my 35 year old C64 disk collection.

I started trying to just make a simple batch file to help automate my imaging. I quickly noticed some issues with Windows based "Tee" programs (I want to see the DTC output as well as log it). Wintee and WTee weren't getting it done the way I wanted for several reasons - mainly I couldn't capture both stderr and stdout. Anyway, I started by writing a small wrapper using AUTOIT so I could pretty much do what I wanted to automate and document the imaging process. (AUTOIT is free: https://www.autoitscript.com/site/) Since my mindset started as a batch file replacement, the development was done as a console app (Command Line).

Anyway, I continued my development adding more features as they came to me - and through no coincidence - finished it up as I imaged my last disk. I provide the tool here in the event that anyone else finds it useful. EXE and source code are both included.

Basically you just start the program by specifying a DiskID and a SideParameter. The DiskID is what you would like to name your disk and the SideParam (-g param) specifies which sides of the disk to image (works if you have a flippy modified drive). If you use a numeric sequence as the DiskID (i.e. 001, 055,000002, etc), it will keep prompting you for the next disk in numeric order and update the DiskID each time around (you can increment or decrement it as well). Then just hitting 0, 1, or 2 will continue imaging the next disk in your stack using the corresponding "-g" SideParam.

There is also the notion of a DiskID prefix and a few other bells and whistles so check the notes in the INI file.

The tool automatically generates a .G64 file from the RAW files, preserves your RAW files (and optionally zips them up), optionally creates a directory listing of the contents of each .G64 file, and preserves your logs.

Basically I just wanted to feed disks to my flippy drive and create an archive with only having to press a single key to continue the operation. I also wanted to be able to switch the "-g" param by using this single keypress as well.

Here's the help screen which is provided if you run the DTCASSIST without any parameters:

DTCASSIST Usage: DTCASSIST {Side Param} {DiskID}

Where: {Side Param} = 0 (Side 0)
1 (Side 1 / Flippy)
2 (Both Sides / Flippy)
{DiskID} = Your Disk ID (001, 002, alpha, bravo, etc)

Note: DTCASSIST.EXE/.INI should be located in the same folder.

1. Constructs the DTC command line such that the image files for each disk are put
in their own dedicated folder (of the same name as the disk)
2. Incorporates its own built-in "tee" command such that the output from DTC is
displayed BOTH on the screen and saved in a log file (*.log)
3. Runs DTC to generate a preservation pass (Raw Files) and then runs it again to
automatically translate the Raw Files into a *.g64 file.
4. Automatically archives the Raw Files into a single compressed archive (*.zip)
(and optionally removes the originals from the disk folder)
5. Automatically generates directory listings of each *.G64 file created (*.dir)
6. DELETES the entire Disk Image folder and ALL its contents to automatically
provide a "clean pass" each time it is executed. *** BE CAREFUL ***"
7. If the specified {DiskID} is a numeric sequence, automatically AutoSequences
so the imaging sequence can be continued with a single keypress
8. Single key modifications to the AutoSequence command are supported to enable
Incrementing/Decrementing the DiskID and selecting the Sides to be imaged.

* See The DTCASSIST.INI file in the same folder for configuration options!


So, then I had this nice big list of sequentially numbered disk folders (and their contents). So I needed some way to give them a human readable name so I didn't have to refer to some master list everytime I wanted to try and load something.

While I was running my imaging via DTCAssist, I was also creating a Spreadsheet of Disk ID's, Titles, Publisher's etc. I had this mostly done right away so I could double-check the DiskID's every once in while to make sure I didn't get out of sequence somehow. Anyway, I didn't want the imaging process to have to be done in step with the documentation process. It is far too inefficient. By splitting the imaging process and the documentation process you can do them in any order as long as you keep your disks in sequence.

(Sample Disk Spreadsheet included in the archive)

But anyway, I then needed another utility to read the contents of my spreadsheet (saved as a "Tab Delimited Text File") so it could take all the sequential files and folders and copy/rename them into something more usable. (Note they are COPIED and not RENAMED or MOVED in case something gets messed up you can start over. Just delete your sequential folders/files when you are happy with the results. There is also a "/TEST" switch for similar reasons.) I didn't want to go through the details to write a INI config file handler, so DTCARename runs all from the Command Line (no INI file).

Here's the help screen which is provided if you run DTCARENAME.EXE without any parameters:
DTCARename Usage: DTCARename {DTCAssist Info File} {Disk Name Prefix} [/TEST]

Where: {DTCAssist Info File} = TAB DELIMITED text file containing Disk Naming Info

{Disk Name Prefix} = String prepended on each DiskID to construct the "source"
Folder and File names. (i.e. "Disk_")

[/TEST] = (OPTIONAL) Will simply generate the output and logfile without"
actually creating folders or copying files. Useful if you want to
see what your folder and filenames will look like after they are
"Cleaned Up" but before you actually run the utility. MUST BE
the THIRD Parameter. "/TEST" will also check to confirm that
all source files actually exist.

DTC Info File Format: (Tab Delimited)

Column 1: DiskID
Column 2: SideInfo ("s0", "s1", or blank (for "s0"))
Column 3: Disk Name
Column 4: Publisher (Optional - Used in Disk Name)
Column 5: Notes (Optional - Used in Disk Name

Function: DTCARename will process the text file line by line and rename the
associated folders and files (*.g64, *.log, *.dir, *.zip) according to the
"name" defined in the THIRD column. It will skip any lines which have an
empty FIRST column or if it contains a "DiskID" (header). This utility
must be located directly above the "source" folders.

Anyway, I'm done. This all helped me pull my archive together. Maybe it will help someone else as well. I include the source code if you want to make your own tweaks.

If anyone has any questions please feel free to send me a PM

Ed Van Every
Digital Intelligence

(1.1 MiB) Downloaded 11 times
User avatar
Posts: 2197
Joined: Tue Oct 05, 2010 5:48 pm

Re: DTC Assistant

Post by mr.vince »

Great stuff and thanks for sharing...
Post Reply