View Single Post
Old 18 December 2008, 23:52   #2
Redwood
Registered User
 
Join Date: Jun 2008
Location: Sydney / Australia
Posts: 83
It is not easy to merge two rawread images. The RAW (or extended ADF) format begins with a 2004 byte header and looks something like this:

Code:
bytes        description
------------------------
0-7          Magic: "UAE-1ADF"
8-11         Number of tracks
12-15        Type of cylinder 0, side 1. (0 = DOS, 1 = RAW)
16-19        Number of bytes in cylinder 0, side 1
20-23        Number of bits in cylinder 0, side 1
24-27        Type of cylinder 0, side 2. (0 = DOS, 1 = RAW)
28-31        Number of bytes in cylinder 0, side 2
32-35        Number of bits in cylinder 0, side 2
36-39        Type of cylinder 1, side 1. (0 = DOS, 1 = RAW)
...
2004-?       Data for cylinder 0, side 1. (Length of data at 16-19)
?-?          Data for cylinder 0, side 2. (Length of data at 28-31)
...
Now, if you make a partial images, the first 2004 bytes of each image will still contain the full header, but the length field for the cylinders you skipped will be zero, and therefore the length of the data for that cylinder later in the file will also be zero.

So to merge partial RAW images, you'll have to read the header information from each partial image, merge it, then read the cylinder data from each partial image into a new image. If you have overlapping partial images, you'll have to be careful to write each cylinder only once.

I have some python code which makes this somewhat easier if anyone's interested.
Redwood is offline  
 
Page generated in 0.07710 seconds with 9 queries