[Coco] Fixing OS-9 format for those that "roll their own"

Gene Heskett gheskett at wdtv.com
Thu Nov 14 19:11:26 EST 2013


On Thursday 14 November 2013 19:04:40 Wayne Campbell did opine:

> FAX
> AX
> 
> AX .x... m w
> 
> Robert Gault <robert.gault at att.net> wrote:
> >There is no question that the NitrOS-9 format command is not adjusting
> >DD.FMT in LSN0 to indicate whether a disk is hard or a floppy. We can
> >argue whether that should be done but it is my opinion that for a hard
> >disk, DD.FMT should be $82. At the very least, DD.FMT should not be $3
> >which indicates DD plus 2 sides.
> >
> >For those who want to compile format to fix this and for those that are
> >posting to the NitrOS-9 project, here is a suggested change.
> >
> >original code in Format
> >in the section * initialize sector 0
> >
> >L0561    ldb   <numsides  get number of sides
> >
> >          cmpb  #$01       just 1?
> >          beq   L0569      branch if so
> >          ora   #FMT.SIDE  else set double-sided bit
> >
> >L0569    tst   <tpi       48tpi?
> >
> >          beq   L056F      branch if so
> >          ora   #FMT.TDNS  else set 96 tpi
> >
> >L056F    sta   <DD.FMT,x  save
> >
> >
> >Suggested changes for hard drives
> >
> >* Patch to correctly indicate a hard drive.
> >L0561    tst   <dtype     obtained from the descriptor
> >
> >          bpl   L0561b     not a hard drive so go
> >          ora   #$80       indicate a hard drive
> >          bra   L0569      skip floppy sides; probably could also skip
> >          tpi
> >
> >L0561b   ldb   <numsides  get number of sides
> >
> >          cmpb  #$01       just 1?
> >          beq   L0569      branch if so
> >          ora   #FMT.SIDE  else set double-sided bit
> >
> >L0569    tst   <tpi       48tpi?
> >
> >          beq   L056F      branch if so
> >          ora   #FMT.TDNS  else set 96 tpi
> >
> >L056F    sta   <DD.FMT,x  save
> >
> >This has been tested and works correctly for both hard and floppy
> >drives.
> >
> >Robert
> >

I am not convinced the numsides checking is correct for a hard drive.

Why? We access hard drives, or at least the superscsi drivers I use do, by 
addressing the LSN, and the drive is smart enough to figure out the 
side/platter that LSN is on.  So our descriptors should be considered 
complete when they simply say its a hard drive.

Do we have drivers that do care?  That I don't know.  Discuss?

--
> >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)

Campus sidewalks never exist as the straightest line between two points.
		-- M. M. Johnston
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