Auto naming files for dumps made by DC2N3 and DC2N5-LC

Although DC2N5-LC incorporates what I refer to as a “filename extractor”, the files it saves to flash are still named simply “DUMPnnnn.DMP”, which is what happens in DC2N3 too.

Nuno suggested a change in DC2N5-LC which consists into renaming DMP files based on the first filename discovered within the tape dump. As example, “DMPnnnn.DMP” would become “DMPnnnn_SILKWORM.DMP”.
I thought about this a bit, and although it’s not a complicated thing to implement on DC2N5-LC, I reckon that there is a PC workflow that would help with any DMP file produced by any DC2N, including DC2N3, as it doesn’t incorporate a filename extractor:

  1. batch-convert all DMP files in a given folder to TAP, using the “dc2nconv” utility,
  2. run a wrapper around my “find-rom-name” utility, which I’ve just adjusted for this task.

Fleshing these out, it would be a matter of issuing:

dc2nconv -d .

for filename in *.TAP; do
    echo -n "Parsing $filename: "
    cbm_name=$(find-rom-name "$filename" | grep "^FOUND:" | awk '{ print $2 }' | sed -e "s/\"//g")
    if [ ! -z $cbm_name ]; then
        mv "${filename}" "${filename%.*}_${cbm_name}.${filename##*.}"
        echo "INFO: renamed"
        echo "WARNING: boot name not found"

Although the above is a bash script, it can run under Windows, within Git bash, MSYS/MSYS2, Cygwin, etc.

Writing a Powershell equivalent is left to the reader as an exercise 🙂

Here’s the output of a similar script that simply extracts the filename of the first CBM file within each TAP file in a given directory:


As you can see, I make digital backups of Silkworm and Turrican a lot, for testing purposes.

A more comprehensive update will follow in a few days, when I will be officially publishing my “filename extractor” binaries for Windows and Linux.

In the publishing pipeline I also have:

  • an update to the DC2N4-LC GUI client,
  • a new CSDb release, and
  • a new project on GitHub.

Stay tuned!

About Luigi Di Fraia

I am a Senior DevOps Engineer so I get to work with the latest technologies and open-source software. However, in my private time I enjoy retro-computing.
This entry was posted in Retrocomputing, Technical and tagged , , , , , , , , , . Bookmark the permalink.

Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Google photo

You are commenting using your Google account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s