• Please review our updated Terms and Rules here

CP/M DSK tool

per

Veteran Member
Joined
Jan 21, 2008
Messages
3,006
Location
Western Norway
One of my latest projects is a small GUI-based program to access CP/M image files. The idea is something along the lines of 22disk, but with disk images instead of physical disks. This tool lets you look at, export, import, delete, rename or copy files to/from/in the image.

The tool assumes typical track layout, so if you have a dsk with a layout that "flips" around at track 80 then you will need to have it shuffled first.

Using the tool is very simple. Buttons in the upper left is used for operations on the image as a whole, while the rest of the buttons are for operations on single files in the loaded image. To access an image, click open and select the file. Then you will be presented with a parameter window. The default values are problably incorrect, so go through all of them carefully. When clicking OK, you're ready to go.

Keep in mind that nothing is saved before you actually save the updated dsk file. You will be able to select a new filename, so this does not automatically overwrite the old image.

Any comments/bug reports are welcome!
 

Attachments

  • CPMDskTool.zip
    25.2 KB · Views: 3
Last edited:

Chuck(G)

25k Member
Joined
Jan 11, 2007
Messages
40,260
Location
Pacific Northwest, USA
It's not just (bump track 0->79 side 0) then (bump track 79->0 side 1). There are also (side 1 before side 0 then bump 0->79) and (bump track 0->79, side 0) then (bump track 0->79), side 1) . There are also a few really oddall formats in addition, like starting at the middle of the disk, going toward the end, then middle to the beginning)...

You can't fault CP/M BIOS implementors for not being original.
 

per

Veteran Member
Joined
Jan 21, 2008
Messages
3,006
Location
Western Norway
Wow.. Out of curiousity, do you know about what portion of CP/M formats didn't follow the "typical" layout?

By the way, the default parameters on the parameter dialog are as following:
  • 90K image: Xerox 820 (40 tracks total, 3 sys-tracks, 1K block size, 1 directory block)
  • 200K image: 40 tracks total, 2 sys-tracks, 1K block size, 2 directory blocks.
  • Else: 5K per track, 2 sys-tracks, 2K block size, 2 directory blocks.
 
Last edited:

per

Veteran Member
Joined
Jan 21, 2008
Messages
3,006
Location
Western Norway
And now for a version that does not screw up the directory table of edited disk images!
 

Attachments

  • CPMdskTool.zip
    25.2 KB · Views: 2

Chuck(G)

25k Member
Joined
Jan 11, 2007
Messages
40,260
Location
Pacific Northwest, USA
...and there are some CP/M formats that are so weird that not even 22Disk can handle them using the description language. We have a special tool with the access methods hard-wired into the code.

I look at it as a testament to human ingenuity and Chairman Mao (1957).
 

1ST1

Veteran Member
Joined
Oct 21, 2014
Messages
1,305
Location
near frankfurt/m, germany
I will try it. How to make images from real existing disks and how to write them back using a modern PC with 32/64 Bit Windows?

By the way, DISKAUX on ATARI ST computers is also able to copy CP/M disks 1:1, I practized yesterday successfully with diskettes from my Olivetti ETV 250 (3.5 insch, single sided, 80 tracks, 16 sectors, 256 btes/sektor, 320 kB). With the diskmon TED I also was bale to look inside the sectors of such disks. (Usually ATARI ST uses MS-DOS compatible disk format)
 

per

Veteran Member
Joined
Jan 21, 2008
Messages
3,006
Location
Western Norway
I just want to make a small note that the previous version here still had some small hickups (it destroys the attribute bits, and the sector skew routines were backwards).

This version, which I've been properly testing for about a week now, should fix this. I've also implemented a nifty "Defragment" function that maps all files to sequencial block allocations. Technically, what this does is to read all the files, wipe every single block (including directory), and then write all the files back. This takes care of deleted entries, files with fragmented allocations, and random data in unused parts of the data-area. On writeback, however, the mentioned "ghost" allocation-blocks (if present) will be converted to blocks of zeroes and physically allocated. Thus, this function *might* end up increasing the amount of used disk space (and in the worst case dropping the last files in the directory if the disk gets full)! Eventually I might write a check for this, but it's not really any big deal since the program doesn't autosave the image.
 

Attachments

  • CPMDSKTool.zip
    28.6 KB · Views: 1

per

Veteran Member
Joined
Jan 21, 2008
Messages
3,006
Location
Western Norway
New version available!

Not much new stuff, but now it displays the number of files down at the info-bar and not only the number of directory-entries used. It also has a preset format that recognizes a 5MB harddisk (format matches one platter of the ST-412, with one system cylinder, using 8K blocks and with two blocks for directory).
 

Attachments

  • CPMdskTool.zip
    28.8 KB · Views: 2
Top