My 1988 TIDYDISK program.

I have posted some of my old programs to the Color Computer Archive site:

https://colorcomputerarchive.com/search?q=huffman

One I found interesting to revisit was my TIDY DISK program. I created it in 1988, and it appears I revised it two more times since there is a version 1.2 from 1990. (Unfortunately, I did not update the title screen so it still reads 1.1):

Tidy Disk title screen

This program, written in BASIC, was designed to scan a floppy disk and erase any unallocated space. Much like how one can “undelete” files on a modern PC and see what was there, the same thing was possible with the old Disk BASIC disk format in the 1980s. However, privacy was not even something I was considering when I created the program.

At the time, I had a modem and was using it all the time to call in to Bulletin Board Systems (BBS). There were many places where you could download CoCo software, including pirated software. There were also disk transfer programs that could be used to send an entire disk from one user to another.

I do not recall the name of the program I used, but it was smart enough to not send “empty” data. If a granule (the CoCo disk was divided in to 68 sections called granules) was empty, the program would skip sending it. Unfortunately, if you had a disk that previously had data on that granule (from a file that was since deleted), it would send all that old “deleted” data as well. This made the transfer much longer than it needed to be.

(And believe me, sending a full disk of 156K over a 300 or 1200 baud modem seemed to take “days” back then… At least it felt like it.)

I created TIDY DISK to solve this problem.

TIDY DISK

The program was written for a CoCo 3, and it errors out on a CoCo 1 or 2. This is because I do a PEEK on startup to check for screen width. If the CoCo 3 is not in 32-column mode, I do a “WIDTH 32” command to switch back. That PEEK does not work on a CoCo 1 or 2, and thus it tries to run the non-existent “WIDTH” command and errors out. Removing that check (or doing a manual POKE 231,0 before running) allows it to run on a CoCo 1 or 2.

To understand what it does, I built in HELP screens.

Tidy Disk – help screen 1
Tidy Disk – help screen 2
Tidy Disk – help screen 3

Ah, humor.

The “pop up” windows I used was a BASIC routine I wrote, and I also posted that routine to the Color Computer Archive site.

When the user selected a drive, they were asked to make sure they really meant to do that:

Tidy Disk – select drive confirmation

If they answered Yes, it would begin by first reading in the allocation table information:

Tidy Disk – starting

This was basically a table that showed which of the 68 granules were in use. This would be a real good time to explain how the Disk BASIC disk format worked, but I think I’ll save that for a standalone article. (Mostly because I do not remember. I’m not even sure how I figured this out back then!)

The process would then scan all 68 granules of the disk and write blank data to any that was not marked as allocated. This would take some time…

Tidy Disk – in progress

When complete, the program would stop. It would literally STOP, saying “BREAK IN 55”. I ended the program with the STOP command. I can’t imagine I used that command very often, and was surprised I even used it there versus “END” which would just end cleanly.

One modern use for this program would be for disk images. If you have a disk image you want to ZIP and share, ZIP will compress all the data. If there are many sectors with deleted information, that will get ZIPped right along with the actual data you want to share. Not only does it make the file larger, but someone could use a disk editor and look at all the formerly “deleted” data.

Running this on a disk image before zipping it up might still have some use.

TIDY TIDK 1.3?

If I were to update this program, here are some things I would change:

  • I would certainly fix the version number in the title screen.
  • I’d also fix it to correctly work on a CoCo 1/2.
  • I’d make it accept drives from 0-255, so it would work on RGB-DOS/HDB-DOS.
  • And I’d remove that STOP, and just have a real Quit option so the user could keep doing disks without needing to re-RUN the program each time.

Maybe some day…

But until then…

2 thoughts on “My 1988 TIDYDISK program.

  1. Jerry Stratton

    I remember setting up downloads to go overnight on the CoCo 3, and that was most likely with 1200 baud. Partly to not tie up the phone line during the day, but mostly because they took so long. I’m not sure I even bothered trying to download/upload stuff with the Tandy 300 baud modem I’d had on the Model 1. That was mostly for logging into the school mainframe to do homework.

    Reply

Leave a Reply to Allen HuffmanCancel reply

This site uses Akismet to reduce spam. Learn how your comment data is processed.