howto bitsavers BASIC-11 v2 disk image under simh
glen.slick at gmail.com
Thu Aug 12 19:50:08 CDT 2021
On Thu, Aug 12, 2021 at 5:29 PM Fritz Mueller <fritzm at fritzm.org> wrote:
> > On Aug 12, 2021, at 3:31 PM, Glen Slick <glen.slick at gmail.com> wrote:
> > If I translate the logical
> > sector order RX-02 disk image back into a physical sector order disk
> > image (dealing with track shifting, sector interleaving, and track to
> > track sector skewing) then RT-11 on SIMH is happy with the disk image.
> Ah, interesting... Where's the best place to look for more information in the RX02 RT-11 logical/physical mapping?
> Glen, if you wouldn't mind sending me a copy of your resulting simh-compatible image, I'd be happy to post it in an upcoming blog article for others who might find it useful as well...
One bit of information that I found helpful as a reference when I
looked at this quite a while ago was the 2.11BSD RX02 floppy disk
device driver source code, which can be viewed online here:
In particular, the routine rxfactr(), which as the comment says it
calculates the physical sector and physical track on the disk for a
given logical sector.
I used that as a starting point to write a simple utility to read an
RX-02 disk image file in logical sector order and output an RX-02 disk
image file in physical sector order.
* rxfactr -- calculates the physical sector and physical
* track on the disk for a given logical sector.
* the logical sector number (0 - 2001) is converted
* to a physical sector number (1 - 26) and a physical
* track number (0 - 76).
* the logical sectors specify physical sectors that
* are interleaved with a factor of 2. thus the sectors
* are read in the following order for increasing
* logical sector numbers (1,3, ... 23,25,2,4, ... 24,26)
* There is also a 6 sector slew between tracks.
* Logical sectors start at track 1, sector 1; go to
* track 76 and then to track 0. Thus, for example, unix block number
* 498 starts at track 0, sector 25 and runs thru track 0, sector 2
* (or 6 depending on density).
rxfactr(sectr, psectr, ptrck)
register int sectr;
int *psectr, *ptrck;
register int p1, p2;
p1 = sectr / 26;
p2 = sectr % 26;
/* 2 to 1 interleave */
p2 = (2 * p2 + (p2 >= 13 ? 1 : 0)) % 26;
/* 6 sector per track slew */
*psectr = 1 + (p2 + 6 * p1) % 26;
if (++p1 >= 77)
p1 = 0;
*ptrck = p1;
More information about the cctech