Tuesday, December 8, 2015

Composite Video from the Nintendo Gameboy

My latest project is to get some sort of video output from the nintendo gameboy. The signals are all present, but are not in a form that can be connected to any television or monitor. My first thought is to convert the signals into a single analog signal called composite video.

Composite video is named as such because it contains color data (chroma), brightness (luma) and synchronization on wire.

1. Chroma is not important in this case becuase the gameboy is monochrome. All of the color differences will be made with Luma.

2. Luma: As above, the Luma will be used to create our four different colors. The TV looks for an analog signal here. The gameboy has two data pins which are used for this purpose, so connected through a DAC of some sort, we can create four different levels rather than just 0v and 5v.

3. Sync
 Csync or composite sync is an XOR of horizontal and vertical sync. These two signals tell the television to move down one line or to move back to the top of the screen. I am not quite sure how progressive or interlaced are determined by these just yet.

Next, these have to be connected together over one wire. As mentioned, the luma is an analog value but what I forgot to mention was that it is a positive signal whereas sync is negative. From what I have read, composite must be AC coupled because the TV input is DC coupled. That being said, our sync can actually be positive as well, as long as the luma is offset by DC value. Once the signal goes into the TV, the DC coupling circuit will block the average DC offset which is our black level. Black level will become 0 volts inside the Tv so sync will become 0v to -0.4v and Luma will be between 0v and +0.7v.

I am not at liberty to share my schematic at this point but it doesn't' work that well anyhow. :P
As a first attempt however, the result is quite promising.

You will notice that the image scrolls in several directions and that it is repeated three times over from left to right. I believe this is a problem with synchronization and possibly the LCD itself.


Updates to follow shortly. 

4 comments:

  1. The scrolling is usually from improper sync levels, maybe buffer the sync to get a clean sync signal.

    ReplyDelete
    Replies
    1. both sync signals are buffered with an inverting buffer, becuase they need to be low enable when they come out high enable. The data signals are not buffered however, but they are converted to analog with a DAC, so even if they bleed together, they are still within the required voltage range.

      Delete
  2. Could also be the Hsync rate that is 8.6kHz and might need to be upped for a standard display?

    ReplyDelete
    Replies
    1. The signal is actually 9.2kHz, but I have had other comments asking for me to modify the frequency. I will first reduce it by half, which I think will stretch the image farther from left to right. I also suspect that my monitor is doing too much of the work; that is to say that it is ignoring sync sometimes and displaying what it thinks is best. If that is the case, then my sync is not working at all and the only picture I get is becuase my personal monitor. Some one else may not get the same results in this case.

      Delete