
_________________

ZIDEFS user guide
_________________


User, please note
=================

ZIDEFS is Freeware, i.e. it is free software, but not public domain.

Copyright notice
================

The copyrights (c) of this program belong to John Kortink. All rights are
reserved.

You may not make changes to this program (except for documented configuration
changes). If you distribute it, you may only distribute the complete and
unchanged original copy (as you first received it). You may distribute this
program freely, but must obtain written permission from me if it is to be
distributed as part of, or alongside, any product that is meant to generate
profits. This program is provided 'as is'. Fitness of this program for any
particular purpose is not implied. Using it is entirely at your own risk.


//
//
// Introduction
//
//

Features :

- Fully replaces (and considerably improves on) the standard filing system and
  support software supplied with the 'old' Ian Copestake Software (ICS) 16-bit
  IDE interface from circa 1991.

- Extends compatibility all the way up to Risc PCs running RISC OS 4.

- Provides optimal transfer speeds and improved harddisc compatibility.

- Supports up to four partitions and very large (up to 256 GB) drives.

Note that ZIDEFS must be 'blown' into an EPROM, which replaces the existing
EPROM on the IDE card.

ZIDEFS has been written from scratch, is stand-alone (doesn't use or builds on
any part of the old software), and provides numerous small and several big
improvements.

ZIDEFS is compatible with all Acorn machines running RISC OS 3.1 or later, up
to the latest Risc PCs running RISC OS 4. It has been tested on an A5000 with
RISC OS 3.1, and on a Risc PC running RISC OS 3.5, 3.6, 3.7, 4.02 or 4.03.

Wherever the 'old' software is mentioned, this refers to IDEFS version 1.14
(dated 23rd April 1991), which is the latest version I know of and/or used
(although not for quite some time, as ZIDEFS started life as early as 1993).


//
//
// Upgrading
//
//

There are a few issues when upgrading to ZIDEFS 1.00 (or higher) :

- The filing system name has changed from IDEFS to ZIDEFS

Note that the filing system name under ZIDEFS versions before 1.00 was also
IDEFS. Due to the name change, full pathnames referring to IDEFS (i.e.
pathnames that include the filing system name) have become invalid. Software
that has stored full pathnames somewhere in its configuration or output files
may need to be reinstalled or rerun. If you boot from a drive which is to
reside under ZIDEFS, you will probably also have to reinstall your !Boot
sequence (if any).

- The filing system number and SWI chunk have changed

Software relying on this needs to be updated.

- SWI functionality has changed

Software using ZIDEFS SWIs may need to be updated. Note, however, that the
IDEFS_Execute SWI has not changed (except, of course, that it is now called
ZIDEFS_Execute).

- Initial access to your drives

In all cases, if you boot from a drive which is to reside under ZIDEFS, you
must issue '*Configure FileSystem ZIDEFS' and '*Configure ZIDEFSDrive X' (where
X is the number of your boot drive).

If you're upgrading from a ZIDEFS version before 1.00, simply re-issue your old
*Configure commands (taking note of the fact that these now start with 'ZIDEFS'
instead of 'IDEFS', but haven't changed in any other way). If you're upgrading
from IDEFS, or intend to connect harddiscs that didn't run under IDEFS, you
must issue '*Configure ZIDEFSDiscs X' and '*Configure ZIDEFSDrives X' (where X
is the number of harddiscs you have connected). After rebooting, you should now
have access to your drives through ZIDEFS.

Always completely read this guide. In particular, if you're not upgrading from
a ZIDEFS version before 1.00, you may want to partition your harddiscs.

There are more issues, but the above will get you started.

Needless to say, first backup all your data before you attempt upgrading.

The rest of this guide assumes you're upgrading from the original IDEFS. If
you're upgrading from a ZIDEFS version before 1.00, a lot of the information
will be familiar, but not everything.


//
//
// List of improvements
//
//

- Support for partitions

ZIDEFS provides support for up to four partitions (drives). You are no longer
limited to a single drive taking up an entire harddisc. Any of the maximum of
four drives may be placed on any of the maximum of two harddiscs you have. And
may take up any portion of the harddisc.

For example, if you have two 500 MB harddiscs, you could choose to put one
drive (of 500 MB) on the first, and three (e.g. 50, 100 and 350 MB) on the
second. Or two on both, or two on the first and one on the second, etc..

Note, from this, that a 'drive' is no longer synonymous with a 'disc', as it
used to be. Don't confuse the two. The drive is what appears on your iconbar as
a drive icon. The disc is the piece of hardware you can hold in your hand.

Partitioning your harddiscs can serve several purposes. If you're running a
RISC OS version before 3.6, the size of a drive is limited to 512 MB. If you
have a 2 GB harddisc, you can now store four 512 MB drives on it, instead of
one 512 MB drive (wasting 1.5 GB which you'll never be able to use). If you're
running RISC OS version 3.6 or later, the size of a drive is, theoretically,
limited to 256 GB. But it can still be useful to use seperate drives for, say,
your software (everything except data) and your data (images, movies, clip art,
DTP and text files).

- Support for 'large' drives

ZIDEFS supports the extensions introduced in RISC OS 3.6 to support drives of
up to 256 GB (instead of 512 MB with RISC OS 3.5 and earlier).

- Optimal transfer speeds

ZIDEFS gets the maximum performance out of the 16-bit IDE podule. The original
software suffered from sub-optimal transfer speeds. Word-aligned transfers
(transfers to or from word-aligned memory addresses) are roughly 5 to 10%
faster. Non-word-aligned transfers have roughly doubled in speed.

- Improved harddisc compatibility

ZIDEFS supports more IDE harddiscs than the original software. It is more
forgiving towards harddiscs that deviate from the ATA standard (although this
is getting rare). Also, the new LBA (Logical Block Address) sector addressing
method supported by most recent IDE harddiscs is exploited (although this is
not readily noticable to you as a user).

- Optional transfer address range checks

ZIDEFS can prevent the possibly disastrous effects (an address exception,
followed by the dreaded 'Filecore in use' and possibly a trashed harddisc) of
bad transfer address ranges (i.e. ranges that are either wholly or partially
mapped to non-existing RAM). Before any transfer is started, a check is made to
ensure that the entire address range is safely accessible.

- Support for the 'Free' module

ZIDEFS supports the 'Free' module (introduced in RISC OS 3), which provides the
fancy 'free space' bar display (available via the 'Free' entry of most drive
icon menus). The newer 64-bit versions of the Free module are also supported.


//
//
// List of differences
//
//

- The filing system

The filing system is no longer called IDEFS, but ZIDEFS. ZIDEFS uses an
officially allocated filing system number and SWI number range. Both are
different from those used by the original IDEFS and ZIDEFS versions before
1.00.

- Commands and SWIs

Compared to IDEFS 1.14 :

Removed : the _FormatTrack and _IdentDrive SWIs, support for _DiscOp's 'Write
Track' reason code, and the *IDEPowerSave command.

Added : a powerful low level IDE access SWI _Execute (also incorporating the
functionality of the old _IdentDrive SWI), two SWIs (_Info and _DriveOptions)
which are for internal use, and three SWIs (_FreeSpace64, _SectorOp and
_MiscOp) providing ZIDEFS versions of the Filecore SWIs of the same name.

Changed : all other IDEFS commands and SWIs have ZIDEFS equivalents.


//
//
// Support software
//
//

The old support software is no longer supported.

New support software is supplied :

- A partitioning utility, used to specify the locations of your drives.
- A patch program for !HForm, the ADFS harddisc formatter supplied with all
  versions of RISC OS. After patching it will format ZIDEFS drives instead.
- A utility that displays details about your IDE harddisc(s).


//
//
// The ZIDEFS package
//
//

There are several files in the ZIDEFS package :

- ZIDEFSROM

This is a ROM image file.

For ZIDEFS to work, you need to replace the EPROM chip on your IDE interface
card (containing the old IDEFS software) with an EPROM chip containing ZIDEFS.

The procedure is as follows :

+ Locate the EPROM on your IDE interface card. It is the socketed chip with 28
  pins, usually marked '2764' or '27C64'. Remove it, and store it away safely
  (preferrably inserted in a piece of conducting foam).

+ Obtain a 27C64 EPROM from an electronics shop. Note that it is also possible
  to use a 27C128, 27C256 or 27C512 EPROM (by replicating the ROM image 2, 4 or
  8 times respectively, at all 8K boundaries), but if you do, it is recommended
  that you locate pins 27 and 26 of the EPROM socket, at the solder side of the
  IDE interface PCB, and connect them by soldering a short piece of wire. This
  will ensure that all the mentioned EPROM types work correctly, and that only
  the top 8K of the EPROM will ever be accessed. Ask someone knowledgeable if
  all this doesn't make any sense to you. Electronics shops will usually be
  able to provide all the help you need.

+ 'Blow' the ROM image file into the EPROM (replicating the image at 8K
  boundaries as necessary for EPROMs other than the 27C64, see above). An
  electronics shop will usually be able to do this for you as well.

+ Securely insert the new, programmed EPROM in the EPROM socket on your IDE
  interface.

- IDEFSROM

Is like ZIDEFSROM, but, throughout, the filing system will be called 'IDEFS'
instead of 'ZIDEFS'. You may want to use this instead of ZIDEFSROM if you want
to access a disc with files containing 'IDEFS' hard-wired as the filing system
(which is likely if you used the disc before under another filing system called
IDEFS).

- ADFSROM

Is like ZIDEFSROM, but the filing system will be called 'ADFS' throughout. See
'IDEFSROM' for more details about why you might want to use it.

- Guide

This is the user guide. You're reading it right now.

- Reference

This text file provides details about ZIDEFS SWIs. This is for reference only.
If you don't know what it's for, you do not need to read it.

- Updates

This text file provides details about past updates to ZIDEFS. Read this if you
are upgrading from an older version of ZIDEFS.

- Partition

This is the partitioning utility. You use it to specify to ZIDEFS where your
drives are on your harddiscs.

- PatchHForm

This program patches !HForm, the ADFS harddisc formatting utility that came
with the version of RISC OS that you're running. After patching, !HForm no
longer formats ADFS drives, but ZIDEFS drives.

- DeviceID

This program provides extensive information about your IDE harddiscs.


//
//
// Setting up ZIDEFS
//
//

- Switch off your machine.

- Remove your IDE interface card from its podule slot.

- Replace the EPROM on your IDE interface card (as described above, under
  'ZIDEFSROM', but note that you may want to use 'IDEFSROM' or 'ADFSROM'
  instead).

- Put your IDE interface card back into its podule slot.

- Switch on your machine.

- When you arrive in the desktop, press F12.

- Enter '*Podules' and check that it says 'IDE interface' when listing the
  podule slot that you use for your IDE interface card.

- Enter '*Help Modules' and check that ZIDEFS and ZIDEFSFiler are listed.

- Count your harddiscs. Determine how many drives you want to store on them.

- Enter '*Configure ZIDEFSDiscs X', where X is the number of harddiscs you have
  connected to your IDE interface podule.

- Enter '*Configure ZIDEFSDrives X', where X is the number of drives you want.

- Enter '*Configure ZIDEFSDrive 4'. This specifies drive 4 as the default
  ZIDEFS drive. If you need another drive to be the default, feel free to
  specify it instead of drive 4.

- Enter '*Configure ZIDEFSDirCache 32'. This permanently reserves 32K of memory
  for the ZIDEFS directory cache. You may enter a higher number (up to 255) if
  you have enough memory to spare.

- Hard-reset your machine (either via the Reset button, or by switching off and
  then on again).

- When you arrive in the desktop, ignore any new drive icons you see, and press
  F12.

- You will now partition your harddiscs. If you intend to allocate your entire
  first harddisc to drive 4, and your entire second harddisc (if you have one)
  to drive 5, you may skip running the 'Partition' program, because the
  described arrangement is the default drive-to-harddisc mapping used if no
  partition table is found (although it is recommended to run 'Partition'
  anyway, even in this case). If you intend to have any other arrangement, you
  must run the 'Partition' program. Do so now. Some information about your
  harddiscs is displayed, and the current partition table (if any) is listed.
  Press 'Y' to start specifying your new (or very first) partition table. Enter
  the location and the size of all your drives. Once you've specified all your
  drives, press 'Y' to store the partition table (in case you need to know, it
  is stored in the first sector of your master harddisc). If you think you made
  a mistake, simply re-run 'Partition' and do it right.

- Hard-reset your machine (either via the Reset button, or by switching off and
  then on again).

- When you arrive in the desktop, you will now see as many new drive icons as
  you specified with *Configure ZIDEFSDrives. At this stage, however, they can
  not be accessed, because they first need to be initialised, just like any
  other new drive.

- Make a copy of the !HForm application supplied with the version of RISC OS
  you're running (never patch the original !). Henceforth '!HForm' refers to
  this copy, not the original. Copy !HForm.!RunImage to !HForm.!RunImage0. Copy
  the supplied 'PatchHForm' program to !HForm.PatchHForm. Change directory to
  !HForm. Run the PatchHForm program. When this finishes without issuing an
  error, you can now use !HForm to initialise your ZIDEFS drives. PatchHForm
  has been verified to work correctly on !HForm versions 2.19, 2.23, 2.44, 2.46
  and 2.51, supplied with RISC OS versions 3.1, 3.5, 3.6, 3.7 and 4.02
  respectively. It is likely to work on all !HForms between 2.19 and 2.51.

- Run the patched !HForm. Ignore any references to 'ADFS' because in reality
  you are now initialising ZIDEFS drives, not ADFS drives ! If you're nervous
  about this, you can choose to physically disconnect your ADFS harddiscs, and
  run the patched !HForm from a floppy disk. The initialising procedure is the
  same as for ADFS discs, with the following differences. Answer 'No' to 'Do
  you wish to retain this shape ?' if it appears. Answer 'Other' to 'Which make
  of hard disc ?'. Accept all the defaults subsequently given for 'Sectors per
  track', 'Heads', 'Cylinders', and any other questions you may get before it
  asks about defects. Answer 'A' ('no more changes to defect list') when it
  does. Answer 'I' to 'Format or just initialise the drive ?'. After that,
  answer the questions any way you want.

- Perform the same procedure to initialise all your remaining drives.

- Hard-reset your machine (either via the Reset button, or by switching off and
  then on again).

- When you arrive in the desktop, your drive icons should now say 'HardDisc4',
  'HardDisc5', etc..

- You are now ready to use your drives ! Now, that wasn't so hard, was it ? ;-)


//
//
// The ZIDEFS filer
//
//

The ZIDEFS filer manages (among other things) the ZIDEFS drive icons. If you
click MENU on a ZIDEFS drive icon, you will see a list of familiar filer
options.

Only the 'Options' entry is new. It leads to a submenu in which you can toggle
(switch on and/or off) write-protection (equivalent to the same option in the
old software) and address range validation (as described above, under 'List of
improvements'). Every drive has its own write-protection and address range
validation options.


//
//
// Commands and SWIs
//
//

ZIDEFS provides several *-commands and SWIs. The help text of all *-commands is
self explanatory (enter '*HELP ZIDE.' to list them all). The SWIs are described
in detail in the 'References' text file.


//
//
// Epilogue
//
//

Updates of ZIDEFS (if any appear) will be made available by (in order of
preference) :

- World Wide Web : visit web.inter.nl.net/users/J.Kortink
- Electronic mail : email kortink@inter.nl.net

Enjoy !


John Kortink



