Andreas Thiede 								Berlin 1. October 2001
a.thiede@berlin.de

----------------------------------------------------------------------------------------------

What you will find here:

    Initial version of a Mac OSX driver for TV cards based on the booktree bt8xx chip.
    Initial version of tv viewer.

    Everything is very alpha. Just a proof of concept. No documentation, except this one.

    The idea is simple. There is a bunch of free code which shows how to to drive a TV card,
    i.e. in Linux/ xxxBSD , M$Windows. The documentation for the chipset is freely avaiable.
    Also there are many examples how to write OSX device drivers / kernel extensions.
    Throw alltogether. And voila.

----------------------------------------------------------------------------------------------

Prerequisites:

    Apple Powermac G4
    
    A Haupauge WinTV Go or better ( only testet with first one )

    Apple Project Builder

    Good knowledge of C, operatings systems

----------------------------------------------------------------------------------------------
    
How to participate ( for the brave ones) :

    Plug the Win TV card into an empty pci-slot of the mac. Expect deep sleep to stop working.
    
    Connect the audio out of the WinTV to year speakers ( my new mac doesn't have audio in;
    audiograbbing and use of OSX audio API, to avoid above solution,  is work in progress. )
    
    checkout out the sources.
    
    Build the 2 targets in PB.
    
    load the kernel extension 
    
        kextload $YOURPATH/xtv/build/Bt8xx.kext

        This sometimes fails, i.e. freeze or panics your mac, i.e. after multiple loads/unloads 
        
    In $YOURPATH/app/cocoa you will find a file called Channel.txt.
    
    Copy it to $HOME/.xtv/Channel.txt
    
    Every thing is hacked/hardcoded to work with PAL and german cable
    
    start the viewer
    
        '$YOURPATH/xtv/build/Cocoa Viewer.app/Contents/MacOS/Cocoa Viewer'
        keys +/- changes channels up/down

----------------------------------------------------------------------------------------------

Roadmap to the sources:

The directory xtv/bt8xx contains the sources for the kernel driver. Started with
examples from apple to understand how the driver should work/ but doesnt. Heavily hacked.

The directory xtv/lib contains some sources from the dTV project ( also hosted at sourceforge ).
One idea behind this project ( I think ) is to do as little as possible in kernel space. 
The dTV kernel driver provides the userspace app with an api to access the hardware ( kernel mem / dma )
The programming of the chipset is completly done in userspace.

Also there is file called init.c where i hacked my testing stuff.

The directory xtv/app/cocoa conatins the sources for the initial viewer app
which uses the funtionality in xtv/lib.

----------------------------------------------------------------------------------------------

What next:

    - Get audio grabbing working, due to lack of audio input devices.
    
    - documentation, i.e. why something is done this way and not another one
     
    - Decision wether chipprogramming should be left in userspace, or transfered to kernel module.
    
    - Make a clean API
    
    - Due to lack of API/Documentation a la DirectDraw in OSX, displaying video is a cpu hog.
      Even when using CGDirectDisplay.  With fullsize video 720x576 at 32 bits at 25 frames per second 
      my 466 mhz cpu is 0% idle.  360x288 is ok - 65-75 % idle.
      Investigations are needed to improve video display performance.
    
    - Powermangement
    
    - Think about recording.

    - Web page at sourceforge

    - Rewrite code
        
----------------------------------------------------------------------------------------------
    
    
Contact: a.thiede@berlin.de

----------------------------------------------------------------------------------------------








