BorgTV v2.1

BorgTV (c) by Borg 1999, 2000             Digital filters (c) by Grzesio 1999

BorgTV is simple TV tuner program which works
on TV tuner cards with BT848/878
and decodes some crypted programs.

It can replace original software
which is often a royal piece of crap.


Requirements:

Tuner TV on BT848/878
Processor 300 MHz or faster (with MMX) [not tested on slower]
Graphics card with overlay YUY2
64MB RAM [not tested on less]
Music card with full duplex

Version 2.0 tested on W95PL, W98PL & NT4PL(SP4)
On NT & 2000 you can watch programs but decoding suxx.

Index

Splash
F1 - Help
F2 - Picture settings
F3 - Programs
F4 - Hardware settings
F5 - Teletext
F6 - Capturing
F7 - Decoding
F8 - Program settings
Dockbar
Keyboard
Command line params
Help, I get no sound!
This piece of crap doesn't work!

Newest version on
http://www.kki.net.pl/~borgx
email: borgx@box43.gnet.pl


IMPORTANT!!!

By this statement I want you to know that I get no responsibility
for possible harm this program can make to you and your family!
If your hard disk will suddenly format itself or wINDOWS will crash
deadly or your house will burn or anything horrible will happen
you can blame only yourself.
(but I did my best to avoid this)


You got this program for free.
You can copy it and use it.
You CAN'T sell it nor make money of it in any other way.
You can't put it without my permission on any CD's.



Splash

This windows is shown right at the beginning.

Fullscreen - Fullscreen or window.
Fullscreen = 800x600x16 bits.
Number - Number of lines used in the Nagra decoder (does not affect logo decoder).
The more the better but slower.


F1 - Help

Do you need any explanation about that?
Button at the left transfers you directly to my web page.
The right one shows this help


F2 - Picture settings

Settings:
Brightness, Contrast, Saturation - you know that...
Overscan - Picture magnification (to get rid of black borders around it).
Volume - Main volume.

Program:
Arrows - previous & next program.
Combo in the middle - program chooser.
M - Mute. Global sound muting.

Programs can be changed using keyboard:
Gray - or Left - prev program.
Gray + or Right - next program.
Numbers on the numeric keyb - type number of program.


F3 - Programs

Programs:
From left to right: program number, channel number, program name.
Listbox - Program list. Pressing Delete erases program under cursor.
Below - Program name. You can name it anyway you want.
Big arrows - Moves program one place up and down.
Delete - Deletes selected program. Warning! Program will be erased without asking you!
Add... - Adds new program.
Edit... - Lets you edit programs.
Secam - You can set Secam mode for each program separately.
You can't delete program 0 (video). However you can rename it.

Searching:
Combo - Channel set to be searched.
Search channels - Begins searching.

If you can't find any program by searching channels you can search band.
Combo - Frequency range to search.
Ranges covers whole available tuner band (45.75MHz - 863.25MHz) and are divided into 100MHz parts.
Searching is done with 0.25MHz step.
Scan band - Does searching.

Searching can be interrupted in any moment, but programs found so far will be added to the list.

Search and:
Replace - Erases all programs and replaces them with new ones.
Add - Adds new programs at the end of the list.

Delete all - Trashes whole program list (asking you before doing that)
Favourites... - Lets you select 10 favourites programs.

With four sliders at the bottom you can change brightness, contrast, saturation and volume
separately for every program. These values are relative to those in F2.



Edit program

Name - Enter name.
Channel - Choose channel...
Frequency - ... or frequency.
Program does automagically tuning to the best frequency while you switch programs.
Therefore the beginning frequency may not be rounded to 0.25 MHz
Automatic tuning can be turned off in F4->Settings->AFC


Add program

The same window
Name - Enter name.
Channel - Choose channel...
Frequency - ... or frequency.
After pressing OK program is always added at the end of the list regardless of setting: Replace/Add!


Favourites

Chooses your favourite programs.
X at the right deselects corresponding choice.



F4 - Hardware settings

Card:
Choose your tuner card.
You can choose any card (even not exactly yours) if only you'll have sound with it.
If you have other tuner and know how to activate sound choose: "Use values below"
and enter values in the "Sound activation".
If you don't know what to write there look here.

Below select your tuner type.
If you don't know what type of tuner you have look into the paperback manual.

Tuner & Video
Select source of sound for tuner and video.
Sliders below controls volume. Set those to have equal sound level from both sources.

Settings:
Shrink window - Lets you shrink window ignoring driver restrictions.
Warning! This can cause hang up!
AFC - Turns on/off Automatic Frequency Control.
Init PLL - Inits PLL. Needed for 878.
Refresh overlay - Refreshes overlay after every changes in it.
If your window shrinks and overlay does not follow it, click this option.
Enable flipping - Enables overlay flipping.
It works only if plugin wants to do this.
That means you can check it and see if something does better. If not uncheck it and forget this option.
You have to restart program to make this work.


F5 - Teletext

After every program change teletext catches pages in background, to access them faster later.
This can be turned off by Catch pages in background

Show - Switches teletext mode on/off. The same does Space on keyboard
Back - Turns on/off hollow background.
Unhide - Unhides hidden characters. Only hidden chars I ever saw were on test pages but...
Fonts: Choose font. Currently available are POLish and ENGlish.
Save - Saves all catched pages to text file.
The files have the same name as current program and are saved into "Teletext" directory.
Subpages are not written.

Page:
There's page number in the middle.
I guess I don't have to explain how the buttons at the left and right works?

Fast access:
Selects page with number on the button.

Favourites:
Buttons with numbers selects page.
Buttons below assigns corresponding buttons above the current page number.

Teletext mode is toggled by Space. In this mode keys changes their function.


F6 - Capturing

Capture now - Writes what you actually see to disk.
Files are written in "Snapshots" dir.
The name of files is "frameXXX.tga', where XXX is number of snaphot.
Snapshots are numbered from 000 to 999, and then again 000.
When counter flips files are overwritten. You have to take care of copying them somewhere else yourself.
They are in .tga format. Every snapshot takes 1.3MB.
Delete all - Deletes all captures frames and clears counter.

You can make snapshot any time by pressing 'S' on the keyboard.


F7 - Decoding

Decoder:
None - Not decoding
Nagra - Nagravision. Not very fast but it's only for the breaks between movies.
+ - Logo decoder + [movie]
C+ P - Logo decoder Canal+ (on the right) [sport]
C+ L - Logo decoder Canal+ (on the left) [sport]
Polsat - Polshit decoder
RAI - RAI. This decoder really suxx, but you can watch football with it.

You will probably find those logo decoders completely worthless.
They are designed especially for Polish Canal +

Auto:
Full automatic.
Works only with logo and nagra decoders.
Video - Auto video
Audio - Auto audio

Decoder settings:
Level 1, Level 2 - Sets levels for logo decoders.
The levels may be depend on your tuner, brightness, contrast etc.
X, Y - Logo shift.
Key 1, Key 2 - Function depends on decoder

Sound:
Decode - Decode or not...
Mute - Mutes input so you won't hear coded sound underneath.
Dolby - Dolby Pro Logic mode.
Buffers: - Set number of sound buffers. Choose as less as you can to avoid sound latency.
Band - Three bands. As you wish.
Priority - Priority of sound thread...
Out - Wave out volume.
In - In volume. Used in decoding instead of volume set in F4
Both works only when sound decoder is active!
Always when Nagra - Sound decoder will always turn on when Nagra.
Usually sound will be decoded when Nagra and Polish C+ has been detected.

Sound decoder does not show any errors! If it can't work properly will do nothing!

Plugins:
Do you need any explanations?
Maybe just that if you activate plugin (Active) Decoder settings will change into Plugin settings.
From this moment on every levels, keys, X, Y changes affects current plugin, NOT the decoder.
If you want to change something in the decoder you have to turn the plugin off first.



How to catch key on Polszit

1. Press Key1
2. Move Level 1 until picture will be good.
3. When whole picture is decoder release Key1
4. If there are some coded lines press Key1 again and release it in the right moment.

Sometimes you have to play with it for a while.
Moving Level2 you can correct picture a bit but don't expect miracles.

How to adjust RAI decoder

Just move Level1 slider up and down until you'll have some picture.
You can also try Level2 if it does something better.

This decoder is really lame...


F8 - Program settings

Sleep Timer:
Lets you turn your computer off at chosen time.
Active activates timer.
Remind will warn you about shutdown.
Message will show up 10, 5 i 2 mins before turning off.

OSD:
Choose font and color.
Time - After it OSD will disappear.

Font:
Font used in the dialogs.

Hide cursor:
Hides mouse cursor

Language:
Here you can switch to another language.
You have to quit and run bTV again to make this work.

Other:
Don't shrink at the borders - without comment...
Proportions 4:3 - neither...
Always on top - Is this really hard to understand this?
Dockbar - Just feature... Shows and hides dockbar. You can also use 'D' on keyboard.
Texture - You can turn texture off, but I really don't see why you should...


Dockbar

Just little thing hanging around.
You can select any program, next or prev.
M mutes sound and slider below changes volume.
There are your favourites at the right which you can define in F3->Favourites


Command line params

If you want to run bTV very quick there are two params you can use:
-channel:xxx : xxx = program number.
-fs:0/1 : fullscreen yes/no

After entering any recognizable parameter the Splash will not show up.
If you give any crap Splash will show up as always.

You better give proper values or anything can happen.
Using '-fs:0' is quite legal and will run bTV in window and without Splash screen.


Keyboard

Space = Teletext mode on/off
Right mouse button = Zooming window fullscreen and back. The same does Z

Regular mode

Esc = Quit
Esc+Shift = Quit with shutdown
F1-F8 = Dialog boxes
Gray+, -> = Next program
Gray-, <- = Prev program
Numeric keyboard - Program selecting
T = Topmost - always on top/not always
S = Snapshot
P = Plugin on/off
Z = Zoom - fullscreen/window
D = Dockbar on/off
= = Window 768x576 - fullsize
- = Window 384x288 - halfsize
Pause = Freeze (only when decoder or plugin active)
Enter = Loop
Gray * = Mute
Insert, Delete = Brightness
Home, End = Contrast
PageUp, PageDown = Saturation
Arrow up, Arrow down = Volume
Backspace = Hide window

Teletext mode


Esc = Teletext off
F1-F8 = Dialog boxes
Gray+, -> = Next page
Gray-, <- = Prev page
Numeric keyboard - Page choice
B = Background
H = Unhide
F = Freshens curent page
Tab = Flushes all teletext cache and catches all pages again
PageUp = Next program
PageDn = Prev program
1-8 = Fast access
Q-I = Favourites
F9-F12 = Fasttext (color buttons at the bottom of page). Works very rarely




Hiding window means disappearing it from desktop without destroying it.
This can be very useful to owners of some graphics cards (eg. Elsa Erazor III).
You can watch TV without window on the desktop.
After hiding window a small icon will show up in the tray (the one on the right).
Clicking it will show window again.
A nice sideeffect of this is that you can place tv picture on your desktop.
Just set desktop color to RGB(255,0,255), zoom window to fullscren and hide it.

In both modes works key \ which shows some status info.


Activating sound from tuner

How to make sound out of your tuner???

Run btTool which you have with bTV.
If you don't have it just get original bTV from my page.
It looks like this on the left.
The yellow frame is what we are interested in.

Now run your program to watch TV you got with your TV tuner.
Switch it to EXT (external source). It can also be VIDEO.
Don't switch to SVHS!!!
Read from btTool values for GPIO Out En and Data.
You will write these into GPIO_EN and Video in F4
Now switch to any program from tuner (anything from air)
Read Data in btTool. Write it to Tuner
Now turn the sound off with [Mute] or something.
Read Data once again.
If you don't have anything like [Mute] try to figure out whether value of
GPIO Data changes while switching channels (but neither from nor to video).
(I mean that moments when there is silence)
You have sometimes try hard to get this.
The last value put into Mute.

So you have four values to put in four field in Hardware settings
Don't forget to set card type to "Use settings below"
If this works for you send these values to me (with name of your tuner)

If you still don't know how to do this, maybe this program is not for you.


Troubleshooting

These are the most frequently asked questions:

1. I get message "Can't initialize DirectDraw[13]"

Well, perhaps thirteen is not your lucky number...
Make sure your graphics card is capable of displaying overlay in format required by bTV:
Download DirectX Control Panel from my page.
This is version is from DX6.0 and also works on NT.
Unzip this file and run.
If it doesn't want to run just copy it to "Windows/System", open Control Panel and click on "DirectX"

You'll see this window:

Click on "Advanced"

Next window will appear:

In yellow frame "FourCC Codes" you can find formats supported by your card.
If there is neither YUY2 nor YUYV nor YUNV you can say goodbye to bTV.
As you can see my card supports YUY2 and that's how it should be...

And this is how it looks on NT with newest detonators 3.68:

As you can see shrinking is gone, almost nothing works, good to have YUY2 at least...

2. I have Ati Rage IIc and message like above...

Check if this Ati has YUY2...
If it has and version 2.0 doesn't work I really have no slightest idea why...

3. My window doesn't want to shrink! Help!

Repeat steps from point 1.
In the second window, in upper right corner in frame "Stretch factors" are overlay stretching factors (underlined)
If Min = 1.0 or Min = 0.0 that means your drivers disallows to shrink overlay.
Also check in the first window in "Overlays" if you have "OVERLAYSTRETCH". If not... Well...
If your graphics card is relatively new (AGP) there is big chance that drivers
you use aren't very good. Download newer version from manufacturers webpage.
If you want to gamble you can force shrinking by setting F4->Shrink window.
But you do this on your own responsibility...

4. This stupid program hangs up right after running it...

Check maybe you have tuner working on the same interrupt as graphics card.
If this is the case try to change it. You can assign different IRQs to different PCI slots in BIOS,
if you have cool BIOS. Other way is to change tuner card with any other one in slots.
If this doesn't work either there is quite big way to solve this (and sometimes works):
Get all cards out of computer and run it. Now insert one card by one running windows after each one.
May help, may not...

5. I plugged USB mouse and it goes crazy

Make sure USB doesn't work on the same IRQ as tuner.
If yes look at point 4 how to solve this...

6. I have 64MB RAM and get message "Not enough free memory"

Get rid of all unnecessary crap in Tray.
Try to eliminate programs running for nothing from registry. Keys:

HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Run
HKEY_USERS\.Default\Software\Microsoft\Windows\CurrentVersion\Run

Set disk cache. This allows you to gain some good megs of RAM.
Download CacheMaster from my page.

Unzip, run and select your RAM size in the frame on the left.
Click "Set" and reboot windows. Ready!
And don't forget to remember free memory before doing that to see how much you did gained.

7. I have 128MB RAM and also get message like above

Look at point 6.

8. A message "You have no BT848/878" appears but apparently I have one...

You probably are running Windows NT or 2000...
To solve this you have to delete some things from registry.
Run 'regedit' and delete keys:

[HKEY_LOCAL_MACHINE\SYSTEM\ControlSet001\Services\BorgTV]
[HKEY_LOCAL_MACHINE\SYSTEM\ControlSet001\Services\btTool]

Delete all of them. Also look if there are similar keys ("BorgTV" albo "btTool")
in other "ControlSetxxx". Delete them all. If this doesn't help, find "windrv" in registry
and delete all keys containing it in all "Services"
This bug may be in bRadio 1.1 or 1.2
bTV 2.0+ & btTool v3 are this bug free...


^^^ Up ^^^