pruss
07-14-2006, 03:22 PM
I'm trying to figure out the format for the files in NVBackup backups (after unzipping), at least well enough so we can convert them to prc/pdb files. I'm making some progress. If anybody here is good at figuring out unknown file formats, please help me.
I'm starting with the TX format. I know that there will be some differences on other devices. So far, I've figured out that there is a "central header" (a poor name since it can be quite far down, though in small files it is at 0x600), sometimes in more than one copy, and sometimes some of the copies lack the Table of Contents
I have not been able to figure out how to locate the central header. I know it always starts on an address that is delta plus a multiple of 0x10, and begins with 0x02 0x69.
delta is a constant that enters into location calculations below
For the following, H = offset of beginning of central header.
Everything is low endian.
H+0x00 = 0x02 0x69
H+0x04 = some count of records/resources, usually equal to the number of records/resources, but sometimes lower; maybe it's the number that has or hasn't been backed up? (2 bytes)
H+0x06 = number of records/resources (2 bytes) (don't know why these seem to be duplicated)
H+0x0C = dbname
H+0x2C = attribute(?) (2 bytes)
H+0x2E = version (2 bytes)
H+0x30 = date1 (4 bytes)
H+0x34 = date2 (4 bytes) (one of these is mod date and the other is create date)
H+0x38 = backup date (4 bytes)
H+0x3C = dbtype (4 bytes)
H+0x40 = dbcreator (4 bytes)
H+0x50 = Table of Contents
The Table of Contents is a list of all the resources or records.
For pdb files, each item in the list has the following format:
3 bytes: location of record: File offset = Location * 0x20 + delta
3 bytes: length of record (bytes)
1 byte: ?? (probably record attribute)
3 bytes: unique ID, in the same byte order as in 68K pdb files
For prc files, each item has the following format:
3 bytes: location of resource: File offset = Location * 0x20 + delta
3 bytes: length of resource (bytes)
word: resource number
dword: resource id
What I'd like to find out, and I'd like help with:
1. Finding out how to locate the central header
2. Finding the location and size of the app-info and sort-info blocks
3. Finding the value of delta
If you're wondering why I am trying so hard to figure out the format in my own backup program's output, this is because I just copy the files from the hidden drive, and so I don't know what format Palm puts them in.
I'm starting with the TX format. I know that there will be some differences on other devices. So far, I've figured out that there is a "central header" (a poor name since it can be quite far down, though in small files it is at 0x600), sometimes in more than one copy, and sometimes some of the copies lack the Table of Contents
I have not been able to figure out how to locate the central header. I know it always starts on an address that is delta plus a multiple of 0x10, and begins with 0x02 0x69.
delta is a constant that enters into location calculations below
For the following, H = offset of beginning of central header.
Everything is low endian.
H+0x00 = 0x02 0x69
H+0x04 = some count of records/resources, usually equal to the number of records/resources, but sometimes lower; maybe it's the number that has or hasn't been backed up? (2 bytes)
H+0x06 = number of records/resources (2 bytes) (don't know why these seem to be duplicated)
H+0x0C = dbname
H+0x2C = attribute(?) (2 bytes)
H+0x2E = version (2 bytes)
H+0x30 = date1 (4 bytes)
H+0x34 = date2 (4 bytes) (one of these is mod date and the other is create date)
H+0x38 = backup date (4 bytes)
H+0x3C = dbtype (4 bytes)
H+0x40 = dbcreator (4 bytes)
H+0x50 = Table of Contents
The Table of Contents is a list of all the resources or records.
For pdb files, each item in the list has the following format:
3 bytes: location of record: File offset = Location * 0x20 + delta
3 bytes: length of record (bytes)
1 byte: ?? (probably record attribute)
3 bytes: unique ID, in the same byte order as in 68K pdb files
For prc files, each item has the following format:
3 bytes: location of resource: File offset = Location * 0x20 + delta
3 bytes: length of resource (bytes)
word: resource number
dword: resource id
What I'd like to find out, and I'd like help with:
1. Finding out how to locate the central header
2. Finding the location and size of the app-info and sort-info blocks
3. Finding the value of delta
If you're wondering why I am trying so hard to figure out the format in my own backup program's output, this is because I just copy the files from the hidden drive, and so I don't know what format Palm puts them in.