The Story Behind The TVGuardian Curse Catcher

The recent flurry of videos and posts about the TVGuardian foul language filter brought back some fond memories. I was the chief engineer on this project for most of its lifespan. You’ve watched the teardowns, you’ve seen the reverse engineering, now here’s the inside scoop.

Gumby is Born

TVG Model 101 Gumby (Technology Connections)

Back in 1999, my company took on a redesign project for the TVG product, a box that replaced curse words in closed-captioning with sanitized equivalents. Our first task was to take an existing design that had been produced in limited volumes and improve it to be more easily manufactured.

The original PCB used all thru-hole components and didn’t scale well to large quantity production. Replacing the parts with their surface mount equivalents resulted in Model 101, internally named Gumby for reasons long lost. If you have a sharp eye, you will have noticed something odd about two parts on the board as shown in [Ben Eater]’s video. The Microchip PIC and the Zilog OSD chip had two overlapping footprints, one for thru-hole and one for SMD. Even though we preferred SMD parts, sometimes there were supply issues. This was a technique we used on several designs in our company to hedge our bets. It also allowed us to use a socketed ICs for testing and development.

The Gumby Light, Easy to Carry on Business Trips

The Model 101 case received some jabs in the video, and deservedly so. The case mold was made before my involvement, but the original prototype we received was in a box that was too expensive to use in production, and it had a locking door on the back which ostensibly prevented one from unplugging the cables. At the time, our client had licensed at least one other flavor of the box called Curse Free TV ([foone] obtained one of those in their collection), and this required a mold insert to change the branding. I can’t remember the details of why there was the unused RF input, but it was either a regulatory requirement or just a consequence available modules on the market in the 1990s. My colleague fashioned a unique version for travel that was flat (without the RF modulator). We called it “Gumby Light”.

Portion of PIC Assembly that samples Line 21

One non-obvious thing I’d like to mention about the Zilog Z86129 CC/OSD chip is that it was only half-used. The ‘129 was made to work as a stand-alone CC processor, and had no provision to access to the decoded CC data stream. Gumby’s design completely ignored this half of the chip, and used the ‘129 as an OSD generator only. Instead, the original designers thresholded line 21 data and shifted it into the PIC using really clever/evil assembly language. There were 96 pairs of bit test / bit set instructions, each executing in the same amount of time regardless of whether the CC data slicer comparator was high or low.

As [Alec] pointed out in his video, there was a switch that turned off filtering, changing the box into an external CC decoder. There was a minor demand for this functionality during all the years these products were sold, and all the designs retained this capability. Despite the FCC mandate for all new TVs to have a built-in closed caption decoder, some viewers with older or small TV sets still wanted captions and ordered these models just for that purpose.

Foul Language Dictionary

When I watched [Ben Eater] start to connect up the serial EEPROM to pull out the curse words, I was reminded of a funny incident during the production ramp-up of Gumby. The manufacturer asked to approve an alternate supplier for this EEPROM. After I checked the data sheet and a few samples, I authorized the request. Soon afterwards, they came back with a mysterious failure. We quickly tracked the problem down to the EEPROM, and realized that the data was all scrambled. But strangely, I could reprogram it and it worked fine. I clearly remember a phone call with a lady from the service company that we used to program the chips. They were following the correct procedure, getting the correct checksums, and we were baffled. There was a long pause, and she suddenly broke the silence,

“You know, it’s none of my business, but there are a some really bad words here in your hex file”.

In response to that incident, I implemented a cursory scrambling of the text, not for encryption, but so someone casually browsing the data wouldn’t be hit by a screenful of cussing. Alas, the unit [Ben] dismantled was manufactured before this.

We did ultimately find the problem with the EEPROM. The substitute had a block programming mode that put the contents into memory in a different sequence than the Microchip 93LC86 did. This was not implemented in all chip programmers, nor documented in the data sheet, but was discovered upon requesting further programming documents from the manufacturer.

Daisy and Oliver

Model 201 Oliver (credit: Family Safe Media)

Once Gumby production was underway, the search was on for a new design that could handle new features, expanded I/O options like S-Video, digital audio, and multiple inputs. This turned out to be much more challenging than anyone thought. While chip manufacturers had various options for handling CC, they were focusing their efforts on digital video. It was clear that analog CC was on the decline. The Zilog ‘129 and its sister chips were very tempting contenders. At heart, they were really a DSP / microprocessor with custom masked-ROM firmware. We explored the option of using that in a new design with modified firmware. Gaining Zilog’s cooperation was tough, and when we learned the chip’s ROM was already filled to capacity, we gave up on that approach.

Model 301 Daisy (credit: Family Safe Media)

We finally stumbled on the Painter chip by Philips Semiconductor that was too good to pass up. It was a complete MCU (8051) with all the CC circuitry built-in and came with libraries for CC and user menu OSD. I wrote about this chip in my previous article on analog Closed Captions. Despite being told the part was “secret”, we eventually got permission to use it. This was my first, but sadly not last, encounter with the concept of a part and its support being so complicated that the manufacturer is very selective about who they can use it. Despite this hurdle, the team at Philips were great to work with. The Painter design formed the basis of three set top box models:

  • Model 201 Oliver (2004)
  • Model 301 Daisy (2004)
  • Model 401 Oscar (2010)
Two-board FR1/FR4 Solution was less expensive

The Oliver and Daisy designs, names also of unknown origin, were both based on the Painter chip, but with differing number of inputs. Daisy only had one and Oliver had two. Digital audio turned out to be easy to mute. It was no different than muting analog audio, except using different connectors. In both cases, audio being muted by interrupting the signal with a CMOS 4066 analog switch. Originally both designs used a single board, but our contract manufacturer requested a two-board solution to save costs. The connectors were mounted on a single-sided FR1 board, and therefore the main four-layer FR4 board was able to be smaller. It surprised us that adding the inter-board connectors and the extra processing was cheaper, but that’s the way the numbers added up.

Model 401, Oscar (credit: Family Safe Media)

That case mold insert came in handy for the Daisy version, since we could used that area for a membrane keypad overlay. Oscar, just another name starting with the same letter as Oliver, wraps up the analog series of set top boxes. It was just a PCB re-spin, made years later in 2010, using a different enclosure and probably the very last inventory in the world of Painter chips.

Macrovision

As good as it was, the Painter solution had a few issues in a set top box application. It was designed to exist inside a TV set, and required stable horizontal and vertical sync signals. We had to make this external to the chip. This would normally be a straightforward design but was complicated by the need to tolerate Macrovision’s Analog Copy Protection (ACP) scheme of the day. ACP existed in various flavors, all of them inserted extra sync pulses of varying amplitude in the vertical blanking interval (VBI) of the video. Ostensibly, these pulses wouldn’t mess with the high-Q tank synchronization circuit of a television set, but caused havoc on the sync and AGC circuits of VHS recorders. The PIC design we inherited in Gumby tolerated Macrovision in firmware, but wasn’t perfect. This worried me, because ACP methods were numerous and subject to change. I didn’t want to test against all different forms that the set top boxes might encounter in the field. So I chickened out on this part of the circuit design and bought a solution off-the-shelf in the form of the Elantec (now Renesas) EL1883 sync separator chip, passing the buck as it were.

A second but minor issue was that like the Zilog chip, normal CC module usage was as a stand-alone black box with no access to read / modify the data stream. But this being implemented in firmware, it was easy to hack around. We were able to grab and alter the data before presenting it to the CC decoder function.

Reference to Keil Encrypted Source Files (from obsolete Philips manual)

The Painter support firmware provided by Philips was not entirely pre-compiled libraries. There were some aspects of the build that required re-compilation of certain proprietary source code files, depending on features needed by the application. Philips provided these files as encrypted source code and a decryption tool in the form of a Windows DLL named C51_RD.dll. They cooperated with Keil so that the compiler knew to make use of this decryption algorithm whenever a file with an .ec extension was encountered. I presume this ability must no longer be part of Keil, since I cannot find any mention of it online in 2022.

On the Trailing Edge

Factory Test Screen for Adjusting Vsync Pulsewidth

While the ‘1883 solved the Macrovision problem, there was one hiccup. The leading edge of the VSYNC signal was precisely specified, but the falling edge was not — in other words, the pulsewidth of VSYNC was not controlled. In fact, it varied quite a bit from chip to chip. This was not good, because the Painter’s CC decoding synchronized on the trailing edge of VSYNC. It turned out that the pulse width could be tweaked by changing the value of an external resistor Rset.

We dealt with this by adding a factory calibration step. The Painter would measure and display VSYNC pulse width the operator, and the operator would adjust the width up and down using two test fixture buttons until the pulse width reached the desired value, the Painter changing the effective Rset value using a PWM output. We collected over a thousand of these settings during the first production in 2004 in order to characterize the spread, both out of curiosity and at Elantec engineering’s request.

Observed Probability Distribution of Vsync Variations

Fully Digital? Project Herbert

The set top box design remained stable for many years and the project eventually wound down. The advent of digital television and video made the technology in these units obsolete. Or so I thought. In 2010, I was asked to undertake a new design using HDMI video. The TVGuardian inventor [Rick Bray] had discovered that most HDMI video sources continued to provide simultaneous analog composite video output with the CC signal. Thus began the design of a new set top box I named Herbert — a random name starting with an “H” standing for HD video.

Testing the First Herbert Prototype on the Bench

Entering the world of HDMI video designs is not for the faint-hearted. The entry price is painful, with steep annual membership required in both the HDMI and HDCP organizations along with per-unit royalties — those were in fact actually reasonable. None of the available HDMI chips had support for CC, since there is no CC data transmitted over the HDMI interface, a point I discussed in this article. We eventually selected the ADV7623 from Analog Devices, an HDMI repeater chip with support for OSD text and icons. This was one of those parts that came with the promise of minimal or no support from the manufacturer, especially since I was trying to use it in a way it wasn’t intended — that is, dynamically changing text instead of fixed OSD.

Model 501, Herbert (credit: Family Safe Media)

The Analog Devices engineers turned out to more helpful that we expected. While it was a long and frustrating hack, I eventually figured out the various hidden and undefined behaviors of the OSD system and made it work. Besides the original goal of making a CC decoder, another client in Korea wanted to use this chip to generate a scrolling text crawl along the bottom of the screen. Naturally, he wanted both English and Korean text (Hangul). That was another fun hack as well, generating foreign language glyphs and moving them smoothly one pixel at a time across the screen. The Herbert platform supported the TVG Model 501 product, and a few other niche applications that needed dynamic OSD overlay on HDMI.

Not a Telephone Jack

One interesting accessory I designed, but was never sold, was a center-channel audio muting switch for use with surround sound systems. There is an 6P6C modular connector on the back of Herbert providing auxiliary power and muting signals for this accessory. The idea here is that 95% of movie dialog comes in the center channel speaker, and the mute is less jarring when only the words are muted and other background sounds are preserved. I avoided needing to decode, tinker with, and re-encode the surround sound signals by just switching the wires going to the center-channel speaker. However, this was a pretty expensive module — it used relays to mute the audio, and switched in 8-ohm power resistors when muting in order to trick the amplifier into thinking the speaker was still connected. Otherwise, some amplifiers would sense a fault and shut down.

“Wow You” and “Oh Crud”

Herbert Factory Test Station Two

Factory testing needed a long repeatable source of closed captioning which included filthy words. In the very beginning, the factory used VHS copies of South Park animated sitcoms. Later on, I experimented with various custom VHS tapes, DVD movies, and even a computer with dual CC generator cards installed. I finally settled on making two custom DVDs. These had a video color bar test pattern and line 21 data containing words that alternated between cussing and not. These are the WOW YOU and OH CRUD test discs — two different discs/phrases were used so the operator could distinguish channel 1 from channel 2. A full setup for testing Herbert input used two DVD/BD players providing HDMI video, and two DVD players containing the CC discs generating the composite video. For outputs, a monitor was used to check the HDMI output, an oscilloscope with an optical to coaxial digital adaptor was used to check the muting, and a pair of LEDs were used to check the never-used auxiliary connector.

Bunny and Project Sally

All these experiences with closed designs and specialty chips really bothered me, and I continued searching for alternatives. On the HDMI side, I was really interested in applying the techniques developed by [Bunnie Huang] for NeTV, which we covered back in 2012. I experimented with his development kit, but alas I could not convince any of our clients to take the perceived legal risk of using his approach in a product.

Project Sally in Development

I had more success with an internal design I called Sally — boringly named because “S” stood for for SD video. I was inspired by various Arm-based projects which were generating VGA signals directly for retro games. But it seemed to me that these wasted a lot of memory storing with pixel buffers. Then one day I realized that a timer-counter register could serve as the destination for a DMA transfer (on an LPC1768 at least). This meant you could store pixel data much more efficiently in a run-length encoding manner. A line of pixels was just a short buffer of amplitudes and timer durations. I built and demonstrated this approach, successfully generating test video patterns or CC signals. It could also synchronize with an incoming video signal for doing overlay of menus and CC data. Alas, this design never made it into production, but I may revisit this in a future writeup.

Recent Videos and Posts about TVGuardian

23 thoughts on “The Story Behind The TVGuardian Curse Catcher

  1. I agree with you. I live in Europe too, and I am amazed to see at what lengths it can go just to avoid a bunch of words we use everyday anyway…. when in the same country, a 12 yo boy can legally buy and walkaround with a gun, but no alcohol….. go figure.
    But the technologic aspect of this thing is very interesting

  2. Hakarl (rotten shark) is from Iceland, which is Europe. I agree on the school shootings. And orthodox christians won’t agree this is a waste of power.
    Also, our continent having >50 languages and us being a lot later with CC compared to the USA makes such a device a lot harder sell.

  3. I live about an hour from Rogers, Arkansas. When these were developed and released they were massive in my area (Bible Belt… sigh…) and you can still find these devices scattered among various flea markets and yard sales. I was always curious how they actually intercepted the CC stream but between the teardowns and this article I get it now. Very ingenious in the implementation, and did I read that later models are technically stripping Macrovision internally?

    1. I read it as they had to ensure that it was a pain to ensure Macrovision didn’t cause problems for TV Guardian, and that it wouldn’t remove it. If a TVG box also acted as a Macrovision remover, they would have been *very popular* for people copying tapes and DVD to tape, especially the models with S-Video ports.

    2. I vaguely remember that Macrovision was removed when the unit was operating in its normal modes. I don’t think that was intentional to make the thing a Macrovision remover, but was just a side effect of how the video synchronization CC deciding circuitry worked. When you put the unit in “just a CC decoder mode”, for example (the Zilog ‘129 does it all), then the Macrovision was not blanked, although it easily could have been. Because of this, I don’t think the original engineers were intentionally sneaking that “feature” into the box. But I’ll ask and see what I can find out.

  4. I agree with other commenters. Write-ups like this, documenting how things came to pass and the decisions and trade-offs made, are interesting. Thank you.

    In case you are reading the comments, I am curious about what did you and the other developers actually thought about what you were doing? Did you agree with the goals of keeping these words off the air? Did you think it was a bit silly but paid money and presented interesting technical challenges? Did what you thought about it change over time? The answers to those questions, I think, add another dimension to histories of product development such as these devices.

    1. I don’t think any of the team members wanted to “keep these words off the air”. Rather, this was a tool that someone could voluntarily use in their home if they wish. A lot of reporting on this technology at the time seemed to miss this key distinction.

      The idea behind this product was to filter a small subset of movies and TV programs that were substantially “family friendly” but had a handful of gratuitous cuss words thrown in here and there. My understanding is that a G-rated movie was a financial kiss of death to a movie. Producers and studios would often make adjustments to the dialogue to bump a movie to PG-13 for that reason alone.

      Stories about using this technology with movies like Pulp Fiction are indeed funny, but miss the point. That wouldn’t be a movie most families would sit down to watch with their elementary school kids. In fact, Pulp Fiction wasn’t even a good movie to test with, because it could mute continuously for minutes at a time!

      My opinion didn’t change over time while working on this project. I was and am opposed to censorship by a broadcaster or media company. But there’s a huge difference between censorship, someone else telling you what you can and can’t watch / read / listen to, and “self censorship” when a person is voluntarily selective in what media they consume.

      One night in college I ate an entire box worth of pistachio pudding in one sitting, and needed major abdominal surgery the next day (completely unrelated to the pudding). To this day I won’t buy or eat pistachio pudding, but I’m quite opposed to grocers banding together to forbid its sale.

      You are correct about this being a technically challenging and interesting project. And there is another aspect of this story not discussed here — that is, several years of integrating this technology into various consumer products like TVs, VHS / DVD players, combo units, etc. The added experience of working with engineering teams across Asia and Europe made this project one of the most enjoyable of my career, Hackaday Contributor aside. Maybe I’ll write a part 2 about that.

      1. Chris, thank you for the thoughtful response. That makes sense. I understand and agree with your position.

        I hope I didn’t offend you as that wasn’t my intent. You were a person that had the opportunity to work on a [slightly] contentious project (ok, perhaps I remember ridiculing devices like them – and the V-chip in my ignorant youth) and I was curious as to how someone inside that project saw it.

        Looking forward to your second part.

        1. Yeah I’d much prefer people to opt-in with a box that they can buy and control, than have the broadcaster just censor anything that *they* think might “cause offence,” whatever that means. This is my biggest concern with streaming services – it’s way too easy for the broadcaster to arbitrarily decide what is acceptable, censor old shows, add new content, or just delete scenes to make room for more minutes of advertising.

  5. Ha ha, reminds me of a program I wrote in the late 80’s that, using ELISA technology (basically, BASIC and if-then statements) seemed to have a conversation with you in regards to buying the company’s products. It had a bad language detector (with every bad thing I could think of) and if you used it it would cut you off and say that it didn’t want to converse with you anymore. Needless to say I could not show anyone the source code. We had that setup at COMDEX on several computers and observing from a distance, I was amazed by how many people swore at the computers and then jumped away startled when the program complained about it.

  6. I am fascinated by the market for this product – on the one hand, it was big enough for to support five iterations, on the other small enough that the broadcast regulators never interceded to regulate the dubbing/closed captioning. Being nosy, I’d love it if you could share any idea of the volume sold, and margins? Was it a money spinner for the original inventor?

    1. Terry Pratchett made a reference to that in one of the Discworld books. Something about changing the lyrics to a song from she sits among the cabbages and peas to she sits among the lettuces and leaks.

  7. One anecdote that didn’t make the article was about the remote control on the first units. We were meeting with an engineer from a supplier who was providing a remote control tailored to our project. Out of curiosity, we asked him if we could look at the insides and see the circuitry. He said “No problem, I’ll be right back”, and left the room. We were puzzled, and a few seconds later we heard loud WHACK sound from the hallway. A minute later the engineer came back into the room and showed us the circuit board.

    I couldn’t help but ask, what was that loud sound we heard? He sheepishly admitted it was him, opening up the plastic case of the remote. He didn’t have any tools with him, so he just gripped it firmly and slammed it into the wall, splitting open the case. I guess he didn’t think that was a “proper” thing to do in front of customers.

    1. LoL Hey, good on him for doing his best to keep things professional!

      BTW, I’d love to see a Part Two of this story, if nothing else but to compare notes on how companies and their engineers or sales & service departments are these days. I’ve had pretty great personal experiences with TI, NXP, Atmel, Microchip, and many others, over the past couple of decades.

  8. I can’t help but wonder how many people working on anti-spam (like Akismet used right here on Had) and language filtering systems saw this in their formative years and learned anything from it on the human side.

  9. This was a great article I just stumbled onto in my newsfeed, my family were avid users of the TV guardian and your description of the use case fits us exactly.

    It’s surprising how many otherwise family-friendly movies have been padded deliberately with foil language to bump rating into the next bracket.

    From the end user perspective, me and my brothers who were teenagers at the time got quite adept at translating “TVG-speak” on the fly in our brains as we watch movies, we knew exactly what “tais” and “hugs” meant and even Incorporated those words into our conversations with each other as a sort of cipher : )

    One thing I’d be interested in hearing about in a round two, is whatever Warner Brothers did with their closed captioning that didn’t follow the standards. TVG was often hit or miss with its ability to filter movies from that studio.

    There’s much more to be said with regards to technology, copyright protection, and the ability for end users to choose which content they consume, especially in the digital era (see VidAnge), but I appreciate this write-up.

Leave a Reply

Please be kind and respectful to help make the comments section excellent. (Comment Policy)

This site uses Akismet to reduce spam. Learn how your comment data is processed.