PIPSwitcher V3  
**************
17 April 2004
 
/**********************************************************************/ 
/* 
Name:		PIPSwitch.c For: TF5000 PVRt 
Author: 	Tonymy01 with some bits and pieces from: Author: Wurstepeter 
		with "Subswitch 1.4" 
Author: 	and other code by Rod Whitby (based on work by Christian Ghisler) 
Licence: 	This TAP is freeware. You may use this code 
		in your own projects free of charge.
Descr.: 	This program makes the PIP experience far better than the chosen Topfield 
		scheme. 
Usage: 		Put the PIPSwitch.TAP into your autostart folder. Hit the exit key
		in normal viewing mode to bring up a pop-up window with options for 

PIPSwitch Options include: 
*activating or de-activating the TAP, *using the 
 volume keys or >| |< to change channels in the PIP window (the volume keys 
 only change the channel if the PIP window is being displayed 
*Display of current PIP position 
*Option for Position of PIP window, including a "side by side" mode where both
 main and subwindows are similar size 
*Display of current PIP size 
*Options for re-size of PIP window, includes small which is 1/16th screen size,
 large which is 1/9th screen size and both which will cycle between the sizes 
*% from screen edge, with 4 choices, 0%, 1% 2% and 4% from screen edge. 
*exit PIPswitch *CANCEL, which will propogate the exit key to other TAPs.
 Use the right >| key to move the PIP window around the screen 
 if the >| keys aren't allocated for volume, and use the |< key to cycle 
 through all FIVE options including the large "side by side" mode. This TAP 
 will save the state of the PIP window to a file, and also save the RAM 
 location of the variable used for the PIP location so the AutoLetterbox 
 TAP won't draw black bars on the main screen.

Bugs: I finally found out what was killing my timeshift buffer with these TAPs. 
If you cycle the PIP channel past the channel you are watching (Topfield call it 
"zapping" through your channels), Timeshift gets disabled for the main window 
PIP!! I can't fix this bug, this is a Topfield problem. If you often rely on 
rewinding your timeshift, I would strongly recommend only using the PIP to bring 
up the other tuner window. Another workaround is to briefly hit the pause key to 
trigger the TIMESHIFT back on. A further workaround is to use the White button 
to change channels rather than the volume keys or >| |<. 

Bug2 is when pulling up the sub-window while tuned to channel "TEN" (any of 
their services!?) the subwindow refused to open. I originally opened a dummy -
non existant channel for the sub-window, and the TAP would actually default to 
the last opened channel, but this opening of the dummy channel stuffs up when 
viewing TEN for the main window (why?? I have no idea). So I check now if you 
are tuned to TEN, and open an known sub-channel, which is a bit annoying if you 
have tuned a particular channel for the subwindow (because it will keep 
defaulting to Toppy internal channel 1 whenever you close and open the PIP while 
on TEN for the main). Sorry for these bugs, there is nothing I can do about 
either of them (they are API bugs). 

If anyone has contacts with the software engineers, pass their name to me (or
vice versa) and we can sort some of these TAP issues out... 

Anyway, despite those little issues, 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 Wurstepeter's SubSwitch 1.4 
V2 Gives size options for the PIP window V2.1 Fixed "LARGE" size after bootup prob. 
V3 Tonnes of changes!! Will support 0%,1%,2%,4% shift from
the edge of the screen, sets variables differently so that when "both" is
chosen, will cycle throught the modes properly. Sets a couple more variables
into the PIPSwitch.ini, including the address that the bPIPshown variable lives
at, so that the autoletterbox TAP won't interfere with the PIP anymore. 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). I also fixed the "PIP won't start
for channel TEN" however it is a really dumb hack to fix the problem. The
problem is basically that the subpicture has to be started on a channel, but if
you give it a dummy channel that doesn't exist, it will open with the last
channel viewed on the PIP, however this fails with TEN and I have to open an
existing channel... a real pain if 
you are on TEN and are toggling the PIP to see what is on another channel..


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


PIPSwitcher V2.1 
**************** 
Oops, that is what I get for coding at 
2am... I didn't check that the "LARGE" setting was loaded when starting up 
(was saving the menu option, but not enforcing the size). Fixed now!

PIPSwitcher V2.0 
**************** 
Gives size options, small, large or both (where both cycles between smaller
size, larger size and off with the red key). Small is 1/4 screen size (1/4
height and 1/4 width), large is 1/3 screen size (1/3 height, 1/3 width). Still
to do: V3.0 will ensure that autoletterbox and PIPswitcher don't interfere, and
I will attempt to address the "Sat" key swap where it rescales back to standard
(this will be difficult as I can't track what channel the sub-window is on, so I
can't rewrite the 
"swap" key.. 

Regards 
Tony 
14th April 2004


PIPSwitcher	V1.0 
**************** 

Based on SubSwitch 1.4

This is used to improve the PIP channel changing and size and placement over the
standard Topfield options. Use the >| or |< keys to move the PIP window around
the screen, use the right >| to move the PIP clockwise around the screen, use
the left |< to move it anticlockwise, and if you move it anti - clockwise, after
the Top Left position there is a "Dual Screen" mode where the PIP and main
window are made the same size.

Use the volume keys to change the channels in the PIP window. If you want to use
the volume keys for their normal purpose, hit the exit key to pull up the
"PIPSwitch Options" window and select "Prog chg Use PIP -Move keys" which will
alter the channel change to the |< and >| keys. To the n choose the spot to
locate the PIP window (as the |< >| keys are no long able to be used once they
become the channel changer), hit exit to bring up the PIPSwitch Options window
again, and it shows you both the current PIP position, and the PIP position to
move it to. If you keep hitting exit to bring up the PIPSwitch Options window
and choosing the "Move PIP X X" option then it will cycle thru all 5 PIP options
from TopLeft, TopRight, BottomRight, BottomLeft and DualScreen.

There is still one or two more tweaks required to improve this TAP, including
the "Sat" key to swap sub & main, and a method of displaying the current channel
on the PIP window (one simple method is to toggle the PIP window off and on,
then quickly change to the channel you want with the volume or |< >| keys, and
the Toppy will show you which channel you are tuning the PIP window to.

Hope this TAP is good for you	all...

Regards Tony

http://tonyspage.dynodns.net:5003


8 April 2004




Original Info for	the orig TAP taht	PIPSwitcher	is based on- SubSwitch 1.4 
*************

SubSwitch.tap ist	eine Applikation (TAP) fr den Topfield TF5000PVR. Sie 
ermglicht	das direkte	Hoch-	oder Runterschalten des	Kanals im PIP-Fenster 
(Sub-Window).

Standardmaessig sind die Tasten fr	die Position des PIP-Fensters	nach 
Aktivierung mit Hochschalten/Runterschalten belegt. Mit der Exit-Taste oeffnet
sich ein Menue, in dem man

- die	Umschalt-Taste bestimmen kann	(Volume-Tasten oder PIP-Move-Tasten) - das
TAP deaktivieren bzw. aktivieren kann - das	TAP komplett beenden kann


Die aktuellen Einstellungen werden abgespeichert und sind nach einem Neustart	
nicht	verloren. Somit kann man das TAP durchaus	im Autostart-Ordner lagern. Die 
Neubelegung der	Tasten ist nur aktiv, solange	man sich in	keinem Menu	
befindet. Sind die Lautstaerke-Tasten konfiguriert,	schalten diese jetzt nur 
noch	um, wenn die OSD-Infobox nicht angezeigt wird.


Nebenwirkungen sind mir	bisher nur zwei bekannt: 

- schaltet man das SubWindow whrend einer pausierten	Aufnahme um, wird	aus dem 
grnen Pause-Symbol ein Play-Symbol, die Pause bleibt aber weiterhin bestehen. 
Somit muss man	zum Fortsetzen der Wiedergabe	leider zweimal die Pause-Taste 
drcken.

- das	Zusammenspiel mit	anderen TAP'S, die die Exit-Taste benutzen, ist	leicht 
gestoert. Beendet man das SubSwitch-Menue mit 'Cancel', wird die	Exit-Taste an 
das	naechste TAP weitergegeben. Wird jetzt das sich	dadurch geoeffnete TAP-
Menue mit der Exit-Taste	verlassen, oeffnet sich	voellig unmotiviert 
wiederrum	das SubSwitch-Menue, allerdings ueberlagert von	dem vorherigen 
Menue. Ist definitiv	ein Firmware-Bug und kann man	leider nicht aendern.

Viel Spass, Wurstepeter
