- How to Quickly Initialize a Model I/III Hard Drive
- Determining Hard Drive Geometry from CONFIG/SYS
- Using a Single Hard Drive with 2 Operating Systems
- Initializing Hard Drives under Model IV DOS’s
- Change The Minimum Cluster Size on R/S Hard Drives
- Booting a Model 4P from a Hard Drive
- Changing TRSDOS 6.2.1 to Boot a Model 4P from a Hard Drive
How to Quickly Initialize a Model I-III Hard Drive
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:
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”.
- 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).
- 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.
- 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.
- 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.
- 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.
- Floppy: The field is used by the disk driver to store the current cylinder position of the disk drive assigned to the DCT position. Since a Floppy Disk controller is used to access up to four different drives, when it accesses a drive, its track register must be loaded with correct information as to the current track position of the head. The current cylinder position is maintained by the disk driver in this storage field. The driver can then be use this field to reload the FDC track register prior to a seek operation and update the field to the cylinder requested in the seek.
- Hard Drive: Hard disk controllers generally contain their own internal track register that is not accessible to a software driver. This means that hard disk drivers do not need to maintain the current cylinder position in this field. The field is thus available for the storage of other data items as required by the hard disk driver. Other data items may include the total quantity of heads on the physical drive (as needed by XEBEC controllers), the complex drive select code (as used by Lobo Drives UniVersal Controller), or data associated with drive partitioning by cylinder rather than by head.
---------------------------------------------------------------------- | 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 …
Using a Single Hard Drive with 2 Operating Systems
11500 Stemmons Expressway, Suite 125
Dallas TX 75229
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.
Once this concept is understood, the application of it is quite simple.
Consider the setup of a 5-megabyte hard drive system. Each hard drive contains two disks or platters, each with two surfaces (four surfaces in all). Each surface has its own read/write head. Both LDOS and TRSDOS 6 allow us to split the hard drive along the surfaces (sometimes referred to as the “head offset method,” head referring to the individual read/write head of each surface). This means that we can split a hard drive into a maximum of four logical drives, assigning one surface (“head”) to each. This is what happens when we execute the Model 4 hard disk initialization program. The hard disk is split into four logical drives, the first surface being drive :0, the second drive :1, the third drive :2, and the fourth drive :3.
There is nothing in either operating system which says that Surface Number One must be logical drive 0 always. So what we can now do is run a modifiedinitialization file under LDOS that reverses the order of logical drives :0 and :3.That is, surface four becomes drive :0, and surface number one becomes drive :3. Thuswe can have two different drive zeros on the hard drive. But the drive :0 which isthe system drive when TRSDOS 6 is running is drive :3 when LDOS running and viceversa. Voila, we have two operating systems sharing the same hard drive! And sinceonly one operating system can be running at any one time, there is no conflictbetween them. Consider the diagram below.
TRSDOS 6 sees ==> :0 :1 2 :3 PHYSICAL SURFACE 1 2 3 4 LDOS 5.1 sees ==> :3 :1 :2 :0
Of course, it falls on the user of such a shared system to make sure thatprograms which run only under one operating system or the other are clearly andobviously marked. One way to accomplish this is to place model- specific programfiles on each operating system’s respective drive 0, and have data files (which canusually be read by both systems) resident on the other two logical drives. Or filescan be renamed so that those intended for LDOS (Model III mode) only end with “M3″while those intended for TRSDOS 6 (Model 4 mode) only end with “M4.” There are many possible schemes to choose from and you should select one which suits your particularsituation best.
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 makesure that you backup EVERY file on your hard drive before you implement this procedu re, as the hard drive will be reformatted.
To use this procedure, you must have both the TRSDOS 6 hard drive initialization disk as well as the LDOS hard drive initialization disk available.
STEP ONE. Boot up your TRSDOS 6 Hard Drive Initialization Disk. This will automa tically 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 eq ual partition sizes, the hard disk to be the system device, and the hard disk to be s earched FIRST when looking for a file. This will result in the hard drive logical dr ive 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 Di sk Startup Manual.
STEP TWO. Make a BACKUP of your LDOS Hard Drive Initialization disk. Boot up thi s 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: BU ILD 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.
You have just patched the LDOS Hard Disk Initialization files to (a) reverse the order of logical drives :0 and :3 on the hard disk, and (b) skip the formatting process (since we’ve already formatted the hard drive under TRSDOS 6).
STEP THREE. Execute the patched LDOS (Model III) Hard Disk Initialization with the command,
DO INITHD3 (NEW,PW=PASSWORD,HARD1,FLOPPY2,ABS)
Refer to the Model III Hard Disk Startup Manual, page 31 and following, for more details.
You now have a hard drive shared between LDOS and TRSDOS 6. Selection is automatic depending on which boot disk is in the floppy drive when the reset button is pressed. When you are running TRSDOS 6, you will note that your logical drive :3 has the LDOS system files on it. When running LDOS in Model III mode, logical drive :3 will have the TRSDOS 6 system files on it. Logical drives :1 and :2 will be the same regardless of which operating system is currently running. This way, any programs which reference files on these two logical drives will not need to be changed.
Using this method, you will be able to use a Model 4 or 4P system with a hard disk to its maximum capability, rather than having to use one operating system on a hard disk and the other on floppies (or on another hard disk). The same method works on larger-capacity hard drives as well, if you have them hooked up to a Model 4 or 4P computer. Unfortunately this method is not usable with CP/M Plus, since CP/M Plus does not have the capability of splitting a hard drive into several logical drives; it sees a hard drive as a single volume only.
The same technique is used to create different system partitions that will be used by two or more computers in a multiplexed situation. In this type of environment, several computers share the same hard drive, and the hard drive is split up so that each computer has its own system partition. These system partitions may be set up so that they are invisible to the other computers, in order to prevent accidental alteration of the system files. In order to maximize the use of available storage space, a hard disk driver program which permits a type of partitioning known as cylinder offset is preferable. Using such a driver, the size of the system partitions can be limited to the minimum necessary to hold the operating system modules and a few often-used (and machine-specific) utilities, leaving the rest as sharable storage between the various computers.
If you have a hard drive which uses a Western Digital controller board, contact PowerSOFT at the address above for more information on hard disk drivers and other hard drive utility software.
Initializing Hard Drives under Model IV 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.):
BACKUP :0 :6 (SYS,INV)
Your system is now set up as follows:
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. Since each extent of a file can be no more than 32 granules, a minimum of one extent for each 32K of a file is necessary, and so any file longer than 4 times 32K, or 128K, will take up at least two directory entries. With these in mind, it’s possible that part, or all, of your system would be better off with the granule size left at 4K.
As mentioned above, this file assumes you’re using the same setup that I am. If your system is different, it may be possible to adapt the method described here, but you’d have to determine that on your own.
The procedure described below will alter the Drive Control Table (DCT) for the chosen drive(s) to indicate 4 sectors per granule, 8 granules per cylinder. (Remember that 8 is the maximum number of granules allowed per cylinder.) Since, as mentioned above, files may require more extents, and possibly additional directory entries, it’s necessary to reformat the drive.
After you’ve modified your hard disk, you don’t have to repeat this whole procedure to reformat one or more of the drives. Boot with the boot diskette created by the steps below (don’t forget
SYSTEM (SYSTEM=4) if you’re reformatting :0), backup the files, use
TRSFORM6 to reformat the drive, list BOOT/SYS as explained below (again, this is essential!),
DATECONV if necessary, and restore your files.
You can use the procedure below to change one, several, or all of the drives on your HD to 1K granules. (Any changes to the HD won’t affect floppy disks; they’ll still be formatted as six sectors (1.5K) per granule.) If, sometime later, you’d like to change an additional drive to use 1K granules, just repeat the procedure described below for that drive. If you’d like to change a drive back to 4K granules, the same procedure also applies, but use the unmodified TRSHD6/DCT instead of TRSHD6A.
If you’re using a 4P and have installed some sort of HD boot scheme, reread its documentation CAREFULLY before doing anything! It may be necessary to re-install the boot routine after modifying the hard disk.
If any of the drives you’re changing are also used by LDOS 5.x, the procedure gets somewhat trickier. My suggestion for that is to modify the CONFIG/SYS.CCC file on your LDOS hard disk boot diskette, by changing DCT+8 for the affected drives from 2F to E3 to reflect the change.
The method in this file appears to work as described. However, I do not accept responsibility for any consequences of using the information in this file, and anything you do must be done at your own risk.
Here’s how to modify your hard disk for 1K granules:
- 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.
- 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
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.
- Reboot your system with this backup of the boot diskette.
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.
- For each drive to change (which I’ll call drive “d” here)
- BACKUP *all* the files on that drive.
SYSTEM (DRIVE=d,DISABLE,DRIVER="TRSHD6A")and answer the prompts. (Make sure you’re using TRSHD6A, not TRSHD6.) With the setup I have, the drive select address is 1 for all drives, each drive uses one head, and the starting head number is the logical drive number plus one. The starting head number for what’s normally drive :0 (which is currently :4) is 1.
TRSFORM6 :dand answer the prompts. Disk name is up to you, and so is the disk master password. Unless you’d previously specified something else, the disk’s current master password is probably PASSWORD. For “Manual lockout of tracks?”, answer N. The appropriate portion of your hard drive will be reformatted, which takes a few minutes.
LIST BOOT/SYS.LSIDOS:d (HEX)to allocate the remainder of the space necessary for BOOT/SYS. This is ESSENTIAL, since TRSFORM6 assumes an unmodified driver, and you’ve thrown its calculations off by modifying TRSHD6/DCT.
- If you’re using 6.3,
- Restore your files back onto the hard disk.
- Repeat steps 5A-5F for each drive to be changed.
SYSTEM (SYSTEM=4)to make the hard disk your system drive again.
SYSGEN (DRIVE=4)to write the updated configuration file to the floppy disk.
- 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. You should also read Adam’s original HDBOOT.DOC file before applying these two patches. (See DL6 IN CIS for that file.)
The HDSYS0/FIX patch should be applied to the SYS0/SYS file on your hard disk. The HDBOOT/FIX patch must have the xx, yy, and zz bytes filled in from your DCT before applying it. 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. Your 4P will automatically boot from the hard disk when it is powered on or reset, unless you hold down the F2 key while booting. (If you have an XLR8er board, you may need a couple of tries on a cold boot because the cold start speed of the XLR8er is a bit slow.)
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.
If you have your HD system partition configured as drive 0 (by booting from a configuration floppy) you can obtain the zz values by using DEBUG to look at address x’0373′ through x’0378′, which is DCT+3 for drive 0 under LS-DOS 6.x for the Model 4.
. 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 . . HDBOOT - Patch to BOOT/SYS of LS-DOS 6.3 to permit direct . booting of model 4P from RS HD - originated by Adam Rubin . --adapted for 6.3 level K by Gary Phillips --08/12/87 . Apply via PATCH BOOT/SYS.LSIDOS using HDBOOT/FIX . Before using this patch, you must substitute: . for xx, number of sectors per cylinder of drive 0 (hex) . for yy, number of sectors per gran under your driver (hex) . for zz, the values of DCT+3 to DCT+8 for drive 0 . d00,4d=xx 00 00 00 00 00 00 00 f00,4d=12 fd cb 04 6e 28 01 87 d00,5a=yy f00,5a=06 d00,9f=c3 43 f00,9f=70 04 d01,41=18 0d f9 43 zz zz zz zz zz zz 00 00 00 00 00 f01,41=1e 00 cd 74 43 3a cd 12 e6 20 21 74 04 b6 77 d01,6f=18 2c 00 f01,6f=c3 38 02 d01,7c=c3 f01,7c=96 d01,80=00 00 f01,80=e6 1c d01,96=00 00 00 00 00 00 00 21 43 43 11 71 04 01 08 00 f01,96=01 f4 81 ed 41 0d 3e 18 ed 51 cd d9 43 db f0 cb d01,a6=ed b0 c3 38 02 f3 cd c3 43 3a 78 00 d3 84 fb 3e f01,a6=47 20 fa 7b d3 f2 3e 81 d3 f4 d5 11 02 c1 3e 80 d01,b6=05 c0 3a 79 04 92 3e 06 28 01 af a7 c9 e5 d5 3e f01,b6=cd d9 43 3e c0 d3 e4 db f0 a3 28 fb ed a2 7a d3 d01,c6=85 d3 84 d3 9c 4b 5a 16 00 06 0c 3e 02 cf f5 af f01,c6=f4 ed a2 20 fa 18 fe d1 d1 af d3 e4 3e 81 d3 f4 d01,d6=d3 9c 3e 86 d3 84 f1 d1 e1 f01,d6=db f0 c9 d3 f0 06 18 10 fe d01,f9=3e 09 90 28 ad af c9 f01,f9=00 00 00 00 00 00 00 . eop
Changing TRSDOS 6.2.1 to Boot a Model 4P from a Hard Drive
This file describes modifications to TRSDOS 6.2.1 to enable a TRS-80 Model 4P to boot directly from a Radio Shack 5-megabyte hard disk drive. You will need a file or sector editor to modify your hard disk.
NOTICE: Changing any operating system, especially at this level, is a dangerous operation. If anything in this file is not absolutely clear to you, do NOT attempt any modifications by yourself.
The method in this file appears to work as described. However, I do not accept responsibility for any consequences of using the information in this file, and any modifications must be made at your own risk.
- TRS-80 Model 4P ONLY, not Model 4 or 4D.
- TRSDOS 6.2.1.
- 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. Any hard drive used must meet the following conditions: TRSDOS logical drive :0 must lie entirely under the first head (head 1) on the hard drive. On this drive, logical cylinder and sector numbers must be identical to physical track and sector numbers.
- Use of Radio Shack hard disk drivers when running under TRSDOS 6.2.1. Other drivers have not been tested.
All references to drive :0 refer to the first logical (and physical) drive on your hard disk.
- Boot the hard disk system with your usual boot diskette. If there is an AUTO command on your boot diskette, write it down.
- Backup all files from the hard disk onto floppies.
SYSGENto create a CONFIG/SYS file on logical drive :0.
- Fill in the values marked “xx,” “yy,” and “zz zz zz…” in the table of changes to BOOT/SYS.
- 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.
To restore the original BOOT/SYS and SYS0/SYS files, either while changing them or at any time afterwards, reboot using your boot diskette and backup SYS0/SYS from the boot diskette to :0.
- Exit from your file or sector editor to “TRSDOS Ready.” If there was an
AUTOcommand on your boot diskette, store it on drive :0.
- 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.
- If your system does not boot properly, reboot with your boot diskette (hold down
F2while pressing RESET), and restore SYS0/SYS and BOOT/SYS from the boot diskette to the hard disk (see step 5 above). You may either abandon the entire project, or attempt it again.
When using the modifications in this file, a few restrictions apply:
- The system will attempt to boot from the hard drive if it is turned on. To boot from a floppy, hold down the
F2key 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. If it cannot be loaded, the system will not boot. In that case, you must boot with the boot diskette, and use SYSGEN to create a valid CONFIG/SYS file on the hard disk’s drive :0
You may change your system configuration at any time, as long as it meets the requirements above. Merely boot the system from the hard drive, establish the new configuration, and re-SYSGEN.
- When booting from the hard drive, you cannot enter DEBUG by holding down the
Dkey, as this would prevent CONFIG/SYS from being loaded. To enter DEBUG in this manner, boot from a floppy.
Of course, once you are at the “TRSDOS Ready” prompt, DEBUG may be used as desired.
- An AUTO command may be installed on the hard disk’s drive :0. To fix a runaway AUTO command, reboot with your boot diskette.
- Do not move the modified SYS0/SYS from hard drive :0 onto another disk. SYS0/SYS and BOOT/SYS have been modified for hard drive boot, and BACKUP will alter the non-existent bootstrap step rate of BOOT/SYS, rendering the copy unusable for booting either a floppy or hard disk system.
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.