OmniMedia Talisman driver for FreeBSD 2.1.0-Development

By Brian E. Litzinger  <brian@easynet.com>

Copyright 1995 By Brian E. Litzinger

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

Talisman MPEG driver

Caveats:

    The driver is being developed on a Pentium P5-90 and has been
    tested in 486DX2/66 platforms.  Your milage may vary with
    other platforms.

    The driver using polling.  It implements neither interrupts
    nor DMA at this time.  This means that if the user level
    application (mplay) does not get enough CPU time, the
    MPEG decoder will underflow and there will be pauses in the
    video and audio.

    Only TM_RESET and TM_PLAY are implemented in this driver.
    Well, so is TM_PAUSE, but since TM_UNPAUSE isn't, TM_PAUSE
    isn't of that much use.

    Playback has only been tested on data coming from a local
    hard drive.

    The static window has only been tested in 720x400 VGA text 
    mode 3.  The default VGA state of the FreeBSD console.

    The device driver malloc's 0.5MBytes for an internal circular
    buffer.  It needs no where near this amount.  But its an
    alpha state driver so what the hey?

    The board is hard wired to IO ports 0x700-0x703
    at this time, so make sure there aren't any conflicts.

    Which means make sure there isn't anything at 0x300-0x303
    that doesn't understand all 16 bits of the I/O addresses.

Usage:

    Install the driver (see below)
    
    Issue the commands:

	tmmgr init 700		# these 3 command only need be issued once
	tmmgr mac init.mac	# after power up.
	tmmgr loadpal

	mplay your_favorite_mpeg_stream

    You can turn the static window on and off with the commands

	tmmgr window on
	tmmgr window off
    
    Have Fun!
    brian

Installing the device driver:



In your i386/conf/LOCAL or whatever file you must add the following line:

device tm0 at isa? port 0x700 bio vector tm_intr

***
*** At this time the board must be set to 0x700. And you must make sure
*** that no devices are at 0x300-0x303 that don't understand 16
*** bits of IO addresses!
***

Add this near the end of i386/conf/files.i386:

i386/isa/tm.c                  optional        tm     device-driver

somewhere in i386/i386/conf.c add:

#include "tm.h"
#if NTM > 0
d_open_t        tm_open;
d_close_t       tm_close;
d_ioctl_t       tm_ioctl;
d_rdwr_t        tm_read, tm_write;
#define tm_select   (d_select_t *)enxio
#define tm_stop     (d_stop_t *)enxio
#define tm_reset        nxreset
#define tm_mmap         nxmmap
#define tm_strategy     nxstrategy
#define tm_devtotty     nxdevtotty
#else
#define tm_open     (d_open_t *)enxio
#define tm_close    (d_close_t *)enxio
#define tm_ioctl    (d_ioctl_t *)enxio
#define tm_read     (d_rdwr_t *)enxio
#define tm_write    (d_rdwr_t *)enxio
#define tm_select   (d_select_t *)enxio
#define tm_stop     (d_stop_t *)enxio
#define tm_devtotty     nxdevtotty
#define tm_reset        nxreset
#define tm_mmap         nxmmap  
#define tm_strategy     nxstrategy
#endif

then in i386/i386/conf.c add to the cdevsw structure

        { tm_open,      tm_close,       tm_read,        tm_write,       /*64*/
          tm_ioctl,     tm_stop,        tm_reset,       tm_devtotty, /* tm */
          seltrue,      tm_mmap,        tm_strategy },
 
Major device number 64 is reserved for the Talisman Device driver in
FreeBSD 2.1.  If an entry already exists for major device 64, replace
it with this one.

Lastly, copy the files in the driver subdirectory to i386/isa

    cp tm0.04/drivers/* /usr/src/sys/i386/isa

Then do a config and make depend and make and install and boot the new
kernel.

You should see the following in the boot text or from dmesg:

tm0 at 0x700-0x703 on isa 

Now mknod the device entry:

mknod /dev/tm0 c 64 0 

You'll also want to make sure the access permissions are appropriate.
chmod 666 /dev/tm0 seems like a good start.

Next get tmmgr and mplay which came in the tm-support distribution.

Regretably, I can't distribute the source to these modules yet, because
of copyright rights of third parties.

You can play a stream by issuing the following comands:

    ./tmmgr init 700
    ./tmmgr mac init.mac
    ./tmmgr loadpal
    ./mplay mpegstream
    

Best of luck.  

Brian Litzinger <brian@easynet.com>
P.O. Box 82
Boulder Creek, CA 95006
