Home | Computer | Photo-album | Funny | Interesting | Projects | Links | Guest book
Index | DS64 | HDR1000 | Keyboards
Bigger harddisk in Philips HDR1000 Video hard disk recorder
Written on Friday, March 26, 2004 (Due to many requests translated into English on Monday, July 5, 2004)

Updates:
Saturday, November 22, 2008:
Long time ago Anzac warned me about two so-called "magic bytes", which really are required for the HDR100 to function properly, when installing a new hard disk. You can read this info below at paragraph "Installing a new hard disk" (Step 10).

Tuesday, May 30, 2006:
The HDR1000 Forum is already down a few months, and will not go up again, due to lack of visitors, and I'm also too busy to put a forum on my own server.

Sunday, August 15, 2004:
The HDR1000 Forum has been moved to http://sepp.betux.com/viewforum.php?f=4

Saturday, July 24, 2004:
I've just created a forum, to discuss about the HDR1000, at http://theekransje.com/viewforum.php?f=4 (it's just a sub-forum on an existing dutch forum called "theekransje" which is co-owned by me)

Sunday, July 25, 2004:
I won't update the dutch version of this HDR1000 site anymore, because most people can speak english, while few of us understand dutch....

Preface
A few months ago I bought for little money a Philips HDR1000 Video hard disk recorder. It doesn't use tapes, but all recorded programs are stored on the internal hard disk. The size of this hard disk is 40 GB, and it can hold 12 to 38 hours of audio & video, depending on the chosen quality (HQ, SQ or LP). I thought it would be useful (and very nice) to try to put a bigger hard disk in it, so programs could be stored longer (because the disk is less rapidly full).

Inventarisation
Last Tuesday I screwed open my video hard disk recorder, demolished the hard disk, and mounted it as secondary disk (/dev/hdb) into my PC, to see what's actually on it. Fdisk didn't understand nothing of it. Then I did a hexdump, which looks as follows:
    00000000  00 00 00 00 00 00 00 00  00 00 00 00 00 00 00 00  |................|
    *
    000001b0  00 00 00 00 00 00 00 00  00 00 00 00 00 00 01 80  |................|
    000001c0  00 01 7f 0c ff ff 00 3f  00 00 2d 41 04 c9 00 00  |.....?..-A...|
    000001d0  00 00 00 00 00 00 00 00  00 00 00 00 00 00 00 00  |................|
    *
    000001f0  00 00 00 00 00 00 00 00  00 00 00 00 00 00 aa 55  |..............U|
    00000200  00 00 00 00 00 00 00 00  00 00 00 00 00 00 00 00  |................|
This looks suspiciously like a partition table!
But if you look a little closer, you'll see that on 000001be stands 01 80, while on a normal partition table this must be 80 01 (when the first partition is bootable). And the last 2 bytes (at 000001fe) are aa 55, while a normal MBR has these vice-versa. From every word, the high and low bytes appears to be swapped...
This is also known as "big-endian". Some processors, like the 68000 are using the big-endian format, while other processors, including the x86 are using the little-endian format. This is (in my humble opinion) why the bytes looks like they're swapped...
    00007e00  00 e9 50 00 49 48 49 4c  53 50 00 20 40 02 00 20  |.P.IHILSP. @.. |
    00007e10  00 02 00 00 f8 00 00 00  00 3f 00 80 00 00 00 00  |........?......|
    00007e20  0e 00 04 c9 26 48 00 00  00 00 00 00 00 02 00 00  |...&H..........|
    00007e30  00 01 00 06 00 00 00 00  00 00 00 00 00 00 00 00  |................|
    00007e40  00 80 00 29 00 00 56 00  4c 4f 4d 55 4c 45 42 41  |...)..V.LOMULEBA|
    00007e50  20 45 41 46 33 54 20 32  20 20 00 00 00 00 00 00  | EAF3T 2  ......|
    00007e60  00 00 00 00 00 00 00 00  00 00 00 00 00 00 00 00  |................|
Moreover, on 00007e00 begins as usual the first partition, 00007e02 should contain ".PHILIPS", but it actually contains "P.IHILSP". Beyond stands "VOLUMELABE FAT 32 ". So, to make the disk readable, has it to be fully copied decoded to an image, or another hard disk. Fortunately, the command dd absorbs the option "conv=swab" (indeed, swap with a 'b'), which exactly does what has to be done here.

Making the partition table readable/making the disk mountable
So, to make the disk readable, it has to be copied fully to a third disk (or, in the absence of an additional disk, through an image back to the original disk):
    dd if=/dev/hdb of=/dev/hdc conv=swab
Fdisk pointed out to recognize the partition after executing this command, and also was the (only) partition mountable.
The following files appear on the disk:
    -rwxr--r--    1 root     root       414720 Jan  1  1982 back.omp*
    -rwxr--r--    1 root     root     81920000 Jan  1  1982 D0000000.BIN*
    *
    -rwxr--r--    1 root     root     81920000 Jan  1  1982 D0000499.BIN*
    -rwxr--r--    1 root     root       108000 Jan  1  1982 D enter_channel_name.omp*
    -rwxr--r--    1 root     root       108000 Jan  1  1982 D enter_file_name.omp*
    -rwxr--r--    1 root     root         1024 Jan  1  1982 disp_bak.cl8*
    -rwxr--r--    1 root     root         1024 Jan  1  1982 disp.cl8*
    -rwxr--r--    1 root     root       414720 Jan  1  1982 D_parts1A.omp*
    -rwxr--r--    1 root     root       414720 Jan  1  1982 D_parts1B.omp*
    -rwxr--r--    1 root     root       676800 Jan  1  1982 D_parts2.omp*
    -rwxr--r--    1 root     root       414720 Jan  1  1982 D_parts3.omp*
    -rwxr--r--    1 root     root        13600 Jan  1  1982 D_WParts.omp*
    -rwxr--r--    1 root     root       108000 Jan  1  1982 enter_channel_name.omp*
    -rwxr--r--    1 root     root       108000 Jan  1  1982 enter_file_name.omp*
    -rwxr--r--    1 root     root       414720 Jan  1  1982 E_parts1A.omp*
    -rwxr--r--    1 root     root       414720 Jan  1  1982 E_parts1B.omp*
    -rwxr--r--    1 root     root       676800 Jan  1  1982 E_parts2.omp*
    -rwxr--r--    1 root     root       414720 Jan  1  1982 E_parts3.omp*
    -rwxr--r--    1 root     root        13600 Jan  1  1982 E_WParts.omp*
    -rwxr--r--    1 root     root       108000 Jan  1  1982 F enter_channel_name.omp*
    -rwxr--r--    1 root     root       108000 Jan  1  1982 F enter_file_name.omp*
    -rwxr--r--    1 root     root       414720 Jan  1  1982 F_parts1A.omp*
    -rwxr--r--    1 root     root       414720 Jan  1  1982 F_parts1B.omp*
    -rwxr--r--    1 root     root       676800 Jan  1  1982 F_parts2.omp*
    -rwxr--r--    1 root     root       414720 Jan  1  1982 F_parts3.omp*
    -rwxr--r--    1 root     root        13600 Jan  1  1982 F_WParts.omp*
    -rwxr--r--    1 root     root       108000 Jan  1  1982 G enter_channel_name.omp*
    -rwxr--r--    1 root     root       108000 Jan  1  1982 G enter_file_name.omp*
    -rwxr--r--    1 root     root       414720 Jan  1  1982 G_parts1A.omp*
    -rwxr--r--    1 root     root       414720 Jan  1  1982 G_parts1B.omp*
    -rwxr--r--    1 root     root       676800 Jan  1  1982 G_parts2.omp*
    -rwxr--r--    1 root     root       414720 Jan  1  1982 G_parts3.omp*
    -rwxr--r--    1 root     root          512 Jan 14  1984 guide_user_bak.dat*
    -rwxr--r--    1 root     root          512 Jan 14  1984 guide_user.dat*
    -rwxr--r--    1 root     root        13600 Jan  1  1982 G_WParts.omp*
    -rwxr--r--    1 root     root       108000 Jan  1  1982 I enter_channel_name.omp*
    -rwxr--r--    1 root     root       108000 Jan  1  1982 I enter_file_name.omp*
    -rwxr--r--    1 root     root       102900 Jan  1  1982 IndParts.omp*
    -rwxr--r--    1 root     root       414720 Jan  1  1982 I_parts1A.omp*
    -rwxr--r--    1 root     root       414720 Jan  1  1982 I_parts1B.omp*
    -rwxr--r--    1 root     root       676800 Jan  1  1982 I_parts2.omp*
    -rwxr--r--    1 root     root       414720 Jan  1  1982 I_parts3.omp*
    -rwxr--r--    1 root     root        13600 Jan  1  1982 I_WParts.omp*
    -rwxr--r--    1 root     root       414720 Jan  1  1982 logo.omp*
    -rwxr--r--    1 root     root         1024 Jan  1  1982 mark_bak.cl8*
    -rwxr--r--    1 root     root         1024 Jan  1  1982 mark.cl8*
    -rwxr--r--    1 root     root        43200 Jan  1  1982 MarkParts.omp*
    -rwxr--r--    1 root     root       421292 Jan  1  1982 ompfile.tb2*
    -rwxr--r--    1 root     root        48216 Jan  1  1982 osd_down.omp*
    -rwxr--r--    1 root     root        31600 Jan  1  1982 osd_up.omp*
    -rwxr--r--    1 root     root         1536 Jan 14  1984 rec_seq_bak.bin*
    -rwxr--r--    1 root     root         1536 Jan 14  1984 rec_seq.bin*
    -rwxr--r--    1 root     root       108000 Jan  1  1982 S enter_channel_name.omp*
    -rwxr--r--    1 root     root       108000 Jan  1  1982 S enter_file_name.omp*
    -rwxr--r--    1 root     root       414720 Jan  1  1982 S_parts1A.omp*
    -rwxr--r--    1 root     root       414720 Jan  1  1982 S_parts1B.omp*
    -rwxr--r--    1 root     root       676800 Jan  1  1982 S_parts2.omp*
    -rwxr--r--    1 root     root       414720 Jan  1  1982 S_parts3.omp*
    -rwxr--r--    1 root     root        13600 Jan  1  1982 S_WParts.omp*
    -rwxr--r--    1 root     root     17965056 Jan  1  1982 TAPE_LIB.BIN*
    -rwxr--r--    1 root     root         2048 Jan 14  1984 tuner_user_bak.dat*
    -rwxr--r--    1 root     root         2048 Jan 14  1984 tuner_user.dat*
    -rwxr--r--    1 root     root          512 Jan  1  1982 usrSet_bak.dat*
    -rwxr--r--    1 root     root          512 Jan  1  1982 usrSet.dat*
    -rwxr--r--    1 root     root          512 Jan  1  1982 VERSION.TXT*
* Here I've not displayed all 500 "D0000nnn.BIN" files.
Obviously, there permanently are 500 of such files on the disk, all 80mb sized, and filling almost the whole disk. Recorded programs are stored WITHIN these files.
 HDR1000 with new 80GB hard disk.
The administrational part of the recorded programs (a kind of File Allocation Table) is stored in the file TAPE_LIB.BIN. The file ompfile.tb2 is a special file. This namely is a POSIX TARball, packed with BZIP2. This file contains all what is needed to initialize a brand new hard disk to get it suitable for use in the HDR1000. To be exactly, this file contains all graphical files, which are files with the extension .omp and .cl8 (resp. bitmaps and palettes).

Initializing a new hard disk
The HDR1000 seems to handle a 80GB hard disk pretty properly. You can initialize a new hard disk as follows:
1. Be sure to have enough free space on your PC (minimal the size of the new harddisk), represented by a second new hard disk OR just as free space on an existing hard disk.
2. Partition the new hard disk, create 1 partition, type 0x0C (Win95 FAT32 (LBA))
3. Format the partition as FAT32
4. Mount the partition (in the example below I've mounted it as /dev/hdb1 into /hdb1/)
5. Copy the file ompfile.tb2 to it, and unpack it.
    belfast:/hdb1 # tar jxvf ompfile.tb2
("belfast" is just the name of my computer)
6. If you don't want to alter the logo (yet), then continue to step 7.



 Altered logo (at 50%).
Altering the logo: When switching the video hard disk recorder on or off, a PHILIPS-logo appears on the screen, this happens to be the file logo.omp. This is a 8 bitplanes picture, 720 x 576 pixels, without header and therefore without palette. The palette is stored in the file disp.cl8. To edit the logo you have to cut-n-paste a lot, the nearest known method of storing the data is a little conform a windows bitmapfile. Click here to download the original picture in bmp-format, it doesn't look very well (colors are different, and the logo is flipped) but it is editable and saveable. It has to be saved just as mal-coloured (brown) and flipped as it has been opened, and after saving you have to remove the header (the first 1078 bytes) again.

7. Create 998 files, name them D0000000.BIN to D0000997.BIN (when using a 80GB disk), because these files are NOT created automatically by the HDR1000:
    belfast:/hdb1 # for i in $(seq 1000 1997|cut -c2-);do dd if=/dev/zero of=d0000$i.bin bs=8192 count=10000;done
BTW: Filenames are NOT case-sensitive
In my case, I had approx. 100 MB free, because the HDR1000 requires some free space (maybe not that much, but just to be sure).
8. Umount partition
9a. Whole disk encoded (with the swab-option from dd) copying to other (identical) disk:
    belfast:/ # dd if=/dev/hdb of=/dev/hdc conv=swab
OR
9b. The same, but first to an image, and then from image back to the same disk:
    belfast:/ # dd if=/dev/hdb of=/images/hdr1000;dd if=/images/hdr1000 of=/dev/hdb conv=swab

10. Finally, the HDR1000 needs to be told how many "Dnnnnnnn.BIN" files there are on the disk. Anzac warned me about this, and you have to store the number of files (998 in this case, which is 0x03e6) at 0x81f0 (MSB) and 0x81f1 (LSB). You can achieve this by typing:
    belfast:/ # printf "%04x" 998|xxd -r -ps|dd of=/dev/hdb bs=1 seek=33264

printf will convert "998" into "03e6", xxd converts this into binary, dd will write the binary in big-endian to 0x81f0 and 0x81f1.
After this, you can unplug your drive, and plug it into the HDR1000. Don't forget to 'jumper' the drive into CS-mode (Cable Select)!

Additional remarks
I hope you understand this page a little, the most difficult part of this project was documentating and translating, so I can imagine if there are some things which are not 100% clarified. You can't mail me anymore about this, therefore I've set up the forum.

© 1986-2004 Martin Meijerink.   Last update: Saturday, 22 November 2008, 12:48:04