[comp.sys.amiga] RAW Track READ and Write

fullmer@dover.uucp (Glen Fullmer) (01/23/88)

A friend and I are trying to figure out how to read/write a track at a time.
We are using as a template the program in the KRM in the section on 
TrackDevice including a routine to write the data out, but are unable to 
copy from one disk to another.  The second disk always becomes corrupted, 
it still lists the old directory afterward but when the disk is removed and 
reinserted the "NOT A DOS DISK" requestor appears.  Any suggestions, 
references or examples would be appreciated. 

page@swan.ulowell.edu (Bob Page) (01/26/88)

fullmer@dover.uucp (Glen Fullmer) wrote:
>copy from one disk to another.  The second disk always becomes corrupted, 
>it still lists the old directory afterward but when the disk is removed and 
>reinserted the "NOT A DOS DISK" requestor appears.

You can use 'diskchange df1:' rather than removing/inserting the disk.

DOS wants a floppy to look like:

block   0: First longword is 0x444F5300 (in ascii, that's "DOS<NULL>")
block 880 (decimal):  Must be a valid ROOT block.  See AmigaDOS
	Techinal Ref Man (TRM) for details.
block 881 (decimal): Must be a valid BITMAP block.
	Doesn't really matter what this looks like, as long
	as the checksum (first longword, calculated just like the root
	block) is correct.  Of course you'll have to make it correct
	if you actually want to USE the disk.

During disk validation, all the blocks referenced in the root block
(the top-level directories) are accessed, so make sure they're OK too.

You can get more info on bitmaps and root blocks from the article
"Notes on 1.2 Amiga Trackdisk Format" by Carolyn Scheppner and Andy
Finkel, which appeared in the Nov/Dec '87 issue of AmigaMail.  I'd
post parts of it here, but I don't know if CBM would squeal about
copyrights, etc (although there are none listed).

..Bob
-- 
Bob Page, U of Lowell CS Dept.  page@swan.ulowell.edu  ulowell!page
"I don't know such stuff.  I just do eyes."  -- from 'Blade Runner'

rap@dana.UUCP (Rob Peck) (01/28/88)

In article <22740@ucbvax.BERKELEY.EDU>, bryce@hoser.berkeley.edu (Bryce Nesbitt) writes:
> 
> The example in the RKM is defective.  The disk buffer MUST be allocated from
> CHIP memory:
> 
> 	if (!( bufferp=AllocMem(BLOCKSIZE,MEMF_CHIP) ))
> 		cleanup(10);

If you are developing examples when the largest available memory size
you can get your hands on is 512K ---- Thanks for finding it and pointing
it out, Bryce.  When we created the initial example, "everything" was
MEMF_CHIP and simply didnt think beyond that for some cases.

I developed a bug in the audiotools (version 2) because I run with 
a 2.5meg machine and forgot to unplug the extra RAM just to see if
it would still work.  Says a lot for getting QA involved so you have
someone else thinking about 'all possible configurations'.

Rob Peck			...ihnp4!hplabs!dana!rap