Subject: RX01 8b/12b mode interaction

From: [email-masked] (Bob Supnik)
Date: 2 JAN 94 15:29:20

The RX8E/RX01 can operate in either 8b or 12b mode.  In 12b mode, two
8b bytes are used to store a 12b word.  The question: do 12b stores into
the buffer store low/high, or high/low, ie,

If I FILL the buffer in 12b mode:

	12b data 0, XDR
	12b data 1, XDR, etc

and then EMPTY the buffer in 8b mode, do I see

a)	XDR, data 0<4:11>
	XDR, 0'data 0<0:3>
	XDR, data 1<4:11>
	XDR, 0'data 1<0:3> etc OR

b)	XDR, 0'data 0<0:3>
	XDR, data 0<4:11>
	XDR, 0'data 1<0:3> etc OR
	XDR, data 1<4:11>

Thanks... /Bob

Bob Supnik	>[email-masked]
		>All opinions expressed are those of a hardline microcoder
		>and do not reflect those of Digital Equipment Corporation

---

From: [email-masked] (Charles Lasner)
Date: 4 Jan 1994 12:33:34 GMT

In article <[email-masked]>,
>the buffer store low/high, or high/low, ie,

The correct answer is that the sector is a bit stream.  12-bit mode takes
them out the same way as 8-bit mode does, just does it 12 at a time, not 8
at a time.  Thus, two 12-bit words are definable as word0[0-11] and
word1[0-11] in terms of identifying the bits in 12-bit mode.  8-bit mode
access to them would be byte[0-2].  The bits in the bytes are:

byte[0] -> word0[0-7] in the same left-to-right order as in the words
byte[1] -> word0[8-11] , word1[0-3]
byte[2] -> word1[4-11]

This is why any sector can be referenced in either mode, as long as you
are willing to forego the last 25% original values.  I think writing in
12-bit mode places the last transferred 8-bits data replicated into all of
the rest of the sector, 8-bits at a time.  A diagnostic probably checks
this!  (Note that no floppy i/o is needed to test this!)

RX50 is totally different!  If there are two adjacent bytes byte[0] and
byte[1], then the contents become:

byte[0] -> word0[0-7]
byte[1] -> word0[8-11], 0000

Yes, even bytes are preserved, but the low-order nybble of odd bytes get
zeroed out!

This is the crux of *why* OS/278 disks self-destruct when you type "SET
SYS OS278" (or similar).  (Or run FUTIL and write record 0):

There is apparently some DEC-wide convention (help us out here, Bob!)
regarding  at least all RX50 bootable volumes, perhaps more generic than
that.  In any case, as a result, the first 12 bytes of logical record 0 of
an RX50 are "sacred".  A value was assigned to OS/8-type systems that is
totally non-viable!  The reason is that a subset of the validity checking
for this value is in the DECmate II,III,III+ ROM's:  (I don't know the
full definition, just that which the DECmate actually checks for!)

byte[0]-byte[1] .AND. 377 = 000 (they are both 000 usually)
byte[2] is an index.  Use twice it and add two.

byte[index] .AND. byte[index+1] .AND. 010 = 010 (they are usually 10 and 11)
byte[index] + byte[index+1] + byte[index+2] + byte[index+3] .AND. 377 = 377

If the test fails, subtract two from index and repeat the test exactly once.

If it flunks again, the system is non-bootable!  Generally, hard disk
volumes use index value of 3 and floppy uses index value of 2.  (The hard
disk controller treats 12-bit and 8-bit identically to the RX50
controller!  The hard disk just moves the bytes two further down on the
record, but all else is the same, including self-destruction by OS/278, etc.)

Since the system can only write in 12-bit mode, the checksum part cannot
be preserved!  Thus, we have the brilliant (!) design of a system that
boots by reading in 12-bit mode a record that cannot be written in 12-bit
mode!  All routines to create boot blocks on the DECmate have to
pre-translate the intended 12-bit code into 8-bit, and write out in 8-bit
mode to ensure that the first 12 bytes on the record aren't affected! 
Needless to say, this is totally contrary to basic OS/8 philosophy at the
handler level!

(Note: I have a fix to this!  Before posting it, I want some input on just
how important preserving these volume header conventions are at this
point, etc.)

cjl