[Coco] format memory (was) Gotek floppy emulator

William Astle lost at l-w.ca
Tue Feb 16 16:32:58 EST 2016


On 2016-02-16 14:07, Tormod Volden wrote:
> On Tue, Feb 16, 2016 at 9:43 PM, Bill Nobel wrote:
>> If memory serves me correct Tormond.  Format uses the user space for the 11120 bytes for the Track being formatted.  Format uses this memory as the Track definition (including pre and post track stuff) this data is written to the physical track on the drive.  It is not just the
>
> Thanks for chiming in, Bill. I think (from a cursory glance at the
> code) that the physical writes to disk are sector by sector. Why would
> it need to stage a whole track in memory? And, with typically 18
> sectors/track, that would be only 4608 bytes for a track.
>
>> sector itself.  The only thing that should come out of the system space for memory is the path and device table entries.
>
> So it shouldn't be such a system memory hog then?
>
> Tormod
>

For floppies, you have to issue a "write track" command to the 
controller. (This includes anything that pretends to be a standard 
floppy drive/controller combination.) That command *does* need the whole 
track data in one lump, and the total size of that is larger than the 
data size of 18 sectors. Depending on the specific implementation of the 
floppy driver, this might require a system memory buffer the size of the 
raw track data.

For "hard drives" that don't do a low level format, or for systems where 
low level formats are handled entirely by the controller, that concern 
isn't there and it can go ahead and just write the sectors one by one 
without having to stage a complete track ahead of time.



More information about the Coco mailing list