annotate TVout/matroxtv @ 7376:c3273d9bc41c

v2.0
author gabucino
date Thu, 12 Sep 2002 09:42:00 +0000
parents be3b0871ef6d
children 3a9a1530ab2d
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
7376
gabucino
parents: 2560
diff changeset
64 echo " [ 1 ] Monitor only"
gabucino
parents: 2560
diff changeset
65 echo " /---> Monitor"
gabucino
parents: 2560
diff changeset
66 echo " [ 2 ] DualHead - CRTC1"
gabucino
parents: 2560
diff changeset
67 echo " \\---> TV"
2487
ac3c0836aaa1 hope it's not too buggy, and overall useful
gabucino
parents:
diff changeset
68
ac3c0836aaa1 hope it's not too buggy, and overall useful
gabucino
parents:
diff changeset
69 echo
ac3c0836aaa1 hope it's not too buggy, and overall useful
gabucino
parents:
diff changeset
70
7376
gabucino
parents: 2560
diff changeset
71 echo " [ A ] 640x512 PAL"
gabucino
parents: 2560
diff changeset
72 echo " [ S ] 640x528 PAL"
gabucino
parents: 2560
diff changeset
73 echo " [ D ] 720x576 PAL"
gabucino
parents: 2560
diff changeset
74 echo " [ F ] 640x240 NTSC"
gabucino
parents: 2560
diff changeset
75 echo " [ G ] 640x480 NTSC, Interlaced"
2487
ac3c0836aaa1 hope it's not too buggy, and overall useful
gabucino
parents:
diff changeset
76
ac3c0836aaa1 hope it's not too buggy, and overall useful
gabucino
parents:
diff changeset
77 read ABC
ac3c0836aaa1 hope it's not too buggy, and overall useful
gabucino
parents:
diff changeset
78
ac3c0836aaa1 hope it's not too buggy, and overall useful
gabucino
parents:
diff changeset
79 case "$ABC" in
ac3c0836aaa1 hope it's not too buggy, and overall useful
gabucino
parents:
diff changeset
80 1)
ac3c0836aaa1 hope it's not too buggy, and overall useful
gabucino
parents:
diff changeset
81 matroxset -f /dev/fb1 -m 0
ac3c0836aaa1 hope it's not too buggy, and overall useful
gabucino
parents:
diff changeset
82 matroxset -f /dev/fb0 -m 1
7376
gabucino
parents: 2560
diff changeset
83 defaultmode
2487
ac3c0836aaa1 hope it's not too buggy, and overall useful
gabucino
parents:
diff changeset
84 echo
ac3c0836aaa1 hope it's not too buggy, and overall useful
gabucino
parents:
diff changeset
85 ;;
ac3c0836aaa1 hope it's not too buggy, and overall useful
gabucino
parents:
diff changeset
86
ac3c0836aaa1 hope it's not too buggy, and overall useful
gabucino
parents:
diff changeset
87 2)
ac3c0836aaa1 hope it's not too buggy, and overall useful
gabucino
parents:
diff changeset
88 matroxset -f /dev/fb1 -m 0
ac3c0836aaa1 hope it's not too buggy, and overall useful
gabucino
parents:
diff changeset
89 matroxset -f /dev/fb0 -m 3
7376
gabucino
parents: 2560
diff changeset
90 SetTVstandard
gabucino
parents: 2560
diff changeset
91 TVdefaultmode
2487
ac3c0836aaa1 hope it's not too buggy, and overall useful
gabucino
parents:
diff changeset
92 ;;
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 a)
7376
gabucino
parents: 2560
diff changeset
95 # 640x512 80Hz 32bpp
gabucino
parents: 2560
diff changeset
96 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
97 ;;
ac3c0836aaa1 hope it's not too buggy, and overall useful
gabucino
parents:
diff changeset
98
ac3c0836aaa1 hope it's not too buggy, and overall useful
gabucino
parents:
diff changeset
99 s)
7376
gabucino
parents: 2560
diff changeset
100 # 640x528 83Hz 32bpp
gabucino
parents: 2560
diff changeset
101 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
102 ;;
ac3c0836aaa1 hope it's not too buggy, and overall useful
gabucino
parents:
diff changeset
103
ac3c0836aaa1 hope it's not too buggy, and overall useful
gabucino
parents:
diff changeset
104 d)
7376
gabucino
parents: 2560
diff changeset
105 # 720x576 78Hz 32bpp
gabucino
parents: 2560
diff changeset
106 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
107 ;;
ac3c0836aaa1 hope it's not too buggy, and overall useful
gabucino
parents:
diff changeset
108
7376
gabucino
parents: 2560
diff changeset
109 f)
gabucino
parents: 2560
diff changeset
110 # 640x240 non-interlaced 32bpp
gabucino
parents: 2560
diff changeset
111 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
112 ;;
gabucino
parents: 2560
diff changeset
113
gabucino
parents: 2560
diff changeset
114 g)
gabucino
parents: 2560
diff changeset
115 # 640x480 interlaced 32bpp
gabucino
parents: 2560
diff changeset
116 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
117 ;;
2487
ac3c0836aaa1 hope it's not too buggy, and overall useful
gabucino
parents:
diff changeset
118 esac
ac3c0836aaa1 hope it's not too buggy, and overall useful
gabucino
parents:
diff changeset
119
ac3c0836aaa1 hope it's not too buggy, and overall useful
gabucino
parents:
diff changeset
120 done