Imaging RX02 disks for simh (was: Re: MU-BASIC V2 and RT-11 V03B distribution disks.)
Don North
north at alum.mit.edu
Sun Mar 6 16:06:09 CST 2016
On 3/6/2016 8:56 AM, Brian Walenz wrote:
> How the heck do you copy an RX02 disk for use in simh?
>
> I've been trying to transfer RX02 images between simh and a real PDP11
> (that has only two RX02's, console, and ethernet). So far, I've only
> attempted sending an RX02 image from the PDP to simh, but simh fails to
> read it: "?DIR-F-Invalid directory". Even after adding 13*512 bytes to the
> start for the missing track, I still get invalid directory.
>
> My process is to COPY/DEVICE/FILES DY1:/START:0/END:330 DY0:BLOCK1.DAT,
> then FTP that off the PDP, delete the file, and do the remaining two thirds
> of the disk. Once all are transferred, "cat *DAT > floppy.dsk".
>
> I can transfer RX50 images using the same recipe, though I haven't tried
> sending an RX50 image created on simh back to the PDP.
>
> For what it's worth, I'm having the same problem with Alan Baldwin's TCP/IP
> disk images from http://shop-pdp.net/rthtml/tcpip.htm. simh can't read the
> individual DSK images, but could read the *.PKG with the disks inside, and
> from that, I could (RT-11) MOUNT each disk to a logical device.
>
> b
From the SIMH pdp11 RX driver (pdp11_rx.c) the disk size is computed as follows,
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 controller.
So the SIMH disk image should be 77*26*128 = 256,256 bytes for an RX01 format.
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 the
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 file.
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.
Don
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
More information about the cctalk
mailing list