{"id":12425,"date":"2020-01-27T23:23:48","date_gmt":"2020-01-27T23:23:48","guid":{"rendered":"http:\/\/pcbjunkie.net\/?p=12425"},"modified":"2020-01-31T13:21:37","modified_gmt":"2020-01-31T13:21:37","slug":"sony-rgb-enable-modchip","status":"publish","type":"page","link":"https:\/\/pcbjunkie.net\/index.php\/projects\/sony-rgb-enable-modchip\/","title":{"rendered":"Sony RGB Enable Modchip"},"content":{"rendered":"\n<p>There are a number of good SONY CRT television sets. Some of these have an unused RGB input waiting to be tapped into. Sadly, if the input isn&#8217;t already utilized for a closed caption or a picture-in-picture function, it has been disabled in software.<\/p>\n\n\n\n<p>Sony Y\/C Jungles are updated with settings continuously as the set is powered on. The settings for the RGB input are updated as well. Based on my investigation with these TVs, there is no way to change the default value of this setting. Even modifying the setting in the EEPROM causes the microcontroller to override it. The only option is to modify the data before it gets to the Y\/C Jungle.<\/p>\n\n\n\n<p>This is the strategy with the Sony RGB modchip. The settings are passed to the jungle via I2C. The modchip listens for the appropriate code, and changes the bits accordingly.<\/p>\n\n\n\n<p>Here&#8217;s the pcb that I eventually developed for this purpose. All it is is a board that has the necessary headers for the I2C connections and power, voltage regulation for the MSP430, the microcontroller itself, a couple of LEDs and a transistor for changing the bits on the data line.<\/p>\n\n\n\n<figure class=\"wp-block-image size-large\"><img loading=\"lazy\" decoding=\"async\" width=\"1408\" height=\"1096\" src=\"https:\/\/pcbjunkie.net\/wp-content\/uploads\/2020\/01\/sony_rgb_modchip.jpg\" alt=\"\" class=\"wp-image-12940\" srcset=\"https:\/\/pcbjunkie.net\/wp-content\/uploads\/2020\/01\/sony_rgb_modchip.jpg 1408w, https:\/\/pcbjunkie.net\/wp-content\/uploads\/2020\/01\/sony_rgb_modchip-300x234.jpg 300w, https:\/\/pcbjunkie.net\/wp-content\/uploads\/2020\/01\/sony_rgb_modchip-768x598.jpg 768w\" sizes=\"auto, (max-width: 767px) 89vw, (max-width: 1000px) 54vw, (max-width: 1071px) 543px, 580px\" \/><\/figure>\n\n\n\n<p>I made a couple of videos on the subject. The first attempt was successful with a Sony XBR-51.<\/p>\n\n\n\n<figure class=\"wp-block-embed-youtube wp-block-embed is-type-video is-provider-youtube wp-embed-aspect-16-9 wp-has-aspect-ratio\"><div class=\"wp-block-embed__wrapper\">\n<iframe loading=\"lazy\" title=\"RGB modding a CRT TV for retro gaming, advanced hacking edition.\" width=\"525\" height=\"295\" src=\"https:\/\/www.youtube.com\/embed\/ANSxASanZes?feature=oembed\" frameborder=\"0\" allow=\"accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture; web-share\" referrerpolicy=\"strict-origin-when-cross-origin\" allowfullscreen><\/iframe>\n<\/div><\/figure>\n\n\n\n<p>The second attempt wasn&#8217;t, but I learned that different Sony Y\/C Jungles don&#8217;t use the same I2C protocol.<\/p>\n\n\n\n<figure class=\"wp-block-embed-youtube wp-block-embed is-type-video is-provider-youtube wp-embed-aspect-16-9 wp-has-aspect-ratio\"><div class=\"wp-block-embed__wrapper\">\n<iframe loading=\"lazy\" title=\"Enabling unused RGB input on Sony TVs via I2C code modification, Part 1.\" width=\"525\" height=\"295\" src=\"https:\/\/www.youtube.com\/embed\/uaKiQTjjI28?feature=oembed\" frameborder=\"0\" allow=\"accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture; web-share\" referrerpolicy=\"strict-origin-when-cross-origin\" allowfullscreen><\/iframe>\n<\/div><\/figure>\n\n\n\n<p>The current solution is as follows. Use an MSP430 microcontroller, to read the I2C communication and look for the RGB port setting. When the setting bits are in frame, modify them accordingly. <\/p>\n\n\n\n<p>Were&#8217;s looking for the register 0x88 and sub register 0x0C in which the last 2 bits (LSB) are the RGB setting. Here&#8217;s the relevant page from the datasheet.<\/p>\n\n\n\n<figure class=\"wp-block-image size-large\"><img loading=\"lazy\" decoding=\"async\" width=\"711\" height=\"772\" src=\"https:\/\/pcbjunkie.net\/wp-content\/uploads\/2020\/01\/sonyi2cmod-registers.png\" alt=\"\" class=\"wp-image-12451\" srcset=\"https:\/\/pcbjunkie.net\/wp-content\/uploads\/2020\/01\/sonyi2cmod-registers.png 711w, https:\/\/pcbjunkie.net\/wp-content\/uploads\/2020\/01\/sonyi2cmod-registers-276x300.png 276w\" sizes=\"auto, (max-width: 711px) 100vw, 711px\" \/><\/figure>\n\n\n\n<p>Here&#8217;s the schematic. Pin 1.7 of the MSP430 is used to pull down the bits of the I2C line down to a 0 for the relevant portion of the RGB register.<\/p>\n\n\n\n<figure class=\"wp-block-image size-large\"><img loading=\"lazy\" decoding=\"async\" width=\"1307\" height=\"572\" src=\"https:\/\/pcbjunkie.net\/wp-content\/uploads\/2020\/01\/sonyi2cmod-1.0.png\" alt=\"\" class=\"wp-image-12426\" srcset=\"https:\/\/pcbjunkie.net\/wp-content\/uploads\/2020\/01\/sonyi2cmod-1.0.png 1307w, https:\/\/pcbjunkie.net\/wp-content\/uploads\/2020\/01\/sonyi2cmod-1.0-300x131.png 300w, https:\/\/pcbjunkie.net\/wp-content\/uploads\/2020\/01\/sonyi2cmod-1.0-768x336.png 768w\" sizes=\"auto, (max-width: 767px) 89vw, (max-width: 1000px) 54vw, (max-width: 1071px) 543px, 580px\" \/><\/figure>\n\n\n\n<p>And here&#8217;s the code that makes this work:<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\">\/\/ Freeware with no strings attached, witout warranty. Use at you own risk for whatever you want.\n\/\/ 2018 pcbjunkie.net\n\n\/\/ This code can be used in Sony CRT TVs to enable unused RGB inputs on YC jungle chips\n\/\/ that have these inputs normally disabled. The jungle chip normally receives the code:\n\/\/ 0x88 0x0C 0xC5 to disable RGB switching completely.\n\/\/\n\/\/ 0x88 - YCJ receiver address.\n\/\/ 0x0C - BCUTOFF, DYCOL, RGB register.\n\/\/ 0xC5 - Typical value (may vary). Only last two LSB are of importance here.\n\/\/\n\/\/ The RGB bits in the value 0xC5\n\/\/ are the last 2 least significant bits, 0bCCCCXDAB where X=don't care and AB is\n\/\/ typically 01. CCCC is the blue CUTOFF value, and D is the DYCOL bit.\n\/\/\n\/\/ The code for RGB switching is as follows:\n\/\/\n\/\/ A B Mode\n\/\/ - - -----------------------------------\n\/\/ 0 0 YS pin switches between TV and RGB\n\/\/ 1 0 Selects external RGB inputs.\n\/\/ X 1 Selects TV mode\n\n\/\/ The code will monitor the I2C communication to the YCJ chip and when the 0x88 0x0C\n\/\/ configuration code is detected, the last two bits of the following byte will be forced\n\/\/ low by pulling the SDA line low for two SCL cycles.\n\n<stdio.h><stdlib.h><string.h>\/\/ pins definition\n#define PIN_YS_SELECT BIT7\n#define PIN_SDA_PULLDOWN BIT3\n#define PIN_SDA BIT4\n#define PIN_SCL BIT5\n#define PIN_LED_DATA BIT0\n#define PIN_LED_MATCH BIT6\n\n\/\/ search and replace variables, look for this pattern\nunsigned const int match_pattern = 0x880c;\n\n\/\/ force low these bits following matched pattern (0 = force low, 1 = don't care)\nunsigned const char replace_pattern = 0b11111100;\n\n\/\/ I2C decoder variables\nconst int STATE_START = 1;\nconst int STATE_STOP = 2;\n\nvolatile unsigned long wtdisrcount = 0;\n\nvoid init(void)\n{\n\t\/\/ slow clock init\n\tDCOCTL = 0x00;\n\tBCSCTL1 = 0x00;\n\n\tWDTCTL = WDTPW + WDTHOLD;    \/\/ Stop WDT\n\n\t\/\/ set pulldown, and led pins as output\n\tP1DIR = PIN_SDA_PULLDOWN | PIN_LED_DATA | PIN_LED_MATCH;\n\n\tP1OUT &amp;= ~PIN_LED_DATA;\n\tP1OUT &amp;= ~PIN_LED_MATCH;\n\n\t__delay_cycles(500);\n\n\t\/\/ fastest clock now -- all bits set on DCO and RSEL, but no MOD\n\tDCOCTL = (DCO0 | DCO1 | DCO2);               \/\/ DCOx = 7\n\tBCSCTL1 = (RSEL0 | RSEL1 | RSEL2 | RSEL3);   \/\/ RSELx = 15\n\n\t\/\/ calibrated clock -- but we don't care about precision, just want the fastest possible\n\t\/\/ BCSCTL1 = CALBC1_16MHZ;      \/\/ DCO range set to 16 MHz\n\t\/\/ DCOCTL = CALDCO_16MHZ;       \/\/ DCO frequency set to 16 MHz\n\n}\n\nvoid main(void)\n{\n\tregister unsigned int lastp1;\n\tregister unsigned int thisp1;\n\tregister int state;\n\tregister unsigned int val;\n\tregister unsigned int bitsleft;\n\n\tregister int matched;\n\tregister unsigned int pattern;\n\n\tinit();\n\n\tthisp1 = P1IN;\n\tlastp1 = thisp1;\n\n\twhile(1){\n\t\t\/\/ loopcnt++;\n\t\tlastp1 = thisp1;\n\t\tthisp1 = P1IN;\n\n\t\t\/\/ P1OUT ^= PIN_SDA_PULLDOWN;\n\n\t\t\/\/ look for a start condition, SDA falling edge while clock high\n\t\tif ((thisp1 &amp; PIN_SCL) &amp;&amp; (lastp1 &amp; PIN_SDA) &amp;&amp; !(thisp1 &amp; PIN_SDA)){\n\t\t\tstate = STATE_START;\n\t\t\tval = 0;\n\t\t\tbitsleft = 8;\n\t\t\tmatched = 0;\n\t\t\tP1OUT |= PIN_LED_DATA;\n\t\t\tP1OUT &amp;= ~(PIN_LED_MATCH | PIN_SDA_PULLDOWN);\n\t\t}\n\n\t\t\/\/ if SCL rising edge while state = STATE_START, capture data\n\t\telse if (state == STATE_START){\n\t\t\t\/\/ rising edge of clock\n\t\t\tif (!(lastp1 &amp; PIN_SCL) &amp;&amp; (thisp1 &amp; PIN_SCL)) {\n\t\t\t\tif (bitsleft){\n\t\t\t\t\tval = val &lt;&lt; 1;\n\t\t\t\t\tif (thisp1 &amp; PIN_SDA){\n\t\t\t\t\t\tval = val | 1;\n\t\t\t\t\t}\n\t\t\t\t\tbitsleft--;\n\t\t\t\t}\n\t\t\t\telse{\n\t\t\t\t\tbitsleft = 8;\n\t\t\t\t\tP1OUT &amp;= ~PIN_SDA_PULLDOWN;\n\n\t\t\t\t\tif (val == match_pattern){\n\t\t\t\t\t\tmatched = 1;\n\t\t\t\t\t\tP1OUT |= PIN_LED_MATCH;\n\t\t\t\t\t\tpattern = replace_pattern;\n\t\t\t\t\t}\n\t\t\t\t\telse matched = 0;\n\t\t\t\t}\n\t\t\t}\n\t\t\t\/\/ falling edge of clock, do the pulldown here\n\t\t\telse if ((lastp1 &amp; PIN_SCL) &amp;&amp; !(thisp1 &amp; PIN_SCL)) {\n\t\t\t\tif (matched &amp;&amp; bitsleft){\n\t\t\t\t\tif (!(pattern &amp; 0b10000000)){\n\t\t\t\t\t\tP1OUT |= PIN_SDA_PULLDOWN;\n\t\t\t\t\t\t\/\/ testing\n\t\t\t\t\t\t\/\/ P1DIR |= PIN_SDA;\n\t\t\t\t\t\t\/\/ P1OUT &amp;= ~PIN_SDA;\n\t\t\t\t\t}\n\t\t\t\t\tpattern = pattern &lt;&lt; 1;\n\t\t\t\t}\n\t\t\t\telse{\n\t\t\t\t\t\/\/ pulldown off unless matching and patters agrees\n\t\t\t\t\t\/\/ P1DIR &amp;= ~PIN_SDA;\n\t\t\t\t\tP1OUT &amp;= ~PIN_SDA_PULLDOWN;\n\t\t\t\t\t\/\/ testing\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\t\/\/ WDTCTL = WDTPW + WDTCNTCL;\n\t}\n}<\/string.h><\/stdlib.h><\/stdio.h><\/pre>\n\n\n\n<p>Some links to other Sony datasheets are <a href=\"https:\/\/pcbjunkie.net\/index.php\/resources\/sony-y-c-jungle-datasheets\/\">here<\/a>.<\/p>\n\n\n\n<p>I do have the board gerbers if anyone wants to give this a shot with their own TV. Contact me if you want to get a pcb from me.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>There are a number of good SONY CRT television sets. Some of these have an unused RGB input waiting to be tapped into. Sadly, if the input isn&#8217;t already utilized for a closed caption or a picture-in-picture function, it has been disabled in software. Sony Y\/C Jungles are updated with settings continuously as the set &hellip; <\/p>\n<p class=\"link-more\"><a href=\"https:\/\/pcbjunkie.net\/index.php\/projects\/sony-rgb-enable-modchip\/\" class=\"more-link\">Continue reading<span class=\"screen-reader-text\"> &#8220;Sony RGB Enable Modchip&#8221;<\/span><\/a><\/p>\n","protected":false},"author":1,"featured_media":0,"parent":69,"menu_order":0,"comment_status":"open","ping_status":"closed","template":"","meta":{"footnotes":""},"class_list":["post-12425","page","type-page","status-publish","hentry"],"_links":{"self":[{"href":"https:\/\/pcbjunkie.net\/index.php\/wp-json\/wp\/v2\/pages\/12425","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/pcbjunkie.net\/index.php\/wp-json\/wp\/v2\/pages"}],"about":[{"href":"https:\/\/pcbjunkie.net\/index.php\/wp-json\/wp\/v2\/types\/page"}],"author":[{"embeddable":true,"href":"https:\/\/pcbjunkie.net\/index.php\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/pcbjunkie.net\/index.php\/wp-json\/wp\/v2\/comments?post=12425"}],"version-history":[{"count":6,"href":"https:\/\/pcbjunkie.net\/index.php\/wp-json\/wp\/v2\/pages\/12425\/revisions"}],"predecessor-version":[{"id":13495,"href":"https:\/\/pcbjunkie.net\/index.php\/wp-json\/wp\/v2\/pages\/12425\/revisions\/13495"}],"up":[{"embeddable":true,"href":"https:\/\/pcbjunkie.net\/index.php\/wp-json\/wp\/v2\/pages\/69"}],"wp:attachment":[{"href":"https:\/\/pcbjunkie.net\/index.php\/wp-json\/wp\/v2\/media?parent=12425"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}