SNES-Mini RGB Measurements

Discussion in 'Modding and Hacking - Consoles and Electronics' started by Ultron, Aug 6, 2014.

  1. James-F

    James-F Member

    Joined:
    Feb 24, 2018
    Messages:
    17
    Likes Received:
    2
    If the 750/1.2k mod changes the RGB values prior to the on board S-RGB Encoder, doesn't it change the peak luminance of Composite and S-Video values too?;
    If so, are the peak luma values of the 1Chip and Min/Jr on Composite and S-video correct stock or are they too bright?
    My intention is to have correct voltages on all analog outputs of the 1chip/Mini, like on the 2chip Snes or the Sega Genesis.

    On my N64 I had to attenuate RGB levels with bigger resistance at the output of the THS7316, without the output series resistors the image was clipping even on my Sony Trinitron with Contrast at minimum, and obviously on the OSSC too.
    But the Composite and S-Video signals from the N64 were perfectly fine with correct luma values.
    Changing anything after the N64 video DAC (VDC-NUS) but before the encoder (ENC-NUS) completely messed up the Composite and S-Video signal (obviously).
     
    Last edited: Mar 22, 2018
  2. Ultron

    Ultron Spirited Member

    Joined:
    Jul 6, 2014
    Messages:
    110
    Likes Received:
    15
    Yes, it would change the Composite and S-video signals. The S-RGB encoder does all the video signal encoding and uses the RGB values as inputs.

    Your N64 - adding more resistance on the output (I'm assuming you mean adding a resistor in series with the 75 ohm resistor) will cause an impedance mismatch. This was the whole problem with the old SNES RGB mods. People adjusted the brightness by changing the 75 ohm resistor. It needs to be changed to the proper levels coming from the source, prior to the encoding. I'm not too familiar with the N64 video circuit; I haven't messed around with mine.
     
  3. James-F

    James-F Member

    Joined:
    Feb 24, 2018
    Messages:
    17
    Likes Received:
    2
    It's strange that RetroRGB (or anywhere else) don't at least mention that adding the 1.2k resistors messes up with other analog outputs.
    Is there any visual degradation when using larger series resistance at the output (old way) to attenuate the voltage you noticed on the SNES?

    Is there a clear visual degradation when attenuating with series resistors at the output even though the "max power transfer" balance of "75 out" and "75 load" is not kept?
    This "max power transfer" theorem was kept for old TV and Telephone line runs where buffers and vacuum amplifiers were expensive and high maintenance, but I don't think it is all that relevant anymore, especially for a few feet runs.

    Impedance mismatching can result in an improper levels like with headphones, but I clearly know the input Load is 75ohm on all analog video inputs on all TVs in my house (old and new, I've measured) and the OSSC, so I can tweak the output impedance for proper levels without any unpredictable side effects.

    On the N64 I had to use 330ohm resistors at the output to bring the image to 2chip SNES or Genesis levels,, and it doesn't seems to degrade the image at all (Using GS deblur codes for sharper visuals) when viewing on the OSSC, it is as sharp and blur free as the Genesis.

    As said, my goal is to keep all analog output levels of the console to spec.
     
    Last edited: Mar 22, 2018
  4. Ultron

    Ultron Spirited Member

    Joined:
    Jul 6, 2014
    Messages:
    110
    Likes Received:
    15
    OK, just giving an explanation here, making it simple:

    Inside your TV/OSSC/Framemeister/whatever, on the video input, the input is tied to the decoding circuit, along with a 75 ohm resistor that is pulled down to ground (which is what you found out). Inside your SNES/Genesis/whatever, the video encoder is buffering the video signal. It is a 6dB buffer, or a 2x amplifier. This type of buffer is used in all video applications.

    So, as an example, your 0.7V Red signal is amplified to 1.4V on the output. The design says to add a 75 ohm resistor in series with the output connector. So now since we have a resistor in series with the output, and a resistor tied to ground at the TV input, we have a voltage divider. When you match R1 (75 ohm in system) and R2 (75 ohm in TV) we have an output of:

    Vin (output of video buffer) * R2 / (R1 + R2) = Vout (to decoding circuit in TV). Since R1 and R2 are equal, we have a -6dB or 1/2x reduction in the signal. So Vout is now equal to 0.7V Red signal as was intended.

    What happens when we change R1 to 100 ohms? Vin stays the same, since the buffer output does not change:

    1.4V * 75 / (100 + 75) = 0.6V

    We succeeded in reducing the voltage into the decoding circuit, thus brightness levels will have dropped. But now we have an impedance mismatch. We have 100 ohms on one side, connected with a 75 ohm impedance cable, connected to the 75 ohm load on the other side. The whole system expects everything to match; that's how it works. To get the actual correct signal input to the TV, everything needs to match. With a mismatch like this, we could see artifacts in the video, like ghosting or tearing. At the frequencies that old consoles work at, this might not be noticeable, depending on the length and quality of cable. So you do make a point there.

    The problem with the SNES is video level going into it's encoder is too high. Instead of 0.7V for Red, we are seeing closer to 0.8V. So the buffer then multiplies that by 2. Now we have 1.6V output to the TV. In an impedance matching situation, the signal going into the TV video circuit is 0.8V. But, the signal above 0.7V will be clipped. So we are losing information there. If we were to try to adjust for this using a different resistance, like changing the resistance to 100 ohms, we now have:

    1.6V * 75 / (100 + 75) = 0.68V (Remember R2 will always be 75 ohm, unless you crack open your TV/scaler and change it).

    Great! We attenuated the signal from 0.8V to 0.68V now. But, now we have shrunk our dynamic range. The output from the PPU DAC was 0.8V going into the encoder, but on the TV end we only have 0.68V. Our dynamic range of the video signal has shrunk 15%.

    Why fix it at the output when it should be fixed at the input? The engineers messed up. They used the wrong resistor value for their DAC. So we need to change that resistance. We know that Red should be 0.7V (700mV), based on the color standard. When we output a solid Red pixel, we should have 0.7V input to the video encoder, buffered, and 0.7V going into the TV video circuit, not 0.8V.

    https://www.maximintegrated.com/en/app-notes/index.mvp/id/1184 - look at Graphics Linear RGB on this page.

    With the proper input into the video encoder, the other signals coming out "should" be fixed as well. Who knows, maybe there is a flaw with the S-RGB encoder and they intentionally changed the DAC resistor to compensate for it. I haven't measure the composite signal or S-video signals with an oscilloscope yet, but it's a good idea to check. The standards for those signals are on that linked page, too.

    TL;DR - Changing the resistor might work, but it's better to fix it the correct way. In the end all that matter is how the video quality looks for you. There's plenty of happy SNES owners out there who have no clue about this problem.
     
    Pikmin likes this.
  5. Ergot_Cholera

    Ergot_Cholera Flaccid Member

    Joined:
    Aug 2, 2012
    Messages:
    406
    Likes Received:
    61
    :oops: This hurts my brain and makes me feel very stupid.
     
  6. James-F

    James-F Member

    Joined:
    Feb 24, 2018
    Messages:
    17
    Likes Received:
    2
    Excellent post Ultron, very informative.

    I am specifically interested in this; how can we test this?
    To me, it seems that a simple voltage divider should do no unusual harm to the signal.
     
  7. Xaranar

    Xaranar Rapidly Rising Member

    Joined:
    Jul 30, 2015
    Messages:
    90
    Likes Received:
    21
    Interesting. Using this information, I'm going to modify my Mega Drive to have correctly attenuated CSYNC, using a bipolar transistor instead of the standard 470R resistor, that would create a mismatch. Going to build a circuit to do it in the SCART head, as I know the 32X doesn't work without TTL sync.
     
  8. Ultron

    Ultron Spirited Member

    Joined:
    Jul 6, 2014
    Messages:
    110
    Likes Received:
    15
    Sorry, I re-read it and it makes my head hurt too.

    So imagine you have 256 shades of red. If you were to shove them into a space that will only fit 240 shades of red, what happens? You are losing shades of colors. What happened is your dynamic range has shrunk. Those 16 shades have now disappeared and will show up as different shades than then the programmers wanted them to be. This is what happens when you change the 75 ohm resistor to adjust the color brightness.

    The base of the problem is that the signal coming out of the PPU (the R,G,B signals) are not set properly. So instead of 256 shades of red, we have 300 shades of red. But the programmers of games were expecting 256 shades of red. We now have the opposite problem, too many shades than were expected. To add to the problem, the TV only expects 256 shades as well. So we have to fix it so the RGB signals are what the programmers and what the TV expects. The way we do that is by changing the resistance of the resistor used to determine the color shades. So if if we have 256 shades to begin with, we have 256 shades going out to the TV.

    Thanks bud. You can test it with an oscilloscope. There might not be a large effect seen because the cable is short. But quality of the cable is also important. 75 ohm termination is a standard, why use a voltage divider with the terminator when we can fix it at the encoder input? The whole purpose of this experiment was to adjust the voltage to the standard values, without having to change the standard resistor that the TV expects to see.

    CSYNC is not an analog signal, it's a digital signal (either ON or OFF). We don't have to worry about signal reflection with it. The Sony encoder in the Mega Drive/Genesis outputs TTL sync, which would need to use a 75 ohm resistor on it. But for some reason Sega decided to use their own sync circuit instead. Whats the reason? TTL sync is not very popular among TV sets.

    The most commonly accepted sync in the TV world would be "sync on composite video". To change the TTL sync voltage level to a "sync on composite video" compatible signal, we need to drop the TTL voltage down to ~ 0.3-0.4V. Depending on the TTL voltage (anything above 2V is considered a high), the resistor added to the line would be console dependent (I see 470 ohm recommended for Genesis/Mega Drive, 330 ohm for SNES). The high level voltage (~0.3V-0.4V) isn't used for the sync, the drop to 0V is, so that's why the high voltage may vary, but should be low enough that the monitor can handle it.

    The RGB cables for the Genesis that I've seen use a sync stripper to get the sync from the composite video signal instead of using the console's sync output.

    Here's the datasheet for the CXA1145 (video encoder in the Mega Drive). You can look at the circuit on the document's page 118 - https://console5.com/techwiki/images/f/fb/CXA1145PM.pdf

    Here's a link to the video schematic of the Mega Drive/Genesis : https://emu-docs.org/Genesis/mega2.png
     
  9. Xaranar

    Xaranar Rapidly Rising Member

    Joined:
    Jul 30, 2015
    Messages:
    90
    Likes Received:
    21
    I didn't know sync was a digital signal, as it is still susceptible to noise. Still, I was using a 470 Ohm resistor in series to create a voltage divider with the 75 Ohm pull down in the OSSC, which if my maths serves me correctly, leaves you with a signal of around 690mV, very close to the 700mV 75 Ohm spec. However, I've now used a buffering circuit in the SCART head that uses a bipolar transistor in common collector configuration that effectively does the same thing. The reason I did it in the SCART head is the 32X does not work without TTL level sync.
     
    Ultron likes this.
  10. Ultron

    Ultron Spirited Member

    Joined:
    Jul 6, 2014
    Messages:
    110
    Likes Received:
    15
    Digital signals are still susceptible to noise. TTL has a wide noise margin for high and low signals. TTL sync is either a high for scanning, or a low for blanking. It's only sending information out about 2 different states, hence why it is a digital signal. It can pick up noise, but since the normal voltage level is the high state, it should be pretty robust. The RGB signals and audio would pick up the most noise because they are low amplitude. That's why a cheapo cable doesn't work well, you need a good shielded cable.

    Yes, the 470 ohm resistor you used is right, and that's what you should do. I'm not sure if the OSSC takes TTL sync, using the divider to make the TTL sync signal and drop it to composite on sync levels is better since you know it will be compatible with any scaler or TV. I'm not sure what you mean by "the 32x does not work without TTL sync". It outputs TTL sync? If so either way you do it is fine, with resistor or transistor. I think the original SNES uses a transistor for the sync circuit.
     
  11. Xaranar

    Xaranar Rapidly Rising Member

    Joined:
    Jul 30, 2015
    Messages:
    90
    Likes Received:
    21
    What I mean is, the 32X is set up so that it takes the RGB video signal from the Mega Drive and applies its own video signal on top of it, by means of a patch cable. However, the 32X will simply refuse to function if it doesn’t receive TTL sync from the Mega Drive, and it can’t use composite video as sync at all.
     
    Ultron likes this.
  12. James-F

    James-F Member

    Joined:
    Feb 24, 2018
    Messages:
    17
    Likes Received:
    2
    Here is my install:
    https://shmups.system11.org/viewtopic.php?f=6&t=61072&sid=1a384c20ab6c2f6007d3c50da94d59a9&start=240

    I have installed a THS7316 amp with 1.2k load and 75 out resistors in my SFC Jr. and I find the result to be darker than my 2chip SFC on all analog outputs.
    I assume the chosen 1.2k values is for using with the internal S-RGB(A) amp which has higher gain (6.5db) than the external THS chip (6db).
    I will install a temporary 2k trimpot on one of the RGB lines and adjust and measure till it matches with my 2chip and only then replace all three 1.2k with higher ones according to measurement.

    I guess the tolerance between 1chip consoles is quite wide.
     
    Last edited: Mar 30, 2018
  13. Ultron

    Ultron Spirited Member

    Joined:
    Jul 6, 2014
    Messages:
    110
    Likes Received:
    15
    It has nothing to do with the chip you are using, the 1.2k resistors need to be installed in parallel with the 150 ohm resistors on the board. This is to bring the RGB levels to their proper values, prior to the encoder. Your install has them in series with the input, which will produce a darker image. Solder the 3 resistors from the vias, to a ground point. I chose a spot as shown in the photo.

    [​IMG]

    Once installed like so, you can run 3 wires soldered onto the via side of the resistors, and use those as your input to your encoder.

    EDIT: Nevermind, I was looking at your photo again, I think you have it wired OK. The bottom of the board has the pins going into the vias I guess? I'll have to check the composite and S-video next week when I have some time.
     
    Last edited: Mar 30, 2018
  14. James-F

    James-F Member

    Joined:
    Feb 24, 2018
    Messages:
    17
    Likes Received:
    2
    Yes.

    I completely removed the 1.2k resistors and now my SFC Jr. reads exactly like my 2chip which reads like my Genesis and PS2 on the RGB lines with 75ohm load,, strange isn't it?
    I did not measure the SFC Jr. prior to modding, I just did all mods in one go.

    Bob from RetroRGB mentioned on his SNES Mini RGB mod page that some people report that SFC Jr. may not need the 1.2k resistors at all... which is my case too with my THS7316 moded SFC Jr.
    http://retrorgb.com/snesminidiybypass.html

    Moreover, I rapidly switched between the 2Chip SFC with the now modded (no 1.2k) SFC Jr. with my Bandridge scart switcher and they look the same in terms of brightness, except the 2chip has the smearing/blur.

    BTW, I do not use a scope for measurement, I use a simple DVM and read AC voltage which gives me consistent reproduceable results, at least when comparing between consoles with 240p suite and the 224p white screen test pattern.
    I use 75ohm 1% between the probes of the DVM as a load when I measure the R,G,B lines.
     
    Last edited: Mar 30, 2018
  15. rama

    rama Gutsy Member

    Joined:
    Dec 17, 2015
    Messages:
    477
    Likes Received:
    112
    Just a heads up:
    The ground point chosen is directly on the ~21Mhz crystal lines.
    It's probably not good for the RGB to be terminated at that location.
     
  16. James-F

    James-F Member

    Joined:
    Feb 24, 2018
    Messages:
    17
    Likes Received:
    2
    I don't see any ill effect even with LPF disabled in the OSSC and THS7316 having no LPF (much higher cut-off freq).
    What you had in mind rama?
     
  17. rama

    rama Gutsy Member

    Joined:
    Dec 17, 2015
    Messages:
    477
    Likes Received:
    112
    Well, then it's fine.
    I'm always worried when RGB meets fast signals :)
     
  18. James-F

    James-F Member

    Joined:
    Feb 24, 2018
    Messages:
    17
    Likes Received:
    2
    My stock SFC 1Chip-02 with Grey Ramp test pattern measures 760mV with 75ohm load on all RGB lines.
     

    Attached Files:

    Last edited: Apr 21, 2018
sonicdude10
Draft saved Draft deleted
Insert every image as a...
  1.  0%

Share This Page