Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Flickering video for S-Video and Composite Video after DeJitter Mod #9

Open
BambooShadow opened this issue Mar 28, 2022 · 16 comments
Open

Comments

@BambooShadow
Copy link

The Composite Video and S-Video signal seems to be somewhat compromised once the DeJitter Modboard is active.
The RGB-Signal is splendid and also the DeJitter-Mod is working perfectly. Line4x, Line5x with the OSSC, no problem!

I've noticed this a while ago, when installing a NESRGB (HW 2.0, FW 2.3) into an AV Famicom, with the DeJitter Modboard:
https://www.youtube.com/watch?v=jwfaHW9rPv4

And now again with borti's SNES_MultiRegion_with_DeJitter_QID. Installed into a PAL SNES 1Chip console (SNSP-CPU-1CHIP-01):
https://www.youtube.com/watch?v=WQlpZ9cdpdc

I don't think it's very important because most of these consoles will be ran with RGB-only for the most part. And since most users will use/install the DeJitter-Mod for the OSSC - and the OSSC can only accept RGB anyway - I guess few users noticed at all that Composite or S-Video is shaky.

But the SNES_MultiRegion_with_DeJitter_QID is a more universal mod which also easily allows to turn on/off the DeJitter feature by a toggle switch. So maybe more users could consider the toggle-switch, if they want to use 60Hz with Composite Video and S-Video. Then they could switch off DeJitter and enjoy without shakyness their 60Hz-console :).

Anyhow - I wanted to share this for documentation purposes.

@marqs85
Copy link
Owner

marqs85 commented Mar 28, 2022

The video encoder should be fed with a subcarrier generated from a stable clock to avoid these issues. Such signal is available from dejitter/multi board but the standard instructions may not describe that extra connection.

Also, have you tested if similar artefacts appear on a CRT?

@BambooShadow
Copy link
Author

Hi marqs, thanks for your quick response.

Yes, the artefacts also appear on a CRT (that's where I originally discovered them). Direct connection from console to device with decent & shielded video cables and the console is running with a proper, original power supply.

Borti also already suggested testing SJ63 on the SNES_MultiRegion_with_DeJitter_QID-Board. I left both jumpers open at first, so I'll mess around with them now, trying to fix the issue.

However, regarding the AV Famicom+NESRGB+DeJitter, I don't see an option to change the subcarrier, so that should be done automatically, if I understand it correctly.

The install was clean and RGB works properly.
NES De-Jitter Mod

Gonna report back, once I did some more testing with SJ63 on the PAL SNES 1chip with the borti-Board.

Thanks!

@marqs85
Copy link
Owner

marqs85 commented Mar 28, 2022

In both cases you need to lift video encoder subcarrier pin and connect a wire to it. Other end of the wire comes from
SNES: CClk.o pad on multi-board (also remember to close one of the 2 jumpers)
NES: CPLD pin 11 on de-jitter board

@BambooShadow
Copy link
Author

BambooShadow commented Mar 30, 2022

So I did some further analysis, summarizing everything in this video (video-description!)
https://youtu.be/6uFcSpkLgLc

This is only concerning the borti switchless CIC-board with DeJitter feature.

Gonna copy + paste the text from the description in here for archiving purposes:

This is some further testing to find proper settings using a PAL SNES 1 Chip Console (SNSP-CPU-1CHIP-01) with borti's SNES_MultiRegion_with_DeJitter_QID Modboard.
I experienced problems, using the DeJitter-feature with Composite Video and S-Video.

However with some additions to the normal installation-process, one can get decent results, at least with S-Video. This can be achieved by the following additional steps:
1.) Move R4 to R62 on the Modboard
2.) Connect right pad of R4 to CClk.o
3.) Close SJ63.1 to output color carrier derived from non-dejittered clock

see also:
https://i.imgur.com/RKbnugA.jpg

  • I playtested a PAL cartridge (Yoshi's Island) in 50Hz then 60Hz mode
  • I playtested an NTSC-J cartridge (Kirby Super Star) in 60Hz then 50Hz mode
  • I tested also the 240p Test Suite (PAL / NTSC version) in 50Hz and 60Hz

You can see that the image problems only occur in 60Hz mode. 50Hz mode will work fine always (probably because the Dejitter-Feature only works for 60Hz modes).

0:00 Composite Video, SJ63.2 closed*, DeJitter: ON
10:09 S-Video, SJ63.2 closed*, DeJitter: ON
You can see here that whenever 60Hz-mode is used, there is some color distortion and flickering, especially on the top of the screen.

19:37 Composite Video, SJ63.1 closed**, DeJitter: ON
You can see here, that in 60Hz mode the color distortion is gone, but the image is still a little more flickery than it should be (compared to having DeJitter turned off).

30:25 S-Video, SJ63.1 closed**, DeJitter: ON
Again, color distortion is gone in 60Hz mode and the noisy flickering that we saw with Composite Video is also not present with S-Video!

41:23 Composite Video, SJ63.2 closed*, DeJitter: OFF
With the DeJitter-feature being turned of, there is no flickering (at least not more than usual amount you get from Composite Video) and no color distortion.

Since we most likely want to use and utilize the DeJitter-Feature though, my conclusion and recommendation would be to have the DeJitter feature turned on (leave SJ31 open!) and use the additional modification (moving R4 etc..) + closing SJ63.1.

*outputs color carrier derived from dejittered clock
**outputs color carrier derived from non-dejittered clock

Thanks to borti for helping me figuring this out and ofc to you marqs.

Regarding NES/AV Famicom, I'll be trying to do some further testing if I get the chance to get an AV Famicom + NESRGB + DeJitter on workbench again.

@snowekim
Copy link

Is it possible to only Dejitter RGB but not composite/S-video?

@marqs85
Copy link
Owner

marqs85 commented Dec 15, 2022

The composite/s-video encoder should receive stable (subcarrier) clock and sync when connected as described earlier so I don't understand why distortion/flickering is present.

@dptsolutions
Copy link

dptsolutions commented Jun 19, 2023

I believe I am suffering from this problem as well:
picture
picture 2

I'm using the 1.3 version of the dejitter board, and it's installed on a Super Famicom w/ board revision SNS-CPU-GPM-02. I've followed the instructions as specified for this revision in the repo and the RGB works fine on my OSSC, but if I attempt to hook it up to my recently acquired CRT via composite, I get output problems, where colors are wrong at the top.

In an earlier comment, you said:

In both cases you need to lift video encoder subcarrier pin and connect a wire to it. Other end of the wire comes from
SNES: CClk.o pad on multi-board (also remember to close one of the 2 jumpers)

But I am not sure I understand what this means. Can you help me find the pin? Using the chip list for this board revision, The video encoder is chip U7. Using this pinout diagram, it looks like the chroma subcarrier input is pin 14.

Thus, is the fix for my revision:

  1. Lift pin 14 on chip U7
  2. Solder a wire from CClk.o on the dejitter board to the lifted pin

??

@marqs85
Copy link
Owner

marqs85 commented Jun 19, 2023

I revisited SNES schematics and noticed that S-ENC/S-RGB encoders are somewhat different to BH7236AF used in NESRGB and the subcarrier should not be directly connected to them. There is a small filter/delay circuit between PPU and encoder input(s), so the subcarrier should be connected to input of the filter instead. In case of SNS-CPU-GPM-02, according to this schematic you could remove R29, and connect CClk.o to the filter side pad of removed part thru 10k resistor (reusing R29 if you like).

@dptsolutions
Copy link

Hey, thanks for the help! Looking at the schematic, I see what you're talking about, and I believe I understand what I need to do. Does this illustration look correct to you?
SNES SNS-CPU-GPM-02 Dejitter Composite

@marqs85
Copy link
Owner

marqs85 commented Jun 21, 2023

@dptsolutions on snes_dejitter board subcarrier is available on CPLD pin 11 (in the picture it's wired to csync output). CClk.o refers to a pad SNES_MultiRegion_with_DeJitter_QID board.

@dptsolutions
Copy link

@marqs85 thanks for the double check, I appreciate it. Here's an updated image, do I have it correct now?

SNES SNS-CPU-GPM-02 Dejitter Composite

@marqs85
Copy link
Owner

marqs85 commented Jun 27, 2023

Yes, you just need to remove R29 and figure which pad is on the side of U7 (connected to R28).

@TwistedTom
Copy link

I just looked at the code, it seems hooking up pin 11 to the S-ENC/S-RGB NTSC/PAL pin fixes the carrier to NTSC (3.58).
So using a switchable PAL/NTSC config (on a PAL 3-chip console), now NTSC composite/s-video will be ok but PAL broken.

If it was a 1-chip I could do MCLK_EXT_i/4 for (17.73/4=4.43) but for my 3-chip guess i'll have to add some extra circuitry to switch original 4.43 from S-CLK?

@marqs85
Copy link
Owner

marqs85 commented Sep 19, 2023

Yes, that would not work for PAL in a switchable system. On the other hand, you could just keep S-ENC/S-RGB in NTSC mode and see if your TV supports NTSC50 with PAL region games.

@TwistedTom
Copy link

How about taking the 4.43 carrier from the S-CLK to a unused CPLD pin, then bypassing it to SC_o when switched to PAL (like MCLK_EXT_i is)?

Something like:

input PAL_car // an un-used pin
output SC_o   // not a reg now
...

reg SC_o_r;  // toggle this in original /6 block

assign SC_o = MCLK_SEL_i ? PAL_car : SC_o_r;

That should make PAL 3-chip work in both modes. PAL 1-chip should work in both modes already I think?
Perhaps this is more of a thing for the guys making the mod boards rather than snes_dejitter?

@marqs85
Copy link
Owner

marqs85 commented Sep 20, 2023

Sure, you could do it like that for PAL 3-chip. For PAL 1-chip a firmware modification alone would be sufficient.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants