TRS-80 Tips and Tricks - Hard Drive

Page Index

How to Quickly Initialize a Model I-III Hard Drive

Hard Drive Initialization Guide Cover

Ken Brookner had prepared a guide called "What You Really Need To Know Quick To Init a Model I/III Hard Drive. You can download that guide here.

Determining Hard Drive Geometry from CONFIG/SYS

Tim Mann, author of XTRS and the OG Catweasel Utilties was kind enough to document how to go about determining the drive geometry of a hard drive based on the CONFIG/SYS file found on LS-DOS v6.

First, export the CONFIG/SYS file to your computer. You can do this with XTRS's "EXPORT" utility or with Matthew Reed's TRSTOOLS. If you are doing this inside an emulator, LS-DOS will likely not boot without the hard drive attached, so you need to press the virtual CLEAR key at just the right time during the LS-DOS boot process.

You then need to find the DCT in the CONFIG/SYS file. It gets loaded at 4300H instead of 0470H where the DCT$ is supposed to be, probably so as not to overwrite the DCT that's actually in use based on boot disk.

Next you need to parse the CONFIG/SYS. Tim used the "cmddump" utility that comes with xtrs to parse it. It's in /CMD (load module) format. Tim ran cmddump config.sys once with no flags, to see what the highest memory address used was -- it was 0x434f. In Windows you can use George Phillips' utility trld with a command line of trld -d config.sys.

Tim then used "cmddump config.sys config.mem 0 0x4350" to get a raw memory image of the part of memory that config/sys loads into (actually he used 0x434F, but that was a mistake since it cut off the last byte). For those using Windows, that will give you the hex dump. For those on Linux you need to use Linux's "hd" to get a hex dump of that memory to work from.

Using a disk I gave Tim as an example, he found the DCT to read as follows (color added):

00004300   c3 f4 0f 0c 90 00 98 bf   bf 4c c3 f4 0f 0c 38 00   |.........L....8.|
00004310   98 7f 7f 4c c3 f4 0f 0c   38 99 99 7f 7f 4d c3 f4   |...L....8....M..|
00004320   0f 0c 10 99 98 bf bf 4c   c3 3d 0e 54 61 04 27 11   |.......L.=.Ta.'.|
00004330   45 14 c3 3d 0e 44 42 00   27 11 45 14 c3 3d 0e 44   |E..=.DB.'.E..=.D|
00004340   64 14 27 11 45 14 c3 3d   0e 44 68 28 4f 11 45      |d.'.E..=.Dh(O.E| 

Decoding the first set (meaning Drive 0) by hand:

  • C3 : DCT+0: C3=Drive enabled / C9 = Drive disabled.
  • F4 0F : DCT+1,2: This is the address of the hard disk driver.
  • 0C: DCT+3: 0C is 00001100 in decimal so:
    • Bits 0-1: 00 = Drive 0
    • Bit 2: 1 = Not removable
    • Bit 3: 1 = Hard Drive
    • Bit 4: 0 = Side Select 0
    • Bit 5: 0 = 5.25" Drive
    • Bit 6: 0 = Single Density
    • Bit 7: 0 = Not Write Protected.
  • 90: DCT+4: 90 is 10010000 in binary so:
    • Bits 0-3: 0000 = Starting Head # 0
    • Bit 4: 1 = "Controller does not return index pulses in its status register"
    • Bit 5: 0 = DBLBIT = 0, so one logical cylinder = one physical cylinder
    • Bit 6: 0 = "Controller is NOT capable of double density operation"
    • Bit 7: 1 = "No @CKDRV will be performed by @OPEN when accessing that drive".
  • 00: DCT+5: DCT+5 is not regularly used for Hard Drives.
  • 98: DCT+6: 98H is 152 in decimal. Since Since DBLBIT=0, this means that the highest numbered logical cylinder on the drive is 152 in decimal (for total of 153 tracks).
  • BF: DCT+7. BFH is 10111111 in binary.
    • Bits 4-0: Highest numbered sector on a track numbered relative from zero. Bits 4-0 are 11111 (Decimal: 31) for 32 sectors per track.
    • Bits 7-5: Number of heads assigned to the logical partition. Bits 7-5 are 101 (Decimal: 5), so there are 6 heads for this logical partition.
  • BF: DCT+8. BFH is 10111111 in binary.
    • Bits 4-0: Sectors per granule. Bits 4-0 are 11111 (Decimal: 31) for 32 sectors per granule.
    • Bits 7-5: Granules per track. Bits 7-5 are 101 (Decimal: 5), so since DBLBIT=0, there are 6 granules per track.
  • 4C: DCT+9. 4CH is 76 in decimal. Since DBLBIT=0, this means that the directory is on logical cylinder 76.

Decoding the entire DCT then gives us:

Drive :0
Hard drive, not removable, DBLBIT = 0, starting head number 0, drive unit address 0, starting logical cylinder 0, 153 logical cylinders, 6 heads, 32 sectors per track, 6 granules per physical cylinder, 32 sectors per granule, directory on logical cylinder 76.
Drive :1
Hard drive, not removable, DBLBIT = 1, starting head number 0, drive unit address 1, starting logical cylinder 0, 153 logical cylinders, 4 heads, 32 sectors per track, 4 granules per physical cylinder, 32 sectors per granule, directory on logical cylinder 76.
Drive :2
Hard drive, not removable, DBLBIT = 1, starting head number 0, drive unit address 1, starting logical cylinder 153, 154 logical cylinders, 4 heads, 32 sectors per track, 4 granules per physical cylinder, 32 sectors per granule, directory on logical cylinder 77.
Drive :3
Hard drive, not removable, DBLBIT = 0, starting head number 0, drive unit address 0, starting logical cylinder 153, 153 logical cylinders, 6 heads, 32 sectors per track, 6 granules per physical cylinder, 32 sectors per granule, directory on logical cylinder 76.
Drive :4
Floppy, 5", physical address 1
Drive :5
Floppy, 5", physical address 2
Drive :6
Floppy, 5", physical address 4
Drive :7
Floppy, 5", physical address 8

Note: DBLBIT = 1 means there are two physical cylinders per logical cylinder; DBLBIT = 0 means one physical per logical.


More Detailed Information:

The below is more detailed information about the Drive Control Table record assigned to a hard drive partition taken from RSHARD - Hard Disk Driver Package and "The Programmer's Guide to TRSDOS Version 6".

DCT+3
This field contains a series of sub-field parameters associated with the disk drive specifications. The field is encoded as follows:
Bits 1-0
This subfield is used for different purposes depending on whether the drive associated with the DCT is a floppy drive or a hard drive.
  • Floppy: The field contains the step rate specification code (0-3) for the floppy disk controller. With a Western Digital 179X FDC or equivalent, the codes correspond to a step rate of 6, 12, 20, and 30ms at an FDC clock speed of 1 MHz and 3, 6, 10, and 15ms at an FDC clock speed of 2 MHz.
  • Hard Drive: This field is usually associated with the drive select code of the hard disk drive (binary value 0-3).
Bit 2
This subfield is used for different purposes depending on whether the drive associated with the DCT is a floppy drive or a hard drive.
  • Floppy: This bit is set by the system to indicate the minimum time delay required after selecting a floppy disk drive whose motors are not currently running. It must be used by floppy disk drivers to adjust their time delay between selection of the floppy drive and the first poll of the status register. A "1" value indicates the minimum delay to be 0.5 seconds while a "0" value indicates the delay to be 1.0 seconds. The time delay can be introduced via a request of the @PAUSE SuperVisor Call with an appropriate count.
  • Hard Drive: This bit is RESET if the drive is a REMOVABLE cartridge.
Bit 3
Is the logical drive a hard drive? If this bit is set to a "1", it indicates that the DCT position is associated with a hard drive (Winchester). A "0" in this bit position indicates a floppy disk drive is associated with the DCT position. The bit is used by the system in informative messages by such things as DEVICE displays, DIRectory displays, and FREE displays. In addition, the system's @CKDRV routine uses this bit to inhibit its automatic logging of a hard drive while it restricts its checking to write protect status only.
Bit 4
This bit is used to store the side selection number for a current access of a diskette. It is a storage area usable by the disk driver to place the side number calculated from the relative sector passed in the disk primitive request. The system passes a relative sector number based upon the number of sectors per cylinder. On a two-headed floppy disk drive, by dividing the relative sector number by the number of sectors per track, the result will be indicative of the side selection number, 0 or 1. The routine performing the calculation can then place the result in this bit of the DCT for the use of the drive selection routine. The bit value will match the side indicator bit in the sector header as written by the FDC. Hard disk drivers will use storage space internal to the driver to hold such a result.
Bit 5
If this bit is set to a "1", the drive associated with the DCT position is an 8" drive. This bit will be a "0" if the drive associated with the DCT position is a 5-1/4" drive. This bit is initially set by whatever installs the disk driver (see the FLOPPY/DCT utility). In the installation of a hard disk driver, this bit should be set according to the size of the hard drive - 5" or 8". In the case of floppy drives, the system formatter will use this bit to adjust its formatting data to 5" or 8". It is also used to adjust informative messages as mentioned under bit-6.
Bit 6
This subfield is used for different purposes depending on whether the drive associated with the DCT is a floppy drive or a hard drive.
  • Floppy: If set to a "1", it indicates that the floppy diskette currently being accessed is formatted in double density. If set to a "0" it indicates that the diskette is single density. The disk driver is responsible for maintaining this bit by recognizing the density of the disk it is accessing. The bit is used both by the driver in the drive selection process and by the system in informative messages by such things as DEVICE displays, DIRectory displays, and FREE displays.
  • Hard Drive: This bit is not referenced by the system.
Bit 7
Set to 1 will indicate the disk device is "software" write protected. It is the responsibility of the disk driver to check this bit on any disk primitive that references a WRITE operation (i.e. write sector, write system sector, format track, or format device) and return a "Write protected disk" error code (error 15) if set.
DCT+4
This byte contains additional drive specifications and parameters. The field is encoded as follows:
Bits 3-0
This subfield is used for different purposes depending on whether the drive associated with the DCT is a floppy drive or a hard drive.
  • Floppy: The field contains the physical drive address (1, 2, 4, or 8) corresponding to the drive select line (DS0, DS1, DS2, or DS3). Thus, only one of the four bits will ever be set.
  • Hard Drive: Hard drive installations that partition a drive by head, may use this field to indicate the relative starting head number of the logical drive partition. This provides support for a drive of up to 16 heads although 4 heads is typical. Bit 3 contains the drive address. Bits 2-0 contains the starting head number, counting from zero. Bits 1-0 contains the number of the starting cylinder for the logical partition, noting that if DBLBIT is set, this number represents half the actual value.
Bit 4
Short Version: This bit is set to indicate that the controller does not supply an index pulse indication to the disk driver on each rotation of the drive surface. Longer Version: This bit is used to indicate the controller associated with the DCT position is an "alien" controller. The term, "alien", refers to a controller that does not return index pulses in its status register. The system uses index pulse transitions in a finite time period (usually 0.5 seconds) to detect the presence of a rotating diskette. If a disk drive does not contain a diskette, or does but the drive door is open, the status obtained on continuous selection of the drive will not indicate the presence of any index pulse transitions. By examining the state of the index pulse over a period of time corresponding to 2.5 possible rotations of a disk, the lack of an OFF-ON-OFF transition state will indicate that the drive is not available. If a controller does not return the state of an index pulse in the controller status byte, then the system will never be able to detect the availability of the drive if it maintains the state transition examination in the logging process. This bit should be set when such controllers are used to inhibit the @CKDRV routine from performing such an examination and proceed to the configuration logging.
Bit 5
This bit is used for different purposes depending on whether the drive associated with the DCT is a floppy drive or a hard drive.
  • Floppy: A "1" indicates that the diskette currently mounted in the drive is a two sided diskette while a "0" indicates that the diskette is a single-sided diskette. This bit is updated whenever the disk is logged by the system or whenever a program invokes the @CKDRV SuperVisor Call. Note that if a dual sided diskette is placed into a two-headed disk drive that previously accessed a single-sided diskette, the system will not recognize the second side of the new diskette until the logging process.
  • Hard Drive: Also known as the "DBLBIT" bit, this bit may be used to indicate that a logical cylinder represents two physical cylinders thereby providing support for twice as many cylinders as limited by the Granule Allocation Table (the GAT limits the number of logical cylinders to 203 - thus by using this bit, hard drives to 406 cylinders can be supported as a single logical drive). This bit will be SET if you requested more than 203 cylinders for a single logical drive.
----------------------------------------------------------------------
| C3/C9 | VECTOR  | FLAG | FLAG | CUR | MAX | H  M  S  | G  S  | DIR |
|       | ADDRESS |   1  |  2   | CYL | CYL | D  A  E  | P  P  | CYL |
|       |         |      |      |     |     | S  X  C  | T  G  |     |
----------------------------------------------------------------------

Notice that most of the size or max numbers are "highest value", so for example 5 in the "heads" field means there are 6 heads numbered 0-5.


Other information I have no idea what to do with ...

ARCHIVE FILE SET HEADER RECORD
Each file segment of an archived file has a header record written as the first sector of the file segment. The information contained in the header is used to support fail-safe reconstruction of the original file. This section covers the information contained in the fields of the header record. Each like-named file in the file set will have a header record where the first forty bytes are identical. The numbers contained within angle brackets are sector offset values in hexadecimal.
DIRECTORY [00 - 15]
This 22 byte field contains the first twenty two bytes of the original file's primary directory entry record. Any technical manual on the operation of the DOS will detail these bytes.
DATE [16 - 1D]
This field contains the date that the file set was created. The date is in standard ASCII string notation: MM/DD/YY.
TIME [1E - 25]
This field contains the time that the file set was created. The time is in standard ASCII string notation: HH:MM:SS.
RANDOM [26 - 27]
This field contains a 15 bit random number.
DISKNUM [28 - 29]
This field contains the 16-bit number of the disk set for a given file segment. Each file that is archived begins its header with a disk number of zero. The value is stored in standard low-high order.

Using a Single Hard Drive with 2 Operating Systems

PowerSOFT Products
11500 Stemmons Expressway, Suite 125
Dallas TX 75229
(214) 484-2976

The Model 4/4P computer has the capability of running in two modes: Model III mode and Model 4 mode. This allows a Model 4/4P owner to use two (or more) different operating operating systems on the computer. Two operating systems, one for each mode of operation, are available from Radio Shack for use on the Model 4/4P with a Radio Shack 5-megabyte hard drive: TRSDOS 6 for Model 4 mode, and LDOS 5.1 for Model III mode. The question has arisen among users of the 5-megabyte hard drive of whether there is any way to use both operating systems on the same hard drive without having to reformat and recreate the system partition every time. There is some justification for wanting to do this. The two operating systems involved, LDOS 5.1 for the Model III mode and TRSDOS 6.1 for the Model 4 mode, are very similar. Moreover, since the software base for TRSDOS 6 is not yet as large as that for LDOS, it can be to a user's advantage to switch to LDOS to run applications which are not available for TRSDOS 6. Finally, a hard drive system provides extensive storage capacity as well as increased operating speed over floppy disks. It seems a waste to have to switch to floppies just to run a particular application.

We at PowerSOFT have been able to place both the LDOS and TRSDOS 6 operating systems on a single hard drive so that they can be used by a Model 4 running in either mode. The selection of which system to utilize is done by simply booting up the appropriate floppy system disk and letting the configuration file transfer control to the hard disk. The files on the hard disk are accessible to both operating systems. This was made possible by the media compatibility which exists between LDOS and TRSDOS 6. This means that they can read each other's directories and disk formats without requiring special software.

The key to placing both operating systems on a single hard drive lies in the flexibility of the two operating systems. Both LDOS and TRSDOS 6 allow you to split up a hard drive into one or more logical drives; and the logical drive numbers need not be the same as the physical positions of the hard disk partitions. This is what makes it all work. The hard disk partition which is assigned as Drive 0 for LDOS need not be the same as the partition which is assigned as Drive 0 for TRSDOS 6! This means that TWO independent logical drive zeros (system drives) can exist on a single hard drive, one for each operating system. And of course, each operating system sees only its own drive 0, the other one appearing to it as something else.

Drive Configuration Example

TRSDOS 6 sees ==>    :0    :1     2      :3
PHYSICAL SURFACE      1     2     3       4
LDOS 5.1 sees ==>    :3    :1     :2     :0

Three-Step Procedure

We present below a three-step procedure to implement the method just described, for those Model 4 hard drive owners who wish to use both LDOS and TRSDOS. Please make sure that you backup EVERY file on your hard drive before you implement this procedure, as the hard drive will be reformatted.

STEP ONE
Boot up your TRSDOS 6 Hard Drive Initialization Disk. This will automatically execute the initialization program. Follow the steps described in your Hard Disk Startup Manual. Tell the program that you to create a hard drive system with equal partition sizes, the hard disk to be the system device, and the hard disk to be searched FIRST when looking for a file. This will result in the hard drive logical drive numbers as 0, 1, 2, and 3. Proceed to format the hard drive, move files over to it, and create your BOOT diskette. These procedures are all described in the Hard Disk Startup Manual.
STEP TWO
Make a BACKUP of your LDOS Hard Drive Initialization disk. Boot up this disk but do NOT execute the initialization procedure yet. We must modify the Model III Hard Disk Initialization files, using the PATCH command of LDOS. First type: BUILD INITHD3/FIX. Then type in the patch lines below EXACTLY.

.Patch to INITHD3/JCL to reverse head order and skip
.FORMAT
D09,B8="1"
D09,EB="4"
D0E,6F="."
D0E,9C="."
D0E,C9="."
.End of Patch.

Now press BREAK. The patch file will be written to disk. Now type:

PATCH INITHD3/JCL USING INITHD3/FIX

and press ENTER. The patch will be applied to the INITHD3/JCL file. There is one more patch which needs to be applied. Since it is very short, you will not build a separate patch file for it, but simply type it in on the command line. Type:

PATCH HD1/CFG.CCC (D02,F7=13:D03,15=10)

And press ENTER. The patch will be applied to HD1/CFG.

STEP THREE
Execute the patched LDOS (Model III) Hard Disk Initialization with the command:

DO INITHD3 (NEW,PW=PASSWORD,HARD1,FLOPPY2,ABS)

And press ENTER.

Refer to the Model III Hard Disk Startup Manual, page 31 and following, for more details.

Initializing Hard Drives under Model 4 DOS's - F. McCloy

Following are instructions for initializing Radio Shack 12 and 35 Meg hard drives under TRSDOS 6.02.00 and LDOS 5.1.4 using TRS-80 models 4 and 4p. These drives are not directly supported by Radio Shack for use with computers listed, and therefore, the "automatic formatting" utilities provided by RS will not give you satisfactory results.

PLEASE NOTE: The 35 Meg disk has 512 actual tracks, but you can use only 404 of them due to the limitation of the TRSHD6/DCT device driver. This limits useable space to about 80% of the drive's capacity. Partitioning the drive for both TRSDOS and LDOS will not solve the problem. (All of the space on the 12 Meg drive will be available to you.)

Use the following procedure to initialize the 12 or 35 meg drive with TRSDOS 6.02.00. (A similar procedure can be used for LDOS using its utilities.):

Command:

SYSTEM (DRIVE=6,DRIVER="TRSHD6")
Question:
12MB Answer
35MB Answer
Number of heads:
1
1
Tracks per surface:
6
7
Step Rate:
230
404
# Heads/Partition
1
1
Starting Head:
1
1
TRSFORM6 :6
Question:
12MB Answer
35MB Answer
Disk pack name:
HARDA
HARDA
Password:
PASSWORD
PASSWORD
Manual Lockout:
N
N

This procedure continues for drives :1 through :5, with each drive configured with specific parameters for 12MB and 35MB systems. The final setup commands are:

BACKUP :0 :6 (SYS,INV)
SYSTEM (SYSTEM=6)
SYSGEN (DRIVE=6)

Your system is now set up as follows:

Logical Drive
Physical Drive 12MB
Physical Drive 35MB
:0
HD Head # 1
HD Head # 1
:1
HD Head # 2
HD Head # 2-3
:2
HD Head # 3
HD Head # 4-5
:3
HD Head # 4
HD Head # 6
:4
HD Head # 5
HD Head # 7
:5
HD Head # 6
HD Head # 8
:6
Floppy :0
Floppy Drv 0
:7
Floppy :1
Floppy Drv 1

PLEASE NOTE: This procedure can provide guidelines for partitioning your 12 or 35 meg hard drive for use with both TRSDOS and LDOS.

Changing The Minimum Cluster Size on Radio Shack Hard Drives - Adam Rubin - June 17, 1987

This file explains how to modify your hard disk to get a granule size of 1 kilobyte. It assumes you're using a Radio Shack 5-meg Hard Disk (26-1130), TRSDOS 6.2 or LS-DOS 6.3, and the Radio Shack hard disk drivers that were included with TRSDOS 6.2.0, and that your hard disk is assigned as drives 0, 1, 2, and 3. Please read ALL of this file, and make sure you understand it, before you try to do anything!

You've probably noticed that when you first set up your hard disk, space for files was allocated in units (granules) of 16 sectors, or 4K. As a result, any file stored takes up at least 4K of space. It's possible to change the DOS's description of the drive so that space is allocated in units of 1K, which means that there will be less wasted space when storing each file.

On the other hand, reducing the granule size from 4K to 1K introduces other problems. For example, it's possible for a 12K file to be stored in 12 separate extents of 1K each, which would take considerably longer to access than, say, 3 extents of 4K each. Also, additional directory entries are needed when there are more than four extents, so there's more chance of filling up all the directory entries before the disk itself is full.

Modification Procedure

Step 1
Make a backup of your current hard disk boot diskette. This will become your new boot diskette once you've finished this whole procedure. Make sure it has TRSHD6/DCT, TRSFORM6/CMD, and, if you're using 6.3, DATECONV/CMD.
Step 2
Create a patch file called TRSHD6A/FIX with these four lines:
D02,EE=CD 56 33
F02,EE=3D 0F 0F
D01,66=CB 3A CB 3A 87 87 3D 0F 0F C9
F01,66=00 00 00 00 00 00 00 00 00 00
then RENAME TRSHD6/DCT.DRIVER:f TO TRSHD6A/DCT
(where "f" is the drive containing the backup of the boot diskette), and PATCH TRSHD6A/DCT:f USING TRSHD6A
to patch it with the patch file.
Step 3
Reboot your system with this backup of the boot diskette.
Step 4
Type SYSTEM (SYSTEM=4) to make the floppy your system drive while you change the hard disk. During all of step 5, therefore, you'll have to refer to what's usually :0 as :4.
Step 5
For each drive to change (which I'll call drive "d" here):
  1. BACKUP *all* the files on that drive.
  2. SYSTEM (DRIVE=d,DISABLE,DRIVER="TRSHD6A") and answer the prompts.
  3. TRSFORM6 :d and answer the prompts.
  4. LIST BOOT/SYS.LSIDOS:d (HEX) to allocate the remainder of the space necessary for BOOT/SYS. This is ESSENTIAL.
  5. If you're using 6.3, DATECONV :d
  6. Restore your files back onto the hard disk.
Step 6
Type SYSTEM (SYSTEM=4) to make the hard disk your system drive again.
Step 7
Type SYSGEN (DRIVE=4) to write the updated configuration file to the floppy disk.
Step 8
The floppy disk is now your new boot diskette. Label it, and make several backups of it. Do NOT use your old boot diskette any more, as it won't work.

Booting a Model 4P from a Hard Drive - Gary Phillips - December 22, 1987

The following patch files can be used to permit a model 4P to boot directly from a hard disk that uses the standard Radio Shack 8X300 or WD1010 controller board. They use the code and technique that was originated by Adam Rubin for TRSDOS 6.2, but have been modified for LS-DOS 6.3. I have tested them with a standard RS 5 Meg drive, using either the original TRSHD6 driver or the Misosys RSHARD6 driver software.

Be sure that your hard disk is completely backed up before applying these patches, because if you have difficulty you could lose data! Remember, too, that once you have applied these patches, you should NOT use backup to copy /SYS files to or from the hard disk.

Note that the xx and yy values must be entered in hexadecimal. For a RS 5 Meg drive, xx is 32 sectors/cylinder or hex 20, for example.

HDSYS0 - Patch to SYS0/SYS

. HDSYS0 - Patch to SYS0/SYS of LS-DOS 6.3 to permit direct
. booting of Model 4P from RS HD  - originated by Adam Rubin
. 6.3 level K mods. by Gary Phillips, 08/12/87, rev. 08/22/87
. Apply via PATCH SYS0/SYS.LSIDOS using HDSYS0/FIX
.
d0c,b9=00 00 00
f0c,b9=31 80 03
d0d,07=c3 8f 1e
f0d,07=00 00 00
d0e,a0=00 00 00
f0e,a0=c2 a0 19
d0e,e2=00
f0e,e2=c0
d0f,14=fe
f0f,14=0c
. eop

Changing TRSDOS 6.2.1 to Boot a Model 4P from a Hard Drive

System Requirements:

  1. TRS-80 Model 4P ONLY, not Model 4 or 4D.
  2. TRSDOS 6.2.1.
  3. Radio Shack 5-meg hard disk drive. This method might work on other drives with a WD1000 or WD1010 controller, but has not been tested.
  4. Use of Radio Shack hard disk drivers when running under TRSDOS 6.2.1. Other drivers have not been tested.

Instructions:

All references to drive :0 refer to the first logical (and physical) drive on your hard disk.

Step 1
Boot the hard disk system with your usual boot diskette. If there is an AUTO command on your boot diskette, write it down.
Step 2
Backup all files from the hard disk onto floppies.
Step 3
Use SYSGEN to create a CONFIG/SYS file on logical drive :0.
Step 4
Fill in the values marked "xx," "yy," and "zz zz zz..." in the table of changes to BOOT/SYS.
Step 5
Using a file or sector editor, CAREFULLY change the files SYS0/SYS and BOOT/SYS on logical drive :0 as specified in the tables below.
Step 6
Exit from your file or sector editor to "TRSDOS Ready." If there was an AUTO command on your boot diskette, store it on drive :0.
Step 7
Remove all floppy disks from the drives and press RESET. In a few seconds, you should see the familiar Tandy logo. If so, you are finished modifying your system.

Restrictions when using these modifications:

  • The system will attempt to boot from the hard drive if it is turned on. To boot from a floppy, hold down the F2 key while pressing RESET.
  • When booting, if the hard drive is not completely up to speed you may see either a screenful of garbage or "The floppy disk drive is not ready." Press RESET, and the system should boot properly.
  • The CONFIG/SYS file must be loaded when booting from the hard drive, and cannot be suppressed.
  • When booting from the hard drive, you cannot enter DEBUG by holding down the D key, as this would prevent CONFIG/SYS from being loaded.
  • Do not move the modified SYS0/SYS from hard drive :0 onto another disk.

Changes to SYS0/SYS.LSIDOS:

Record,Byte     From        To
-----------     ----        --
0C,B0           31 80 03    00 00 00
0C,FE           00 00 00    C3 86 1E
0E,7A           C2 A0 19    00 00 00
0E,C0           C0          00
0E,F2           0C          FE

Changes to BOOT/SYS.LSIDOS:

Record,Byte     From             To
-----------     ----             --
00,4D           12 FD...01 87    xx 00 00 00 00 00 00 00
00,5A           06               yy
00,9F           70 04            C3 43
01,41           1E 00...B6 77    18 0D F9 43 zz zz zz zz zz zz 00 00 00 00 00
01,6F           C3 38 02         18 2C 00
01,7C           96               C3
01,80           E6 1C            00 00
01,F9           00 00...00 00    3E 09 90 28 AD AF C9
01,96 thru 01,DE
From:   01 F4 81 ... 18 10 FE
To:     00 00 00 00 00 00 00 21 43 43 11 71 04 01 08 00 ED B0 C3 38
	02 F3 CD C3 43 3A 78 00 D3 84 FB 3E 05 C0 3A 79 04 92 3E 06
	28 01 AF A7 C9 E5 D5 3E 85 D3 84 D3 9C 4B 5A 16 00 06 0C 3E
	02 CF F5 AF D3 9C 3E 86 D3 84 F1 D1 E1

For "xx," "yy," and "zz zz zz...," substitute the appropriate values for drive :0 of your hard disk system.

  • xx = Sectors per cylinder, in hexadecimal. For example, thirty-two sectors per cylinder would be 20 hex.
  • yy = Sectors per granule, in hexadecimal. For example, sixteen sectors per granule would be 10 hex.
  • zz zz zz... = values of DCT+3 through DCT+8 for hard disk drive :0. Boot the hard disk system with your boot diskette, and use DEBUG to examine the Drive Code table for drive :0.