PDRIVE   (or Understanding By Necessity).

Phill Walsh 17/03/85

        I have recently had to 'tidy up' a friends Model III discs which brought me to a documentation study of the PDRIVE functions of NEWDOS80 as I found myself faced with the problem of compatibility between TRSDOS, DOSPLUS, LDOS and (my favourite) NEWDOS80 V.2. This document examines SOME of the methods NEWDOS80 V.2 uses to overcome these problems with its library command 'PDRIVE'.
        I have been helping a friend with a 80 track drive complimenting my three 40 trackers, I had not experienced an 80 track drive on my Model III until now. I shall endevour to clearly explain some PDRIVE setup tables that I've been forced to learn.
For users "not in the know":
   The reason we can't read DOSPLUS and LDOS double density discs is that they have strayed from the norm. The 'norm' in the computer industry appears to be whatever the programmer/designer decides that it will be at the time of their current project. It would take approximately 5K of program to allow NEWDOS80 to read their type of double density directory. Whilst either one will read between a double or single density Model I or Model III of their own type, they do not have the ability to read one of the others. Therefore if you have some DOSPLUS or LDOS files and wish them on NEWDOS80, copy them to single density discs and then set up the PDRIVE table as example #1 in the following table. This will allow NEWDOS80 to read and copy them onto a NEWDOS80 system or formatted data disc. One thing that you may not be aware of at first is that you are not limited to two letters in the 'TI' spec of PDRIVE. The manual states:
  "TI = etc.,  Where TI consists of one or more alphabetic letter flags chosen from, etc."
   This means one or MORE alphabetic letter flags can be used in the 'TI' spec. Even though all the examples given therein consist of one or two - you can have three if so required. Example 6 in the manual displays:
PDRIVE,dn1,dn2,TI=AK,TD=E,TC=39,SPT=18,TSR=3,GPL=2,DDSL=17, DDGA=2
   This specification is for the Model III for 13.3cm disc, 40 tracks, double density, single-sided disc that has track zero formatted in single density. Now by just altering the TI=AK to TI=AL, you have the same specification except that you can read that same 40 track disc in an 80 track drive.

        Some examples of PDRIVE tables:

        Example #1.
PDRIVE,0,9,TI=A,TD=A,TC=40,SPT=10,TSR=3,GPL=2,DDSL=17,DDGA=2
        This spec allows you to read LDOS single density discs as is, and DOSPLUS single density discs (after WRDIRP) that are 40 tracks.

        Example #2.
PDRIVE,0,8,TI=AM,TD=E,TC=40,SPT=18,TSR=3,GPL=6,DDSL=17,DDGA=2
        This spec will allow you to copy any known file from a Model III TRSDOS disc. You still will not be able to read the directory, as the TRSDOS directory is not compatible with any other marketed system. You can read the TRSDOS directory in one of two manners:
        Boot up the TRSDOS disc and call up the directory, or better still, call up 'SUPERZAP' go into 'DD' that contains the TRSDOS disc and (display drive relative sector 306), you can even MOD sectors. This will display the directory and other sectors whilst in NEWDOS80 using the above PDRIVE setup.

        Example #3.
PDRIVE,0,7,TI=AK,TD=E,TC=39,SPT=18,TSR=3,GPL=2,DDSL=17,DDGA=2
        This spec tells your Model III that you are looking at a Model I NEWDOS80 disc that is double density with track zero in single density.

        Example #4.
PDRIVE,0,6,TI=AL,TD=E,TC=40,SPT=18,TRS=3,GPL=2,DDSL=17,DDGA=2
        This is the standard Model III setup except that you can read the 40 track disc in an 80 track drive.

        Example #5.
PDRIVE,0,5,TI=AL,TD=A,TC=40,SPT=10,TSR=3,GPL=2,DDSL=17,DDGA=2
        This spec is the same as example #1 (LDOS read) except that you can read it in an 80 track drive.

        Example #6.
PDRIVE,0,4,TI=ALM,TD=E,TC=40,SPT=18,TSR=3,GPL=6,DDSL=17,DDGA= 2
        This one is the same as example #2 (TRSDOS III) except that the disk is read in an 80 track drive.

        Example #7.
PDRIVE,0,3,TI=A,TD=E,TC=80,SPT=18,TSR=3,GPL=2,DDSL=17,DDGA=2
        This is the standard setup for an 80 track drive on the Model III.

        Example #8.
PDRIVE,0,2,TI=A,TD=E,TC=40,SPT=18,TSR=3,GPL=2,DDSL=17,DDGA=2
        This is the 40 track standard setup.

        One small pointer. If you have two drives on your system, set up the 'SYSTEM' options command of 'AL=2'. This will give you use of the other seven PDRIVE tables as a storage area for the tables that you are likely to be using at different times. If you have three drives, set 'AL=3". When you need a different drive option, you only type <PDRIVE,0 1=7' and presto, you are ready. By resetting the 'AL' function, you not only gain the extra storage space, but your system need not go looking for a file on a drive that doesn't exist. This actually increases your disk I/O time - sure not by much, but every nanosecond counts.

        By using ADR/CMD from The Alternate Source (Automatic Pdrive Utility) or by applying the following zap (published by CINTUG U.S.A.) you can quickly look at a variety of disc formats.
ZAP 086 (Cincinnati TRS-80 User Group) March 2 1984)
SYS16/SYS,02,E8 change 7E FE 41 12 20
                    to 7E C3 CB 51 20
SYS16/SYS,04,DF change all zeroes to:
FE 41 12 20 03 C3 E0 4F 3D FE 41 20 F8 C5 E5 01 00
07 21 D3 4D 71 23 10 FC E1 C1 18 E3 02
        This zap allows temporary 'in memory' change of the PDRIVE table thereby not altering the disc record. Use PDRIVE as normal except ,B is substituted instead of the regular ,A in the PDRIVE command viz:
        PDRIVE,0,1=7,B<ENTER>
This will alter the PDRIVE configuration in memory (you can leave the write-protect tab on) and you can do this as many times as required for the next time you RESET your PDRIVE table will not have been affected. You could then copy SYS16/SYS onto other work discs in use.

    Hope this item will be of some use,
If you have any queries leave a message here or feel welcome to 'phone me on 02-630-8361.
        Good PDRIVEing,
        Phill Walsh.
#############################