home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
World of A1200
/
World_Of_A1200.iso
/
programs
/
disk
/
misc
/
pfs
/
tools
/
diskspare2.2
/
doc
< prev
next >
Wrap
Text File
|
1995-02-27
|
13KB
|
335 lines
DiskSpareDevice 2.2
written and (c) 1992-1994
by Klaus Deppisch
All rights reserved
What is diskspare.device:
It is a completion or replacement of the trackdisk.device,
which lets you format your disks with 960 kB or 984 kB, or if
you've got a (trackdisk-compatible!) HD-Drive with 1920 kB
or 1968 kB !!!
How could this be:
I've changed the track-construction a little bit. In detail I
left out the (unused) sector-headers and read/write some
bytes more than the trackdisk.device.
The result: I can read/write 12 sectors/track (HD: 24)!
By the way, ALL the drives I tested were able to read/write
more than 12 sectors (at least 12.4 sectors but unfortunately
no 25 sectors in HD-Mode).
-> There should be no problems.
The device is able to read/write 12*160*512 = 983040 Bytes.
Or (new for v1.6) 12*164*512 = 1007616 Bytes (984K)
Or (new for v2.0) 24*160*512 = 1966080 Bytes (1920K)
or 24*164*512 = 2015232 Bytes (1968K)
The HD-Mode is compatible to my 'highdensity.device' which
is now dead.
The device can be used now with the ProfFilesystem of Michiel Pelt.
Please don NOT use the version 2.0 of the device. The motor of the
drive stays on all the time AND version 2.0 may cause read/write
errors. There are Mountfiles (for WB 2.1/3.0 only) in the DD and HD
drawer called PS0 and PS1. (Names (PSx) are from Brett Simcock)
When you mount the device you can use it like any other disk
or partition. That means you can access it with your favourite
dir-util, format, diskcopy or whatever you want to do with it.
What do you need:
- Kickstart 2.0 or higher (NO WAY to get it run < KS 2.0 !)
- diskspare.device (here it is)
- mountlist-entry (included)
- a floppy-drive (you should have one)
- an Amiga (hmm..)
What to do:
- read this doc-file (the WHOLE crap !!!)
- copy the file 'diskspare.device' into your DEVS: directory.
- append the file 'Mountlist' to your Mountlist (to be found
in your DEVS: directory).
- insert the lines 'mount DS0:' and 'addbuffers DS0: >NIL:'
(or DS1-3) into your 'User-Startup' (can be found in S:)
- OR if you're using WB 2.1/3.0 copy the File(s) DS0-DS3 into
your DEVS:DosDrivers directory.
- OR use the included install sripts (new for v2.0).
- reboot your Amiga
The line 'addbuffers DSX: >NIL:' is necessary to make the
device 'visible'. It's better to use this than to modify
the mountlist with 'Mount = 1' because then you'll get a
'no disk'-requester when mounting. (only for WB2.0)
For Workbench 2.1 and above you can use the 'Mount = 1'.
NOTE:
If you don't use the 'addbuffers' or 'mount = 1' the device
won't be mounted correctly until you access it. That will
cause some programs to crash !! That's another oddity of the
workbench! See 'LoadWB' below.
For a quick test simply doubleclick the QuickTest Icon.
Please note: You won't get a Disk Icon for unformatted Disk on
the Workbench (the same for all devices you mount after LoadWB).
So you need the Shell to format the disk the first time.
(format drive DS0: name Test)
Examples:
1. You've got two drives and want to use 'DF1' as 'DS1'.
You've copied the file 'diskspare.device' and appended 'Mountlist'
to your Mountlist (do *** NOT *** simply COPY it to devs: or your
personal Mountlist will be LOST !!!).
To test whether it works (or not) open a Shellwindow and type
'mount DS1: <return>' then 'dir DS1: <return>'. You should
see a requester now 'No disk present in device DS1', cancel it.
Insert a blank (or empty) disk into your drive and type:
'format drive DS1: name test noicons<return>'.
The disk should be formatted like any other disk. After format
type 'info <return>' you should find a line like this:
'DS1: 983K 1966 2 0% 0 Read/Write test'
this means that everything works fine and you're able
to use this disk like any other disk.
2. If you've only got one drive and want to use it as 'DS0'.
You've copied the file 'diskspare.device' and appended 'Mountlist'
to your Mountlist (do *** NOT *** simply COPY it to devs: or your
personal Mountlist will be LOST !!!).
Follow the test-procedure as above.
After 'info' you should see a line like this:
'DS0: 983K 1966 2 0% 0 Read/Write test'.
3. You're the proud owner of an Amiga 4000 and want to use your
internal 'DF0:' as DS0:. You only have to copy the file
'diskspare.device' to DEVS: and the Mountlist-File from the
'HD'-Drawer (!) into your 'Devs:DOSDrivers' Drawer.
What problems could arise ?
- If you modify the icons for WB 2.1/3.0, check if they
have the right unit-number (use information from the
icons-menu). (There needn't be a number in the icon.
I forgot to remove it in the first release...)
- Mount returns an error: 'Entry not found' -> check if you
really appended the mountlist and typed the right name
- dir returns an error: 'device or directory not mounted' ->
did you copy the device to devs: or did you try to access
an invalid drive (if you've got df0: and df1: you can't
mount ds2:. It's logical, or what !!!)
- format returns: 'no disk inserted' -> you must wait a
few seconds after inserting a disk (trackdisk must access
the disk first)
- format returns: 'format failed try another disk' -> do so
- format returns always the above -> it looks like you've
got a drive that doesn't work -> try another drive or
curse me and delete all 'diskspare-files'.
NOTES:
-This is NO easy using program! That means, You should know
what you're doing.
If you don't know how to use the Shell and how to edit a mountlist
and user-startup read the manual that came with your machine!
Or ask a friend to help you.
Or use the included install scripts.
-If you mount the device after 'LoadWB' there will be no Icons
for unformatted disks or during format,diskcopy etc. that say
'DSX:BAD' or 'DSX:BUSY'.
This isn't a bug of my device but an oddity of the Workbench.
(It's the same if you mount RAD: or any other device AFTER
'LoadWB').
-If you use the device for 984K disks NOTE that it IS a HACK!
Normally you CAN'T read/write Cyl. 80/81 via trackdisk.device.
It's only possible due to a PATCH of a PRIVATE device.structure!
I tried to make it as safe as possible and it works fine with
KS2.0/KS3.0 but there's NO GUARANTEE that it will work with
future releases. (Until I fix it).
-The Autoswitch DD<->HD is only possible due to a PATCH of a PRIVATE
structure in the FFS. The second nasty hack! (I hope the last one)
It's necessary because the FFS allows only the trackdisk.device
to change the capacity during operation. If the devicename isn't
'trackdisk.device' it NEVER calls GETGEOMETRY.
p.s. Works fine with KS2.0/KS3.0
-It might be possible that there are drives which can't
read/write up to Cyl.81 (I've never seen one).
-It's currently impossible to mount two drives on the same unit.
With the FastFilesystem only. If you use another filesystem, which
uses AddChangeInt instead of Remove (e.g. ProfFileSystem) you may
mount more than two drives.
Bonus:
If you use diskspare.device you won't have any problems with
bootblock-viruses because they try to write single sectors via
trackdisk.device. Trackdisk can't read the track so it can't
write single sectors!
If there should be a virus which is able to write itself to
the first blocks of a diskspare-disk then this will be it's
last activity because the device can't be made resident ->
you can't boot from this disk -> the virus won't be executed!
Note:
The Install command checks for trackdisk.- and carddisk.device.
So you can't install ANY other disks.
Some details:
1. Safety:
I've tested the device since Dec. 1992 on different Amigas
(A500-A4000) and I've copied (nearly) all my disks to diskspare-
format. I use the cheapest No-Name-Disks and there weren't any
problems (yet).
All updates and enchantments made, concerning the
device-routines and not the track-construction.
The only problem could be the floppy-drive. There're so many
different types (I've got 6 drives of 4 different manufacturers)
that it might be possible that one of them doesn't work.
2. Speed:
Diskspare.device is about 5%-15% faster than the trackdisk.device
(68000 5%, 68020 10%, 68030 15%)
example: (A2000 with A2630/25MHz/2Meg)
kB sec speed
format 984 81 -> 12.1 kB/s
880 83 -> 10.6 kB/s
4. Mountlist:
Flags:
Bit 0: (1) 0 = Diskchange works only on DSX: (X = 0-3)
(you have to do a diskchange for DFX by
hand e.g. 'diskchange df0').
1 = Diskchange works on DSX: AND DFX:.
(like CrossDOS).
Bit 1: (2) 0 = use only Cyl. 0 to 79 (like trackdisk does)
1 = allow the device to use also Cyl. 80 and 81
You must ALSO change HighCyl to 81 or
nothing will happen.
Bit 2: (4) 0 = no HD mode allowed
1 = enables the device to use HD-Disks too.
(works LOGICALLY only with HD-Drives!)
Bit 3: (8) 0 = use any mem for the trackbuffer
1 = use mem from $600000 to $A00000 (4M) If the
allocation failed, any mem will be used. This
may be useful for A2630 or A3/4000 owners who
have got a 16Bit Ramcard.
ALL other values are reserved.
These flags may be different for each drive.
For changing the flags you have to add the values in brackets behind
the bitnumbers. e.g. You wish to use bit 1 + 2 (HD with 82 Cyls). So
you need to add 2 + 4 = 6 = value for the flags.
You may change BlockSize, BlocksPerTrack and Sectors/Block but
note that a file of even 1 (ONE) Byte length needs 2 blocks
(FileHeaderBlock & DataBlock). -> if you use big blocks you
waste A LOT OF disk-space!
If the HD-Flag is set, you can't change the values for Sectors,
BlockSize, BlocksPerTrack... They will be overwritten the first
time a disk is inserted!
BE CAREFUL:
The entry 'Reserved' MUST BE '2' !!! It cost me a lot of time
and nerves because I set it to '0' to get 1K more capacity.
The only thing I got was curious error-messages! That's
obviously a bug in the fastfilesystem.
If you want to waste a lot of speed and capacity you may set
the 'Buffers < 25' and 'DosType = 0x444f5300'. A good value
for Buffers is 50 (also for DFx:).
5. HD-Mode:
With Bit 2 (Flags in Mountlist) set, the device is enabled to
use HD-Drives. It works a little bit differently from the
trackdisk.device. Trackdisk allocates and frees the memory
for the dmabuffers according to the disk capacity. I don't
do so, because if the chipmem is very fragmented or simply
not enough of it left, it could be possible that the allocation
failed -> No HD-mode possible. So I allocate the buffers when
opening the device and keep them until close. -> Make sure the
FIRST 'OpenDevice' to a HD-Floppy is made with Bit 2 SET or
the HD-Mode won't work!
6. Copying normal disks to diskspare format:
You may wish to copy some data from normal (837K) disks to
diskspare disks (984K) to get some free disks. (You need 8
d.s. disks for 9 normal disks).
The fastest possibility is to mount a RAD: which has the same
size as a diskspare disk. I've included a sample mountfile
for 984K (called RDD) and for 1968K (called RHD).
Now you can copy the files from your normal disks to the RAD
(RDD or RHD) and then 'diskcopy' it to DSX.
VERSIONS:
1.6 first public release
using 'highdensity.device' for HD mode
2.0 now includes HD mode
2.1 better errorchecking:
- checks now both for trackdisk and ms-dos format before
a track is reread !
- the device does now more retries before an error is
returned. Do NOT use this to use Disks which can hardly
be formatted. Such Disks are RUBBISH !!!
some bugfixes
Because of a misunderstanding with a friend, there was a misrelease
of the version 2.1. If you find a file 'DiskSpII.lha' please delete
it immediately! The device itself is (nearly) ok, but the docs don't
fit to it.
2.2 some bugfixes again
IMPORTANT:
The device is FreeWare. You may use it with your own
projects until this doc.file and the Mountlist.files are
distributed with it. You may also use it for commercial
programs if you say CLEARLY that this device is FREEWARE!
You MUSTN'T modify the device itself or this doc.file or
the MountList.files. Only exception is a translation of
this file. If you need a modified/enchanted version
please contact me.
This disk-format MUSTN'T be used for stupid NDOS-Games !!!
MOST IMPORTANT:
You use the above described software at your OWN RISK.
Under NO CIRCUMSTANCES will the author be liable for any
direct or indirect damage or data loss resulting from
the use or misuse of this software or the documents.
All rights are reserved by the author.
Suggestions and (detailed) bug-reports are welcome.
Author:
Klaus Deppisch
Beckenwengert 3
97246 Eibelstadt
Germany
Phone: 09303 1579