Re: [Simh] RP/RM differences in header commands (for ITS, salvager)

2019-06-29 Thread Lars Brinkhoff
Johnny Billquist wrote:
> Right. But that sounded what the OP was looking for. He noted that
> serial number and information was written to the pack. The serial
> number is never, as far as I can remember, for any disk drive, written
> anywhere in any header fields or similar.

The ITS program called SALV apparently retrieves the drive serial number
with a device command, then proceeds to write this number to every
sector header, in the first key field.  The second key field holds the
pack number, as specified by the user when formatting the pack.

___
Simh mailing list
Simh@trailing-edge.com
http://mailman.trailing-edge.com/mailman/listinfo/simh

Re: [Simh] RP/RM differences in header commands (for ITS, salvager)

2019-06-28 Thread Johnny Billquist

On 2019-06-28 15:45, Paul Koning wrote:




On Jun 28, 2019, at 3:07 AM, Johnny Billquist  wrote:


 From a hardware point of view, sector header "Word 3" and "Word 4" have
no particular meaning.  Just for completeness, can you point me to a
reference where "pack number" is defined or used by the software?


Search for DEC standard 144. If nothing else, I think there is a description in 
the RL11 documentation. (Me trusting my memory once more...)


That's different, though.  It describes the bad block table, which includes a 
pack serial number in its header.  Some device types use 144, some do not (in 
particular, on RP/RM there is a mix -- RP04/5/6 do not, RP07 and RM02/3/5/80 
do).  The 144 table is purely a software construct, a bit of data placed by 
convention in the last few sectors of the drive and interpreted by the OS.  For 
example, in RSTS the bad block table is read to mark those blocks as 
unavailable, and the serial number is read and displayed during formatting but 
not otherwise used for anything.


Right. But that sounded what the OP was looking for. He noted that 
serial number and information was written to the pack. The serial number 
is never, as far as I can remember, for any disk drive, written anywhere 
in any header fields or similar. It's always just on a normal block. 
Most packs that have anything reserve the last track or similar for this 
kind of information. And that is what DEC STD 144 is about. For disk 
packs that do not follow that standard (if we only talk about DEC disks 
here), then there is no common area where a serial number will be stored.


  Johnny

--
Johnny Billquist  || "I'm on a bus
  ||  on a psychedelic trip
email: b...@softjar.se ||  Reading murder books
pdp is alive! ||  tryin' to stay hip" - B. Idol
___
Simh mailing list
Simh@trailing-edge.com
http://mailman.trailing-edge.com/mailman/listinfo/simh

Re: [Simh] RP/RM differences in header commands (for ITS, salvager)

2019-06-28 Thread Clem Cole
FWIW:   When Ted and I wrote fcsk in the mid 1970s, (after some arguing
about assuming perfect media) we added the notion of a bad block list to
the assign to the bad block file (it was not in the original code), but we
knew nothing about BAD144 at the time since we both were students.   Ultrix
[and Tru64] was later fixed (early 80s) to obey BAD144 (thank you, Fred
Canter).   IIRC, that part of the Ultrix code got sent back to UCB and
showed up in some later versions, but I've forgotten.   As I recall, the
Unix driver was modified after getting a bad block error from the
controller, to mark the block as bad and pick a replacement from BAD144.
 The problem was that the caused stray seeks under the covers after the
reformat.

I remember having a conversation with Fred at one time approx 1981-2 ish,
about not doing the replacement at all if the block was in the free list,
then assigning to the bad file so the seeks never occurred (*i.e.* creating
perfect media - which is what UNIX assumed).  I've forgotten the result of
that conversation.
ᐧ

On Fri, Jun 28, 2019 at 9:46 AM Paul Koning  wrote:

>
>
> > On Jun 28, 2019, at 3:07 AM, Johnny Billquist  wrote:
> >
> >> From a hardware point of view, sector header "Word 3" and "Word 4" have
> >> no particular meaning.  Just for completeness, can you point me to a
> >> reference where "pack number" is defined or used by the software?
> >
> > Search for DEC standard 144. If nothing else, I think there is a
> description in the RL11 documentation. (Me trusting my memory once more...)
>
> That's different, though.  It describes the bad block table, which
> includes a pack serial number in its header.  Some device types use 144,
> some do not (in particular, on RP/RM there is a mix -- RP04/5/6 do not,
> RP07 and RM02/3/5/80 do).  The 144 table is purely a software construct, a
> bit of data placed by convention in the last few sectors of the drive and
> interpreted by the OS.  For example, in RSTS the bad block table is read to
> mark those blocks as unavailable, and the serial number is read and
> displayed during formatting but not otherwise used for anything.
>
> paul
>
>
> ___
> Simh mailing list
> Simh@trailing-edge.com
> http://mailman.trailing-edge.com/mailman/listinfo/simh
___
Simh mailing list
Simh@trailing-edge.com
http://mailman.trailing-edge.com/mailman/listinfo/simh

Re: [Simh] RP/RM differences in header commands (for ITS, salvager)

2019-06-28 Thread Paul Koning


> On Jun 28, 2019, at 3:07 AM, Johnny Billquist  wrote:
> 
>> From a hardware point of view, sector header "Word 3" and "Word 4" have
>> no particular meaning.  Just for completeness, can you point me to a
>> reference where "pack number" is defined or used by the software?
> 
> Search for DEC standard 144. If nothing else, I think there is a description 
> in the RL11 documentation. (Me trusting my memory once more...)

That's different, though.  It describes the bad block table, which includes a 
pack serial number in its header.  Some device types use 144, some do not (in 
particular, on RP/RM there is a mix -- RP04/5/6 do not, RP07 and RM02/3/5/80 
do).  The 144 table is purely a software construct, a bit of data placed by 
convention in the last few sectors of the drive and interpreted by the OS.  For 
example, in RSTS the bad block table is read to mark those blocks as 
unavailable, and the serial number is read and displayed during formatting but 
not otherwise used for anything.

paul


___
Simh mailing list
Simh@trailing-edge.com
http://mailman.trailing-edge.com/mailman/listinfo/simh

Re: [Simh] RP/RM differences in header commands (for ITS, salvager)

2019-06-28 Thread Johnny Billquist

On 2019-06-28 00:59, Rob Doyle wrote:

On 6/26/2019 9:54 PM, Lars Brinkhoff wrote:

SALV actually writes data for an entire track all in one go.  I tried
something which skips the headers in the middie.  But there must be
something else wrong with my code, because when reading back the sector
data I just get zeroes.

Anway, I agree something like that would go most of the way to make SALV
happy.  There's another part of SALV that reads the header information
go access the pack number written there, but I'm not sure how that
number is used later.


I think that should work. When executing the "write header plus data"
command, the state machine in my FPGA's RP06 controller just handles the
first two 36-bit words (technically four 16-bit words) specially and
jumps to the "write data only" states to transfer the non-header data.
Ditto read and write check commands.


Sounds like what I'm advocating.


This part of the FPGA passes all of the RP06 diagnostics - so I believe
it is correct.


That is really interesting to hear.


 From a hardware point of view, sector header "Word 3" and "Word 4" have
no particular meaning.  Just for completeness, can you point me to a
reference where "pack number" is defined or used by the software?


Search for DEC standard 144. If nothing else, I think there is a 
description in the RL11 documentation. (Me trusting my memory once more...)


  Johnny

--
Johnny Billquist  || "I'm on a bus
  ||  on a psychedelic trip
email: b...@softjar.se ||  Reading murder books
pdp is alive! ||  tryin' to stay hip" - B. Idol
___
Simh mailing list
Simh@trailing-edge.com
http://mailman.trailing-edge.com/mailman/listinfo/simh

Re: [Simh] RP/RM differences in header commands (for ITS, salvager)

2019-06-27 Thread Rob Doyle

On 6/26/2019 9:54 PM, Lars Brinkhoff wrote:

SALV actually writes data for an entire track all in one go.  I tried
something which skips the headers in the middie.  But there must be
something else wrong with my code, because when reading back the sector
data I just get zeroes.

Anway, I agree something like that would go most of the way to make SALV
happy.  There's another part of SALV that reads the header information
go access the pack number written there, but I'm not sure how that
number is used later.


I think that should work. When executing the "write header plus data"
command, the state machine in my FPGA's RP06 controller just handles the
first two 36-bit words (technically four 16-bit words) specially and
jumps to the "write data only" states to transfer the non-header data.
Ditto read and write check commands.

This part of the FPGA passes all of the RP06 diagnostics - so I believe
it is correct.

From a hardware point of view, sector header "Word 3" and "Word 4" have
no particular meaning.  Just for completeness, can you point me to a
reference where "pack number" is defined or used by the software?

Rob Doyle







___
Simh mailing list
Simh@trailing-edge.com
http://mailman.trailing-edge.com/mailman/listinfo/simh

Re: [Simh] RP/RM differences in header commands (for ITS, salvager)

2019-06-27 Thread Johnny Billquist

Sorry, I did oversimplify it, yes.

Essentially, I meant that you should write the data part as a normal 
write, and ignore the extra fluff required for the write header. That 
ought to make most software happy.


So, skipping extra words intended for the header, adjust size accordingly.

  Johnny

On 2019-06-27 04:05, Bob Supnik wrote:
I don't think it's that straightforward. The write header and data 
command must include the proper Massbus word count for header and data. 
The Unibus side of the RH11 is doing 18b transfers, and so is the disk 
side, so the word count ought to be 260 for an RP and 258 for an RM.


If the simulator doesn't "skip" the right number of header words, SALV 
is going to fail on its block data check.


/Bob

On 6/26/2019 7:37 PM, simh-requ...@trailing-edge.com wrote:

I would vote for someone doing just the naive write as a starting point.
I think much software will be happy enough with just that, and then we
can look at specific when we locate software that really do care about
what is written into the headers.

    Johnny


___
Simh mailing list
Simh@trailing-edge.com
http://mailman.trailing-edge.com/mailman/listinfo/simh



--
Johnny Billquist  || "I'm on a bus
  ||  on a psychedelic trip
email: b...@softjar.se ||  Reading murder books
pdp is alive! ||  tryin' to stay hip" - B. Idol
___
Simh mailing list
Simh@trailing-edge.com
http://mailman.trailing-edge.com/mailman/listinfo/simh

Re: [Simh] RP/RM differences in header commands (for ITS, salvager)

2019-06-26 Thread Lars Brinkhoff
SALV actually writes data for an entire track all in one go.  I tried
something which skips the headers in the middie.  But there must be
something else wrong with my code, because when reading back the sector
data I just get zeroes.

Anway, I agree something like that would go most of the way to make SALV
happy.  There's another part of SALV that reads the header information
go access the pack number written there, but I'm not sure how that
number is used later.


Bob Supnik wrote:
> I don't think it's that straightforward. The write header and data
> command must include the proper Massbus word count for header and
> data. The Unibus side of the RH11 is doing 18b transfers, and so is
> the disk side, so the word count ought to be 260 for an RP and 258 for
> an RM.
>
> If the simulator doesn't "skip" the right number of header words, SALV
> is going to fail on its block data check.
>
> /Bob
>
> Johnny Billquist wrote:
>> I would vote for someone doing just the naive write as a starting
>> point.  I think much software will be happy enough with just that,
>> and then we can look at specific when we locate software that really
>> do care about what is written into the headers.

___
Simh mailing list
Simh@trailing-edge.com
http://mailman.trailing-edge.com/mailman/listinfo/simh

Re: [Simh] RP/RM differences in header commands (for ITS, salvager)

2019-06-26 Thread Bob Supnik
I don't think it's that straightforward. The write header and data 
command must include the proper Massbus word count for header and data. 
The Unibus side of the RH11 is doing 18b transfers, and so is the disk 
side, so the word count ought to be 260 for an RP and 258 for an RM.


If the simulator doesn't "skip" the right number of header words, SALV 
is going to fail on its block data check.


/Bob

On 6/26/2019 7:37 PM, simh-requ...@trailing-edge.com wrote:

I would vote for someone doing just the naive write as a starting point.
I think much software will be happy enough with just that, and then we
can look at specific when we locate software that really do care about
what is written into the headers.

Johnny


___
Simh mailing list
Simh@trailing-edge.com
http://mailman.trailing-edge.com/mailman/listinfo/simh

Re: [Simh] RP/RM differences in header commands (for ITS salvager)

2019-06-26 Thread Johnny Billquist

On 2019-06-26 19:54, Bob Supnik wrote:
Implementing a more complete form of read/write/write check header is 
not as straightforward as I thought, because the RP and RM drives use 
different header formats.


The RP expects 4 16 bit words, of which the first two are used, and the 
second are "for software". Word 0 is cylinder plus 18b/16b, word 1 is 
sector, words 2 and 3 are "keywords".


The RM expects 2 16 bit words, both used. Word 0 is cylinder plus 
18b/16b plus two bad block indicators. Word is 1 is track and sector.


The simulator supports the RP06, RP07, RM02/3, RM05, and RM80. I'm not 
sure if the RP07, RM05, or RM80 were ever actually qualified for the 
KS10. However, the RP06 and RM02 both shipped with the system, so the 2 
word/4 word distinction would have to be implemented.


I can't find the sector format for the RP07 which, despite its name, 
behaved like an RM series drive.


The RP07 is actually even more complicated. I wrote a formatter for RSX 
for it at one point. It was more of a hack than really properly doing 
the formatting. As far as I remember, for the RP07, you can even specify 
the gap between sectors, which potentially allows you to map around bad 
spots on the disk. So there is information about that kind of things in 
the header as well.


I can't remember where I got the RP07 information from back then, but 
probably the set of microfiches we had.


I would vote for someone doing just the naive write as a starting point. 
I think much software will be happy enough with just that, and then we 
can look at specific when we locate software that really do care about 
what is written into the headers.


  Johnny

--
Johnny Billquist  || "I'm on a bus
  ||  on a psychedelic trip
email: b...@softjar.se ||  Reading murder books
pdp is alive! ||  tryin' to stay hip" - B. Idol
___
Simh mailing list
Simh@trailing-edge.com
http://mailman.trailing-edge.com/mailman/listinfo/simh

[Simh] RP/RM differences in header commands (for ITS salvager)

2019-06-26 Thread Bob Supnik
Implementing a more complete form of read/write/write check header is 
not as straightforward as I thought, because the RP and RM drives use 
different header formats.


The RP expects 4 16 bit words, of which the first two are used, and the 
second are "for software". Word 0 is cylinder plus 18b/16b, word 1 is 
sector, words 2 and 3 are "keywords".


The RM expects 2 16 bit words, both used. Word 0 is cylinder plus 
18b/16b plus two bad block indicators. Word is 1 is track and sector.


The simulator supports the RP06, RP07, RM02/3, RM05, and RM80. I'm not 
sure if the RP07, RM05, or RM80 were ever actually qualified for the 
KS10. However, the RP06 and RM02 both shipped with the system, so the 2 
word/4 word distinction would have to be implemented.


I can't find the sector format for the RP07 which, despite its name, 
behaved like an RM series drive.


/Bob

___
Simh mailing list
Simh@trailing-edge.com
http://mailman.trailing-edge.com/mailman/listinfo/simh