EUG PD
1st December 1997
Author: Gus Donnachaidh
Published in EUG #35
These are the notes which I have on adding a hard disk. I realise there have also been several articles in early EUGs on this subject too. I have a circuit diagram for the host adaptor. I'll try to put it into a future EUG. The notes were written some time ago and so prices and any sources named may be out of date.
Winchester Disk Systems - Background
Unlike a floppy disk, a Winchester Disk Drive is much faster. It spins at 3,600rpm instead of 360rpm and can store from ten to hundreds/thousands of times more data. In addition to being faster is also has more heads (from 2 to 16) and the data transfer rate from the disk to the controller is 5Mb/s. As a trade off a Winchester Disk is permanently sealed in its housing and cannot be removed and extra controller circuitry is also needed to interface it.
Most Winchester drives are the same physical size as a 5.25" full height or half-height floppy one. They come in numerous storage capacities ranging from 5Mb to around 140Mb (10Mb is most common and usually affordable). The drive will have three connectors: power, data and control. The SASI (Shugart Associates Standard Interface) ST406/506 applies to the data and control connectors, basically the control connector is a 34 way edge connector carrying similar control functions to those found on a standard floppy disk, and the data connector is a 20 way edge connector that carries the data to/from the head(s).
The Winchester disk cannot be connected to a microcomputer directly, instead an intelligent (microprocessor based) controller has to used. The Winchester controller is a vital part of the system: it is operated under software control of the host and performs all the read/write/seek/ format operations on the Winchester - the host has only to send high level "commands" to the controller to be able to use the Winchester.
About controllers and all that...
To the host, the Winchester just looks like a large number of sectors (or blocks). The host is not concerned with the track/cylinder/head/sector number, it simply uses a Disk Address (DA) which uniquely refers to each sector (the Disk Address ranges from zero to the maximum which is number of cylinders * number of heads * number of sectors per track -1). The Disk Address is represented by a 24 bit number (3 hex bytes), so drive 0 head 0 track 0 is DA 000000, sector 1 is 000001 etc. to the end of the disk. This notation is very convenient as it allows media independence in the filing system, for example a floppy disk can be addressed in the same way, it just has less sectors so it has a correspondingly lower maximum DA.
Again there is a SASI standard for controllers, originally it defined only the electrical interface signals, but a defacto standard emerged for the majority of high level commands, so in most applications controllers are interchangeable. Most controllers can support two Winchester drives (connected by the 34 way and 20 way sockets) and provide a 50 way socket to the host. This socket provides a bi directional 8 bit parallel data port and a number of input and output hand shaking signals, these TTL level signals have to be interfaced to the host and software provided for data I/O.
To be more precise the Disk Address is actually a 21 bit number which represents the sector number, and a 3 bit number which represents the device on the controller (or Logical Unit Number, the LUN has a range from 0-7). Most SASI controllers support more than one device, for example SASI controllers to support 2 Winchesters only, 2 winchesters and 2 floppies, or 1 Winchester and 1 tape streamer are common.
Each connection port on a controller has a LUN related to it such that requests for I/O to a LUN are channeled to a particular port. Some controllers can be daisy chained on the SASI bus to make use of all 8 LUNs (the controller can be configured, by links or software, to map particular LUNs to particular devices). As an example, the DTC 520A controller board supports 2 Winchesters and 2 floppies, accesses are as follows:
LUN=0 | First Winchester (Winchester port 0) | ||
LUN=1 | Second Winchester (Winchester port 1) | ||
LUN=2 | First floppy (Floppy port 0) | ||
LUN=3 | Second floppy (Floppy port 1) |
Usually a controller can support two Winchesters (all the ones I have met do), but some only allow this if the two devices are of the same type and capacity others allow the size/capacity of each drive to be specified to the controller - it's safer to use one Winchester or two of the same size (a friend nearly ruined a 20Mb Rodime when using it in conjunction with a 10Mb Rodime).
There are two distinct types of formatting a controller can use on a Winchester: MFM (Modified Frequency Modulation) and RLL (Run Length Limiting - sometimes known as 2,7 RLL). Basically RLL is the newer technique which uses a type of data compression to get more data onto the disk (a bit like using double density on floppy disks) but requires a disk capable of supporting RLL (the transfer rate is increased to approximately 7.5Mb/s). Also the controller has to be able to support RLL (eg. Adaptec ACB4070). Most controllers on the second hand market support only MFM and most drives were intended for use with MFM. My advice is to stick with MFM unless you really need the extra space - also it's probably cheaper to use a bigger drive with MFM than to purchase a RLL controller.
Controllers are not, unfortunately, interchangeable. That is, a Winchester that has been formatted by one controller cannot be read or written to by a different make of controller. This is because the different controller manufacturers use slightly different methods of putting the data onto the disk, different numbers of sectors per track etc.
Another compatibility "problem" with controllers is how they are informed about the size/shape of the Winchester attached. All controllers have a "default" drive configuration at power up (usually a Shugart 5Mb drive) which is not much use unless you happen to be using this type of drive. Three ways can be used to get around this problem:
- After power up, the host computer sends a command block to the controller telling it about the drive connected (this remains in use until power is lost or the RESET line is pulled low) eg. WD1002. The problem is the host computer needs to know when to send the info to the controller (problem with the BBC as controller reverts to power up default parameters every time BREAK is pressed.
- If the controller is microprocessor-based, then the default parameter values are stored as part of the program in EPROM on the controller card. These default parameters can be edited so that they match your drive, eg. DTC controllers.
- Truly intelligent controllers are "told" about the drive when it is formatted, and a special sector is written to the Winchester (on track 0/head 0) automatically containing drive parameter information. On subsequent power ups (OR after BREAK is pressed on the BBC), the controller reads the special sector to find out about the drive, eg. Adaptec ACB4000 and Xebec S1410a series controllers.
Interfacing to a host computer
Generally, to interface a controller to a host, a pair of 8 bit parallel read ports and an 8 bit parallel latched write port are required with some extra logic to handle the control signals (handshaking etc) - all data into/out of the controller is negative logic, so for the majority of machines, it has to be inverted. The interface between a standard SASI controller and a particular host computer is usually known as a "Host Interface Adaptor" or "Winchester Host Adaptor", further sections of this article describe host adaptors for various computers.
Once a host adaptor is implemented a power supply is required for the drive and controller, typically a Winchester will require +5v at 1A and +12v at 2.5A when running (peak of 4A at switch on), and the controller will require around 3A at 5v, these supplies should be "computer grade", ie. well regulated, probably from a switched mode power supply unit.
Software to "drive" a winchester varies greatly with the host in use, for the BBC micro the routines required are already inside Acorn's ADFS ROM, for a Z80 based CP/M machine a driver routine is required for the BIOS (similar too for IBM PC type machines with MSDOS). If you can't find software to handle a Winchester on your computer you will have to write routines from scratch - the controller manuals usually give detailed flow of charts to make this easier...
Winchester disk systems - Buying hardware
Drives
There is a reasonable supply of cheap drive units available on the secondhand market, but prices and quality vary greatly. Points to note:
- All Winchesters (except the very large units with removable media) are sealed in a clean room, most manufacturers put a seal across the top plate - don't buy a drive that has the seal broken. (Some drives have been to the manufacturer and been refurbished so may have two sets of seals - these are probably ok as long as the top set are not broken).
- All winchesters have control logic attached to them to operate the stepper motor, regulate drive speed, etc. (Should have a 4-pin power connector, 20-way and 34-way edge connector) - don't buy a lump of diecast aluminium that is no use other than a doorstop!
- Sometimes, if you're lucky, the disk controller is mounted on the Winchester and already (still) connected up (by 20-way and 34-way IDC ribbon cable) - if the drive looks ok, then you might have a bargain; it might even be worth buying the drive just to get the controller board depending on the price!
- If possible try out the drive on someone's system before parting with the cash, or at least try the motor, put power on the drive (+5V and +12V) and watch/listen. Most drives (All the ones I have met!) are up to speed after about 30 seconds and the end of a successful power up is indicated by the drive recalibrating the heads (stepping them out and back to track zero) - you should hear the stepper motor move the heads. If, after 30 seconds, the drive speed has not settled down (motor speed hunting), or nothing is happening, or if you hear a loud clattering noise, then switch off and choose another drive!
- Look on the side of the drive for a sticker called "Bad Block Map", "Illegal Address Map" or similar; this details any areas on the Winchester that were found to be defective at manufacture - if possible, find a drive that has no map entries (a "physically perfect" disk). Many disks have bad blocks: this is not a problem because these can be overcome during formatting making a "logically perfect" disk.
- Always get technical information on a drive you are buying. You will need to know a number of parameters to configure your controller card/host system. You will need to know such things as the number of cylinders, number of heads, head step time, cylinder number after which reduced write current is used, etc.
There is not too much point in going into who makes what in the way of drives - basically there are two types: head positioned by stepper motor or by voice coil, the later is much more expensive and usually reserved for multi user systems where speed is really critical.
Older 5, 7 and 10Mb drives usually have a fixed head step speed 3mS, whereas newer drives support buffered seek. Buffered seek means that the controller sends all the head step pulses to the drive, which counts them, and then the drive works out the best way to move the head quickly to the required cylinder. Various manufacturers have implemented their own ways of moving the heads quickly, and may call them such things as "fast step algorithms" etc. Basically it doesn't matter since it is transparent to the controller.
There is a good chance that you will see more Rodime drives around than some others as they are a British (!!!) company (and they are a pretty good make!). The RO200 series is most popular and goes something like: RO201=5Mb, RO202=10Mb, RO203=15Mb, RO204=20Mb, RO203E==30Mb and RO204E=40Mb. The RO200 series are all 5.25" full height, quiet and reliable.
Controllers
There are a number of different SASI controllers around on the market made by Shugart, Adaptec, Xebec, DTC, Western Digital, NCL etc., most of these are software compatible as far as the command structure is concerned except some of the Western Digital controllers. The list below is not exhaustative; there are other makes of controller that may be suitable.
Shugart
A new Shugart controlled is available in the USA which can emulate Xebec S1410 and DTC 510B controllers. New price is around $79 from companies advertising in BYTE - we just need someone to import them!
Adaptec (Model ACB4000 and ACB4070)
The ACB4000 is used by Acorn in their "official" systems with Rodime or Seagate drives, it works in MFM only with 32 sectors per track. As the ACB4000 is used by Acorn, it is fully supported and will work with their SuperForm (Winchester formatter program). Viglen use the ACB4070 which supports MFM and RLL.
Advantages of Adaptec controllers are that they are used by Acorn, and store the drive parameters on the drive. The Adaptec controllers have a few opcodes not found on other controllers such as $2F - read drive parameters. This is not a problem as these are only used during formatting, and a different format program for a different controller solves this.
Tame Micro Systems sell Adaptec controllers (ACB4000=£155, ACB4070=£175, both plus VAT).
Disk Technology Corporation (DTC) (Models 510A/B and 520A/B)
These have 33 sectors per track and are one of the more profuse series of controllers. DTC have been in the market a long time and their controllers have been used with a lot of different machines.
The 510 series controllers support two Winchesters, while the 520 series support two Winchesters and also two floppy disks (using an NEC765 FDC). Basically the B versions of both are newer than the A versions, the firmware in the A versions is stored on a 2732 and in the B versions a 2764 is used. The B version of the controllers have some extra opcodes, but these are not needed for the BBC.
The importer/distributor if DTC controllers is not known so prices can't be found, but I believe that the current new price for a DTC510A is around £110, plus VAT.
Most hobbyists use the DTC controllers as they have been found on the secondhand market at affordable prices (circa £50-£60). With the BBC Micro, the drive parameters are put into the controller's Eprom as the default parameters.
Xebec (Model S1410)
Another profuse controller with 32 sectors per track, this is available for around £167 + VAT new (Farnell). Believed to be used in some third party Acorn-compatible products for the BBC and also used in various CP/M and IBM PC type machines.
Advantages of this controller are its ability to support up to 65535 cylinders and 16 heads for very large drives, and it stores the drive parameters on the drive.
Xebec (Modeal S1410a)
We have now used this controller and are very impressed. As standard it comes with a 4K Eprom (2732) with software version 104788. This firmware is usable but would need a new parameter table for different sized drives - the parameter table is at the end of the Eprom -. The main
disadvantage is that the step rate of this drive is not stored in the parameter table but the controller expects the drive step rate to be supplied in the control block sent to it by ADFS which is always zero. The controller interprets this as a 3 msec step rate which, for modern
drives such as Rodime 200 series, is slow! (In fact the DTC controllers default to 3 msec on reset so they seek track zero at 3msec step rate when you press BREAK).
Optional firmware release 104793
Just under 8K in 2764. The drive parameters are supplied at format time, including the step rate, and are written to physical track zero. These parameters are read from the drive at controller reset. The result is that the drive seeks track zero at the step rate during formatting. Obviously one cylinder of the Winchester is lost to the parameters so the drive has one cylinder less for the user - ie Rodime 202 has 321 cylinders but when initialised has 320 available to the user.
Western Digital (models WD1001, WD1002 and WD1003)
The WD1001 controller series (32 sectors per track) are believed to be somewhat non-standard and will not work with the Beeb.
The WD1002 is available in two very different versions:
- WX1 suffix, which is a half length plug-in card for the IBM PC using SMD devices (costs around £90) and is not suitable for the BBC, and
- SHD suffix, conventional card. The WD1002-SHD will work with the BBC but there are problems with storing the drive parameters (Solidisk use the 1002 with their Winchester system but you have to use their host adaptor and their ADFS - I have not found their ADFS particularly reliable!)
The WD1003 is a newer controller and apparently has a link to make it Adaptec ACB4000 compatible, but we don't have any more info on it...
WD1002-SHD disadvantages: The drive parameters cannot be stored on the drive and cannot be programmed into Eprom since the controller does not have an Eprom (It uses custom chips instead of being microprocessor-based).
SOLIDISK have got around the drive parameters problem by storing them inside the ADFS ROM. This means that the ADFS ROM has to be supplied by SOLIDISK to match the drive. An Eprom could be written for the BBC that detected power up or pressing BREAK and then sent the parameters to the controller if it was connected. This is being investigated.
You are probably best to avoid WD1001/1002 controllers for a BBC application because of the problem storing the drive parameters.
NCL NDC 3011
NCL make a small controller that looks like it should work ok with the BBC. It is sold by Tame MicroSystems for around £120, but as yet no one has tried one.
Winchester Disk Systems For The BBC Micro
To implement a Winchester Disk System on the BBC Micro (Model B or B+) or Master, you need the following:
- A suitable drive (Any size up to 4 Gigabytes is supported!)
- Acorn's ADFS (Advanced Disk Filing System) version 1.30 for the BBC B/B+, or version 1.50 for the Master (already fitted in the Master 128).
- A suitable controller card: DTC, Adaptec or Xebec recommended.
- Host adaptor (detailed later).
- Power supply - you cannot run this of the internal power supply! (Around +5V at 5A and +12V at 5A should suffice)
- Cables. You will need the following:
- 50-way to 5-way IDC to go from the host adaptor to the disk controller (typically 6")
- 34-way to 34-way IDC to go from the BBC's 1MHz bus to Host Adaptor (typically 3")
- 34-way IDC to 34-way edge connector for drive control signals to controller card (typically 12"). If you are using a WD1002 controller, this is an edge connector lead
- 20-way IDC to 20-way edge connector for drive data signals to controller card (typically 12")
Using a Winchester on the Beeb has absolutely nothing to do with any Floppy Disk Controller that you may have fitted, be it 8271, 1770 or any other. If you have something other than a 1770 controller then you might consider changing to one but it is not necessary. The BBC B+ and Master have the 1770 fitted (or the 1772 which is smaller). For the BBC B you can fit the Acorn 1770 board or the SOLIDISK DDFS or DFDC boards (Issue 2).
The advantage of using the 1770 is that ADFS can work with it on floppies as well as with the Winchester controller. For compatibility with the older DF's Acorn's 1770 DFS or SOLIDISK's STL-DFS 2.2 can be used.
The layout of "drive numbers" under ADFS is as follows (when a Winchester is fitted):
Drive Drive Handled Description Number Letter by 0 A Controller 1st SASI device (LUN=0), 1st Winny 1 B Controller 2nd SASI device (LUN=1), 2nd Winny 2 C Controller 3rd SASI device 3 D Controller 4th SASI device 4 E 1770 First floppy 5 F 1770 Second floppy 6 G - 7 H -
(Note a floppy drive under ADFS is a unit, not a surface like DFS, a drive can have one or two sides and 40 or 80 tracks).
Basically references to "drive numbers" of 4 or higher are passed to code within ADFS which uses the 1770/1772 controller chips in the Beeb/Master and pretends to be a SASI-compatible controller, while "drive numbers" of 0 to 3 are used to generate requests for I/O to a SASI device responding to the equivalent LUN on one of the controller(s) connected (See discussion of LUNs above).
The BBC Micro/Master computers support Acorn's Winchester disk units, which are connceted via the 1MHz bus. The Advanced User Guide shows that memory locations &FC40 to &FC47 are set aside for Winchester disk units. (These are located in page FRED).
A host adaptor on these machines requires 4 bytes of memory space; as 8 bytes are reserved it is believed that two controllers can be mapped onto the system.
Two Winchester drives have been used successfully on one controller, and as expected they appear as drive 0 and 1. Unfortunately, ADFS 1.30 on the BBC B/B+ doesn't support a second host adaptor, probably because there wasn't sufficient space in the ROM for the extra code so we can only hope that Acorn will implement the extra code one day? [Note Sunday 19th April 1987 - Rumour has it Acorn are doing just that!]
The memory map looks like this:
Controller Address Read Write 0 FC40 Data Data FC41 Status - FC42 - Select FC43 - Interrupt latch 1 FC44 Data Data FC45 Status - FC46 - Select FC47 - Interrupt latch
Providing you have your power supply, Winchester drive, ADFS ROM, controller card and cables, the sticking point is the host adaptor - the host adaptor connects the standard SASI controller to the BBC and sorts out the addressing and buffering and inverts the data bus (SASI uses negative logic).
Acorn do not sell parts of their Winchester disk system - you cannot but just the host adaptor. A number of other companies now sell complete Winchester disk systems (Amcon, Viglen, Technomatic, Midwich, etc) and they have had to design and manufacture their own host adaptors, it is just possible that they might sell the host adaptor separately. If they do then it should cost you around, say, £50 maximum. Any more would be scandalous.
If you can't buy a host adaptor then you'll have to resort to building one. The next part of this article deals with just this. Fig. 1 is the circuit diagram of a modified version of Acorn's host adaptor and it can be built for around £35. Double-sided PCBs are available from the author for £15.00 plus £1.00 P&P: these boards are being made in small quantities only, by hand, hence the price.
How It Works
IC5 (74LS245), IC6 (74LS138) and IC7 (74LS138) perform the address line buffering and decoding. S1 provides a link selectable setting for controller 0 or controller 1 (base address FC40 or FC44). The output of the address decoder provides eight lines (active low), four for read and four for write (shown for controller 0 on the diagram).
IC1 (74LS245) buffers the data bus continuously, IC2 (73LS373) is used to latchdata that is written to the controller. Write data is inverted by IC13/14 when enabled by the I/O control signal from the controller card. IC13/14 (7438) are open collector output devices that drive the SASI data port (pins 2 to 16).
Data is read from the controller card, inverted and buffered by IC3 (74LS240). Controller status is inverted by individual Schmitt inverters in IC15 (7414) and latched and buffered by IC4 (74LS373). Acknowledge (ACK) signals are provided automatically after a Request from the controller when a read or write to the data port is performed. Select (SEL) is driven automatically by the Busy (BSY) status from the controller.
An unusual interrupt generating arrangement is also incorporated; a set reset flip flop, IC12, is set every time a Request (REQ) is received from the controller, and is cleared when a "1" is written to bit of the interrupt latch, half of IC10. This allows interrupts from the controller to be ignored during block read/write operations but to be enabled during byte read/write and provide the necessary handshaking between the host and the controller.
The host adaptor connects to the 1MHz bus via a length of 34-way ribbon cable and to the host adaptor via a length of 50 ribbon cable. IDC connectors or cheaper pin headers (available from Farnell) may be used. A power connector (similar to those used on floppy drives) is provided for connection of +5V (No 12V supply is required). The power rails are decoupled at every chip by small 0.1uF capacitors.
The Acorn application note on interfacing to the 1MHz bus recommends that all output and data lines should be pulled up to +5V and down to ground on the last device connected to the 1HMz bus. If the Winchester disk unit is the last device (or the only device) then fit the eight 2K2 resistors and RP1 to RP4.
If the Winchester is not the last device in the chain then a 1MHz bus in and 1MHz bus out socket should be provided to allow daisy chaining - this is most easily done by putting a 34-way IDC socket (one with pins) onto the cable at the back of the Winchester unit. Note that the Teletext Adaptor has the special status of last device in the 1MHz bus chain (it has the terminating resistors fitted).
Figs 2 to 4 are the artwork for the double-sided PCB to built the host adaptor, as follows:
Fig. 2 : Component placing diagram | |
Fig. 3 : Bottom side - track layout | |
Fig. 4 : Component side - track layout |
On Fig. 2, the crosses "+" indicate the 0.8mm holes used for the IDC connectors and through pins. Our PCBs are not through plated boards, instead through pins are used to connect the top layer to the bottom. A pin is used in every position that is not an IDC connector.
You may have difficulty making PCBs from this artwork as photocopiers have a tendency to slightly change the size of the artwork and add distortion. As an alternative, you could wire wrap a board, or even build the circuit on Veroboard...
Host Adaptor Parts List
IC1 74LS245 C1 100uF 16V IC2 74LS373 C2-17 0.1 Disk IC3 74LS240 IC4 74LS373 R1-8 2K2 0.5W IC5 74LS245 RP1-4 2K2 8 Resistor SIL IC6 74LS138 RP5-6 330R 8 Resistor SIL IC7 74LS138 IC8 74LS14 S1 Wire link IC9 74LS04 IC10 74LS74 SK1 Power connector (Farnell P/N 148-086) IC11 74LS74 SK2 34-way pin header (Farnell P/N 148-195) IC12 74LS00 SK3 50-way pin header (Farnell P/N 148-195) IC13 7438 IC14 7438 IC15 7414 IC16 7407
Controller Configuration
For the DTC510A/B controllers, there is a ten byte parameter block stored in the controller software Eprom on the controller card. ADFS expects the power up default drive parameters to be correct or the controller to get the parameters from the drive (eg. Apaptec/Xebec).
The following table indicates the bytes that have to be altered and their addresses within the Eprom. Note, the addresses are for firmware version WD24 (DTC-510A controller) and WD30 (DTC-510B). If you have a different firmware version number, the parameter block may be at a different address.
Address (hex) Description RMS RMS RODIME RODIME 510A 510B 509X 514X 202 204 059B 0941 Step pulse width 02 02 01 01 059C 0942 Step period 3C 3C 01 01 059D 0943 Step mode 00 00 00 00 059E 0944 Max head address 03 03 03 07 059F 0945 Max Cyl. lo byte D7 35 3F 3F 05A0 0946 Max Cyl. hi byte 00 01 01 01 05A1 0947 Reduce current cyl. 80 80 84 84 05A2 0948 Do not change 00 00 00 00 05A3 0949 Do not change 0A 0A 0A 0A 05A4 094A Do not change 00 00 00 00Ampex drives are identical to the Rodime drives (as they are made under licence). Rodime E series appear to have less heads but more cylinders.
Note the following:
- Max head address is (number of heads - 1)
- Max cylinder address is (number of tracks - 1) (16bit number)
- Rodime drives are operated in fask seek mode, buffered with ramped stepper speed controlled by the onboard processor on the drive (See Rodime manual)
The format of the ten bytes is the same as detailed in the DTC manual for the "load drive parameters" opcode except that the 16bit numbers are stored low byte first. For other drives, you will have to calculate the parameters and blow an Eprom with the appropriate bytes. If you don't have the facility to edit/blow Eproms then I can probably do it for you.
Controller Links (DTC-510A)
Link W1 on the controller should be open to select 256 byte sectors then the default parameter (closed is 512 byte sectors), and link W2 should be across BC. Link W (by the crystal) should be on.
Controller links (DTC-510B)
Sect Select links W6 and W7 should both be open to select 256 byte sector operation. W1, W2, W3 & W5 should be open, parity select W8 should be open, and W4 should be connected between 1 & 2. Link ID0 should be connected (nearest to W7).
Getting Going
Once a host adaptor has been built or purchased, and the controller card has been configured for the Winchester the system can be put together, formatted and tested.
Power up the Winchester drive, controller, host adaptor and BBC Micro at the same time, ADFS should be installed as the highest filing system ROM (preferably the highest priority ROM, socket 14 is okay if you have BASIC in 15) a high priority socket is needed as ADFS has to service interrupts from the host adaptor, and is reasonably timing dependant; a few ROMs can cause problems if they are in a higher priority socket (eg. IEEE filing system).
If you have a Master you should do a *CONFIGURE FILE 8 to make ADFS the default filing system. *CONFIGURE HARD to select Winchester by default.
The system should be hanging after the "BBC Computer 32K Acorn ADFS" messages waiting for the Winchester to spin up to speed (takes up to 30 seconds) then become "ready". After this, ADFS will try to "mount" the drive; that is, read in the free space map and root directory. The DTC controllers have 8 status LEDs, they should be displaying 01000000, which is the idle condition, if they are 11111111 (all on) then you probably connected one of the cables the wrong way round or forgot the power on the host adaptor.
If you get "Disk error 5 at :0/000000" then hit BREAK. The system should now hang and wait for the drive. This seems to happen with some Rodime drives on the DTC controller.
Depending what is already on the disk (garbage as far as we are concerned!) on the first occasion you will get a "Disk error", "Bad FS Map", "Compaction required" or "Broken directory" message and the system will then probably hang or drop into BASIC.
Press CTRL-F and BREAK. ADFS will be entered without looking for the free space map/root directory. Load the Winchester formatter program from floppy disk (Remember that under ADFS your floppy drives are now :4 and :5!) with, for example, LOAD ":4.SYSROOT.WINCHESTER.DTCFORM"
Run the format program. It should take about 1 or 2 minutes to format the drive, depending on capacity. After the format is complete the drive should be exercised by the diagnostic routine, when finished successfully you can initialise the drive.
Like floppy disks, Winchesters can be formatted with a sector skew to improve data transfer rate (Allowing time for the host to process sectors). We have done various experiments/timings and have found that a skew of 4 is optimum.
Note: The formatted (DTCFORM) provided does not take care of bad blocks. If, when you verify the disk, you have some errors, you can note them down and "map them out" of the free space map with HARDERROR utility so that they are not used.
Initialising the drive writes an new (unused) free space map, and an empty root directory to the drive, making it usable to ADFS. The HDINIT program will initialise the drive: initialisation takes only a few seconds. When complete the drive can be used. Make sure that you have modified the variables cyl%, heads%, sect% to match the drive and controller that you are using before you use HDINIT otherwise it is possible to make the disk look bigger or smaller than it actually is.
After you have run HDINIT type *MOUNT 0 CTRL-BREAK and the drive should be mounted, *FREE should reveal the free space on the drive, and *MAP the entries in the free space map. If you're new to ADFS, you should read the ADFS manual thoroughly and then start to experiment...
Hints
A library for executable programs (* commands), called "LIBRARY" (or anything starting LIB...) will be selected automatically when ADFS boots, so put your machine code programs there.
A *EXEC file can be *RUN (or just *filename) if its load/exec address is set to $FFFFFFFF, this allows *EXEC files to work from the library. (Very useful!)
Acorn's utility to recover deleted files (called GETLOST), requires a top level directory called "LostFiles", with two sub directories called "A" and "B". For this utility to work the directories must be on the disk before you need them. Create them now even if you don't use them!
A utilities disk is available from the author with a number of useful programs for formatting/verifying/initialising/archiving Winchesters etc. with DTC and other controllers.
HDArchive | Fast Winchester to floppy archiver | |
PARK | To take a copy of the first track on the Winchester and write it to the far end of the disk. This makes a second safe copy of the vital free space map/root directory, and leaves the heads in a better place than the middle of the disk for when you turn the power off. | |
DU | An 80-column file dump routine. | |
ROMS | List installed ROMs and any Sideways RAM. | |
RAMLoad | Load a ROM Image to Sideways RAM and install into Beeb's Map plus other bits and pieces. |
We are continually writing new software are will add these to the disk too. It will be supplied on 80 Track double-sided ADFS unless you ask for another format.
The Advanced Disk Toolkit ROM from ACP also has a number of useful commands and is probably a good investment. It includes a formatter for DFS/ADFS floppies (not the Winchester), a disk sector editor for floppy/Winchester DFS/ADFS and a utility to transfer files from one filing system to another.
Gus Donnachaidh, EUG #35