
	warsx - UNIBUS/Q-bus ATA (IDE) HDD software for RSX-11M
		and RSX-11M-PLUS systems.

*******************************************************************************
* Copyright (c) 1999 by Dmitry Pryanishnikov, Dnipropetrovsk, Ukraine.        *
*                                                                             *
* Permission is granted to any individual or institution to use, copy,        *
* or redistribute this software so long as all of the original files          *
* are included, that it is not sold for profit, and that this copyright       *
* notice is retained.                                                         *
*                                                                             *
* This project has been provided 'as is'. Any expressed or implied warranties * 
* are disclaimed. In no event shall I be liable for any direct, indirect or   *
* other damages arising out of the use of this project, etc. However I am     *
* interested in feedback from the users of this technology, and any           *
* suggestions are welcome.                                                    *
*******************************************************************************

 The software consists of the following files:
 
  ewa11.cnf - error log parser module for WA: device error packets
  savwam.mac - BOO/SAV module for WA: load device support in RSX-11M system
  savwap.mac - BOO/SAV module for WA: load device support in RSX-11M-PLUS system
  wadrv.cmd - command procedure to assemble and build WA: device driver
  wadrv.mac - source text for device driver
  watab.mac - source text for driver loadable database

This software should work with any modern version of RSX (it has been tested
with RSX-11M v4.1, 4.2, and RSX-11M-PLUS v4.5).


             Support for ATA HDD as a data (non-system) disk

  In order to support HDD(s) via ATA adapter in RSX-11[-PLUS] system you
should build and load device driver first (note that RSX-11M must be SYSGENned
with loadable driver support). To do it, just put wadrv.mac, watab.mac and 
wadrv.cmd into some directory, make sure that LB:[11,10]RSXMC.MAC is a current
system MACRO prefix file. If your adapter uses base address other than 171000
(octal) or vector other than 120 (octal) with RSX-11M system, please edit 
watab.mac to change settings of S.CSR/S.VCT field in SCBs (in RSX-11M-PLUS
you can change defaults by means of reconfigurator).  Then start the command
file:

>@WADRV

It will create WADRV.TSK and WADRV.STB, then you should move these files to
the system files directory (SYSUIC, [1,54] by default) on LB:. Then LOAd this
driver:

>LOA WA:/PAR=GEN       (specify partition that has enough space)

It should add to your system at least 8 devices WA0:-WA7:, that is, WA0: is
for master drive (unit 0) in first channel, WA1: is a slave (unit 1) on this
channel, while WA2: is a master unit on second channel etc. Units for found
HDDs will came online for RSX-11M, for RSX-11M-PLUS you must bring them online
using online reconfigurator (CON).
  For RSX-11M systems LOAding driver will add more units if valid partition 
tables found on the physical drive. Naming convention is that the WAxxx: 
device numbers for partitions are tied to primary unit number. Partitions 
found in MBR (up to 4) of primary logical unit number N will always have 
unit numbers 100+(N*4.)+J octal, where J is a relative slot number in 
table (0-3). Furthermore, partitions found inspecting MS DOS logical disk 
chain will  have unit numbers 200+(N*16.)+K octal, where K is a relative 
logical disk number (0-15.). For example, primary partitions on drive WA0:
may have specifications WA100:-WA103:, and secondary chain for this unit 
will be mapped to the units WA200:-WA217:. For WA2: they will move to 
WA110:-WA113: and WA240:-WA257: etc. In RSX-11M-PLUS systems secondary
units for disk partitions will be created during bringing unit online
via reconfigurator.
  If you don't want to have partition support you can comment out DSKDPT
symbol definition in wadrv.mac before assembly.


           Support for ATA HDD as a system disk (limited one)

  You can use ATA HDD as a system disk with some limitations. I can not give
you full support because it requires modifications of BOO and SAVe and I can't
make these modifications available without violating copyright. So it will
not possible with this package to boot the system from disk partition, and
(which is worst) you have to rebuild BOO/SAVe for each HDD with different
geometry. I see no way to pass device CHS parameters (number of sectors 
per track and number of heads (tracks) per cylinder) within original BOO
and SAVE. So you should assemble appropriate boot driver (savwam for RSX-11M,
savwap for RSX-11M-PLUS):

>MAC SAVWA=LB:[1,1]EXEMC/ML,[11,10]RSXMC/PA:1,SY:[current_UIC]SAVWAM

for example, then insert resulting SAVWA.OBJ module into the library SAV.OLB
on distribution disk in directory [1,24]. After this you should rebuild
BOO and SAV via SYSGEN. Ask SYSGEN to make pause before actual taskbuild,
and edit files in [1,24] (BOOBLD.CMD, BOOBLD.ODL, SAVBLD.CMD and
SAVBLD.ODL). Add the following symbol definitions to the options section
of each .CMD file:

GBLDEF=WA$SPT:sss
GBLDEF=WA$TPC:ttt

where sss - number of sectors per track and ttt - number of heads for
particular HDD, each number expressed in octal. Then patch .ODL files to
add SAVWA module. For example it can be added after SAVDK module, it
should look like

SAVDRV:	.FCTR	SAVNUL-SAVDRT-(SAVDK,SAVWA...
...                                  ~~~~~
SAVWA:	.FCTR	SY:[1,24]SAV/LB:SAVWA
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

for RSX-11M tasks, and like

SPCDRV:	.FCTR	[1,24]SAV/LB:SAVDV1:SAVDK:SAVWA...
                                          ~~~~~

for RSX-11M-PLUS ones. NOTE that in RSX-11M-PLUS BOO task (at least in
v4.5) added SAVWA will cause that code required to be mapped by APR5 will
be shifted to APR6 mapping and therefore will not work (BOO code will NOT
detect this error, and results will be unpredictable). As a fast
work-around you can eliminate SAVDK and SAVDP modules, it will be enough
to keep code mapped via APR5. To check it, ask BOO mapping file from
SYSGEN and check placement of the section APR5DA - it should fit
completely below 140000 octal!
 NOTE: savwam/savwap drivers do NOT handle non-existent memory trap that
could occure if system image file larger than main memory - you should
avoid this situation.


           Support for ATA HDD in Error Log system (optional)

  In order to support new device in RSX Error Logging you can compile
ewa11.cnf module with CFL (look at command for ERK05 module assembly for
example). For successful compilation you should have results of module
DSP2M1/DSP2P1 compilation, so easiest (but slowest) way is add module
compilation command to ERRLOGASM.CMD file and recompile all modules.
Also, you have to add the following string to device identification table 
called DEVICE_INFO in DEVSM1 module:

    'WA', 'WA11',    'ATA HDD',      'EWA11',   #LD'-1',      FALSE, #BO'0' ;

and recompile this module. After that rebuild ERRLOG.ULB library (or just
add EWA11 module and replace DEVSM1). Then RPT will format error packets
from WADRV properly.

dmitry@digital.dp.ua
