Hi everyone!
This is a mini how-to for extracting the firmware for the Hauppauge DVB-S2 TV card from the windows sys-files. In particular, I want to extract the firmware from the latest published firmware file from Version:2.124.27191, August 6, 2009. You can find it here:
http://www.wintvcd.co.uk/drivers/88x...191_1_WHQL.zip
As no one seems to be able to figure out how to extract the Hauppauge firmware from the published windows archive (at least no one comes forward and explains it to us mortals...), I took a brief look at this myself with a hex editor. What follows are some observations made simply by looking at the files, in particular hcw88bda.sys. Just to make it clear: I have no idea whatsoever about the structure of these files nor the hardware that it runs on. So what I'm writing is pure guesswork and not guaranteed to work with future firmware files published by Hauppauge. If you decide to do follow my description, it is your risk entirely. Anyway, here goes:
The actual firmware of the Hauppauge dvb-s2 card is somehow embedded within the file hcw88bda.sys contained in the windows zip archives available from Hauppauge's home page. There seems to be a reliable method for locating he beginning. This I found on the Internet. The magic word seems to be:
Code:
"33 50 03 12" (in hex)
Seemingly, the _very_ first part of the firmware file contains information that depends on the version. This information starts 4 bytes earlier. Thus, for the currently publicly known firmware versions we get:
88x_2_119_25023_WHQL.zip:
Code:
"02 11 f9 ec 33 50 03 12"
^-- firmware starts here
88x_2_122_26109_WHQL.zip:
Code:
"02 11 fb ec 33 50 03 12"
^-- firmware starts here
Firmware v1.23.86.1 that is available with the TeVii S460:
Code:
"02 12 02 ec 33 50 03 12"
^-- firmware starts here
With this information we can locate the beginning of the actual firmware. So far, so good. Now we need the end or equivalently know how large the firmware file is. To me that was a bit more tricky...
The firmware files in 88x_2_119_25023_WHQL.zip and 88x_2_122_26109_WHQL.zip end with
so I thought this was it. However when I looked into 88x_2_124_27191_1_WHQL.zip, I was unable to locate this pattern. However, getting back to 88x_2_122_26109_WHQL.zip: Just behind the firmware there is a pattern that seems to repeat:
6 Bytes before, I found "f57e". Now, remembering this obnoxious business about little and big endian and swapping the byte order you get "7ef5", which is 32501 (decimal). This happens to be the size of the firmware in bytes. Repeating this with other known firmwares yielded similar results (although the exact position of the firmware file size relative to the "marker" "7b 1a 88 08" varied!)
For 88x_2_119_25023_WHQL.zip: we have
Code:
"94 1c 22 00 00 00 f5 7e 00 00 00 00 00 00 7b 1a 88 08"
firmware size -> ^^ ^^ ^^ ^^ ^^ ^^ <-- pattern to search for
=32501 (decimal, remember "endianness") For 88x_2_122_26109_WHQL.zip we have:
Code:
"94 1c 22 00 00 0a 7f 00 00 7b 1a 88 08"
firmware size-> ^^ ^^ ^^ ^^ ^^ ^^ <-- pattern to search for
=32522 Now, the corresponding position in the firmware file within
88x_2_124_27191_1_WHQL.zip is:
Code:
"00 22 00 00 22 7e 00 00 7b 1a 88 08"
fw size-> ^^ ^^ ^^ ^^ ^^ ^^ <-- pattern to search for
=32290 This looked very plausible to me and the number 32290 fit quite well with the number of bytes between the start and the actual location. So, I tried it and it worked. At least mythtv/linux doesn't choke on the firmware.
Now, why the offset between end of firmware and its size vary may have something to do with byte alignment on a 32-bit architecture, but honestly, I have no idea! This could also be something completely different...
To summarize:
Code:
> unzip 88x_2_124_27191_1_WHQL.zip
and locate hcw88bda.sys
Code:
> dd if=hcw88bda.sys of=124.fw skip=105768 bs=1 count=32290
The magic number 105768 you can verify with your favorite hex editor. It is the location of "02 12 06 ec 33 50 03..." within hcw88bda.sys.
Then you do the standard extremely idiotic sudo stuff to set the sym-links and copy the file.
To whoever wants to try this out: Hope this works out for you!
Regards,
Jón