Here is some format info for the replay guide data used on the 30xx units, as decoded by sdurgin a year or so ago. The program description stuff in extract_rtv is based on this info and works for the 30xx units, but evidently not for the 40xx units. I'm posting this here because maybe seeing what they did in the 30xx units will shed some light on the structures used in the 40xx units.
See also the extract_rtv source code for some C structures and code to pull this info off of a 30xx drive.
/user/ReplayChannels/2/ReplayChannelSet.File , record size = 560 bytes
Each record is for one channel in the guide, which may have multiple shows recorded.
[offset,length] in bytes
[0, 4] Type
1 = Single record show
2 = Zone ?
3 = Repeat show
[4, 4] quality
0 = high
1 = med
2 = standard
[8, 8] size 64-bit
size in bytes of guaranteed space reserved
if > 0 then it's a guaranteed channel
[16, 4] keep episodes
0 = single record channel
1+ = keep #n episodes
[20, 4] current # of episodes
[44, 4] create time (secs since 1/1/70)
[48, ??] Channel name (unknown field length. using 48)
There are other things in each record, but their use is not understood and some could be garbage. The above records are the only verified records that I have decoded so far.
Next, open /user/ReplayChannels/2/ReplayChannels/[create time secs].FiledArray
This file has a record for each show in the channel.
record size = 404 (variable+)
[8, 4] number of records (in first record only)
[16, 4] create time secs
if 0, look at 20, 24, 32, etc until non-zero. keep track of offset.
if create time is found @ 56, off = 40 below.
[off+20, 4] file name of MPEG file on part 2 (secs since 1/1/70)
[off+24, 4] type as above
[off+28, 4] quality as above
[off+36, 4] exists? 1 = exists
[off+148, 4] start of record time
[off+172, ??] show title/episode/desc
sometimes @ 176, 180...
Check @ 172 if byte is < 32, skip 4 bytes until byte ! <32
[ptr+400, 4] number of seconds in recording
You'll want to do the equiv of tr/\\x92\\x93\\x94/'`'/; on the Channel name, show title, episode, & description.
I don't know why the records are not all exactly 404 bytes. Something weird going on. The show title doesn't always start at 172. Sometimes it has weird data there. Not sure of it's use.
The offset mentioned at byte 16 is additive to the record size.