It's possible to trigger a possible bug in the CMD HD firmware, creating a directory with so many spaces in the name that it overwrites the next directory entry. Here are my steps using 2.1:
1: get 2.1 d64 to a 1541 (dev 8). My cmd hd is on dev 13.
load"*",8
run
In cbm commander, follow these keypresses:
d (select drive)
13 (select cmd hd)
@cp130 (my test partition)
At this point, I'm in the test partition. I tested with an empty partition as I had to diredit the first one this occured on.
Press F7 to make a new directory, then just press return. The commander comes back with a garbage directory name. Upon exit, the directory is like so:
130 "test " hd 1h
2 "
8224 dir
Note that 8224 is 32*256+32. This means two spaces are present where the file size entry in the directory would be.
There are two issues here: First, cbm commander should treat an empty directory name as a cancel request or present an error.
The second issue is likely not within cbm commander but can be mitigated by checking the name of the directory before submitting to the drive.
I'm curious to see the string cbm commander sends in this instance to understand why the cmd hd proceeds with creating the directory. :)
Comments: ** Comment from web user: jbevren **
1: get 2.1 d64 to a 1541 (dev 8). My cmd hd is on dev 13.
load"*",8
run
In cbm commander, follow these keypresses:
d (select drive)
13 (select cmd hd)
@cp130 (my test partition)
At this point, I'm in the test partition. I tested with an empty partition as I had to diredit the first one this occured on.
Press F7 to make a new directory, then just press return. The commander comes back with a garbage directory name. Upon exit, the directory is like so:
130 "test " hd 1h
2 "
8224 dir
Note that 8224 is 32*256+32. This means two spaces are present where the file size entry in the directory would be.
There are two issues here: First, cbm commander should treat an empty directory name as a cancel request or present an error.
The second issue is likely not within cbm commander but can be mitigated by checking the name of the directory before submitting to the drive.
I'm curious to see the string cbm commander sends in this instance to understand why the cmd hd proceeds with creating the directory. :)
Comments: ** Comment from web user: jbevren **
I did discover after some trial and error that it's a cmd hd dos bug. On v1.92, I used this:
@"md: "
Note that there's no space between d and ". This results in a bad directory entry, although the directory itself is intact.