Drawing on the OSD

It would make much more sense to use an alternate firmware to do real custom OSD work, but if you just want to display some stuff in an overlay fashion you can do it a couple of ways:

1) Draw an image pixel by pixel on the screen using the drawRect test option

2) Upload an image via USB and use the image blit tests to show it.

To do all of this, you have to have enabled the RS232 debug mode from the service menu.  If you type debug <enter> d and then see a whole lot of options listed, you have debug mode available.  I found that if you dabble in option 14, the OSD test menu, you can draw rectangles (whoo!), test patterns, and blit images directly.  A few things I found:

To reproduce the image I created, paste the contents of "jolly.txt" into the terminal window -- and be patient.  It's not very fast.  You could probably speed it up if you crank the serial port of the TV to 115200 from the same menu you used to put it in "event" or "debug" mode to begin with.

Advanced OSD display over serial:

Using the lrz utility (see "sending binaries" section) on a USB stick, I have a shell script that does the following:

1) Resize image to target size (the smaller the image, the faster it transfers)

2) Transfer image to /tmp folder of TV

3) Use debug menu to blit image to the lower-right corner of the TV.

Some improvements are needed, but here's something that kind of works:

#!/bin/bash

port=/dev/ttyUSB1

stty -F $port ispeed 115200 ospeed 115200 -echo

image=/tmp/a.jpg

targetWidth=100

targetHeight=100

#imagefile=${image##*/}

#info=$(convert $image info:)

#width=$(echo $info | awk '{split($3,size,"x");printf size[1];}')

#height=$(echo $info | awk '{split($3,size,"x");printf size[2];}')

#since we're resizing it doesn't matter what the original dimensions were

width=$targetWidth

height=$targetHeight

convert $1 -resize "$targetWidth"x"$targetHeight" -quality 90 $image

echo >> $port

echo exit >> $port

echo x >> $port

echo >> $port

echo debug >> $port

echo dsh >> $port

sleep 0.5s

#cat > /dev/null << EOL

cat >> $port << EOL

cd /tmp

cp /mnt/usb1/Drive1/lrz.gz .

gunzip lrz.gz

rm a.jpg

EOL

#sleep 1s

sleep 0.2s

echo ./lrz >> $port

sleep 0.2s

sz -b -L 512 $image < $port > $port

sleep 0.5s

#cat >/dev/null << EOL

cat > $port << EOL

exit

EOL

sleep 0.25s

cat > $port << EOL

14

14

0

0

0

1366

768

00000000

0

1e

2

/tmp/a.jpg

$width

$height

1265

667

$targetWidth

$targetHeight

0

0

ff

exit

x

EOL

To use this script, just call the script and pass it the name of the image.  You may want to adjust the script to resize the image to something slightly larger (adjust width and height variables to match) as the result turns a little fuzzy.  Alternatively you can dabble in image majick's convert options to apply some sharpening to the image.  If you're working with fixed sizes, you may just want to omit the convert part altogether, but use the commented-out section to read the width and height to avoid any accidents.