Hello Klaus,

Here the long-promised PoFoIde package. I've packed the entire
thing in a .ZIP file to make transportation easier. I'm verry
sorry I have to 'mangle' you through the uudecode loop, but I
have no easy way to send non-ASCII files. The complete PoFoIde
package consists of the following files:

doff.asm        A small set of programs to spin up or down a PoFo
doff.com        disk. Most ATA disk support an (ATA-) command to
don.asm         spin-down a disk. Don and Doff are command-line
don.com         programs that stop the disk from spinning/
                re-start the disk. The PoFo is nice and quiet
                when working, These utilities allow that to stay
                so even with an IDE disk connected.

mdextern.com    The program from Klaus to install an external
mdextern.txt    MkDir command (ATMD.COM mostly) that it will
                take charge of making directories on multi-sector
                clustered disks.

atmd.com        The external make-directory command for use with
                a PoFo when a more-than-one-sector-per-cluster
                partition is used.

pofoide         The make-file for all the source programs.

pofoide.asm     The source file for the PoFoIde driver.

pofoide.sys     The ready-made driver.

mk2mbfs.asm     A utility to make a 2 MBytes file-system on an
mk2mbfs.com     IDE disk. This can be used to 'fill up' the disk
                when the disk size is no integer multiple of 33
                MBytes. The 2 MBytes file-systems do NOT require
                ATMD od MDEXTERN, the PoFo can access them with
                it's 'native' file-system.

mk30mbfs.asm    A utility to produce a 33 MBytes partition on a
mk30mbfs.com    PoFoIde disk. These file-systems require MDEXTERN
                and ATMD loaded.

ddiag.asm       A diagnostics program for the driver. I write
ddiag.com       most of the driver's static storage to the
                IoCtlRead buffer. This program provoces such an
                IoCtlRead, then dumps the relevant data. I think
                you'll need the source of both the driver and the
                ddiag program to make sense of it. This has
                proved to be very helpful in he debugging.

The use of these files is as follows:

Don/Doff: call these from the command line whenever you want to
switch on/off the disk. You don't even have to have a driver
loaded, they contain all the code needed to stop/start the diusk
spinning. One word of caution: not all disks support this
feature. If the disk does not support the spin-down ATA command
it will simply ignore the command. I've never seen it dop harm to
any disk. NB: The PC's 'power management' uses the same commands
to stop a disk.

MDEXTERN & ATMD: I think you already know what to do with these
files, for completeness: If you intend to use the 33 MB
partitions you have to enter the following command in your
autoexec.bat (or do it by hand at any time you like..):

        MDEXTERN <full path name of ATMD.COM>

Note: you have to put the FULL path & file (inluding the .COM)
name of AMD as a parameter to the MDEXTERN program.

PoFoIde: This makefile can explain what to do should you want to
re-build the program. I use the MS make-utility and some
unix-likes (rm = Remove File). Masm, Link and exe2bin are needed
to make this work.

PoFoIde.asm: the source file of the driver, not of direct use.

PoFoIde.sys: the loadable driver. To use it put the following
statement in your config.sys file:

        device=c:\system\pofoide.sys [/D] [/P<0..255>]
                        [/C <1..1023> <1..15> <1..255>]

I have assumed that the pofoide.sys driver is in the c:\system
directory. You may want to add the /D and/or /P0 .. /P9 options
as explained below.

The driver accepts the following options:

 /D = debug modus. This will cause the driver to bark debug
      messages to the user at all kinds of odd moments. Klaus
      would understand what it means, I think it's quite useless
      for any other user. Default is no debug messages.

 /P<0..255> = set partition 0 to 255. The driver currently supports
            255 partitions. I do not yet have a program to select
            the active partition for the driver, you have to
            specify the partition for the driver at boot time. I
            intend to change that, but the program for that is
            not yet made. This will cause a lot of rebooting when
            you want to create more than one partition on your
            disk, I'll explain some more below about how to go
            about doing that. I have to warn: At this moment it's
            a lot of work to get more partitions on your disk, it
            can be done however (that's how I tested....).
            Default is /P0 (load the driver for the first
            partition on the disk)

 /C <c> <h> <s> = override automatic geometry detection of the
            disk and specify your own goemetry. This is mainly to
            support old-style (non-ATA-compliant) disks. My
            Miniscribe 8051A is an example. This disk does NOT
            support the ATA DiskIdent command (gives wrong
            answers). For such old disks you'll have to force a
            disk geometry into the driver. This is somewhat
            against my liking. I like to store ALL disk-relevant
            information on the disk itself. The driver and PoFo
            setup (config.sys) should -in my view- be completely
            independent of what disk you connect (at that
            moment). These old disks leave me little choice, so
            here is the geometry override.

NB: Once you have more than one partition on your disk, you can
make the PoFo activate them all at once, just put for each
partition a line line device=c:\system\pofoide /Px (x=one of
0..9) in config.sys and you get drive letters for each of the
partitions.

NB I : you have to install MDEXTERN/ATMD only once; That will do
for ALL the drives. I have made the driver so that it will use
the MDEXTERN/ATMD only when the partition has a multi-sector /
cluster filesystem. The 2MB filesystem will not call upon ATMD to
create directories. Should you decide to use ONLY 2MB filesystems
then there is no need to load MDEXTERN/ATMD at all.

Mk2MbFs & Mk30MbFs:
Creates a 2MBytes resp. 33 MBytes file-system on the currently
selected partition of the first pofoide.sys driver. Here you can
see the reason why I'm working on a select-partition utility for
the PoFoIde driver. At this moment this is the ONLY way to create
partitions.

How to create partitions/file-systems on the PoFoIde disks:

- install the hardware, connect disk etc...

- install a single device=c:\system\pofoide.sys in the config.sys
  file.

- reboot (<CTRL><ALD<DEL>). This will load the driver.

- run km2mbfs or mk30mbfs from the command line. This will write
  the first partition on the disk.

- reboot (<CTRL.......). This will load the driver again, this
  time with proper file-system information loaded. You could
  start playing around with this first partition, it is loaded
  and should work. NB: do not forget to install MDEXTERN/ATMD if
  you made a 30MBFS. The PoFo will respond with 'divide by zero'
  errors if you attempt to make a directory without ATMD loaded.

- edit config.sys, change the driver's command to:

   device=c:\system\pofoide.sys /P1 This will tell the driver to

  activate the next partition, (on the next boot...) behind the
  first one you created the previous time.

- reboot (again......). This will prepare the driver for the next
  make-filesystem (mk2mbfs or mk30mbfs).

- run mk2mbfs or mk30mbfs again, yes: you can mix them as you
  like, the driver recognises what filesystem it finds on the
  disk an process it accordingly.

- reboot..... Makes the newly-created filesystem active.

Repeat this till:
- you run out of disk space. Take care of that yourself! PoFoIde
  does NOT check on that yet....
- you run out of patience (happened to me....)

NB: yes, it's quite possible to make a mess out of the partition
chain, I have no agains that yet. But then again: It's possible
to make a mess of any system, the trick is to make a computer
work, NOT to crash it...

Each time you have to increment x in the /Px, reboot,
make-filesystem, reboot again. I know: It's a drag. I'm working
on a better way... I made it this way because I wanted all the
information about the file-system and disk geometry to reside on
the disk itself. I wanted NO a-priori assumptions of what would
be on the disk, and NO information the user has to remember about
how he/she had (some years ago..?) configured the drive. I plan
two utilities:

1 to list the partitions that are currently on the disk, together
  with file-system information, perhaps free space etc...

2 to select the active partition of the first pofoide driver from
  the command-line. This should get rid of all the reboots in the
  initalization process.

You asked for a more-or-less-stabile pofoide driver, well here it
is. It's not quite done yet, but already usable if you know where
NOT to step... I'm looking forward to any comment/experiences
you'll no doubt have.

greetings,

Peter Faasse
 
