Re: Imaging RX02 disks for simh (was: Re: MU-BASIC V2 and RT-11 V03B distribution disks.)

2016-03-06 Thread Jerome H. Fine

>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.
 


In order to verify how an arbitrary container file is handled under SimH, I
attempted to run V3.9-0 under Win98SE.  I doubt that the actual Windows
operating system makes a difference, but just in case.

I was able to boot RT-11 using an MSCP device for which:
ATTACH  RX0:  FRXBAR.DSK
ATTACH  RQ0:  FRQBAR.DSK
BOOT  RQ0:
When I arrived in RT-11 after having booted on FRQBAR.DSK,
performing the RT-11 command:
DUMP/TERM  DX0:/ONLY:0
provided all zeros in the dump output of block zero.
Further, when I attempted to use RY0: which I assume is the
device name for RX02 images, all the attempts were rejected.

On the other hand, when I used Ersatz-11,
MOUNT  DU0:  FRQBAR.DSK /RO
MOUNT  DX0:  FRXBAR.DSK /RO
BOOT  DU0:
when I arrived in RT-11 after having booted on FRQBAR.DSK,
performing the RT-11 command:
DUMP/TERM  DX0:/ONLY:0
the expected values were displayed in the dump output of block zero.
Further, when I attempted to use DY0: which is the device name
under Ersatz-11 for RX02 images, everything worked as expected.
More to the point, I was also able to:
MOUNT  DU1: FRXBAR.DSK /RO   (Ersatz-11 allows access to
using both DU: and DY: emulation at the same time when the access
is READ  ONLY), and determine that  both DU1: and DY0: were
identical when I used BINCOM to compare both RT-11 devices.
All 988 blocks of both DU1: and DY0: could be read and were
found to be the same.  Obviously, that was expected since the
same container file was used in each MOUNT command.  But
the fact that Ersatz-11 is able to access FRXBAR.DSK and
SimH is not able to do so is what is so confusing.

One minor point that seems worth while to mention is that the
Ersatz-11 emulation for the DY: (DEC  RX02 device) also
supports DSDD media which have 1976 blocks and with
a suitable floppy drive and controller support double-sided,
double density operation, or what DEC intended to be the
RX03 floppy drive.  While it seems that DEC never sold
such the RX03 hardware, there was code in V04.00 of
RT-11 to make the attempt to support double-sided media
as a SYSGEN option.   Unfortunately, the code that was
released with V04.00 of RT-11 was not quite correct.  By
V05.00 of RT-11, the code to support double-sided operation
had been removed.  However, at the very least, an RX03
floppy drive was produced and sold by DSD (Data Systems
Design) and sold as the DSD 880/30.  Again unfortunately,
the controller supported only 18-bit hardware addresses
which required an enhancement of the DYX.SYS device
driver to support all 4 MB of memory for user buffers.
I have mentioned this enhancement a few times, but there
seems to be zero interest.

Since I don't have access to the SimH manuals at the moment, I
don't know what I am doing that is incorrect.  But since I have
never attempted to use SimH before with either RX01 or RX02
images, there might be other problems.

I hope that the above information helps.

I would appreciate any information in respect of using the TCP/IP hardware
and software to access a Qbus PDP-11 via ethernet, and especially from
a system running RT-11 and / or TSX-Plus under both SimH and Ersatz-11.


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".
 


The RT-11 commands are correct.  Why SimH has difficulty is
not understood.


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.
 


I recognize some of the details of what you are doing, but I have no
idea of the actual hardware and software that you are using.  I would
like to use TCP/IP to move files backs and forth under RT-11, but I
don't know what hardware is needed, especially if there are to be
transfers between RT-11 running under SimH or Ersatz-11.  I do
have a router between two of my Windows systems, so that part is
already working.  But I am quite sure that the speeds between the
Windows systems and the PDP-11 don't match at all.

Of late, I have found that working on the RT-11 Symbolic Debugger,
SDHX.SYS to be specific under a Mapped RT-11 Monitor to be
sufficient challenge to keep me busy.  Version Y01.16 has a few
bugs which ne

Re: Imaging RX02 disks for simh (was: Re: MU-BASIC V2 and RT-11 V03B distribution disks.)

2016-03-06 Thread Glen Slick
On Sun, Mar 6, 2016 at 2:17 PM, Brian Walenz  wrote:
>
>
> http://www.dbit.com/putr/putr.asm has the following:
>
> ;
> ; RX01 interleave routine.
> ;
> ; bplogical device rec
> ; chcylinder (0-75.)
> ; cllogical sector (0-25.)
> ;
> ; On return:
> ; chcylinder (1-76.)
> ; clsector (1-26.)
> ;
> ; From RT-11 V04 DY.MAC:
> ;
> ; ISEC=(ISEC-1)*2
> ; IF(ISEC.GE.26) ISEC=ISEC-25
> ; ISEC=MOD(ISEC+ITRK*6,26)+1
> ; ITRK=ITRK+1
> ;
>

There is also yet another implementation of this in the 2.11BSD source
code file src\sys\pdpstand\rx.c

/*
 * rxfactr -- calculates the physical sector and physical
 * track on the disk for a given logical sector.
 * call:
 * rxfactr(logical_sector,&p_sector,&p_track);
 * 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).
 */
static
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;
}


Re: Imaging RX02 disks for simh (was: Re: MU-BASIC V2 and RT-11 V03B distribution disks.)

2016-03-06 Thread Brian Walenz
On Sun, Mar 6, 2016 at 5:06 PM, Don North  wrote:


> 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_NUMTR77  /* tracks/disk */
> #define RX_NUMSC26  /* sectors/track */
> #define RX_NUMBY128 /* 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.
;
; bplogical device rec
; chcylinder (0-75.)
; cllogical sector (0-25.)
;
; On return:
; chcylinder (1-76.)
; clsector (1-26.)
;
; From RT-11 V04 DY.MAC:
;
; ISEC=(ISEC-1)*2
; IF(ISEC.GE.26) ISEC=ISEC-25
; ISEC=MOD(ISEC+ITRK*6,26)+1
; ITRK=ITRK+1
;

(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.

b


Re: Imaging RX02 disks for simh (was: Re: MU-BASIC V2 and RT-11 V03B distribution disks.)

2016-03-06 Thread Don North

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_NUMTR77  /* tracks/disk */
#define RX_NUMSC26  /* sectors/track */
#define RX_NUMBY128 /* 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


Re: Imaging RX02 disks for simh (was: Re: MU-BASIC V2 and RT-11 V03B distribution disks.)

2016-03-06 Thread Brian Walenz
On Sun, Mar 6, 2016 at 3:33 PM, Mattis Lind  wrote:

>
> Did you have problems with my RAW files as well? Which? I tested a few of
> them right now and they seemed to work fine.
>

Nope, no problems.  That was what triggered this...that someone else could
do it.

I jury rigged an RX50, and managed to get an image across that way.  My end
goal is to dump an RD52, but, sadly, I still am unable to access the disk.
Not even a blip on the activity light.  *Sigh*  Back to reading manuals, I
guess.

Thanks to everyone for confirming I'm not insane, a moron, or both.

b


Re: Imaging RX02 disks for simh (was: Re: MU-BASIC V2 and RT-11 V03B distribution disks.)

2016-03-06 Thread Jerome H. Fine

>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



On Thu, Jan 28, 2016 at 11:50 AM, Mattis Lind  wrote:



I found some 8 inch floppies with distribution kits for MU-BASIC V2 and
RT-11 V03B. I imaged those and put them here
http://www.datormuseum.se/documentation-software/rx01-and-rx02-floppy-disks
if anyone is interested in playing with MU-BASIC. There are both RAW disk
images and to be used in SimH and like and also DMK/IMD files.

The system that floppies came with is this little (
http://www.datormuseum.se/computers/digital-equipment-corporation/pdp1103-l
)
system once used at Scania in Södertälje.


Check


Re: Imaging RX02 disks for simh (was: Re: MU-BASIC V2 and RT-11 V03B distribution disks.)

2016-03-06 Thread Mattis Lind
2016-03-06 17:56 GMT+01:00 Brian Walenz :

> 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.
>

I used a regular PC running DOS and then a catweasel card to produce the
DMK file. Then I extracted the raw disk image from the DMK file. The files
produced are 512512 bytes.


>
> 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.
>

Did you have problems with my RAW files as well? Which? I tested a few of
them right now and they seemed to work fine.


> b
>
>
> On Thu, Jan 28, 2016 at 11:50 AM, Mattis Lind 
> wrote:
>
> > I found some 8 inch floppies with distribution kits for MU-BASIC V2 and
> > RT-11 V03B. I imaged those and put them here
> >
> http://www.datormuseum.se/documentation-software/rx01-and-rx02-floppy-disks
> > if anyone is interested in playing with MU-BASIC. There are both RAW disk
> > images and to be used in SimH and like and also DMK/IMD files.
> >
> > The system that floppies came with is this little (
> >
> http://www.datormuseum.se/computers/digital-equipment-corporation/pdp1103-l
> > )
> > system once used at Scania in Södertälje.
> >
>


Re: Imaging RX02 disks for simh (was: Re: MU-BASIC V2 and RT-11 V03B distribution disks.)

2016-03-06 Thread Glen Slick
On Sun, Mar 6, 2016 at 10:33 AM, Mark J. Blair  wrote:
> I have managed to munge RX02 disk images into a format that SIMH understands 
> a year or so ago. Unfortunately, I didn't keep notes about how I did it, and 
> now I've forgotten what I did, possibly using some throw-away code that I've 
> since thrown away. Or maybe I dumped the disks to image files on an emulated 
> TU58 on my real PDP-11, and then wrote the image files to new simh RX02 disk 
> images under RT11 in simh. Actually, that sounds like what I might have done. 
> It's a clumsy way to do things, though. I'd like to learn how simh expects 
> its RX02 image files to be arranged so that I can write a utility to 
> translate between them and other formats.
>

I have also gone through that exercise in the past and wrote some
simple code to shuffle disk sectors around between and input RX02
image files and and output RX02 image files to account for the sector
interleave and track to track skew factors. I still have the code I
wrote to do that, but I'd have to take a look at it again to figure
out how I was using it.

-Glen


Re: Imaging RX02 disks for simh (was: Re: MU-BASIC V2 and RT-11 V03B distribution disks.)

2016-03-06 Thread Mark J. Blair
I have managed to munge RX02 disk images into a format that SIMH understands a 
year or so ago. Unfortunately, I didn't keep notes about how I did it, and now 
I've forgotten what I did, possibly using some throw-away code that I've since 
thrown away. Or maybe I dumped the disks to image files on an emulated TU58 on 
my real PDP-11, and then wrote the image files to new simh RX02 disk images 
under RT11 in simh. Actually, that sounds like what I might have done. It's a 
clumsy way to do things, though. I'd like to learn how simh expects its RX02 
image files to be arranged so that I can write a utility to translate between 
them and other formats.


-- 
Mark J. Blair, NF6X 
http://www.nf6x.net/