Decoding the name entries
Don’t know yet how this relates to the earlier directory entries, but further on the disk, there’s a list of tv-shows, including the names of the shows and the names of the channels (both in plain ascii, or maybe UTF8). Each name entry has a size of 8192 bytes (wow!). After some hexdump staring, I found the following data structure:
typedef struct _tfs2_name_entry
{
uint32 some_numbers1[4];
char title[64];
char station[80]; // 5 bytes + '\0'
uint32 some_numbers2[24];
uint32 some_numbers3[128][6]; //var length list of groups of 6 ints
uint32 some_numbers4[304][4]; //var length list of groups of 4 ints
} TFS2_NAME_ENTRY;
So, it starts with 16 bytes of something with a lot of zeroes in it. Then we have the title you enter when programming a tv-show in the timetable, there’s space for 64 bytes although you cannot enter more than 8 I believe (except when you rename a title, duh). Okay, then there’s the name of the tv station. The station name contains 5 characters, unused ones become spaces. The remaining 75 characters are zeroes. Then there are 11 32-bit integers containing some data followed by 13 integers that I all found to be 0. After that there are 2 things that look like variable length lists. The first list consists of up to 128 groups of 6 integers, the second list contains up to 304 entries of 4 integers. Each name has at least one entry for both lists, in most cases only one. Maybe the exceptions are videos I clipped or merged?
I wrote some tooling to visualize it:
entry: 0 title : Title 0 station: V8
n1 1-tuples[0]:01000100 [3]:00011d00
n2 1-tuples[0]:1f01d807 [1]:000a2514 [8]:00000400 [9]:00010050 [10]:09014000
n3 6-tuples[0]:00000300 00000000 00000000 a84c0000 00000000 a84d1d00
n4 4-tuples[0]:00000100 00000000 00000000 a84c0000
entry: 1 title : Title 1 station: DISCO
n1 1-tuples[0]:01000100 [3]:00d44900
n2 1-tuples[0]:0509d707 [1]:003b2e15 [8]:00000200 [9]:00010050 [10]:09014000
n3 6-tuples[0]:00000100 00000000 00000000 a84c0000 00000000 a8204a00
n4 4-tuples[0]:00000100 00000000 00000000 a84c0000
entry: 2 title : Title 2 station: NED1
n1 1-tuples[0]:01000100 [3]:00d20f00
n2 1-tuples[0]:0101d707 [1]:00240a0c [8]:00000200 [9]:00010050 [10]:09014000
n3 6-tuples[0]:00000100 00000000 00000000 a84c0000 00000000 a81e1000
n4 4-tuples[0]:00000100 00000000 00000000 a84c0000
entry: 3 title : Title 3 station: NED1
n1 1-tuples[0]:01000100 [3]:402c6600
n2 1-tuples[0]:0101d707 [1]:00230b0c [8]:00000200 [9]:00010050 [10]:09014000
n3 6-tuples[0]:00000300 00000000 00000000 68c71000 00000000 a8f37600
n4 4-tuples[0]:00000100 00000000 00000000 68c71000
entry: 4 title : Title 4 station: S-014
n1 1-tuples[0]:01000100 [3]:c0d82a00
n2 1-tuples[0]:0101d707 [1]:0028150c [8]:00000200 [9]:00010050 [10]:09014000
n3 6-tuples[0]:00000200 00000000 00000000 a84c0000 00000000 68252b00
n4 4-tuples[0]:00000100 00000000 00000000 a84c0000
entry: 5 title : Seinfeld station: V8
n1 1-tuples[0]:03000100 [3]:00059100
n2 1-tuples[0]:0b09d707 [1]:00013713 [6]:00000500 [8]:00000200 [9]:00010050 [10]:09014000
n3 6-tuples[0]:00001800 00000000 00000000 28cf4800 00000000 28d4d900
n4 4-tuples[0]:00000100 00000000 00000000 28cf4800
n4 4-tuples[1]:00000100 00000201 00000000 58a45200
n4 4-tuples[2]:00000100 00000200 00000000 68365600
...
The n1-n4 are the numbers1-numbers4 integer arrays. Only the non-zero tuples are shown. Interesting, isn’t it?
I have 209 filled in names entries, while the directory only showed 108 undeleted records.. So apparently, the names are not one-to-one related to the directory entries.
More decoding later, I guess the date and time should be in here as well, and maybe a pointer to the MPEG data?