4]-------------- 3]TRACKDOS V1.04 3]By Nic Wilson 4]-------------- TrackDOS allows easy transfer of data between the three main areas on an Amiga: DOS, Memory and trackdisk.device. DOS means the data contained within a file. Memory means the data contained anywhere within the memory map. Trackdisk.device means data stored on a disk not accessible by DOS, such as bootblocks and special loader disks. Transfer of data among these three areas is not normally easy or convenient. TrackDos was written to overcome this. Once the program loads you will see a credits window and a prompt to click the mouse button. This will take you to the main menu, which is a set of these seven gadgets: Trackdisk to DOS DOS to Trackdisk Memory to DOS Memory to Trackdisk DOS to Memory Trackdisk to Memory Format Tracks 3]PROGRAM SUMMARY When any one of the gadgets is clicked on, another window will open for that particular function and will prompt for inputs with string gadgets. At the bottom of each window are two gadgets: OK and EXIT. The OK gadget will attempt to perform the function, and EXIT returns to the main menu. There is one exception to the above. In the Format Tracks function there is an extra gadget labeled INIT. It performs a quick format like that of the DOS 1.3 QUICK parameter of the format command. This will of course blank any disk and all files will be lost. The INIT gadget only looks for the device and ignores the start and end track string gadgets. If a disk is accidentally "INITted," the Diskdoctor command will rectify this, since the INIT function only rewrites the Root block and the Bootblock of a disk to make it appear blank. Errors or prompts will be shown in the rectangular box at the bottom of each window. Once the function has been performed, the program will stay within that function should another be required. If not, then EXIT can be clicked. Every function only supports disk data in the normal range of sectors 0 to 1759 or tracks 0 to 79. Any attempt to read or write outside this area will generate an error message. This was done since tests show that reading or writing to tracks 80 to 83 is only a rumor. I've seen no proof to support the conclusion this is at all possible. This will be changed if conclusive evidence to the contrary is supplied to me. 3]FORMAT FOR INPUT OF PARAMETERS All numerical inputs can be given in decimal or hexadecimal. If you supply in hexadecimal, the number must be preceded by a dollar sign. This format is the same for those parameters that have other prefixes, such as # and +. Numbers can be input as binary by preceding with a percent (%), but I do not forsee this being used a great deal. This was included as my ASCtoInt macro just happens to do it anyway. 3]INPUT EXAMPLES To input the offset 1024 in decimal -----> 1024 To input the offset 2c00 in hex -----> $2C00 To input 40 (decimal) cylinders -----> #40 To input A (hex) cylinders -----> #$a To input 2 (binary) cylinders -----> #%10 To input root block offset (decimal) -----> #880 To input root block offset (hex) -----> #$370 To input a length of 5000 (decimal) -----> 5000 To input a length of ABCD (hex) -----> $ABCD To input destination address $20000 -----> $20000 To input a destination as a length -----> +$200 To input a start cylinder of 10 -----> 10 To input drive zero as a device -----> DF0: To input drive one as a device -----> df1: To input an example path/file -----> DH0:c/name The above examples show upper case characters, but either upper or lower or both is allowed. 3]WRITING BOOTBLOCKS Any data written to the first two sectors of a disk will be automatically checksummed, and in this current version cannot be disabled. 3]WRITE ERROR HANDLING When any of the trackdisk.device write functions encounter a hard error on the destination disk, the offending areas will be formatted and one attempt to rewrite the data will be performed. Failure or any other trackdisk error will cause the particular function to be aborted and a trackdisk error message displayed. 3]INPUT PARAMETERS Below is an explanation of all parameters used by the different functions. Each function will use some of the following parameters. OFFSET --Byte sized offset to start the read from. This offset must be block aligned, else an error message will be generated. The offset is the same that normally be placed in the IO_OFFSET field of an IO_REQUEST block to perform a CMD_READ or CMD_WRITE through trackdisk.device. This field can also be entered as a block number instead of an offset. To enter as a block, the number must be preceded with a hash sign: #. The prefix for hex or decimal still applies as shown in the examples. Once the OK gadget has been clicked, the block number in the string gadget will be replaced with the calculated byte sized offset for your reference. If this field is set to -1 then the offset will be zero and full disk of 1760 blocks will be used. LENGTH --Byte sized length to read/write. Must be increments of 512 and the minimum allowed is one sector. An incorrectly supplied number will be rounded up to the nearest sector. If this length parameter is in a trackdisk reading function, such as Trackdisk to DOS or Trackdisk to memory, it can be input as a cylinder length --number of cylinders to read --by inserting a prefix character hash (#) before the cylinder value. When the OK gadget is clicked, the string gadget will be replaced with the calculated byte sized length for your reference. PATH/FILE --Path and filename. Data will be read from or written to this place and name. It can be any valid path and name that you can normally use in CLI. DEVICE --The device the data is to be read from or written to. It must be a floppy device from DF0: to DF3: and entered as the full device string. Full error checking for invalid or illegal devices is performed, so it will not accidentally try to write to your hard disk. BUFFOFF --Byte sized value into the file from which to start the write. This allows you to skip an amount at the beginning of a file and only write out the remainder. It's useful for skipping the file header of an executable file. SOURCE ADDRESS --Memory address where the write starts. This area can be Fast or Chip memory. This source address is inclusive. END ADDRESS --Last memory address to write. This end memory address is inclusive. This parameter can be input as a length instead of a destination address by inserting a prefix character plus (+) before the length. Length of course can still be in decimal or hex, as long as the format is followed as shown in the examples. When the OK gadget is clicked, the string gadget will be changed to display the calculated end address for your reference. PREFERRED AREA --Your preferred area where you would like the data placed. If left blank the area will be chosen for you and the result address will be displayed in the box at the bottom of the window. If your preferred area is unavailable, an error message will be displayed in the same box. This memory area will only remain allocated while the program is running and is freed when you exit the program. WHen loading, TrackDOS spawns its own process and returns the command line for you so you can launch another program to examine or modify the memory without opening another CLI. START TRACK --This parameter is only found in Format Tracks. It is the starting track for the format. This does not mean cylinder. Amiga drives have a total of 160 tracks, starting at 0 and ending at 159. Cylinder 0 holds tracks 0 and 1, cylinder 1 holds tracks 2 and 3, and so on. This track parameter is inclusive to the format END TRACK --As above except this is the last track to format. This track is inclusive to the format. Maximum number for this parameter is of course 159. 3]FUNCTIONS 3]Trackdisk to DOS FUNCTION -- Transfer data from disk sectors to a file. PARAMETERS -- Offset, length, path/file, device. 3]DOS to Trackdisk FUNCTION -- Transfer data from a file to disk sectors. PARAMETERS -- Offset, buffoff, length, path/file, device 3]Memory to DOS FUNCTION -- Transfer data from memory to a file. PARAMETERS -- Source address, end address, path/file. 3]Memory to Trackdisk FUNCTION -- Transfer data from memory to disk sectors PARAMETERS -- Source address, end address, offset, device. 3]DOS to Memory FUNCTION - Transfer data from a file to memory PARAMETERS - Length, preferred area, path/file. 3]Trackdisk to Memory FUNCTION -- Transfer data from disk sectors to memory PARAMETERS -- Offset, length, preferred area, device. 3]Format Tracks FUNCTION --To format one or more tracks and optionally initialize the disk. Note that if a disk is initialized then the disk will be blanked and any DOS files that were on the disk will disappear. To format a single track put the same number in start and end tracks. (i.e. to format track 90 put that number in both start and end). The disk will NOT BE initialized via the OK gadget. If you require the disk to be initialized then the INIT gadget must be clicked after the formatting has finished. PARAMETERS -- Start track, end track, device. INIT --This gadget will initialize or quick format a disk in the drive specified by the device string gadget. The disk of course must be already formatted. 3]COPYRIGHT This program is copyright by Nic Wilson Software and MAY NOT be distributed without written permission of Nic Wilson Software. It may not be used for any commercial construction or transferral of data without written permission of Nic Wilson Software. To seek permission, write to Nic Wilson, Nic Wilson Software, 138d South Street, Toowoomba Queensland 4350 Australia. Telephone (076) 358522 work and FAX, (076) 358539 home. 4]END OF TEXT