[Coco] CoCoSDC question: default .DSK size?

Darren A mechacoco at gmail.com
Wed Dec 17 19:44:20 EST 2014


On Wed, Dec 17, 2014 at 5:01 PM, Allen Huffman <alsplace at pobox.com> wrote:

> > On Dec 17, 2014, at 4:01 PM, Darren A <mechacoco at gmail.com> wrote:
> >
> > No. DSK files will auto-expand with or without a header. The only
> > information in the header that has any significance to the CoCo SDC is
> the
> > number of sides (1 or 2). Without a header, the number of sides has to
> > determined from the size of the DSK file.
>
> 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.

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

Darren


More information about the Coco mailing list