/usr/share/freevo/contrib/fbcon/mgafb is in freevo 1.9.2b2-4.2.
This file is owned by root:root, with mode 0o755.
The actual contents of the file can be viewed below.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 | #!/bin/sh
#
# This script is a mix from the mplayer TVout scripts and some
# changes by me to support 768 width
#
# Note: fbset and matroxset are copied from mplayer! They're
# included here for ease of use, but check out the mplayer
# source for updates if you have problems. There are more
# init scripts there, setup utilities, etc.
#
# /Dischi
# possible locations for matroxset and fbset if they are not in the path
# and not in the runtime
export PATH=$PATH:/bin:/usr/bin:/usr/local/bin:/sbin:/usr/sbin
# find the freevo script
if [ -x "$FREEVO_SCRIPT" ]; then
freevo=$FREEVO_SCRIPT
elif [ -e "`dirname $0`/../freevo" ]; then
freevo=`dirname $0`/../freevo
elif which --skip-functions --skip-alias freevo >/dev/null 2>/dev/null; then
freevo=`which --skip-functions --skip-alias freevo`
else
echo freevo script not found
exit 1
fi
if [ "$1" = "restore" ]; then
if [ -c /dev/fb0 ]; then
HEAD0=/dev/fb0
HEAD1=/dev/fb1
else
HEAD0=/dev/fb/0
HEAD1=/dev/fb/1
fi
#$freevo runapp matroxset -f ${HEAD1} -m 0
#$freevo runapp matroxset -f ${HEAD0} -m 1
#$freevo runapp matroxset -f ${HEAD1} -m 2
$freevo runapp matroxset -f /dev/fb0 -m 1
$freevo runapp matroxset -f /dev/fb1 -m 0
if [ "$2" != "" ]; then
shift
$freevo runapp fbset -a -fb /dev/fb0 "$@"
fi
exit 0
fi
if ! [ "$1" = "pal" ] && ! [ "$1" = "PAL" ] && \
! [ "$1" = "ntsc" ] && ! [ "$1" = "NTSC" ]; then
echo "usage: mgafb [ pal | ntsc ] resolution"
echo " mgafb restore"
exit 1
fi
# I don't know what this is doing exacly, but it should enable the
# clone mode with IMHO looks better than the others
$freevo runapp matroxset -f /dev/fb1 -m 0
$freevo runapp matroxset -f /dev/fb0 -m 3
# set the correct fbset mode
if [ "$1" = "pal" ] || [ "$1" = "PAL" ]; then
# switch to PAL
$freevo runapp matroxset 1
if [ "$2" = "768x576" ]; then
$freevo runapp fbset -fb /dev/fb0 -depth 32 -left 20 -right 10 -hslen 34 \
-upper 30 -lower 10 -vslen 10 -xres 768 -yres 576 \
-vxres 768 -vyres 576 -depth 32 -laced false -bcast true -pixclock 38400 \
-hsync high -vsync high
# $freevo runapp fbset -fb /dev/fb0 -depth 32 -left 23 -right -5 \
# -upper 39 -lower 10 -hslen 46 -vslen 4 -xres 768 -yres 576 \
# -vxres 768 -vyres 576 -depth 32 -laced false -bcast true
elif [ "$2" = "800x600" ]; then
$freevo runapp fbset -fb /dev/fb0 -depth 32 -left 48 -right 24 \
-upper 70 -lower 32 -hslen 40 -vslen 2 -xres 800 -yres 600 \
-vxres 800 -vyres 600 -depth 32 -laced false -bcast true
else
echo unsupported mode $2 for pal
fi
else
$freevo runapp matroxset -f /dev/fb0 2 2
db=`dirname $0`/fbset.db
if [ "$2" = "640x480" ]; then
$freevo runapp fbset -db $db -fb /dev/fb0 "ntsc-640x480_60"
elif [ "$2" = "768x576" ]; then
$freevo runapp fbset -db $db -fb /dev/fb0 "ntsc-768x576"
elif [ "$2" = "800x600" ]; then
$freevo runapp fbset -db $db -fb /dev/fb0 "ntsc-800x600"
else
echo unsupported mode $2 for ntsc
fi
fi
setterm -blank 0
|