Making one's own Supergun: NTSC Video Encoder

Discussion in 'Arcade and Supergun' started by l_oliveira, Dec 28, 2010.

  1. l_oliveira

    l_oliveira Officer at Arms

    Joined:
    Nov 24, 2007
    Messages:
    3,879
    Likes Received:
    245
    With this post I ask for help from the fellow engineers on the board. :pray:

    So I built two video encoder circuits for my homemade supergun.

    On the first one I used the CXA1645 because it was simpler to built around it. I didn't like how it looked on my TV set because the chroma burst circuit would inject an "wavy dot crawl" effect on the image that would "piss the hell out of me".

    Then I sucked it up and went on to build an much more complex circuit using an CXA1145 in hopes it would improve my image quality with CVBS and S-Video (yeah I know what RGB is, but it's not an viable option where I live :rolleyes:)

    The second circuit alleviated the issue in a good deal (by having an better quality waveform for the CHROMA carrier) but I'm still NOT satisfied.

    Feeding either encoder chips with square wave CHROMA carrier makes the image look like the Mega Drive video output... lol (Fixed saw-like effect on the edges of the image)

    The supergun itself (with the CXA1645 encoder):

    [​IMG]
    (This pic is a repost)

    The image looks like this on a real USA TV:
    [​IMG]
    The dot crawl artifact is particularly visible on the "h" letter of the game logo. :DOH: It will either roll to the left or to the right. Doesn't matter if it's CVBS or SVIDEO and I know it has to do with the phase of the CHROMA carrier clock input on the CXA chip. If I take the CHROMA burst out, the image is as SHARP as if it were tied straight to the tube (RGB) but B&W (d'oh).

    Now here's the question:

    I know that SONY solved this problem on the PlayStation console by using an triangular wave output of 3.579545Mhz as color carrier.

    How I can possibly replicate that waveform in my circuit to get rid of that "wavy" dot crawl effect on my image ?
     
  2. TmEE

    TmEE Peppy Member

    Joined:
    Aug 13, 2008
    Messages:
    362
    Likes Received:
    1
    You can get sine by using a parallel capacitor on the clock line... no idea about achieving triangle wave
     
  3. retro

    retro Resigned from mod duty 15 March 2018

    Joined:
    Mar 13, 2004
    Messages:
    10,354
    Likes Received:
    822
    What do you get with the 1645 in the new circuit?
     
  4. l_oliveira

    l_oliveira Officer at Arms

    Joined:
    Nov 24, 2007
    Messages:
    3,879
    Likes Received:
    245
    I have not tried, but I am positive I'll get at least an solid B&W image, as the 1645 has no oscilator circuit for quartz crystals. I used an transistor to oscilate with the 3.57 crystal on the 1645 board.
     
  5. retro

    retro Resigned from mod duty 15 March 2018

    Joined:
    Mar 13, 2004
    Messages:
    10,354
    Likes Received:
    822
    Ah yeah, good point. I had the vague recollection that they were more or less compatible, but there are in fact several differences.

    I'm a bit surprised you had worse issues with the 1645. What circuits are you using?
     
  6. l_oliveira

    l_oliveira Officer at Arms

    Joined:
    Nov 24, 2007
    Messages:
    3,879
    Likes Received:
    245
    I didn't had that much issues with the 1645 honestly ... I am just being "anal" about that stupid dot crawl caused by fluctuations on the crystal output due to temperature variation and such oddties. In fact the 1645 reaches about the same quality of video as the 1145 with half the analog parts. The only reason I reverted to the 1145 was for being able to control the dot crawl effect (and maybe mask it out).

    I'll eventually hook a PlayStation motherboard to the circuit just to see what happens (haha :lol:).

    If I can't find a method for generating a triangular wave for NTSC burst I'll cheat and use an early PS1 GPU for that purpose. :-0
     
    Last edited: Dec 31, 2010
  7. Jamtex

    Jamtex Adult Orientated Mahjong Connoisseur

    Joined:
    Feb 21, 2007
    Messages:
    5,472
    Likes Received:
    16
    Surely using NTSC for arcade games is like sticking a 1.3 litre Flat 4 engine in a Ferrari... Surely it will be easier to hack a TV to display RGB then it is to get a near perect Never The Same Colour signal?
     
  8. retro

    retro Resigned from mod duty 15 March 2018

    Joined:
    Mar 13, 2004
    Messages:
    10,354
    Likes Received:
    822
    Actually, the easiest solution is to use an RGB monitor such as an Amiga monitor or a broadcast monitor. Can you not get your hands on one of those over there? The Amiga ones will be 14", broadcast anything from around 9" up to about 28", probably!

    Like this:

    http://produto.mercadolivre.com.br/MLB-167537386-monitor-sony-profissional-_JM

    (searched for broadcast monitor... didn't know I could speak Portuguese!! lol)

    At their prices, though, a JROK might be cheaper!
     
  9. xmog123x

    xmog123x Peppy Member

    Joined:
    May 7, 2010
    Messages:
    382
    Likes Received:
    14
    Obviously you need some kind of integral part, what works well for analog is a RC op-amp circuit. Although to get high precision(and thus good frequency) you'd need low tolerance components (+/- 1% error margin).

    Here's a circuit:
    http://www.play-hookey.com/analog/triangle_waveform_generator.html
     
  10. retro

    retro Resigned from mod duty 15 March 2018

    Joined:
    Mar 13, 2004
    Messages:
    10,354
    Likes Received:
    822
    Personally, I'd look at the initial circuit. Simpler is better!

    Don't forget that all boards will be different. Have you tried a few?

    Incidentally, was your 1645 circuit the one I posted years ago? lol
     
  11. electrochip

    electrochip Rapidly Rising Member

    Joined:
    Aug 26, 2008
    Messages:
    86
    Likes Received:
    1
    I get the same effect with the CXA1645 and CXA2075 but only when using composite video. S-Video looks perfect. I use this for the NTSC color carrier http://search.digikey.com/scripts/DkSearch/dksus.dll?Detail&name=XC227-ND

    I've also tried making my own carrier, and I get the same issue. How would I adapt a PS1 GPU to it? I have some old broken boards in the garage.
     
  12. Calpis

    Calpis Champion of the Forum

    Joined:
    Mar 13, 2004
    Messages:
    5,906
    Likes Received:
    21
    You really don't want to make a RC oscillator out of even 0.01% high tolerance components lol, it has to be EXACTLY 3.579545 MHz (or 3.575611 MHz for PAL-M in this case).

    The input waveform shouldn't matter much anyway. After the monitor locks to CB it uses its OWN (sine) wave to demodulate color. I'm not sure but I also guess the input is digital since what you put in is NOT directly used as CB, the input probably goes through a Schmitt trigger to an attenuator and through shaping at minimum. To make the quadrature wave it's more likely the signal will be multiplied 4x, divided then attenuated and shaped rather than using passive circuits to create the phase delays.

    The video artifacts have more to do with whether the encoder phase shifts the colorburst from line to line (I think I remember reading 1145 does not), the pixel clock, frame timing as well as filtering rather than the input colorburst signal itself. Dot crawl can be improved however by altering the colorburst phase like the Neo Geo (I think it disrupts the oscillator), but I'm pretty sure it can't be done outside of the system.
     
    Last edited: Jan 4, 2011
  13. Stone

    Stone Enthusiastic Member

    Joined:
    Sep 27, 2005
    Messages:
    504
    Likes Received:
    1
    An AD724 gave very good results in my Supergun. I've found the Sony CXA series to be too much of a pain to use as it's really hard to tune the subcarrier filters properly, and even with everything set up perfectly the output just isn't that great.

    The AD724 datasheet [link] gives you a layout on page 10 that works well - tie ENCD high to permanently enable the chip, STND high for NTSC and SELECT high or low depending on if you're using a 1FSC or 4FSC clock source. I ignored the 3 op-amp buffers in the example circuit and fed the raw RGB signals directly to a SCART socket which works fine if you keep the wiring short. Not including the termination caps/resistors, the only external components required are your crystal and a variable capacitor - just add the RGB and sync signals direct from the arcade board and it'll work fine.

    Also, please don't take this personally but your construction method sucks. Ribbon cable is totally the wrong choice for the video signals - you may get away with it for the controls but you'll be inducing tons of interference into all the other signals. Using shielded cable grounded at both ends makes a big difference even if you're using the RGB signals direct. Putting your corrupted video into an imperfect encoder circuit will never give you the quality you started out with. No surprise you've got dot crawl!

    Stone
     
  14. ASSEMbler

    ASSEMbler Administrator Staff Member

    Joined:
    Mar 13, 2004
    Messages:
    19,394
    Likes Received:
    995
    Ribbon cable is not the best for sure, not everyone knows about wires.

    Please suggest wires so people can go and get it, not everyone knows the kind of wire.

    You're teaching people, so provide them with the links too if possible.
     
  15. retro

    retro Resigned from mod duty 15 March 2018

    Joined:
    Mar 13, 2004
    Messages:
    10,354
    Likes Received:
    822
    It's normal to use standard, stranded equipment wire. 7/0.2 (24 AWG to Americans) or 16/0.2 (20 AWG) should be fine for video and all other data (Americans could go in the middle with 22 AWG). For power, though, you want to use 32/0.2 (17 AWG... 18 AWG should suffice).

    If you really wanted, you could use shielded video cable like Stone said. It's just shielded video cable - he DID suggest a cable type, that's what it's called.
     
  16. l_oliveira

    l_oliveira Officer at Arms

    Joined:
    Nov 24, 2007
    Messages:
    3,879
    Likes Received:
    245
    Well I'm using less than 8 centimeters of flat cable. It goes straight from the JAMMA connector to the encoder board.

    My wiring is:

    +5v/GND/R/GND/G/GND/B/GND/CSYNC/KEY wire (absent)

    And obviously if this scheme is perfectly fine for 66 MHZ signals on digital ATA cables why it would not work for 20khz analog signals ?


    I'm absolutely sure that the dot crawl is related to the encoder and yes I took your suggestion and I am eager now to obtain an Analog Devices encoder chip to try out.

    Funny enough, I just tested my two encoder boards with my SEGA SATURN and (even with that flat cable) the output was CRISPY and CLEAR on both.

    Which matches 100 what was said by Calpis. (about the artifacts having more to do with the actual source of signal than with the video encoder)

    In the end I'm just as puzzled now as I was when I started this stuff ... :shrug:

    At least I got to hear opinions from a lot of people ! :thumbsup:
     
  17. retro

    retro Resigned from mod duty 15 March 2018

    Joined:
    Mar 13, 2004
    Messages:
    10,354
    Likes Received:
    822
    It doesn't matter. Shit is shit, no matter how large or small.

    If I were to make a model bridge for Action Man figures out of drinking staws, it would work. Would you want to stand on it? Just because something is capable of a job in one situation, doesn't make it capable in another. Why make do with something inferior when the superior option doesn't cost much?

    What?! Your logic is flawed.

    Digital is digital - it's a stream of 1s and 0s. Analogue signals, on the other hand, aren't.

    Interference is picked up in an analogue circuit that would be ignored in a digital circuit.

    Incidentally, we get problems when putting JAMMA boards through SCART if the signals are too high for the SCART standard. Have you checked the acceptable levels that your encoder will accept, and what you're actually giving it?
     
  18. l_oliveira

    l_oliveira Officer at Arms

    Joined:
    Nov 24, 2007
    Messages:
    3,879
    Likes Received:
    245
    The said video encoder (exactly the same thing you saw on the picture) captured on a BT878 capture card (this thing has an better comb filter than my TV as you can see :p)
    CPS2:
    [​IMG]

    Do you see any degradation on the image ? The problem is that the TV is not smart enough to "filter the problem" I'm having with the chroma.

    And again that has nothing to do with the RGB.

    The RGB part is working just fine and we could spend years talking about how wire ribbons suck.

    The fact is that on REAL JAMMA CAB the wires are tossed around the case and bind with plastic clips in a bundle (JAMMA harness), all together and there's no sign of quality loss with all those wires hanging together. Some cabinets have video wires going as long as one meter and no interference of any kind happen on them.

    I can even put an O-Scope on the RGB lines just to proof that the RGB wires have nothing to do with the dot crawl issue.

    And my argument comes from the fact that:

    1- I have GND wires run between each signal (in a real arcade machine they're just tied together without any care and on not shielded cables)

    2- I know that shielding has nothing to do with this because it's one of the things I already tried.

    And finally my argument is that the RGB signal never gets past 20Khz in frequency so it's not really anything that is ultra sensible to noise on such short wires.

    My problem is solely related to my TV set as you can see it does not happen when the circuit is connected to an TV capture card.

    Even some signal sources (Saturn/Playstation) do something to the signal that diminishes or completely solves the problem. With the SHIT CABLE in the circuit. Again I'm puzzled.

    Saying "your wiring sucks" is not achieving anything here besides frustrating me even further ... :banghead:

    More pics... (all from the same TV capture card)

    System12:
    [​IMG]
    Video adjust screen:
    [​IMG]
    Neo Geo:
    [​IMG]
     
  19. Calpis

    Calpis Champion of the Forum

    Joined:
    Mar 13, 2004
    Messages:
    5,906
    Likes Received:
    21
    CPS1 & 2 video is 8 MHz*, 20 kHz (->15.75 kHz?) is only the sync frequency :p

    *Most systems use 6 MHz for nearly square pixels (just under 6), Capcom instead wanted their games to shine against competitors so they chose very thin pixels to pack 25% more detail. Since the RGB encoder has to fit both luma and chroma into ~4 MHz, luma needs to be filtered since the highest frequency components (alternating black and white pixels) which are 4 MHz via Nyquist theorem conflict with chroma @ 3.58 MHz.

    Do you have a filter on the Y OUT pin to the Y IN pin?
     
  20. l_oliveira

    l_oliveira Officer at Arms

    Joined:
    Nov 24, 2007
    Messages:
    3,879
    Likes Received:
    245
    Oooo maybe we're getting hot here....

    Regarding the circuit, it's nothing fancy, I'm using the reference circuit from the chips datasheets.

    So in the case of the CXA1645 there's nothing on the Y output besides the basic/standard 75 ohm resistor and the capacitor to stop DC from flowing out from the chip.

    The CXA1145 one uses standard NPN transistors to amplify the signal which is taken from the external loopback (the usual circuit made to add S-Video to Neo Geo and Mega Drive).

    The first TV shot on this thread was taken from the CXA1145 based board and the "faint wavy cloud" moves to the right or to the left depending on the variation of frequency from the chroma clock circuitry (it has an adjust, too but seems like ambient temperature has some effect on it, making the adjust point where the "wavy cloud" is less visible change).
     
sonicdude10
Draft saved Draft deleted
Insert every image as a...
  1.  0%

Share This Page