3 # Gabucino - no warranty, this script can BOOM your TV and/or monitor, or else.
5 # This script has been tested and configured on a Matrox G400DH, a PAL TV,
6 # a 14" analog and a 15" digital monitor.
9 # 1. READ MPLAYER'S TVOUT DOCUMENTATION!
10 # 2. Choose proper mode at 'defaultmode', 'TVdefaultmode',
11 # and 'SetTVstandard' functions to fit your needs.
12 # You normally shouldn't touch anything else.
13 # 3. Remove 'exit 1' safety check.
16 function defaultmode
{
17 # You can choose the mode to use in monitor-only mode
18 # 640x480 60Hz 32bpp (14" monitors)
19 fbset
-a -xres 640 -yres 480 -vxres 640 -vyres 480 -depth 32 -pixclock 39721 -left 48 -right 16 -upper 33 -lower 10 -hslen 96 -vslen 2 -hsync high
-accel true
-laced false
20 # 768x576 60Hz 32bpp (14" monitors)
21 # fbset -a -xres 768 -yres 576 -vxres 768 -vyres 5460 -depth 32 -pixclock 26101 -left 144 -right 16 -upper 28 -lower 6 -hslen 112 -vslen 4 -accel true -laced false
22 # 800x600 76Hz 32bpp (15" monitors)
23 # fbset -a -xres 800 -yres 600 -vxres 800 -vyres 1440 -depth 32 -pixclock 20000 -left 128 -right 16 -upper 24 -lower 2 -hslen 96 -vslen 6 -laced false
24 # 1024x768 70Hz 32bpp (15" monitors)
25 # fbset -a -xres 1024 -yres 768 -vxres 1024 -vyres 1440 -depth 32 -pixclock 12500 -left 144 -right 32 -upper 30 -lower 2 -hslen 192 -vslen 6 -laced false
28 function TVdefaultmode
{
35 fbset
-fb $1 -a -depth 32 -left 60 -right 0 -upper 70 -lower 39 -hslen 76 -vslen 4 -xres 640 -yres 512 -bcast true
-laced false
37 # fbset -fb $1 -a -depth 32 -left 40 -right 0 -upper 63 -lower 29 -hslen 56 -vslen 4 -xres 640 -yres 528 -vxres 640 -vyres 528 -laced false -bcast true
39 # fbset -fb $1 -a -depth 32 -left 54 -right -36 -upper 55 -lower -6 -hslen 46 -vslen 4 -xres 720 -yres 576 -vxres 720 -vyres 576 -laced false -bcast true
45 # 640x240 non-interlaced 32bpp
46 # fbset -fb $1 -a -depth 32 -xres 640 -yres 240 -vxres 640 -vyres 240 -pixclock 79443 -left 72 -right 40 -upper 15 -lower 5 -hslen 48 -vslen 3 -laced false
47 # 640x480 interlaced 32bpp
48 # fbset -fb $1 -a -depth 32 -xres 640 -yres 480 -vxres 640 -vyres 480 -pixclock 79443 -left 72 -right 40 -upper 30 -lower 10 -hslen 48 -vslen 5 -laced true
51 function SetTVstandard
{
56 function SetMonitorMode
{
60 function mappingreset
{
61 matroxset
-f /dev
/fb0
-m 0
62 matroxset
-f /dev
/fb1
-m 0
63 matroxset
-f /dev
/fb0
-m 1
64 con2fb
/dev
/fb0
/dev
/tty1
65 con2fb
/dev
/fb0
/dev
/tty2
72 echo "tty2 will be automatically transferred to fb1 using the con2fb utility."
75 echo "A big \"1\" letter will be displayed on tty1 after the change."
76 echo "A big \"2\" letter will be displayed on tty2 after the change."
79 echo "If you read this, PRESS ANY KEY TO CONTINUE"
117 echo " Press ALT-F1 to change here"
149 echo " Press ALT-F2 to change here"
153 echo "Please read MPlayer's TV-out documentation, and install 'matroxset' and 'fbset'."
154 echo "Then edit this script to suit your monitor+TV set."
162 echo " [ 0 ] Clear & blank screen"
163 echo " [ 1 ] Monitor only"
165 echo " [ 2 ] Cloning - CRTC1 -> Monitor"
168 echo " [ 3 ] Cloning - CRTC1 -> Monitor1"
169 echo " CRTC2 -> Monitor2"
171 echo " [ 4 ] DualHead - CRTC1 -> Monitor1"
172 echo " CRTC2 -> Monitor2"
174 echo " [ 5 ] DualHead - CRTC1 -> Monitor2 (SWAP!)"
175 echo " CRTC2 -> Monitor1"
177 echo " [ 6 ] DualHead - CRTC1 -> Monitor1"
180 echo " [ 7 ] DualHead - CRTC1 -> TV (SWAP!)"
181 echo " CRTC2 -> Monitor1"
185 echo "-- TV MODES on /dev/fb0 -- TV MODES on /dev/fb1"
187 echo " [ a ] 640x512 PAL [ A ] 640x512 PAL"
188 echo " [ s ] 640x528 PAL [ S ] 640x528 PAL"
189 echo " [ d ] 720x576 PAL [ D ] 720x576 PAL"
190 echo " [ f ] 640x240 NTSC [ F ] 640x240 NTSC"
191 echo " [ g ] 640x480 NTSC, interlaced [ G ] 640x480 NTSCl"
193 echo " (Warning, fb0 and fb1 tend to change RANDOMLY with these mode changers..)"
213 matroxset
-f /dev
/fb0
-m 3
215 TVdefaultmode
/dev
/fb0
220 matroxset
-f /dev
/fb0
-m 3
226 matroxset
-f /dev
/fb0
-m 1
227 matroxset
-f /dev
/fb1
-m 2
234 matroxset
-f /dev
/fb0
-m 2
235 matroxset
-f /dev
/fb1
-m 1
242 con2fb
/dev
/fb1
/dev
/tty2
243 matroxset
-f /dev
/fb0
-m 1
244 matroxset
-f /dev
/fb1
-m 2
246 TVdefaultmode
/dev
/fb1
253 con2fb
/dev
/fb1
/dev
/tty2
254 matroxset
-f /dev
/fb0
-m 2
255 matroxset
-f /dev
/fb1
-m 1
257 TVdefaultmode
/dev
/fb0
263 fbset
-depth 32 -left 60 -right 0 -upper 70 -lower 39 -hslen 76 -vslen 4 -xres 640 -yres 512 -bcast true
-laced false
268 fbset
-fb /dev
/fb1
-depth 32 -left 60 -right 0 -upper 70 -lower 39 -hslen 76 -vslen 4 -xres 640 -yres 512 -bcast true
-laced false
273 fbset
-depth 32 -left 40 -right 0 -upper 63 -lower 29 -hslen 56 -vslen 4 -xres 640 -yres 528 -vxres 640 -vyres 528 -laced false
-bcast true
278 fbset
-fb /dev
/fb1
-depth 32 -left 40 -right 0 -upper 63 -lower 29 -hslen 56 -vslen 4 -xres 640 -yres 528 -vxres 640 -vyres 528 -laced false
-bcast true
283 # fbset -depth 32 -left 54 -right -36 -upper 55 -lower -6 -hslen 46 -vslen 4 -xres 720 -yres 576 -vxres 720 -vyres 576 -laced false -bcast true
284 fbset
-depth 32 -right -36 -lower -6 -hslen 46 -vslen 4 -xres 720 -yres 576 -vxres 720 -vyres 576 -laced false
-bcast true
289 # fbset -fb /dev/fb1 -depth 32 -left 54 -right -36 -upper 55 -lower -6 -hslen 46 -vslen 4 -xres 720 -yres 576 -vxres 720 -vyres 576 -laced false -bcast true
290 fbset
-fb /dev
/fb1
-depth 32 -right -36 -lower -6 -hslen 46 -vslen 4 -xres 720 -yres 576 -vxres 720 -vyres 576 -laced false
-bcast true
294 # 640x240 non-interlaced 32bpp
295 fbset
-depth 32 -xres 640 -yres 240 -vxres 640 -vyres 240 -pixclock 79443 -left 72 -right 40 -upper 15 -lower 5 -hslen 48 -vslen 3 -laced false
299 # 640x240 non-interlaced 32bpp
300 fbset
-fb /dev
/fb1
-depth 32 -xres 640 -yres 240 -vxres 640 -vyres 240 -pixclock 79443 -left 72 -right 40 -upper 15 -lower 5 -hslen 48 -vslen 3 -laced false
304 # 640x480 interlaced 32bpp
305 fbset
-depth 32 -xres 640 -yres 480 -vxres 640 -vyres 480 -pixclock 79443 -left 72 -right 40 -upper 30 -lower 10 -hslen 48 -vslen 5 -laced true
309 # 640x480 interlaced 32bpp
310 fbset
-fb /dev
/fb1
-depth 32 -xres 640 -yres 480 -vxres 640 -vyres 480 -pixclock 79443 -left 72 -right 40 -upper 30 -lower 10 -hslen 48 -vslen 5 -laced true