annotate TVout/matroxtv @ 9329:113095b8258b

required for i18n+-lintl (found by Nexus)
author arpi
date Fri, 07 Feb 2003 22:47:48 +0000
parents 3a9a1530ab2d
children 10ac5e716014
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
2487
ac3c0836aaa1 hope it's not too buggy, and overall useful
gabucino
parents:
diff changeset
1 #!/bin/sh
7376
gabucino
parents: 2560
diff changeset
2 #
gabucino
parents: 2560
diff changeset
3 # Gabucino - no warranty, this script can BOOM your TV and/or monitor, or else.
gabucino
parents: 2560
diff changeset
4 # v2.0
gabucino
parents: 2560
diff changeset
5 # This script has been tested and configured on a Matrox G400DH and a PAL TV.
gabucino
parents: 2560
diff changeset
6 #
gabucino
parents: 2560
diff changeset
7 # INSTALLATION:
gabucino
parents: 2560
diff changeset
8 # 1. READ MPLAYER'S TVOUT DOCUMENTATION!
gabucino
parents: 2560
diff changeset
9 # 2. Edit 'defaultmode', 'TVdefaultmode', and 'SetTVstandard' functions
gabucino
parents: 2560
diff changeset
10 # below to fit your needs.
gabucino
parents: 2560
diff changeset
11 # 3. Remove 'exit 1' safety check.
gabucino
parents: 2560
diff changeset
12 #
gabucino
parents: 2560
diff changeset
13
gabucino
parents: 2560
diff changeset
14 function defaultmode {
gabucino
parents: 2560
diff changeset
15 # You can choose the mode to use in monitor-only mode
gabucino
parents: 2560
diff changeset
16 # 640x480 60Hz 32bpp (14" monitors)
gabucino
parents: 2560
diff changeset
17 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
gabucino
parents: 2560
diff changeset
18 # 768x576 60Hz 32bpp (14" monitors)
gabucino
parents: 2560
diff changeset
19 # 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
gabucino
parents: 2560
diff changeset
20 # 800x600 76Hz 32bpp (15" monitors)
gabucino
parents: 2560
diff changeset
21 # 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
gabucino
parents: 2560
diff changeset
22 # 1024x768 70Hz 32bpp (15" monitors)
gabucino
parents: 2560
diff changeset
23 # 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
gabucino
parents: 2560
diff changeset
24 }
gabucino
parents: 2560
diff changeset
25
gabucino
parents: 2560
diff changeset
26 function TVdefaultmode {
2487
ac3c0836aaa1 hope it's not too buggy, and overall useful
gabucino
parents:
diff changeset
27
7376
gabucino
parents: 2560
diff changeset
28 ##
gabucino
parents: 2560
diff changeset
29 ## PAL modes
gabucino
parents: 2560
diff changeset
30 ##
gabucino
parents: 2560
diff changeset
31
gabucino
parents: 2560
diff changeset
32 # 640x512 80Hz 32bpp
gabucino
parents: 2560
diff changeset
33 fbset -depth 32 -left 60 -right 0 -upper 70 -lower 39 -hslen 76 -vslen 4 -xres 640 -yres 512 -bcast true
gabucino
parents: 2560
diff changeset
34 # 640x528 83Hz 32bpp
gabucino
parents: 2560
diff changeset
35 # 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
gabucino
parents: 2560
diff changeset
36 # 720x576 78Hz 32bpp
gabucino
parents: 2560
diff changeset
37 # 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
gabucino
parents: 2560
diff changeset
38
gabucino
parents: 2560
diff changeset
39 ##
gabucino
parents: 2560
diff changeset
40 ## NTSC modes
gabucino
parents: 2560
diff changeset
41 ##
2487
ac3c0836aaa1 hope it's not too buggy, and overall useful
gabucino
parents:
diff changeset
42
7376
gabucino
parents: 2560
diff changeset
43 # 640x240 non-interlaced 32bpp
gabucino
parents: 2560
diff changeset
44 # 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
gabucino
parents: 2560
diff changeset
45 # 640x480 interlaced 32bpp
gabucino
parents: 2560
diff changeset
46 # 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
gabucino
parents: 2560
diff changeset
47 }
gabucino
parents: 2560
diff changeset
48
gabucino
parents: 2560
diff changeset
49 function SetTVstandard {
gabucino
parents: 2560
diff changeset
50 matroxset 1 # PAL
gabucino
parents: 2560
diff changeset
51 # matroxset 2 # NTSC
gabucino
parents: 2560
diff changeset
52 }
gabucino
parents: 2560
diff changeset
53
gabucino
parents: 2560
diff changeset
54 echo
gabucino
parents: 2560
diff changeset
55 echo "Please read MPlayer's TV-out documentation, and install 'matroxset' and 'fbset'."
gabucino
parents: 2560
diff changeset
56 echo "Then edit this script to suit your monitor+TV set."
gabucino
parents: 2560
diff changeset
57 echo
2488
383a4f3870e0 *** empty log message ***
gabucino
parents: 2487
diff changeset
58 exit 1
2487
ac3c0836aaa1 hope it's not too buggy, and overall useful
gabucino
parents:
diff changeset
59
ac3c0836aaa1 hope it's not too buggy, and overall useful
gabucino
parents:
diff changeset
60 while [ 1 ]; do
ac3c0836aaa1 hope it's not too buggy, and overall useful
gabucino
parents:
diff changeset
61
ac3c0836aaa1 hope it's not too buggy, and overall useful
gabucino
parents:
diff changeset
62 clear
ac3c0836aaa1 hope it's not too buggy, and overall useful
gabucino
parents:
diff changeset
63
7524
3a9a1530ab2d function for blanking+clearing screen
gabucino
parents: 7376
diff changeset
64 echo " [ 0 ] Clear & blank screen"
7376
gabucino
parents: 2560
diff changeset
65 echo " [ 1 ] Monitor only"
gabucino
parents: 2560
diff changeset
66 echo " /---> Monitor"
gabucino
parents: 2560
diff changeset
67 echo " [ 2 ] DualHead - CRTC1"
gabucino
parents: 2560
diff changeset
68 echo " \\---> TV"
2487
ac3c0836aaa1 hope it's not too buggy, and overall useful
gabucino
parents:
diff changeset
69
ac3c0836aaa1 hope it's not too buggy, and overall useful
gabucino
parents:
diff changeset
70 echo
ac3c0836aaa1 hope it's not too buggy, and overall useful
gabucino
parents:
diff changeset
71
7376
gabucino
parents: 2560
diff changeset
72 echo " [ A ] 640x512 PAL"
gabucino
parents: 2560
diff changeset
73 echo " [ S ] 640x528 PAL"
gabucino
parents: 2560
diff changeset
74 echo " [ D ] 720x576 PAL"
gabucino
parents: 2560
diff changeset
75 echo " [ F ] 640x240 NTSC"
gabucino
parents: 2560
diff changeset
76 echo " [ G ] 640x480 NTSC, Interlaced"
2487
ac3c0836aaa1 hope it's not too buggy, and overall useful
gabucino
parents:
diff changeset
77
ac3c0836aaa1 hope it's not too buggy, and overall useful
gabucino
parents:
diff changeset
78 read ABC
ac3c0836aaa1 hope it's not too buggy, and overall useful
gabucino
parents:
diff changeset
79
ac3c0836aaa1 hope it's not too buggy, and overall useful
gabucino
parents:
diff changeset
80 case "$ABC" in
7524
3a9a1530ab2d function for blanking+clearing screen
gabucino
parents: 7376
diff changeset
81 0)
3a9a1530ab2d function for blanking+clearing screen
gabucino
parents: 7376
diff changeset
82 clear
3a9a1530ab2d function for blanking+clearing screen
gabucino
parents: 7376
diff changeset
83 setterm -cursor off
3a9a1530ab2d function for blanking+clearing screen
gabucino
parents: 7376
diff changeset
84 setterm -blank 0
3a9a1530ab2d function for blanking+clearing screen
gabucino
parents: 7376
diff changeset
85 read
3a9a1530ab2d function for blanking+clearing screen
gabucino
parents: 7376
diff changeset
86 ;;
3a9a1530ab2d function for blanking+clearing screen
gabucino
parents: 7376
diff changeset
87
2487
ac3c0836aaa1 hope it's not too buggy, and overall useful
gabucino
parents:
diff changeset
88 1)
ac3c0836aaa1 hope it's not too buggy, and overall useful
gabucino
parents:
diff changeset
89 matroxset -f /dev/fb1 -m 0
ac3c0836aaa1 hope it's not too buggy, and overall useful
gabucino
parents:
diff changeset
90 matroxset -f /dev/fb0 -m 1
7376
gabucino
parents: 2560
diff changeset
91 defaultmode
2487
ac3c0836aaa1 hope it's not too buggy, and overall useful
gabucino
parents:
diff changeset
92 echo
ac3c0836aaa1 hope it's not too buggy, and overall useful
gabucino
parents:
diff changeset
93 ;;
ac3c0836aaa1 hope it's not too buggy, and overall useful
gabucino
parents:
diff changeset
94
ac3c0836aaa1 hope it's not too buggy, and overall useful
gabucino
parents:
diff changeset
95 2)
ac3c0836aaa1 hope it's not too buggy, and overall useful
gabucino
parents:
diff changeset
96 matroxset -f /dev/fb1 -m 0
ac3c0836aaa1 hope it's not too buggy, and overall useful
gabucino
parents:
diff changeset
97 matroxset -f /dev/fb0 -m 3
7376
gabucino
parents: 2560
diff changeset
98 SetTVstandard
gabucino
parents: 2560
diff changeset
99 TVdefaultmode
2487
ac3c0836aaa1 hope it's not too buggy, and overall useful
gabucino
parents:
diff changeset
100 ;;
ac3c0836aaa1 hope it's not too buggy, and overall useful
gabucino
parents:
diff changeset
101
ac3c0836aaa1 hope it's not too buggy, and overall useful
gabucino
parents:
diff changeset
102 a)
7376
gabucino
parents: 2560
diff changeset
103 # 640x512 80Hz 32bpp
gabucino
parents: 2560
diff changeset
104 fbset -depth 32 -left 60 -right 0 -upper 70 -lower 39 -hslen 76 -vslen 4 -xres 640 -yres 512 -bcast true
2487
ac3c0836aaa1 hope it's not too buggy, and overall useful
gabucino
parents:
diff changeset
105 ;;
ac3c0836aaa1 hope it's not too buggy, and overall useful
gabucino
parents:
diff changeset
106
ac3c0836aaa1 hope it's not too buggy, and overall useful
gabucino
parents:
diff changeset
107 s)
7376
gabucino
parents: 2560
diff changeset
108 # 640x528 83Hz 32bpp
gabucino
parents: 2560
diff changeset
109 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
2487
ac3c0836aaa1 hope it's not too buggy, and overall useful
gabucino
parents:
diff changeset
110 ;;
ac3c0836aaa1 hope it's not too buggy, and overall useful
gabucino
parents:
diff changeset
111
ac3c0836aaa1 hope it's not too buggy, and overall useful
gabucino
parents:
diff changeset
112 d)
7376
gabucino
parents: 2560
diff changeset
113 # 720x576 78Hz 32bpp
gabucino
parents: 2560
diff changeset
114 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
2487
ac3c0836aaa1 hope it's not too buggy, and overall useful
gabucino
parents:
diff changeset
115 ;;
ac3c0836aaa1 hope it's not too buggy, and overall useful
gabucino
parents:
diff changeset
116
7376
gabucino
parents: 2560
diff changeset
117 f)
gabucino
parents: 2560
diff changeset
118 # 640x240 non-interlaced 32bpp
gabucino
parents: 2560
diff changeset
119 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
gabucino
parents: 2560
diff changeset
120 ;;
gabucino
parents: 2560
diff changeset
121
gabucino
parents: 2560
diff changeset
122 g)
gabucino
parents: 2560
diff changeset
123 # 640x480 interlaced 32bpp
gabucino
parents: 2560
diff changeset
124 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
gabucino
parents: 2560
diff changeset
125 ;;
2487
ac3c0836aaa1 hope it's not too buggy, and overall useful
gabucino
parents:
diff changeset
126 esac
ac3c0836aaa1 hope it's not too buggy, and overall useful
gabucino
parents:
diff changeset
127
ac3c0836aaa1 hope it's not too buggy, and overall useful
gabucino
parents:
diff changeset
128 done