Imaging RX02 disks for simh (was: Re: MU-BASIC V2 and RT-11 V03B distribution disks.)
thebri at gmail.com
Sun Mar 6 16:17:20 CST 2016
On Sun, Mar 6, 2016 at 5:06 PM, Don North <north at alum.mit.edu> wrote:
> From the SIMH pdp11 RX driver (pdp11_rx.c) the disk size is computed as
> and the byte offset into the file is computed by CALC_DA(trk,sec) given
> the PHYSICAL
> track (0..76) and sector (1..26) addresses used in accessing the
> So the SIMH disk image should be 77*26*128 = 256,256 bytes for an RX01
> RX02 format is same number of tracks and sectors, but has 256 byte sectors.
> So if you image an RX disk using logical operating system 512B blocks
> there are
> 494 of them (76*26*128/512 = 494) numbered 0..493. Track 0 is skipped in
> filesystem (block 0 is at track=1 sector=1) for legacy compatibility
> reasons (with IBM).
> However, since the SIMH file is in physical track/sector order, if you
> read the disk image
> using logical device blocks, you have to know how the driver interleaves
> logical blocks
> onto physical track/sectors, as you must de-interleave to build the SIMH
> Or else you must run a program on the PDP-11 side that reads the RX drive
> as physical
> tracks and sectors, not using file system access commands.
> It's not pretty, but if you think about it enough it is the only way for
> SIMH to simulate the
> RX/RY devices and be operating system agnostic.
> From PDP11/pdp11_rx.c:
> #define RX_NUMTR 77 /* tracks/disk */
> #define RX_NUMSC 26 /* sectors/track */
> #define RX_NUMBY 128 /* bytes/sector */
> #define RX_SIZE (RX_NUMTR * RX_NUMSC * RX_NUMBY) /* bytes/disk */
> #define CALC_DA(t,s) (((t) * RX_NUMSC) + ((s) - 1)) * RX_NUMBY
http://www.dbit.com/putr/putr.asm has the following:
; RX01 interleave routine.
; bp logical device rec
; ch cylinder (0-75.)
; cl logical sector (0-25.)
; On return:
; ch cylinder (1-76.)
; cl sector (1-26.)
; From RT-11 V04 DY.MAC:
; IF(ISEC.GE.26) ISEC=ISEC-25
(and then some assembly code to implement that)
I didn't try anything based on this. I was confused about "ISEC-1".
Assuming sectors started at zero, this gave a negative result. Plus, I was
wrong about the sector size.
Thanks! This seems like enough hints to figure it out.
More information about the cctech