AutoLetterboxV6.9, draws black lines to block out VBI junk, and locks out the appropriate aspect ratio when toggling with the "0" key.
Copyright (C) 2005 Tony H

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.
.....

This is for the Topfield 5000PVR(t), based on various bits of source by 
Ghisler/Whitby/Wurstepeter orignally for the letterbox.c programme, a bit from 
the signal strength tap, and a bit from subswitch.c. This is used to remove 
those few lines top and bottom of the image that can be very annoying for 4:3 TV 
owners when VBI signalling is sent in those lines.   Normally they are lost in 
the overscan for a widescreen TV, but when 4:3 Letterbox mode is chosen, they 
end up in the middle of the screen.  See http://tonyspage.abock.de/TAP%20Pictures/bottom_VBI_JunkinLetterboxMode.JPG 
for a very rough picture of what the lines look like for here in 10 Sydney.

This version will refresh the blanking (after OSD and other stuff gets printed 
up on the screen), and will not cover the top of OSDs.   It takes advantage of the
new API, and now when you hit EXIT to bring up the menu, you choose whether you
have a 16:9 or 4:3 TV, and when hitting the "0" remote key to toggle aspect ratio will cycle thru:

4:3 TV -   Letterbox and 4:3 Centre Cut.
16:9 TV-   16:9 and 4:3 Centre Cut.


So for newbies to the "TAP" environment, all you need to do is copy this .tap file to your Topfield via USB with the ALTAIR proggy avail on the Topfield Australia site, and put the tap file into the "ProgramFiles" folder where you can manually launch it when you wish, or put it into "\ProgramFiles\Auto Start"  so that you don't have to manually choose it to start it.

To manually launch once you have uploaded it: hit the middle filelist button on the bottom section of the remote, then either >| or |< once or twice to see the TAP applications that you have uploaded (window will be titled "Program Files").  Select the TAP file, hit OK, and away you go!   Hit the exit key to bring up an option menu that
lets you change the TV type, change whether you want the black bars printed, and to exit the TAP.


Cheers
Tonymy01
http://tonyspage.dyndns.org
05/12/2004


Info from the C file:
/**********************************************************************/
/* Name:    autoLetterbox.c
   For:     TF5000 PVRt                                               
   Author:  Rod Whitby (based on work by Christian Ghisler)           
   Author:  A bit of Wurstepeter "Subswitch" code
   Author:  Tonymy01 put it all together.
   Licence: This TAP is freeware. You may use this code in your own   
		projects free of charge.                                  
   Descr.:  This program puts thin black bars at the top and bottom of    
		the screen, which can be used to hide the white lines and VBI junk.
	    	Such as what is sent by Ten Sydney.
   Usage:   Put the letterbox.TAP and letterbox.ini into your autostart folder.
		Before you restart your player, (or launch the tap from the autostart folder), change
		your setup to 4:3 Letterbox for best success.
		When you hit the "0" key to change aspect ratio, this will automatically add the black
		lines when the player is in 4:3 Letterbox mode (by simply tracking how many times the 0
		key has been pressed).   It stores this information in letterbox.ini, so that when you 
		power cycle the STB, everything should be good.
		If things get mixed up (such as if you alter the aspect from the menu rather than the 0 key),
		then all you need to do is alter the aspect with the "0" key to "4:3 Letterbox", then hit
		the exit key, which will bring up a menu box with 3 choices:
		"Reset Letterbox"
		"Exit Letterbox"
		"Cancel"
		When you choose "Reset Letterbox" this will reset the options to show the black letterbox cover
		up bars and assume the STB is in letterbox mode.
		You can obviously exit the TAP altogether with this window, or cancel your selection
		I hope this makes your viewing experience much better!
		Cheers
		Tonymy01
		tony_h@bigpond.net.au

Release History:
V1	Modded from a lot of various bits from Subswitch, Infodisplay and original Letterbox TAP
V2	Fixed a bug where using the number keys for channel change would toggle the status, now
	waits for 2secs after hitting any number key so hitting "90" etc will work fine.
	Also fixed some timeouts etc to reduce resource usage marginally.
V3	Tidied up code (again).   Made this draw 2 pixel line for 4:3 and 16:9 top and bottom to sort out potential
	junk on top & bottom of those modes.    Removed transparency setting, as this was mucking up OSD.   I figure 
	if you want this to be most effective, you can compromise your transparency settings in the menu yourself (OSDs and
	TAPs share the same transparency setting, I can't set full black no transparency and then honour your selected
	transparency you setup in the STB menu at the same time).
	Made the .ini file readable with notepad (and understandable, you can now edit if you want).
	Made the TAP only save the settings to HDD when resetting, exiting or powering down the player, to avoid HDD
	activity (and spin up time!) if you don't run timeshift 100% of the time.
V4  	Hmm, power key isn't trapped, so have to just save settings to HDD in idle time.   Orig version worked well,
	but it appears that people run Timeshift off and hence the HDD has to spin up when saving settings during aspect change
	which "pauses" the tap while this is happening.   Hopefully saving in idle time is a bit better.
V5  	Made this interact much better with my PIPswitch TAP, such that if a PIP window is pulled up, it won't put the black bars
    	over the top of the window.   For this to be effective, PIPSwitch and autoLetterbox MUST be in the same folder.
	It looks at the RAM location that PIPSwitcher saves its "on/off" variable to (much better than checking out the HDD all
	the time, although I still check it whenever launched, red key hit, or "0" key hit).
	I really recommend not turning timeshift off, as the HDD stops spinning and things will be a bit slow
	with these taps as they often save and read from the HDD (so the state of the TAP is remembered after reboot).
V6  	Woohoo, the new API allows me to do all sorts of great things, including bypassing the modes you don't need depending on
    	your TV type setting (hit exit to set it up), and to alter the transparency on the fly between non-transparent when
	painting the black lines, to your setup transparency setting in the system setup menu.
V6.1 	Fixes top right text from dissapearing when it wants to...
V6.2 	Fixes things that 6.1 broke ;-)  and removes the UHF debug key that I forgot to take out.
V6.3    Interim fix to sort out the "black line eventually shows up in letterbox mode.
V6.4    I think it is finally sorted out, there shouldn't be any more black lines even when bringing up PIP (from pipswitch tap only).
V6.5    Fixed the black lines across the screen once and for all.  Also made the OSD text fairly quick (as part of the problem is
        this 2second wait).  28/04/2004
V6.6    Adds another menu option "Display black bars" or "Don't display Bars", which is useful to turn off with newer firmwares as Topfield
        has finally modded the firmware to achieve the "black bars" to hide the VBI junk in letterbox mode.   But the TAP is still useful to 
	lock out the letterbox mode you don't use (so 4:3 TV will lockout the 16:9 option, 16:9 TV will lock out the letterbox option).
	I also fixed a few loading things, hopefully to speed the TAP loading up.   I made the menu a little simpler to use, now when you toggle
	a menu option you see it change immediately (so OK or left/right).  27/06/2004
V6.7    Fixed problem where TAP didn't return UART etc events, effectively breaking serial port communications. 28/06/2004
V6.8   Added nice graphic for autoletterbox text, got rid of PIP TAP integration as code was too messy.   German language support 5/12/04
V6.9   Added TSRCommander support, to enable the TAP config or exit from a common window.

*/
/**********************************************************************/
