<< Previous Message Main Index Next Message >>
<< Previous Message in Thread This Month Next Message in Thread >>
Date   : Sun, 28 May 2006 00:01:52 +0100
From   : "Mike" <profpep@...>
Subject: Re: Back in circulation

>
> The "Format Unit" command (opcode 04H) doesn't specify the sector size,
> so it has to be set elsewhere.
>
Usually referred to as the block size in the SCSI world.

It's usually set with the 'Mode Select' (&15) command:

You can tell if a Mode item can be changed by doing a 'Mode Sense' (&1A)
command, with the page control field &3F, which should return a list with
the adjustable page numbers set to '1'

Somwhere I have some scrappy code I wrote to do disc checking when I got my
Seagate 80M SCSI to run on my BBC. It was a 5.25" half height one. I know
that some of the IBM smaller SCSI drives will set to 256 bytes/block too - I
did them for some local schools' fileserver., I'll try and dig the code up,
but I'll have to rewrite quite a bit of it to make it more generally
useable. I got my start from Mike Tubby's code too.

The mode select part runs around an 8 byte parameter block like this:

Byte 0 Density Code (usually set to 0 for a hard disc to indicate only one
density is available)
Byte 1 Number of Blocks (MSB)
Byte 2 Number of Blocks
Byte 3 Number of Blocks (LSB) specifies the number of blocks to be formatted
Byte 4 (reserved on the drives I used)
Byte 5 Block Length (MSB)
Byte 6 Block Length (MSB)
Byte 7 Block Length (LSB)

I seem to remember that you can format a SCSI disc with different areas
having different block lengths. I think this was used for some clever
database systems, though I may just be remembering wrong.

I think your first port of call is a copy of the SCSI 1/2 standard, then a
look at the way the formatter passed SCSI comands. Biggest problem I had was
enough buffer space for the data returned from some of them. At least the
later drives don't need explicit defect lists typing in!

Western digital used to give away a program called SCSIBench. You coud issue
any SCSI command to a drive with it. Perhaps the answer might be to do the
mode sense part on a PC then format on the BBC.

||\/||ike
<< Previous Message Main Index Next Message >>
<< Previous Message in Thread This Month Next Message in Thread >>