home *** CD-ROM | disk | FTP | other *** search
-
- *****************************************************************
- * *
- * NOTE: IF YOU USE THE DISKSPARE.DEVICE FOR YOUR *
- * PROGRAMS YOU HAVE TO COPY THIS DOC.FILE TOO !!!! *
- * *
- * Note: *
- * I can only support your program in future releases *
- * of the device, if you send me a FREE copy. *
- * *
- *****************************************************************
-
- TABLE OF CONTENTS
-
- diskspare.device/CMD_Remove
- diskspare.device/CMD_GetGeometry
- diskspare.device/CMD_RawRead
- diskspare.device/CMD_RawWrite
- diskspare.device/CMD_Eject
- diskspare.device/Open
-
- The other commands work like the corresponding trackdisk cmds.
-
- KNOWN BUGS: * The value of dg_CylSectors returned by GetGeoMetry
- is wrong.
- Fixed in V2.0.
- * The Device doesn't support ETD_Cmds correctly.
- Fixed in V2.1.
- * The Device returns an Error IOERR_BADADDRESS
- if the adress of IO_DATA is odd (Not with FFS).
- Fixed in V2.1.
- * If remove is called twice, the System crashes.
- Fixed in V2.1.
- * Error in CloseDevice: Maybe a RemPort on a Port
- which wasn't added -> Crash (caused by register mistake)
- Fixed in V2.1
- * Error in TD_FORMAT: Doesn't do an Update but flushes
- the trackbuffer.
- Fixed in V2.2
-
-
- NAME Remove
-
- FUNCTION If you are not the FastFileSystem, and I guess
- you aren't, NEVER call Remove !
- It's no use calling Remove !!
- The best thing is to forget that there's a
- cmd called Remove !!!
- IF you call this forgotten cmd and the DD<>HD
- autoswitch is enabled (Bit 2 in Flags is set), the
- system WILL crash !!!!
- If you want to add a diskchange-int, use the
- addchangeint/remchangeint cmd instead.
-
- Why was this patch necessary ?
- Because there's a restriction in the FFS: It checks,
- if the devicename is 'trackdisk.device' and if it
- isn't, GetGeometry won't be called.
-
- I tried to fix the disksize in the dosenvec-struct
- and all programs like FixDisk, DiskSalv, Format etc
- worked fine. BUT the FFS said 'Not a DOS Disk'...
-
- SEE ALSO Includes/exec/alerts.i
-
- BUGS If Remove was called twice, the System crashed.
- Fixed in V2.1.
-
- NAME GetGeometry
-
- FUNCTION Works like trackdisk. If you set Bit 2 when opening
- the device (to allow HD mode), there are two
- possibilities for Sectors per Track:
- 12 sectors/track and 24 sectors/track.
- You have to check this after each diskchange !
- If bit 2 isn't set, there will always be 12 sec/tr
- even with a hd disk in a hd drive, which causes
- read/write errors when trying to write a DD track
- to a HD disk in a HD drive.
-
- SEE ALSO AutoDocs/trackdisk.doc
-
- BUGS There was a bug in the first release (V1.6):
- The value returned in dg_CylSectors was wrong.
- I forgot an 'ext.l', so the contents of the
- high order word was rubbish. Fixed in V2.0.
-
-
-
- NAME RawRead
-
- FUNCTION No Function ! Returns IOERR_NOCMD. Use trackdisk
- device for rawread.
-
-
-
- NAME RawWrite
-
- FUNCTION No Function ! Returns IOERR_NOCMD. Use trackdisk
- device for rawwrite.
-
-
-
- NAME Eject
-
- FUNCTION No Function ! Returns IOERR_NOCMD. Use trackdisk
- device to eject (if you've got a drive which ejects).
-
-
-
- NAME OpenDevice
-
- FUNCTION Opens the device with a drive-specific set of flags.
- There's something special about the flags:
-
- If the device wasn't opened yet, everything works as
- usual. If the device was already opened (via Mount)
- your flags will be ignored, but the device won't
- return an error. (Some well known programs crash
- when an OPENFAIL was returned ??? They obviously
- don't use the fssm_Flags when opening AND don't
- check for errors ?¿?)
-
- The active flags are returned in IO_ACTUAL. So you
- can check whether the flags fit your needs or not.
-
- Why ?
- If the user has mounted the device with HighCyl = 79
- and/or hd-mode disabled then it's his decision not to
- use it and you HAVE TO accept that.
- It's the users Amiga not yours.
-
- The minimum you get is:
-
- heads: 2
- tracks: 160
- sectors/track: 12
- bytes/sector: 512
-
- # of sectors: 1920
- total bytes: 983040
-
-
- SEE ALSO AutoDocs/exec.doc/opendevice
-
-
- FLAGS
- BIT 0 0: disable diskchange for DFX:
- 1: enable diskchange for DFX:
- Works only when mounting the device with the FastFileSystem.
- When you open the device and don't call the forgotten
- cmd the diskchange-int of the corresponding trackdisk
- drive won't be affected.
-
- BIT 1 0: HighCyl is Cyl. 79
- 1: HighCyl is Cyl. 81
- When set to '1' trackdisk WILL be patched everytime a
- track is read/written from/to disk!
-
- BIT 2 0: ONLY 960K/984K mode (DD) available
- 1: Autodetection of DD/HD-disks (1968K)
- Call GetGeometry to get the right disksize. See above.
- The patch for the ffs is in the remove cmd. So if you
- open without bit 1 set and don't call the forgotten cmd
- NOTHING is patched !!
-
- BIT 3 0: Use any Mem for trackbuffer
- 1: Try to use Mem from $600000 - $A00000
- If there's no memory at this location
- any other mem is used.
- Why ? I've got an A2000 with A2630 (which has it's mem at
- $200000-$5FFFFF) and a 16bit Ramcard at $600000 - $A00000.
- So why should I use the 32bit ram (which is prefered when
- calling allocmem) for a trackbuffer ?
- This bit may be useful for A3/4000 with 16bit ramboards too.
-
- BIT 4-31 are currently unused and RESERVED.
-
-
- NOTES
-
- HD-Mode:
- To check if the drive is a highdensity one you may call
- GetUnitID from the disk.resource. Here are the Results:
-
- No Disk in any Drive -> returns 0x00000000
- Any Disk in a DD Drive -> returns 0x00000000
- A DD-Disk in a HD Drive -> returns 0x00000000
- A HD-Disk in a HD Drive -> returns 0xAAAAAAAA
- No Drive connected -> returns 0xFFFFFFFF
-
- As you can see, it's not possible to check if the drive
- is a hd one, if there's no HD Disk in it.
- So if you don't want to waste chipmem, you have to ask the
- user whether he's got a hd drive or not.
-
- AddChangeInt:
- If you've already added a ChangeInt with the trackdisk.device,
- you needn't add one with diskspare.device because it's directly
- passed through to the trackdisk.device.
-
- Inhibit:
- It's a good idea to inhibit the corresponding trackdisk drive
- (DFX) when accessing the disk via diskspare.device. Also
- check for mounted diskspare drives. Don't rely on the names
- DS0: to DS3: when you inhibit the DOS.
- The device itself can't inhibit the DOS because a task isn't
- allowed to call a dos.lib function.
-
-
- General:
- The main purpose of this device is to be mounted with the
- FastFileSystem or better with the ProfFileSystem. So always
- remember that you may not be the only accessor !!
-
-
-