TFDISK is a set of utilities to handle the Topfield TF4000PVR
hard disks under Windows 2000 and Windows XP. For the moment, the
only program in the TFDISK set is TFGET, which enables to read
the Topfield TF4000PVR disks, convert the recordings to several
formats and to store the result into the PC filesystem.

You have to run the program with Administrator privileges (to get access
to the physical disk drive data) and from the Command line (do NOT run
the program by clicking on its icon!).

This version works with disks > 128 GB, provided your PC and operating
system handles them correctly. The Topfield filesystem format has changed
since support for disks > 128 GB was inroduced, by increasing the allocation
block size (was 1MB, now depends on disk size). The smaller disks still use
the same format as with previous software releases.

Older versions of Windows (95/98/ME) are not supported, as they do not have
any standard way to access the raw hard disk device. If someone knows some
trick, please let me know. Windows NT might work, but probably disks
larger than 128 GB will fail. Actaully, disks > 32GB fail with some machines
and Windows NT 4.0 and I was not able to determine the root cause of that.
If someone knows what is the problem and how to fix it, please let me know by
e-mail.

Some versions of the Windows operating system and some filesystems such as the
FAT32 filesystem may have limitations regarding the size of the file
they are able to create (4 GB). If the converted recording is larger than
this limit, the resulting file is silently truncated to the largest
size the operating system supports. The only solution to this problem is to
use a different filesystem (such as NTFS) or newer operating system.

The program requires that you attacht the Topfield hard drive to one of the
IDE adapters. Please check the master/slave settings to avoid any conflicts.
As installed in the Topfield PVR, the disk is set as MASTER/SINGLE.
The program checks all IDE devices from lowest to highest and processes
the first disk with Topfield signature found (up to 8 disks in total).

If there is a disk image file present in your current directory or one
level of directory above the current one, the disk image file is opened
instead of the real disk. This is mainly for debugging purposes, or could
be used to handle a larger number of files, while your real Topfield disk
is back in the Topfield TF4000PVR. The disk image file is called "tfdisk.img".

The program can read from Topfield disks, it cannot write to them yet. The
recordings are extracted in one of several formats:

disk - this copies the WHOLE disk (that is 40 GIGABYTES with the original
      drive, more if you have fitted a larger disk)
      into a PC file called "tfdisk.img". If this file is later found
      in the current directory (or one leve above it), no actual Topfield
      disk is searched and this disk image file is used instead. This is
      mainly for testing and will be used for the development of writing
      to disks. Writing the saved image back is not supported at the moment.

raw - "as is" in the Topfield file system; this is a proprietary header,
      bookmarks and then the partial transport stream with the PIDs of the
      recorded program. You can use it for archiving or for further processing.
      The format of the proprietary header is documented in the file
      topfield.h in the included source code.

VOB - audio and video, transport stream format in packs of size 2048, compatible
      with DVD VOB file format. The Navigation Packs are missing in this version.
      This format should work well with most software which can process
      VOB files from DVDs, or can be used for DVD authoring without
      having to recompute the video data. Please note that some
      DVD authoring software converts the audio to either AC3 or LPCM.
      The VOB format plays well with DVD players, such as PowerDVD or the
      latest Windows Media Player.

MP3 - audio track only, MPEG-1 Layer 1 to 3, elementary stream data only. Good
      for playback in Winamp or other MP3 players. The suffix is always MP3,
      even if the format is typically Layer 2. This parameter should also extract
	an AC-3 audio stream, provided the AC-3 stream was selected as the default
	one before recording. You have to change the extension of the filename to .AC3
	after creating the file with raw AC-3 data.

M2V - video track only, MPEG-2 video data in ES format.
      Good for conversion to other formats or for playback in programs like
      the Elecard MPEG-2 player. The conversion of this format by various
      video conversion/authoring programs seems to be quite safe.
      Please note that if you separate the audio and video streams, they
      will not be in sync without manual adjustment, as the audio
      and video data do not typically start at the same place in the
      Topfield recording format.

M2P - audio and video tracks, MPEG-2 Program Stream format (well, without
      headers at the moment).  Good for audio/video playback in Elecard MPEG-2
      player and for conversion to other formats.  A lot of DVD authoring
      software fails with these files, the reasons are still being investigated.

TS  - Partial Transport Stream, audio/video/PMT data from the transport stream.
      This is for further conversion or for analysis of the data.
      The PAT tables are missing at the moment.

The resulting filename will have one of the above extensions and the base name
will be the name of recording, with strange characters converted to underscores.
The files will be created in the current directory.

The format is specified as the first parameter to the "tfget.exe" program.
The format is not case sensitive.

For M2P, it is possible to re-packet the data with the maximum packet size
specified as the second argument to "tfget.exe".
If no argument or 0 is given, the packets will stay as in the input stream.

The program has been compiled with Mingw and should not need any other
libraries (DLLs) than those supplied with the operating system.
To compile the program from the sources, you need the following
files from the MINGW project to be installed:
- MINGW core
- binutils
- GCC
- Win32API

I personally use MINSYS as well as MINGW.

All the above files can be downloaded from http://www.sourceforge.net/projects/mingw/

KNOWN PROBLEMS:

The M2P format crashes most video editing/authoring software and does not work
with all video players.

The VOB format is not 100% DVD compatible yet. Some recordings are known to
work with some players, but more work and tests need to be done.

SUPPORT:

Please e-mail the author (topfield@centrum.cz), or open a thread at the discussion
board for Topfield receivers at http://boar2.topfield.de/
Please use the "International Topfield Cafe" section and English language,
my German, Italian and Dutch are very limited. Requests in my native language
(Czech) by e-mail only, please.

New versions of this program will always be announced on the Topfield
German board in the "International Topfield Cafe" section.

The primary site for TFDISK is now the site of Andreas Bock (thank you, Andreas),
the files are at http://topfield.abock.de/PeN/ (directory listing is not supported
at this moment, you have to know the filename).

SYSTEM REQUIREMENTS:

HW: no specific requirements for processor or other peripherals. One free IDE/ATA port
required to connect the disk. Please make sure that the MASTER/SLAVE setting reflects
your PC and do not forget to restore the jumpers for MASTER/SINLGE before returning
the disk to TF4000PVR. Best performance is achieved in installing the Topfield disk
on a different IDE/ATA channel than the destination PC disk (ie. main PC disk on IDE 0,
Topfield disk and CD/DVD drive on IDE 1). Also try to enable UDMA or other fast
disk transfer modes supported by your drives, controller and drivers, typically
the conversion is disk transfer speed limited, not processor limited, and every percent
counts with large multi-gigabyte files.

RAM: The program has been tested with 64MB RAM, but may work with less RAM.

DISK SPACE: The program itself requires only around 100KB, including binaries, sources
and documentation. You will need enough disk space to store the (converted) recordings,
and for any further processing such as DVD/SVCD/VCD/DIVX authoring.

OS: Windows NT 4.0 or later, no other software is required. For further processing,
you will need futher software such as DVD authoring and burning software. You can also use
the DVD player programs listed in the section below.

LINKS:

I have used with success the free demo of the Elecard shareware MPEG-2 player,
which is available from www.moonlight.co.il. It does not have too many
features, but seems to be fast and stable. Do not try it on the TS format, it
does not work (most probably due to missing PAT in TF files). For simultaneous
video and audio, use the VOB format.

For conversion to other formats, the DVD2AVI program seems to be quite good,
although it has more problems than the Elecard player. (Use Google or other
popular search engine to find DVD2AVI and related programs). You can convert
the recordings to DivX AVIs or to other formats such as SVCD.

The format conversion is inspired by the code in MPEGTOOLS, which form a part
of the Linux driver and application for the Siemens DVB-S card. No code has
been taken directly, I have tried to write things from scratch and make it
much simpler than in the Siemens DVB implementation. Most of the bugs and
problems described above occur in the MPEGTOOLS implementation as well. If you
need some special conversion, you can always export the file as TS and
then use MPEGTOOLS to convert it to something else.

AUTHOR:

Petr Novak (PeN)
topfield@centrum.cz

/***************************************************************************************
    This program is free software; you can redistribute it and/or modify
    it under the terms of the GNU General Public License as published by
    the Free Software Foundation; either version 2 of the License, or
    (at your option) any later version.

    This program is distributed in the hope that it will be useful,
    but WITHOUT ANY WARRANTY; without even the implied warranty of
    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
    GNU General Public License for more details.

    You should have received a copy of the GNU General Public License
    along with this program; if not, write to the Free Software
    Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
*/
