PDA

View Full Version : NVBackup format


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.

iemand
07-14-2006, 04:36 PM
Seeing your post I am totally puzzled...I guess I'm not going to be programming anytime soon... :-/

Doesn't sound like you will have time to look in to this thread (http://www.1src.com/forums/showthread.php?t=113985) (yes, that was a sneaky attempt to get your attention for that, hoped it was maybe something to integrate into MyKbd...).
Well, I am a daily (or rather; nightly) user of NVBackup, so I am allready thank full for what you've done so far!

Hope others are of more help to you...keep up the good work!

dmitrygr
07-14-2006, 04:41 PM
you know, pruss, the format is mostly-documented in PalmOne docs. =)

dmitrygr
07-14-2006, 09:14 PM
fat16?
what are you reading?
nvfs in tx is on tffs filesystem, but that is completely irrelevant

pruss
07-15-2006, 07:54 AM
fat16?
what are you reading?

Section 9.8.2 of the palmOne Developer's Guide.

dmitrygr
07-15-2006, 01:00 PM
no no no. that is absolutely not try currently. anyways it is irrelevant because as long as you use vfs acessing file does not matter what FS it is on

pruss
07-15-2006, 02:02 PM
no no no. that is absolutely not try currently. anyways it is irrelevant because as long as you use vfs acessing file does not matter what FS it is on

Where, then, in the palmOne docs is the format documented? (I actually have some code that seems to extract all the resources and records from a TX format file, but I still haven't located the sort info and app info blocks.)