[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Help!!!
In article <1996Oct13.195259.1127@lafn.org>, aw133@lafn.org (James Poore)
writes:
>....
>I have followed the directory structure and found where the foul-up is.
>What I am puzzled by is after the key-pointer of the directory file. The
>prodos tech manual sez that the key block of the data file points to the
>the data blocks for the file but what I dont understand is what the bytes
>mean. Or better put, once I get to the key-block where do I go with the
>2byte numbers in the key block?
>
>The good news is the db file is contiguous and all the data is in
>consecutive blocks on the HD.
>
>What I am trying to accomplish is to manually copy the file block by
>block to the RAMdisk and then resave it to a floppy.
>
Probably, your file is a "Sapling File" (512 bytes - 128k bytes). If
so, then bytes $11 and $12 (17 and 18 in decimal) of the file entry are
the Key Pointer. (The Storage Type/Name Len byte just before the first
letter of the name is byte 0.) The Key Pointer has the Block # of the
Index Block stored low byte first. For example, 1F 00 would point to Block
$1F (35).
The Index Block lists the blocks in the file. The first 256 bytes
list the low byte of each Block #. The last 256 bytes of the Index Block
list the high bytes. For example, you view the first part of the Index
Block and find ...
000 0A 0B 0C 10 11 ... .
Then, viewing the second part of the Index Block, you find ...
100 00 00 00 01 01 ... .
The first five blocks of the file are ...
000A (Block 10)
000B (Block 11)
000C (Block 12)
0110 (Block 272)
0111 (Block 273)
Since your blocks are in consecutive order, you may be able to save
some time using a utility named "Block Works" to copy all of the blocks at
once.
Rubywand