Hi,
This topic to share my work on a USB device that can be used to control of TV image geometry from a PC.
The result is pretty hacky and have some limitations but it’s usable.
It can only work on TV/Monitors whose geometry is adjustable by a Service Menu. Maybe some of them, I suppose most of them.Proof of concept demo:
Sources:
https://github.com/silmalik/USB4CRTTarget : Target is image vertical size auto-adjustement upon running mame game.
How does it work ?Most recent CRT TV/Monitors use « I2C » bus for communication between chips. One of the chip, the Jungle IC, is responsible of resultant geometry.
The basic idea is to send specific I2C messages on the bus to adjust the image geometry on the fly.
So, using a programmed SoC to act like a USB to I2C brigde that allows some kind of I2C bus spoofing can do the job.
Side effects :Some messages travel on the I2C bus very frequently, most messages are just *useless* repetitions but other are required for some functions.
The bad news is that it’s not possible to send once an order for adjustment because after few time, the default value will be sent again upon the I2C bus and cancel customization.
A solution is to lock the bus once a custom message is sent (i.e. send an unstopped message).
Then, there are some side effects :
- NO MORE SOUND ! Argh ! --> Fixed using external speakers.
- The TV apears locked, no remote control, no front panel control
Sending a « stop » I2C message on the I2C bus and TV is back 100% responsive
The good effect is, of course, that the geometry can be adjusted in real time with same precision than with the Service Mode. Multiple variables can even be tweaked by sending adequat I2C messages to the TV.
Hardware employed: - Cypress 5LP PSoc Prototyping Kit (15-20€)
http://www.cypress.com/documentation/development-kitsboards/cy8ckit-059-psoc-5lp-prototyping-kit-onboard-programmer-and - A pair of 300 Ohms resistors and some wires.
- Optionally : a cheap (10-15€) USB Logic Analyzer, to sniff I2C bus (see below).
Required knowledge :This could be the fun part !
Well, there is no standart for I2C message used to control image geometry, it depends on the Jungle IC employed.
So, to know about this, 2 solutions :
1 – The easy way
- Explore TV Service Manual or directly the TV PCB to identify the jungle I2C chip (often Philips TDAxxxx).
- Then, with some luck, Google can find the chip specification document and all required informations should be
there (I2C address, registers and value ranges).
2 – The « have-a-guess » way :
- Use a USB Logic Analyzer to take some I2C bus traces and then analyze messages to learn how the TV chips speak. I had to follow this way, it's easier than it sounds.
Implementation :- Program the PSOC with the "USB4CRT" code (
https://github.com/silmalik/USB4CRT).
- Wire the PSOC to the TV PCB, only 3 wires are required.
The Sony, and probably most of TVs, has a kind of service connector, so, using « female jumper wires », no need to solder on the PCB.
One wire can be plugged directly on PCB, the 2 others need a resistor between the PSOC and the PCB.
Plug the micro USB to the PC, the device is seen as a COM port.
Usage :From PC, send I2C messages to COM port, with « [ » and « ] » for start/stop signals.
Example : « ECHO [8A1211][8A1309 > COM4 » adjusts vertical size and centering on a KV-29FX30
In this example, 2 messages are sent, the second is « unstopped » which has effect to keep the I2C bus in the busy state (Bus locked = IR remote down, etc.).
- 8A is the I2C Slave address
- 12 the Vertical Position register, 13 the Vertical Zoom
- 11 is the value. Increase/decrease this value makes the image goes up or down.
Sorry this massive message, thank you for reading.
If there is some interest, I have a bit more to share about integration in a Groovymame setup.