diff options
Diffstat (limited to 'doc/LIVERECOVERY.txt')
-rw-r--r-- | doc/LIVERECOVERY.txt | 25 |
1 files changed, 25 insertions, 0 deletions
diff --git a/doc/LIVERECOVERY.txt b/doc/LIVERECOVERY.txt new file mode 100644 index 0000000..94782a0 --- /dev/null +++ b/doc/LIVERECOVERY.txt | |||
@@ -0,0 +1,25 @@ | |||
1 | Figuring out on which sector the next recording should start | ||
2 | (or where a crashed live recording starts) | ||
3 | ============================================================ | ||
4 | 1. Find the start offset of the drive usage table, e.g. 0xa00 | ||
5 | 2. Find the suspected start offset of the live recording | ||
6 | in said table. This is the offset of the first 32-bit word | ||
7 | that is 0. | ||
8 | For instance the found offset is 0xe74 | ||
9 | 3. This means the recording starts on cluster | ||
10 | 0xe74-0xa00=0x474 | ||
11 | 4. The superblock states the number of audio blocks per cluster, | ||
12 | offset 0x14. For the sake of this example, lets assume 9 | ||
13 | audio blocks per cluster. The size of each audio block is on | ||
14 | offset 0x10, usually 0x480. | ||
15 | 5. The first audio sector is mentioned on the superblock on | ||
16 | offset 0x7e. In most cases it is 0x1397f6. | ||
17 | 6. Each byte in the drive usage table represents 8 clusters. | ||
18 | 7. The audio should then start on | ||
19 | 0x1397f6 + (0x480*9*8*(0xe74-0xa00)) = sector 0x5b667f6. | ||
20 | |||
21 | --------------- | ||
22 | The other way around- calculating offset from sector number: | ||
23 | (0x02e427f6 - 0x1397f6) / 0x480 / clusters /8 + 0xa00 | ||
24 | |||
25 | |||