4.0 KiB
The first few KBytes
Rough notes from reading the hexdump of the stuff before the ogg files.
Header:
The first 32-bit-word is an offset into the file.
At that position, there is a sequence of of more offsets (32-bits). I call this the main table.
Every object in the book has a 16 bit OID code. When the user points at any object the tiptoi identifies its 16 bit OID code, subtracts the first used OID code and takes the result as the offset to find the corresponding jump table. The base for this offset is the beginning of the maintable + 8 (first two 32bit words are skipped)
For most files(?), the main table consists of
- 32bit: last used OID code
- 32bit: first used OID code
- Then, 32-bit offsets that point to (what I call) jump tables (see below).
- At some of these offsets are
0xFFFFFFFF. These indicate that the corresponding OID code is not used within the book. - These correspond linearly to the OID codes.
E.g. WWW_Bauernhof: The first piglet has OID-code 1499, the corresponding
jump table is at
0x766A. This offset is the 100th entry of the main table (4 bytes for each entry). So possibly4*(OID - 1401) = main table index + 8. The Value 1401 in this example is taken from the second 32bit word in the main table, it represents the first used OIS code within the current book. - The end of the offsets can be found at (maintable + 8 + 4*(last used OID code - first used OID code).
There is more data contained at the beginning of the file:
0x0000the first 32-bit word pointer to the main table0x0004The second 32-bit word is a pointer to the media table.0x0008unknown 32-bit word, value always0x000238b0x000cpoints to a 16bit word that is alwaya0x0000(no exceptions found so far)0x001032-bit-word (0x0001703b) is an offset into the file. This offset is always direcIts value is always 2 bytes after the There is a number (32-bit,0x000 000c= 12) followed by that many offsets right after the list. These offsets point to right after the list and spread out towards the next known block (the media file table), so its objects are relatively large (~1k). The objects themselves contains numbers and offsets.0x0014The sixth 32-bit-word is a small number containing the product id code (== OID code of the power on symbol on page 1)0x0018The seventh 32-bit-word points to the data directly following the list of the welcome samples. Maybe this means something like "end of table data"?0x001cThe eighth 32-bit-word is a small number, differing between books.0x0020is a byte that contains the lenght of the Chomptech data format version string.0x0021Then follows the stringCHOMPTECH DATA FORMAT CopyRight 2009 Ver2.5.0908or similar, resembling the length given at `0x0020- directly after that there is a date string like
20111024followed by zero bytes up to0x005f. For some books the date contains a language string, e.g20111024GERMANor20111002DUTCH 0x0060For some books a 32bit address pointing to a place where another pointer can be found. Otherwise 00x0064to0x0070are 00x0071This points to a list that contains the address of the welcome samples played when the power on symbol is pointed at.0x0075to0x008bare 0- Beginning at
0x008csome books have more data (otherwise 0):0x008coooooooo32-bit offset0x0090oooo16-bit offset?0x0092nnnn16-bit number0x0094oooo0x0096nnnn0x0098oooo0x009annnn0x009c00000x009e00000x00a0oooo0x00a2nnnn0x00a40000or00010x00a600000x00a8oooo0x00aannnn- from
0x00acto0x01ffall bytes are0
- from
Jump table locations
Where are the others referenced from?
For example there is a (very small, one line with one F command) jump-table at 0x35C0 in WWW_Bauernhof.gme, but that offset does not occur in the file. Maybe just some dead code.