AD724 on a Sega Genesis (in same color issue)

Discussion in 'Modding and Hacking - Consoles and Electronics' started by segasonicfan, Jul 21, 2018.

  1. segasonicfan

    segasonicfan Robust Member

    Joined:
    Sep 23, 2011
    Messages:
    261
    Likes Received:
    40
    So I've been working with this video encoder for some time, and it's really good quality IMO.

    I designed my own PCB with it which is coming along nicely. It works with other systems but for some reason the colors freak out when using Sega Genesis.

    Here are some videos I took of the issue. Oddly enough, during some portions of the Battle Mania 2 intro the colors look fine.

    Battle Mania 2:


    Sonic Spinball:


    GBA (working fine with the godawful Sonic port, lol):


    I'm guessing it's an issue with the voltage divider and or needing to increase the input capacitance. But does anyone have any thoughts for a good way to debug this?

    Any help is greatly appreciated!

    -Segasonicfan
     
  2. Bad_Ad84

    Bad_Ad84 The Tick

    Joined:
    May 26, 2011
    Messages:
    8,566
    Likes Received:
    1,308
    Need more info.

    Got a schematic of what you are doing? What is in the signal path on the output? What's the voltage measurement in your video of?
     
  3. rama

    rama Gutsy Member

    Joined:
    Dec 17, 2015
    Messages:
    477
    Likes Received:
    112
    The horizontal wavering (best seen on the right border of the picture in video 1) is concerning.
    If the TV can't establish a lock on the horizontal pulses, it will misplace the black level clamp and decode colors wrong.

    In addition, the encoder clamps RGB on its inputs as well and that circuit must be according to the datasheet as well.
    I don't know what you designed there, but if it's just random value coupling capacitors and "whatever works" termination resistors, then it will definitely screw this up.

    Encoding the RGB of Mega Drives is probably super tricky.
     
  4. segasonicfan

    segasonicfan Robust Member

    Joined:
    Sep 23, 2011
    Messages:
    261
    Likes Received:
    40
    Thanks for the replies!
    My bad on not including files. Schematics and datasheet attached.

    I'm using standard 75ohm termination resistors. Everything is following the datasheet.

    On further inspection, I do notice that the colors for the GBA are actually a bit off. Everything seems very "primary" colors-ish, i.e. not enough detail/gradients.

    The voltage in the picture is from the Red output coming from the Genesis. (DC measured to GND)
    datasheet says zero to 714mV AC-coupled inputs, so Im thinking maybe thats the issue.
     

    Attached Files:

  5. Bad_Ad84

    Bad_Ad84 The Tick

    Joined:
    May 26, 2011
    Messages:
    8,566
    Likes Received:
    1,308
    Sounds like you need a voltage divider on the inputs of the video encoder.

    2v is way too high.
     
  6. segasonicfan

    segasonicfan Robust Member

    Joined:
    Sep 23, 2011
    Messages:
    261
    Likes Received:
    40
    Thanks. That was my feeling as well. But I'm not sure how to go about it because:
    1) doesn't it still need to be 75 on termination? Or maybe I should just copy the Genesis voltage divider design... (attached)
    2) how do I go about selecting a different capacitor value (if needed) on the input?

    It's surprising to see that the decoupling capacitors for the Genesis are quite low (0.022uF)... I wonder how they came up with that value?
     

    Attached Files:

  7. Bad_Ad84

    Bad_Ad84 The Tick

    Joined:
    May 26, 2011
    Messages:
    8,566
    Likes Received:
    1,308
    the output of the amp will still have the 75ohm termination. You just need to get the levels right going into the amp.

    Really you want a scope and something like 240p test suite showing white so you can measure the peaks properly. From there you can work out your voltage divider.
     
  8. rama

    rama Gutsy Member

    Joined:
    Dec 17, 2015
    Messages:
    477
    Likes Received:
    112
    I agree. You really need a scope for this.

    The datasheet also talks about the digital sync requirements.
    Logic low was 1.0V (from memory) so that could be borderline on an MD as well.

    Copying the Genesis circuit could work well but I think they adjust for 1.0Vpp inputs into the original CXA1145.
    The 3 coupling capacitors are a function of the encoders input impedence and some other stuff I don't really understand.
    Use the recommended value from the datasheet ;)

    Edit:
    You seem to be using CSYNC into the AD724, right?
    If I understand that datasheet correctly, you're then supposed to pull VSYNC in high all the time, not input an additional VSYNC signal.
     
    Last edited: Jul 21, 2018
  9. segasonicfan

    segasonicfan Robust Member

    Joined:
    Sep 23, 2011
    Messages:
    261
    Likes Received:
    40
    there is a 10k pullup in the schem for VSYNC. Yup, inputting C Sync into H Sync input.

    Helpful to know, thanks!

    I don't understand how a mixed color issue like this would have anything to do with Sync... Can someone explain? I could use a sync cleaning circuit if that would help…

    and yeah, I think CXA1145 is 1.0V p-p

    I had no idea that 240p test suite existed till now!! omg what an amazing project :O

    I also have an oscilloscope… What waveforms should I be looking for?

    Thanks for the help everyone!!
     
  10. Bad_Ad84

    Bad_Ad84 The Tick

    Joined:
    May 26, 2011
    Messages:
    8,566
    Likes Received:
    1,308
    Measure the rgb lines, set scope to display vpp. (usually something like "display all" or "measure all")

    White will give you max value for each, so this is ideal to find out the vpp of each line, you can then figure out what values you need in your voltage divider to bring them down to acceptable levels.
     
  11. rama

    rama Gutsy Member

    Joined:
    Dec 17, 2015
    Messages:
    477
    Likes Received:
    112
    Oh, that's great that you have a scope available!
    The chip has to lock onto the sync signals (H+V separate or CSYNC internally separated) to place all the pulses and clamps at the correct positions.
    You would get color problems if there was a delay for example, since the color clamp would reach into active video instead of what's supposed to be black level.
    This can happen if the logic high / low levels of the MD input into the encoder was marginal to what it expects.

    You can (and should) check for this by measuring the CSYNC high and low levels in your active circuit.
    Compare them to what the encoder datasheet says they should be. There should be a good margin as well!

    If you find that the levels are indeed marginal, see if you can change them. If there's voltage dividers in the MD, you could change their values for example.

    Use the scrolling test 1 and confirm good color (it should be mostly fine). Then hit the C button (iirc) and scroll test 2 comes up.
    This 2nd test runs in a different timing mode on the MD, one that appears to be much harder to control. You may get a lot of color problems in it.
    Actual games use both modes for various scenes. This is what makes the MD hard to design video processors for.
     
  12. rama

    rama Gutsy Member

    Joined:
    Dec 17, 2015
    Messages:
    477
    Likes Received:
    112
    Short guide on the clamps :p
    [​IMG]
    Imagine this is the Red (Green, Blue) RGB input waveform for one line (and ignore the color burst, it doesn't exist yet).
    You can see that the falling edge of hsync starts several processes, one of which is the clamp start and stop positions.
    Each line the encoder offsets the amplification / encoder matrix so that the video level in-between the clamp positions = black.

    With this, you can see how a delayed hsync pulse could shift the entire clamp into active video.
    (Remember, the hsync signal is not present in the RGB, but externally fed via CSYNC in.)
    In this condition, the encoder would bias itself wrong and output wrong colors for this line. Since it happens on every line again, the problem would appear on the entire image.
     
  13. Bad_Ad84

    Bad_Ad84 The Tick

    Joined:
    May 26, 2011
    Messages:
    8,566
    Likes Received:
    1,308
    He also needs to ensure the amplitude of the rgb lines are right. 2v seems very high. The reason the 75ohm resistor is on the input in the schematic is because its expecting you to feed a video source that expects the 75ohm resistor there to be the correct level.

    You may just need to change the 75ohm resistor for a different value. But you need to scope the signals and see what's what first. Could be that it's just got an offset, which could be removed or the signals are too high and need voltage divider adjustment.

    All guess work until we get some measurements.
     
  14. rama

    rama Gutsy Member

    Joined:
    Dec 17, 2015
    Messages:
    477
    Likes Received:
    112
    Yep, 2Vpp for the RGB levels into the encoder will be way too much. It will clip and cause all sorts of distortion.
    The datasheet specifies the usual ~0.7Vpp on the inputs. I believe any DC offset would be removed by the input capacitors, but this is impedance stuff so no guarantees :p
     
  15. segasonicfan

    segasonicfan Robust Member

    Joined:
    Sep 23, 2011
    Messages:
    261
    Likes Received:
    40
    Wow, so much useful info here – thanks!

    I realize the easiest thing to do is design a sync cleaner / RGB adjustment test rig PCB to go with 240p test suite. After I make sure it works I'll post the files online for free so everyone can make their own :)

    -Segasonicfan
     
  16. segasonicfan

    segasonicfan Robust Member

    Joined:
    Sep 23, 2011
    Messages:
    261
    Likes Received:
    40
    Okay, here's the test rig schematic that I drew up to support the amazing 240p Test Suite. Will work on the board layout soon. But before I do, anyone have any recommendations for changes?

    This board will not only clean non-standard sync signals, it will remove Macrovision and should also protect against high-resolution inputs.

    As mentioned above, this is a free project for the community, so feel free to add your input :) I don't have time to answer a lot of questions about it, but if somebody has an important technical Q I will do my best.

    –Segasonicfan
    My Website: https://segasonicfan.wixsite.com/retro
     

    Attached Files:

    Last edited: Jul 22, 2018
  17. Bad_Ad84

    Bad_Ad84 The Tick

    Joined:
    May 26, 2011
    Messages:
    8,566
    Likes Received:
    1,308
    Not in to using pots. They are inprecise. Just measure the values you have now and do the maths?
     
    MonkeyBoyJoey and Taijigamer2 like this.
  18. rama

    rama Gutsy Member

    Joined:
    Dec 17, 2015
    Messages:
    477
    Likes Received:
    112
    I just want to ask where you plan to buy a sync stripper other than the LM1881 :p
     
  19. segasonicfan

    segasonicfan Robust Member

    Joined:
    Sep 23, 2011
    Messages:
    261
    Likes Received:
    40
  20. Bad_Ad84

    Bad_Ad84 The Tick

    Joined:
    May 26, 2011
    Messages:
    8,566
    Likes Received:
    1,308
    You should always do the math.

    The amplitude of video signals is well defined, there's no real guess work to be had that requires pots. It's just promoting people who don't know what they are doing to make video mods. People who don't kkow what they are doing is the main reason half the mods on the Internet are a non spec mess.

    Just my 2 cents, but something I feel strongly about.
     
    Last edited: Jul 23, 2018
    MonkeyBoyJoey likes this.
sonicdude10
Draft saved Draft deleted
Insert every image as a...
  1.  0%

Share This Page