From: Jim Brain (brain_at_jbrain.com)
Date: 2009-01-25 23:30:50
Ruud@baltissen.org wrote:
> Hallo Marko,
>
>
>
>
> Bingo, it seems you know something I didn't. How did you know this ie.
> where did you find this info? Maybe I can get more info on that place for
> the following idea: why is the number of side sectors limited to six? If
> this number is hard coded, why cannot I expand it to 15, or better, 255?
> TIA!
>
http://www.zimmers.net/anonftp/pub/cbm/manuals/drives/1541-manual.txt.gz,
Section 7:
"The DOS keeps track of the tracks and blocks used, and even allows
records to overlap from one block to the next. It is able to do this
because it establishes side sectors, a series of pointers for the
beginning of each record. Each side sector can point to up to 120
records, and there may be 6 side sectors in a file. There can be up
to 720 records in a file, and each record can be up to 254 characters,
so the file could be as large as the entire diskette."
Why is the number limited to 6:
+---------------------------------------------------------------+
| SIDE SECTOR BLOCK |
+--------+------------------------------------------------------+
| BYTE | DEFINITION |
+--------+------------------------------------------------------+
| 0,1 | Track and block of next side sector block. |
+--------+------------------------------------------------------+
| 2 | Side sector number. (0-5) |
+--------+------------------------------------------------------+
| 3 | Record length. |
+--------+------------------------------------------------------+
| 4,5 | Track and block of first side sector (number 0) |
+--------+------------------------------------------------------+
| 6,7 | Track and block of second side sector (number 1) |
+--------+------------------------------------------------------+
| 8,9 | Track and block of third side sector (number 2) |
+--------+------------------------------------------------------+
| 10,11 | Track and block of fourth side sector (number 3) |
+--------+------------------------------------------------------+
| 12,13 | Track and block of fifth side sector (number 4) |
+--------+------------------------------------------------------+
| 14,15 | Track and block of sixth side sector (number 5) |
+--------+------------------------------------------------------+
| 16-256 | Track and block pointers to 120 data blocks. |
+--------+------------------------------------------------------+
Now, you can expand beyond 6, but you'd need to (as Marko points out)
pull the "super side sector" code from the 1581 or the IEEE drives.
Howver, if you're adding this to a list of things to do, I would put it
*way* down on the priority list. Few folks use REL files, and almost no
apps would need > 720 records (they handle the limit by creating
multiple REL files, if needed), so I think there are better ways to
spend your free moments. I implemented REL file support on uIEC *just*
to shut the "Hah! It doesn't even support REL files" crowd up, not
because I had a bunch of folks who genuinely cared. (At work, I call
these "checkoff items". The folks use the lack of a feature as an easy
way to yank the product from consideration, not because they actually
need the feature).
Now, I temper that with the fact that I just got in the mail a 1581 disk
from a gentleman in Arkansas who is 80 and uses his Commodore to manage
books for area school libraries (as I understand it). He called (no
email) noting that his CMD HD had bitten the dust, his FD is acting
flaky, and he's worried about his 1581, and he was wondering if uIEC
would handle his small book management app (BASIC) that uses REL files.
Thus, for him, I'm glad I labored to add support, and I asked him to
send me the app so I could test it.
Jim
Jim
Message was sent through the cbm-hackers mailing list
Archive generated by hypermail pre-2.1.8.