On Mon, Jul 17, 2023 at 1:05 PM Paul Koning via cctalk
<cctalk(a)classiccmp.org> wrote:
On Jul 17,
2023, at 12:51 PM, Ethan Dicks via cctalk <cctalk(a)classiccmp.org> wrote:
On Mon, Jul 17, 2023 at 12:48 PM Ethan Dicks <ethan.dicks(a)gmail.com> wrote:
From:
http://www.chdickman.com/pdp11/pro380.txt
"The RX50 floppy starts at track 1. Track 0 is logically placed after
track 79. The sectors are...
It should be "... interleaved 1, 3, 5, 7, 9, 0, 2, 4, 6, 8..." There
is no "sector 10" when counting from 0.
-ethan
I don't know what to make of that web page's description, it certainly
doesn't have much connection to reality. Are those numbers supposed to represent the
placement of logical sector numbers onto the physical track? If so, they show 5:1
interleave rather than 2:1 interleave. Or do they represent the physical sector numbers
for consecutive logical sectors? If so, it seems to be backwards.
It looks like it represents how to go from a physical track to get
things back in the logical order that one would see from a PDP-11 or
VAX on real hardware - i.e., the boot block (if any) is the very first
thing you encounter.
I agree, it's not a 2:1 interleave in any classic sense.
The actual algorithm is what I wrote in my previous
email, which you can also find in my RSTSFLX tools. That has been tested against real
world RX50 floppies, and against the source code of the RT11 RX50 driver.
Chuck Dickman's algorithm is in lbn2rx50.c
#define RX50_TRACKS 80
#define RX50_SECTORS 10
int interleave[] = { 0, 2, 4, 6, 8, 1, 3, 5, 7, 9 };
track = lbn/RX50_SECTORS;
track = (track + 1)%RX50_TRACKS;
sector = lbn%RX50_SECTORS;
sector = (interleave[sector] + 2*(track - 1) + RX50_SECTORS)%RX50_SECTORS;
-ethan