ExtractStream + new SVR2000 FIXED!

rwaldin rwaldin at y...
Mon, 07 Jan 2002 09:12:28 -0000


--- In ExtractStream@y..., "jeremyjgordonhome" <jgordon@s...> wrote:
> I am having problems right now in that I can get the sector map 
> succesfully for FSID's on the second set of partitions (and the 
> sector map looks like valid values) but I'm still figuring out how 
> to map the sector map entries to actual physical sectors on the 
> second set of partitions. 

Hi Jeremy,

I've figured this out for an experimental ExtractStream that I wrote. So far it has been able to extract raw tyStreams for all the FSIDs I throw at it. I have a single A drive 120 GB SAT-T60 which has two MFS App partitions (hda10 and hda12). The answer to your question appears to be:

offset = ((((loff_t) fsid * 0x20db2) & 0x000fffff) + 1) << 9;
partition = (offset & 0xf0000000) >> 27; // results in 0 or 2
if(partition == 0) {
offset += (0x461 << 9);
} else {
offset &= 0x0fffffff;
}

If the result of FSID to offset mapping results in the 28th bit being set, then the offset refers to the second partition. There is also a difference of 0x461 sectors between sectors on the first and second MFS App partitions. Where mapping adds 0x462 sectors to the offset for sectors on the first MFS App partition, only 1 sector needs to be added to offsets on the second partition.

Also, there appears to be a 128 byte, zero terminated string at offset 0x24 of the first MFS App partition that lists all MFS partitions. Mine reads "/dev/hda10 /dev/hda11 /dev/hda12 /dev/hda13 /dev/hda14 /dev/hda15". 

> After that it's time 
> to figure out if the tyStream DEMUX / MPEG2 MUX can be done on the 
> Tivo side or not (without bringing the Tivo to it's knees).

Great! This is where I must defer to you, as I can't get the extracted raw tyStreams to split using any of the usual tools. I don't have any knowledge in this area...

I've posted this version of ExtractStream here in case you want to give it a whirl:

http://www.dealdatabase.com/forum/showthread.php?s=&threadid=6890&pagenumber=3#post20254

-Ray