[Coco] Another Coco Virtual Disk Util
Gene Heskett
gheskett at wdtv.com
Wed Oct 23 14:01:36 EDT 2013
On Wednesday 23 October 2013 13:29:34 Bob Devries did opine:
> It is my understanding that FLOPPY drives have a PD.SAS of 8, and HARD
> drives use 32 ($20). That is done to prevent excessive fragmentation. I
> know I have always used 32 on my hard drives. And isn't a VHD file just
> another form of hard drive?
>
> Gene Heskett can give us chapter and verse on this. He's the resident
> expert.
Expert, thats a leak under pressure I have been repeatedly told. ;-)
Thanks for the flowers Bob.
That said, any floppy descriptor I have setup for more than the default 35
track SS disk, more or less automatically gets a SAS=20. If I get a disk
full error, and the disk is really about full, I may go back to an 08 or
less just to fill the disk if its important to keep it all in one sock.
You could even use $20 (32) on the 160k default, there will be almost zero
difference (and virtually zero fragmentation) because while it may ask for
$20 sectors to write the file, if the file is only 200 decimal bytes, then
30 of those sectors will be returned to the allocation map as free as it
cleans up after writing that file. Said a different way the file itself
would then use one sector for its FD sector, and one for the files
contents, leaving 30 unused, and which is returned to the allocation map as
free for use.
The disk would be declared full if there is not SAS contiguous sectors
free. So you could reduce SAS and then write several more smaller files.
But there would not be any more wasted space on the disk other than the
extension, 2nd FD.SEG of the root directory would be using 32 sectors
instead of 8 in that case, but that should be the only "wasted" space on
the disk.
Note also that when a new directory is created, it will be SAS sectors
long, but the actual length of the directory file will be one less because
the FD sector is part of that allocation. If worried about space, and you
are creating a new directory that will only have 10 or so files in it, I
would set SAS=04 so as to not waste the extra sectors that will never be
used in practice. You will get a directory that will hold 3*8-2 = 22 files
that way before it has to be extended by another SAS sectors, whatever SAS
is at the time the extension is needed. The -2 is the . and .. entries of
course.
I hope this is helpful.
>
> Regards, Bob Devries
> Dalby, QLD, Australia
>
> ----- Original Message -----
> From: "Walt Zydhek" <walt at wzydhek.com>
> To: "'CoCoList for Color Computer Enthusiasts'" <coco at maltedmedia.com>
> Sent: Wednesday, October 23, 2013 11:54 AM
> Subject: Re: [Coco] Another Coco Virtual Disk Util
>
> > Yup, it's because each of the directories on your original have a
> > minimum of
> > 20 sectors allocated to them instead of the default 8. The PD.SAS
> > value is probably $20 instead of $08 in the virtual machine that
> > formatted that original vhd. Do a dmode of that drive to see what the
> > SAS value is set to.
> >
> > -Walt Zydhek
> >
> > -----Original Message-----
> > From: coco-bounces at maltedmedia.com
> > [mailto:coco-bounces at maltedmedia.com] On
> > Behalf Of Wayne Campbell
> > Sent: Tuesday, October 22, 2013 6:47 PM
> > To: CoCoList for Color Computer Enthusiasts
> > Subject: Re: [Coco] Another Coco Virtual Disk Util
> >
> > Yes it was. The one I made today was using that one as source and
> > copying to
> > a new one made with the new version today. The resulting free space is
> > the same whether I use the original (Archives) or the second
> > (Archive), so that
> > tells me the original is using more space than the new, but over
> > 100,000 bytes? That's alot of wasted space.
> >
> > Format defaults to 32 sector allocation. I forgot to change it to 1
> > sector allocations, but EmuDisk doesn't give me an option to change
> > it.
> >
> > Wayne
> >
> > On Oct 22, 2013 9:15 PM, "Walt Zydhek" <walt at wzydhek.com> wrote:
> >> Question.. the 2 files you just sent me. The NEW version (RiBBS
> >> Archive.vhd, not plural), was it created and copied to BEFORE I fixed
> >> the sector allocation in directory creation? Because it looks like
> >> it. I see directories with their initial segment having a single
> >> sector. And comparing it to the source version, I can see where the
> >> freespace went in the source. It is using a default segment
> >> allocation of $20 (when directories are created, it allocates 32
> >> sectors automatically instead of the norm of 8). Please check your
> >> SAS value for your drive in DMODE and see if it says $08 or $20.
> >> Regardless, if the Destination version was created and copied to
> >> AFTER my fix to directory sector allocation, then there is another
> >> bug there somewhere, as it should be creating initial segments for
> >> directories at the default PD.SAS value of 8 sectors.
> >>
> >> -Walt Zydhek
> >>
> >> -----Original Message-----
> >> From: coco-bounces at maltedmedia.com
> >> [mailto:coco-bounces at maltedmedia.com]
> >> On
> >> Behalf Of Wayne Campbell
> >> Sent: Tuesday, October 22, 2013 5:30 PM
> >> To: CoCoList for Color Computer Enthusiasts
> >> Subject: Re: [Coco] Another Coco Virtual Disk Util
> >>
> >> I used RiBBS Archive (the new copy) as source.
> >> I created a vhd image 5760 tracks, 64 sectors/track. Free Space after
> >> format:
> >>
> >> 94323456
> >>
> >> I drag'd the root directory from the source vhd to the destination
> >> vhd. Source vhd free space: 89308928 (this was the new copy
> >> yesterday) Destination vhd free space: 89299200 (after copying) The
> >> original source vhd free space: 89196000
> >>
> >> All disks had the same amount of free space when formatted and before
> >> copying any files. There may be a few deleted files in the original,
> >> but I don't think it's over 100k worth when the average filesize for
> >> files I create are <4K overall.
> >>
> >> Wayne
> >>
> >> --
> >> Coco mailing list
> >> Coco at maltedmedia.com
> >> http://five.pairlist.net/mailman/listinfo/coco
> >>
> >>
> >> --
> >> Coco mailing list
> >> Coco at maltedmedia.com
> >> http://five.pairlist.net/mailman/listinfo/coco
> >
> > --
> > Coco mailing list
> > Coco at maltedmedia.com
> > http://five.pairlist.net/mailman/listinfo/coco
> >
> >
> > --
> > Coco mailing list
> > Coco at maltedmedia.com
> > http://five.pairlist.net/mailman/listinfo/coco
>
> --
> Coco mailing list
> Coco at maltedmedia.com
> http://five.pairlist.net/mailman/listinfo/coco
Cheers, Gene
--
"There are four boxes to be used in defense of liberty:
soap, ballot, jury, and ammo. Please use in that order."
-Ed Howdershelt (Author)
In those days he was wiser than he is now -- he used to frequently take
my advice.
-- Winston Churchill
A pen in the hand of this president is far more
dangerous than 200 million guns in the hands of
law-abiding citizens.
More information about the Coco
mailing list