#Get_DiskBlock
6 messages in this thread
Does anyone know roughly how to read an AmigaDOS disk block? The
Action_getdiskblock dos packet type is not implemented. I am looking for
something like what the disked program must be doing to read in a block by
'key' number and display the pointers to the other blocks, etc. Thanks,
Mike.
Use a standard i/o request (via DoIO()). Use 'key' number times
block size as the io_Offset value in the IOStdReq structure.
Look in Chapter 19 of the ROM Kernel Manual…Libraries and
Devices.
As to pointers and so forth…that you'll have to deal with in your
own code by interpreting the data in the block…or by searching for the
parent block (depending on if FFS or OFS).
Thanks a lot. That should get me going. I have played around with disked
enough to be fairly familiar with the disk structure. I just needed to know
how to read a block. Thanks! Mike
I got my program to read the root block from a floppy. Thanks. Now I have a
new problem (always goes that way). After I do the CmdRead the floppy drive
light stays on forever. I have tried sending a CmdClear, CmdStop, etc. but
no luck so far. Do you know what the secret is? Thanks again for your help.
Close the device via CloseDevice(), but don't forget to re-open it
before you try any more i/o calls on it.
I am doing a CloseDevice. Perhaps it's not really closing somehow. At least
I know I'm on the right track. Thanks for the help. Mike