Wednesday, May 23, 2018

The road to Dreamcast 480p YPbPr

When I set up my current retro gaming area around 2013, I grouped the Dreamcast with the rest of the consoles of the generation it kicked off - the Playstation 2, the Gamecube and the XBOX.  That particular area has a dedicated CRT TV which natively supports all of the best resolutions those consoles have to offer.  Most games of the era max out at 480p, and all of those consoles have official support for 480p via Component/YPbPr except the Dreamcast.  The Dreamcast is absolutely capable of it, but until this week, all of my attempts to get 480p Component video out of the Dreamcast could be measured in degrees of failure.  If you just want to know how I finally did it, skip to the end. In the middle is the journey.

1999
The Sega Dreamcast was born during the earliest days of the transition from Standard Definition TeleVision (SDTV) to High Definition TeleVision (HDTV).  DVD was an up-and-coming technology which was driving the adoption of cleaner analog video technologies such as RGB and Component (YPbPr).  Though most households did not have the means to take advantage of those technologies in 1999, Sega seemed to be hedging their bets when they designed the Dreamcast's video output, and indeed some of the technology locked inside that little white box was well ahead of its time.

Interlacing
As consumer-level video technology improved in the late 90's in an arc towards HDTV, the first quality leap involved moving  from mixed signals such as Composite, to increasingly discrete signal transmission first with S-Video which separated color from brightness, and Component which separated brightness from color and the colors from each other.  The next step was the leap from "interlaced" to "Progressive Scan".  To thoroughly explain those terms would probably require several paragraphs, but I will spend a little time explaining the basic premise.  In an ideal and simple world, a television picture would be formed by drawing one horizontal line at a time from top to bottom until a whole frame was complete before starting over at the top to draw the next one.  Once upon a time in the early days of Television, engineering compromises were made.  I'm not entirely sure whether these compromises were made to cut down on bandwidth or to deal with slow cathode guns, but the engineers discovered that instead of drawing an entire screen from top to bottom, they could get almost the same effect in half the time and half the bandwidth by only drawing every-other horizontal line from top to bottom, starting over at the top and drawing the opposite lines from top to bottom.  So instead of drawing a whole frame at a time, they could draw a "field" of all of the even lines, followed by another "field" of all of the odd lines. Each field left gaps like the spaces between teeth in a comb, but when laid over top of each other, the "teeth" would mesh to exploit a property of human sight called "persistence of vision".  The screen was flickering so quickly as the teeth of the combs were interlocked, your eyes would sort of glue the two fields together and to your brain you would see a whole picture.  This is known as interlacing, and it's the reason that a SDTV image looks like it's bobbing up and down rapidly if you look at it up close.

Progressive Scan
Progressive Scan was sort of bringing us back towards that ideal state where an entire image is drawn top-to-bottom before the next one is displayed.  This has the effect of making the image appear more stable because it doesn't have the bobbing effect caused by alternating fields.  Actually, most 80's and early 90's game consoles tricked the CRT televisions into displaying a progressive image by always drawing odd or or even lines instead of alternating between them.  While this was never a ratified standard, it is commonly referred to as 240p, and it's what allowed those consoles to display a stable image on a TV that wasn't meant to do so - it's also what causes those characteristic "scan lines".  But when we talk about the turn of the century, Progressive Scan almost universally refers to 480p - which was a real ratified standard that not only created a rock solid image without flicker, but (arguably) doubled the horizontal resolution of the image.  The switch to 480p was a dramatic picture quality improvement, however it did not qualify as "high definition" because that term had been reserved for 720p and above. For this reason a new designation was given for this in-between format: Extended Definition TeleVision (EDTV) - a term that never really saw popular use.

In 1999 when the Dreamcast was released, progressive scan Televisions were on the horizon, but hadn't quite hit the market yet.  However almost every computer monitor available at the time did support progressive resolutions, so Sega's solution was to design a video output that could be configured to work with a PC monitor via a special adapter.  In 2000, I purchased one of these "VGA adapters" and connected my Dreamcast to a 17" PC monitor and I have to say the picture was unbelievably good - colors were more vibrant than ever, the image was razor sharp and lightning quick.  But a 17" PC monitor didn't really fit well in my gaming setup so I found myself falling back on the S-Video output to play on my television.

Consumer televisions capable of supporting 480p wouldn't be widely available until after the unfortunate demise of Sega's hardware business and therefore the Dreamcast.  So while all of the capabilities were right there in the Dreamcast, no one ever made official hardware to connect the Dreamcast to an EDTV to enjoy 480p on a larger screen.  While some early 480p televisions provided VGA inputs, it was hardly a common feature.

The Problem:
While the Dreamcast technically outputs everything needed to display 480p over component, some translation has to happen to make it work.  Firstly the Dreamcast has to be switched into "VGA mode" by grounding one of the pins on the AV out.  When it does this, the Dreamcast outputs video in a format called RGBHV - the "HV" part refers to the fact that horizontal and vertical sync pulses are delivered on separate channels.  However Component video requires a C-Sync which is the two pulses combined into a single channel.  The Dreamcast uses C-sync for everything else BUT VGA mode.  Activating VGA mode deactivates C-Sync.  So the next stage in the process needs to combine the H and V sync into C-Sync.  Lastly the color transmission needs to be converted from RGB to YPbPr.

My First Solution:
This was my first attempt at a Dreamcast 480p "box".
I hesitate to call my first solution a "success", though it did result in outputting 480p YPbPr from the Dreamcast to my TV, the picture was awful.

The first stage was the Dreamcast to VGA portion.  I initially used the Naki Dreamcast VGA adapter I bought back in the day but ended up buying a new Dreamcast VGA cable because the picture was too dark and I thought the box might be at fault (it wasn't). - what these adapters basically do is ground the "VGA Select" pin of the av-out and put the Dreamcast into VGA mode (RHBHV).

When I initially connected the VGA adapter to the VGA-to-Component adapter, the picture was very dark and hard to see.  Aside from trying another VGA adapter for the Dreamcast, I also ended up inserting a device called a "Gamma-X" as the second stage.  The purpose of this device is to boost brightness - and it did help, though not as much as I needed it to.

The third stage was a Monoprice VGA to Component YPbPr adapter.  There were several things wrong with this setup.  I lay most of it at the feet of the VGA to Component adapter.  The device was designed for maximum compatibility, not for the simple task I needed.  In order to always output a working 480p/720p/1080i/1080p signal, every single signal input was run through a scaler and the sync was regenerated.  This effectively crushed the contrast and introduced completely unnecessary scaling artifacts.

No matter what I did, I could never get the picture to look right.  Aside from not being progressive scan, the picture over S-Video looked waaaay better.

Forlorn Hope #1
Round about the time I was wrestling with this, the guys at HDRetrovision teased an image of a Dreamcast outputting 480p component video along with a blurb that they were in the early stages of working on a product that did exactly what I was looking for.  Unfortunately that was 2015 and as of the middle of 2018 they still haven't even really begun work on it.
The HD Retrovision cable that no one can actually buy.


Forlorn Hope #2
A couple of years ago I learned about The Behar Bros. (www.beharbros.com) - a couple of guys from Spain that produce a variety of output adapters for the Dreamcast.  They have several different types of boxes, including some that output directly to HDMI for a great signal on modern TVs.  They also make a replacement VGA adapter that will add artificial scanlines, and a simple sync-combiner etc...  Since most of their designs were clearly purpose-built for several different uses, I didn't think it would be unreasonable to reach out to them and ask if they could produce a box that just provided a straight-up 480p YPbPr output.  The first time I asked they were in the process of designing several new items and they told me to check back because they would soon have just the thing.  The second time I reached out about a year later, this is the response I received: "No, we don't have a component video solution. RGB is always better."  Not really, guys.

My Second Attempt
Emboldened by several recent successes in modding and a dawning understanding of circuit analysis, I decided that it would no longer be overly ambitious to think I could build my own adapter.  So I studied the problem for a couple of weeks, studied solutions to various pieces of it, made a plan, made a parts list, placed an order and got to work when it arrived.    My plan was to build my own sync-combiner and switch to throw the Dreamcast into VGA mode, but use an HDRetrovision Genesis Component cable to transcode the signal from RGBs to YPbPr.  It actually came together quite beautifully until I made a mistake and ended up burning out the HDRetrovision cable.  Not only are those things pricey, but it seems like it takes ages for them to be restocked.  That was a huge letdown, and i'm still not entirely sure what I did wrong - which tells me I still have quite a lot to learn.


My Final Solution
Simple Dreamcast VGA Cable

(Retrotek VGACTV1) VGA to YPbPr transcoder.


Amidst crying over my burned out HD Retrovision cable, I started re-exploring my options.  A lot has changed over the last few years since I started trying to do this.  I started by thinking I could use a sync-combiner that the Behar Bros. produced along with an RGB to YPbPr transcoder.

I'm currently using such a transcoder for my older 240p/480i systems, but I wasn't sure what 480p would do to it, and the seller had no idea either.  That led me to Retrotek on Ebay.

They sell a handful of specialty devices, including a RGB to YPbPr transcoder - which is what I went looking for in the first place, but somewhere along the line they also added a VGA to YPbPr transcoder they call the VGACTV1.

Unlike my general-purpose Monoprice adapter, this one is just a sync-combiner and transcoder - it doesn't do anything to scale or otherwise alter the resolution.  It does exactly what I had been trying to achieve all along.   The picture comes through sharp and clean with no obvious degradation at all - the Dreamcast is now a proper 480p console on my TV alongside its peers.

The Retrotek box is a little on the expensive side, but compared to how much I've spent over the last three or four years trying to make this happen and the fact that it not only works but works perfectly, it was a bargain.





1 comment:

SCSA said...

I have one of these Retrotek VGACTV1 to use with crt emudriver. Will this work with Dreamcast to get a Component image via a VGA cable?