[Coco] CoCoSDC question: default .DSK size?
Robert Gault
robert.gault at att.net
Wed Dec 17 23:36:16 EST 2014
Allen Huffman wrote:
>> On Dec 17, 2014, at 6:44 PM, Darren A <mechacoco at gmail.com> wrote:
>>
>> On Wed, Dec 17, 2014 at 5:01 PM, Allen Huffman <alsplace at pobox.com> wrote:
>>> Does this mean if I do:
>>>
>>> DRIVE 1,"42TRACKS.DSK",NEW
>>>
>>> ...then I write to track 42, it *will* become a 42 track disk image?
>>
>>
>> It will for as long as it remains mounted.
>>
>> Since the image has no header, the *next* time it is mounted the rules of
>> the disk geometry table will be applied. Having more than 40 tracks, it
>> will be treated as a double-sided image.
>
> Ah, that is very good to know. Therefore, it can’t really tell the difference between a 40 track double sided disk image, and an 80 track single sided, without the header. It has to assume, but then it still works the same (sector 0 - sector n) I guess.
>
>> You could choose to initially create your DSK images as 42 track
>> double-sided images before copying anything onto them. It's a little
>> wasteful of space, but you eliminate the need to manually insert a header.
>>
>> The program below can be used to create a 42 track double-sided DSK image,
>> mounting it in drive 1.
>>
>> 10 CLEAR 200:F$=STRING$(128,255)
>> 20 INPUT "NEW DSK FILE";D$
>> 30 DRIVE 1,D$,NEW
>> 40 DRIVE 1,2
>> 50 DSKO$ 1,13,18,F$,F$
>> 60 DRIVE 1,UNLOAD
>> 70 DRIVE 1,D$
>> 80 FOR S=1 TO 18
>> 90 DSKO$ 1,17,S,F$,F$
>> 100 NEXT
>
> Man, too many years. DSKO$ is drive, track and sector, then two 128 byte strings (because a string couldn’t be 256 bytes?). Is that right? Track 13 was the directory track?
>
> In the case of the common Disk BASIC patches, double sided was used, but each side was treated like a single 40 track disk since having more than that needed more memory for the allocation table and stuff and broke compatibility. However, it seems likely I will have some disks like that too — but I would copy them as separate floppies (DIR 0 was one side, DIR 1 was the other) since that’s really what they were.
>
> For OS-9, though, a double sided image would be needed.
>
> I am starting to dread all the various disk formats I am going to run in to, going back to 1983 ;-) Yipes!
>
> --
> Allen Huffman - PO Box 22031 - Clive IA 50325 - 515-999-0227 (vmail/TXT only)
> Sub-Etha Software - http://www.subethasoftware.com - Established 1990!
> Sent from my MacBook.
>
> P.S. Since 4/15, I have earned OVER $370 in Amazon gift cards via Swagbucks! Use my link and I get credit:
> http://swagbucks.com/refer/allenhuffman
>
>
>
>
>
Better do a CLEAR 600 or you may run out of string space.
More information about the Coco
mailing list