Page 1 of 2

NES core colour changes in v201102

Posted: Sun Nov 08, 2020 6:33 am
by elvis
I've been doing a lot of testing of late on a real NES versus existing colour palettes using a colorimeter on a Sony PVM monitor, and the 240p test suite for NES.

I've been refining the process, and as part of my MiSTer use update all the cores regularly.

NES core version v201102 has seen some odd changes in a couple of the colour palette renders. Notably the "Smooth" and "PVM" palettes now show the "00" colour (a deep grey) as green.

The values of note are the CIE L*a*b* colour space, where there's a large shift in the a* b* values:

Raw values from my colorimeter BEFORE the change for the "Smooth" palette:
2020-10-25:
Result is XYZ: 11.791556 12.209302 10.177532, D50 Lab: 41.546857 0.135561 -0.346911

2020-10-27:
Result is XYZ: 11.792717 12.257508 10.259975, D50 Lab: 41.622495 -0.182318 -0.484621

Raw values from my colorimeter AFTER the change:
2020-11-08:
Result is XYZ: 10.426987 12.943263 7.365638, D50 Lab: 42.677633 -14.707092 11.776316

"PVM" is similar, however other palettes appear unaffected. Prior to this core change, "Smooth" was one of the better palettes in my findings for accuracy on how it decoded colour. After this change, it's greatly modified this palette in particular.

Converting to 8bit RGB, the values go from 98,98,99 to 98,98,99 (no change at 8bit precision, 2 days apart) to 81,107,81 (substantial change), with the v201102 core seeing a large spike in green. (I will render these to image files later to demonstrate visually). It's easy enough to replicate - load up the 240p test suite, set it to full screen colour "00", and cycle through the palettes. They'll all be grey (luminance levels vary, which is normal), however "Smooth" and "PVM" appear green rather than pure grey.

I've tested both the palette built in to the core and re-tested by downloading the palette from FirebrandX's site, and they're the same. The change appears to be in the NES core itself.

I do see commits recently that affect colour:
https://github.com/MiSTer-devel/NES_MiS ... 2e272d7612

I'm not a developer and can't comment on the code, however measuring with a high accuracy, studio quality colorimeter, things have gotten substantially worse for these two palettes in particular with this latest release.

I'm still going through today's run of the colour palettes, and will post the results later tonight my time, including measured Delta E values (colour error) and visual renders of the colours for comparisons. When done, I'll update this thread with the data.

[edit]

Confirming - I replaced 201102 with 20200620, re-tested, and the colour "00" reverted back to previous measured values for the "Smooth" palette, and grey appearance.

Re: NES core colour changes in v201102

Posted: Sun Nov 08, 2020 12:09 pm
by paulbnl
If you open palettes Smooth & PVM and check out color 00 then you'll see they are 6A6D6A (106,109,106) and 696E69 (105,110,105) respectively. So the green tint is in the original palettes.

However previously only 5 bits per color were used so the green tint was lost. Now that all 8 bits are used the colors are more accurate to the palettes.

I don't know why you are seeing such a big change in green tint though (Red & Blue are much lower). I saw that you were using the Component out from the IO board. Maybe it has something to do with Analog output on the IO board being limited to 6 bits or the RGB to Component conversion not being accurate.

It would be better if you could use DirectVideo HDMI to VGA in RGB.

Re: NES core colour changes in v201102

Posted: Sun Nov 08, 2020 12:16 pm
by elvis
Thanks for that info. I'll recheck with direct video as soon as I can and report back.

Re: NES core colour changes in v201102

Posted: Sun Nov 08, 2020 9:08 pm
by elvis
Here are the renders of the IO board measures.

Process is:
* Calibrate display (Sony PVM D20L5A) to Rec.601 using colorimeter+HCFR
* Attach AV Famicom, adjust PLUGE (brightness/contrast only) via 240p test suite, capture colours 00 (dark grey) and 20 (white) luminance values with colorimeter
* Measure 52 colours via ArgyllCMS "spotread", 240p test suite and colorimeter, record CIELab results
* Attach MiSTer
* Adjust per-palette brightness/contrast to match AV Famicom on 00/20
* Measure 52 colours via ArgyllCMS "spotread", 240p test suite and colorimeter, record CIELab results
* Repeat for all palettes (testing 15 currently - 13 provided by MiSTer and 2 extra)
* Use Python "colormath" libraries to calculate CIE Delta E 2000 between AV Famicom and comparison system, and convert to RGB for renders
* Render with ImageMagick as a side-by-side comparison.

The goal is to measure the real-world output on a CRT with an instrument that is objectively accurate (acknowledging that the display itself as well as IO board may not be).

Project is still WIP, but there's more info on the process here: https://stickfreaks.com/colour/nes-colo ... omparisons

The ArgyllCMS software also accounts for white balance and relative luminance changes, and I also make allowances for slight luma changes due to differing display gamma that the palette author might have had as a "more fair" comparison.

Here's a render of the "Smooth" palette on the 20200620 release of the NES core. In all squares, the left image is a real AV Famicom. The right image is the compared system (MiSTer + IO Board + Smooth Palette). The sequence is repeated on black, grey127, grey188 (middle grey, 50% perceived brightness) and white purely to help with by-eye comparison.

Image

Here are the Delta E measurements per colour (lower is better, and dE 2.0 or lower is considered "not noticeable by human eyes"):
https://stickfreaks.com/colour/nes-colo ... smooth.txt

And here's the render of the results on the 20201102 release:

Image

And Delta E per colour:
https://stickfreaks.com/colour/nes-colo ... smooth.txt

Most notable are the two darker grey colours, changing from dE 1.5 to 16.7, and 0.5 to 14.9 respectively. Although as pointed out, this appears to be the actual intent of the palette, and wasn't noticeable until this change.

As mentioned I'll repeat the process shortly via direct_video. I've got 2 RGB DACs I can use, one also does YPbPr although sync didn't work on the NES core last time I checked, but I'll see how I go.

Re: NES core colour changes in v201102

Posted: Sun Nov 08, 2020 10:34 pm
by rcade
I am no expert in measuring colors, but I have an IO board with the 15-pin RGB connected to a PVM, and I don't show any of the palettes where grey entries have a green tint in the 20201102 release.

Could it be you have wrong resistor values on your IO board and this new change has exposed that? I have seen others complain of this issue recently...

Re: NES core colour changes in v201102

Posted: Mon Nov 09, 2020 12:43 am
by paulbnl
I have done some testing with the NES/SNES core and the VGA out from the IO board.

When using RGB the colors are fine but with Component the greens are boosted with certain colors. It is very obvious on the 20201102 NES core with Smooth palette. After the core is loaded it shows a green background on Component and grey on RGB. With the SNES core I also see the boosted greens.

It looks like the RGB to Component conversion is broken so I will check it out.

Re: NES core colour changes in v201102

Posted: Mon Nov 09, 2020 1:58 am
by elvis
I tried direct_video this morning on two different DACs (one RGB only, one both RGB and YPbPr) but couldn't get sync on three different CRTs. This was working for me about 6 months back, but not currently. Tested both DACs on a Raspberry Pi via 240p and 480i modes over HDMI and that works fine, so that's another thing for me to work out before I can test further.

I'll try to find some components to make a sync combiner this week, as that might solve my problem. As soon as I've got more data I'll post up results.

Re: NES core colour changes in v201102

Posted: Mon Nov 09, 2020 3:06 pm
by paulbnl
Did you set composite_sync=1 in MiSTer.ini? You shouldn't need a sync combiner with that.

I have checked the RGB to Component conversion and there is room for improvement. However the 6 bits per color limitation of the IO board is a big problem for Component.

Color 00 (106,109,106) in the Smooth palette is a very slightly green tinted grey. This results in 105,109,105 with 6 bit RGB output and with correct 6 bit Component the result should be 102,112,101. Even though that is a lot better than the current Component output, 6 bits per color is just not enough for accurate Component output.

You should not use the Component output of the IO board at all if you are measuring colors. Better is to use RGB from the IO board or RGB Direct video which can be more accurate because that is 8 bits per color although most HDMI to VGA converters crush black colors which is why hdmi_limited=2 was added to MiSTer.ini.

Re: NES core colour changes in v201102

Posted: Tue Nov 10, 2020 2:11 am
by elvis
paulbnl wrote: Mon Nov 09, 2020 3:06 pm Did you set composite_sync=1 in MiSTer.ini? You shouldn't need a sync combiner with that.
I did, but it still doesn't sync. Those same DACs works with a Raspberry Pi via HDMI out with 240p and 480i modes, but not MiSTer. I'm certain they did work with MiSTer some time back however, as I have MiSTer.ini files backed up from those times that I used for testing. I'll make up some new cables just in case. I'll get to the bottom of it one way or another.
paulbnl wrote: Mon Nov 09, 2020 3:06 pm You should not use the Component output of the IO board at all if you are measuring colors. Better is to use RGB from the IO board or RGB Direct video which can be more accurate because that is 8 bits per color although most HDMI to VGA converters crush black colors which is why hdmi_limited=2 was added to MiSTer.ini.
Yeah I was trying to avoid DAC black/white crush, as well as any issues or colour variability third party DACs introduced. But your info here convinces me I'll need to use them for testing going forward instead of the IO board, so once I've sorted out my sync issue, that will be my new testing standard.

I'll just need to make sure I find a good DAC, which I can test with other tools I have. I have several other good quality screens, colour patch generators and colour measurement tools I can use to verify that a DAC doesn't get the colours wrong. (Part of my work is screen calibration for film/editorial and VFX studios, so I've got a fair few tools that can help me out).

Thanks for all the info posted above. Very helpful.

[edit]

Well the sync problem was very boring - a bad 5V input to the DAC (the RPi seems to have fed enough juice to the DAC without it, but not the MisTer). New power cable to the DAC solved it.

Visually, the green tint on the "Smooth" palette is much subtler via the DAC (I checked RGB, will check YPbPr as that DAC offers both via a switch) than it is on the IO board. I've got data for the IO board posted above, once I've done measurements via the DAC I'll post them up too (takes about 3-4 hours to go through them all).

Again, thanks for all the advice and help. That's cleared a lot of questions up.

Re: NES core colour changes in v201102

Posted: Tue Nov 10, 2020 4:07 pm
by paulbnl
Do you have a link to that DAC? It is interesting that it has both RGB and Component. I am curious if it properly outputs Rec 601 Component for SD and Rec 709 for HD signals.

Re: NES core colour changes in v201102

Posted: Mon Nov 23, 2020 8:06 am
by elvis
paulbnl wrote: Tue Nov 10, 2020 4:07 pm Do you have a link to that DAC? It is interesting that it has both RGB and Component. I am curious if it properly outputs Rec 601 Component for SD and Rec 709 for HD signals.
Quite a few of these on eBay and AliExpress from various vendors. I bought mine a number of years ago from eBay.

Here's some photos inside and out I took on the weekend:

Zv4NRsl.jpg
Zv4NRsl.jpg (471.8 KiB) Viewed 19215 times
clR6LsH.jpg
clR6LsH.jpg (477.24 KiB) Viewed 19215 times
BqAvAaF.jpg
BqAvAaF.jpg (453.5 KiB) Viewed 19215 times
fp8StWk.jpg
fp8StWk.jpg (521.94 KiB) Viewed 19215 times
7xHjRty.jpg
7xHjRty.jpg (490.26 KiB) Viewed 19215 times

Re: NES core colour changes in v201102

Posted: Mon Nov 23, 2020 4:33 pm
by paulbnl
Thanks! I couldn't find one on eBay for a good price including shipping to Europe so I ordered one on AliExpress. Nice that it also has Optical audio out.

Re: NES core colour changes in v201102

Posted: Sat May 29, 2021 12:59 am
by pizaCat
Hi guys, sorry to resurrect this thread! My appologies if this is not allowed.

I am new to MiSTer and the forums, but I searched a lot for threads with a clear solution. I am looking at buying a similar converter box I found on amazon, and was wondering if you can give an update or conclusion on how good of a solution this is. I am looking to use the hdmi port to connect to the component input of my Sony Trinitron kv-32fs100 TV.

Are your converter boxes a good solution for that? Do the cores work well with it? what advice or pointer can you give me regarding setup and ini settings? Thanks!

Re: NES core colour changes in v201102

Posted: Sun May 30, 2021 2:28 pm
by paulbnl
The Component output on the one in the photos above doesn't work with Directvideo for me. Only the VGA output works with Directvideo.

If you can solder then you can mod a HDMI to VGA convertor/cable to output Component but that is not compatible with all TVs. https://github.com/MiSTer-devel/Main_Mi ... rect-Video

A HDMI to VGA converter in combination with an RGB to Component convertor should give better results.
https://stoneagegamer.com/retrotink-rgb ... onent.html

Re: NES core colour changes in v201102

Posted: Mon May 31, 2021 2:49 am
by pizaCat
Thanks for confirming that the converter in the pictures above does not work in direct video mode in combination with being in HDMI to yPbPr mode.

1- What about when used in HDMI to yPbPr mode, with direct_video off: can the mister output 480i to connect it to a consumer CRT TV component input? I assume that in that case the same scaler and lag as HDMI out apply (+ what ever the converter box adds, but I assume it doesn't add lag). Perhaps that would be a way to ensure compatibility with the TV over component. I can live with HDMI like minimal lag if that means all cores running at 480i on my TV.

2- If that converter is set to HDMI to VGA mode, I assume it could be modded as described in the direct_video wiki (with the diode and resistor) to be compatible with a breakout VGA to component cable. I ask because I ordered a similar one ( I rushed, I know :lol: ) and I would not mind dedicating it to the MiSTer and cutting the component traces and making it an HDMI -> VGA + Sync-on-green mod -> Component out all in one.

3- As for the RetroTink RGB2Comp converter, that would mean HDMI (direct_video=1, ypbpr=0, composite_sync=0) -> HDMI to VGA converter (no SOG mod) -> VGA to SCART cable -> RetroTink RGB2Comp -> component cable to TV, correct?

The part about direct video to component not being compatible with all TVs has me a bit worried, so if option 1 is at all possible I would start with that.

Thanks for your help.

Re: NES core colour changes in v201102

Posted: Mon May 31, 2021 11:19 am
by paulbnl
pizaCat wrote: Mon May 31, 2021 2:49 am 1- What about when used in HDMI to yPbPr mode, with direct_video off: can the mister output 480i to connect it to a consumer CRT TV component input? I assume that in that case the same scaler and lag as HDMI out apply (+ what ever the converter box adds, but I assume it doesn't add lag). Perhaps that would be a way to ensure compatibility with the TV over component. I can live with HDMI like minimal lag if that means all cores running at 480i on my TV.
The component output of the converter does work well with direct video off but MiSTer doesn't support 480i so you are limited to 240p. Even then you need different custom resolutions for every core so it is just not practical.
3- As for the RetroTink RGB2Comp converter, that would mean HDMI (direct_video=1, ypbpr=0, composite_sync=0) -> HDMI to VGA converter (no SOG mod) -> VGA to SCART cable -> RetroTink RGB2Comp -> component cable to TV, correct?
Almost correct. It needs composite_sync=1.
The part about direct video to component not being compatible with all TVs has me a bit worried, so if option 1 is at all possible I would start with that.
I meant the Sync on Green diode & resistor hack is not compatible with all TV's because it is just a hack. The RGB2Comp has proper RGB to YPbPr conversion so it should have no compatibility problems. Of course you could try the mod and see if it works first before buying something like the RGB2Comp.

BTW which one did you order?

Re: NES core colour changes in v201102

Posted: Mon May 31, 2021 12:15 pm
by jlancaster86
pizaCat wrote: Mon May 31, 2021 2:49 am The part about direct video to component not being compatible with all TVs has me a bit worried, so if option 1 is at all possible I would start with that.
As far as I can tell, getting YPbPr working directly from Direct Video is hit-and-miss. I'd recommend using a separate converter to go from RGBHV/RGBs to YPbPr. I personally use an RGBs (SCART)-to-YPbPr adaptor I bought back in 2008 or something. If I were buying one today, I'd probably go with the RGB2COMP.

Re: NES core colour changes in v201102

Posted: Mon May 31, 2021 1:09 pm
by elvis
jlancaster86 wrote: Mon May 31, 2021 12:15 pm As far as I can tell, getting YPbPr working directly from Direct Video is hit-and-miss.
Do we know why? I can get numerous custom 15KHz modes working via both an RPi and an AMD video card running on a GroovyArcade Linux setup through my DAC, but not MiSTer. Does anyone know what's different about MiSTer?

Re: NES core colour changes in v201102

Posted: Mon May 31, 2021 3:15 pm
by pizaCat
paulbnl wrote: Mon May 31, 2021 11:19 am I meant the Sync on Green diode & resistor hack is not compatible with all TV's because it is just a hack. The RGB2Comp has proper RGB to YPbPr conversion so it should have no compatibility problems. Of course you could try the mod and see if it works first before buying something like the RGB2Comp.
You're right, I'll try that before going for more complicated solutions.
paulbnl wrote: Mon May 31, 2021 11:19 am The component output of the converter does work well with direct video off but MiSTer doesn't support 480i so you are limited to 240p. Even then you need different custom resolutions for every core so it is just not practical.
Perhaps this can be an option for some cores. I saw in that thread that thorr ends up successfully using an audio extrator -> hdmi to yPbPr converter -> TV component in, while using directVideo at 240p.
He later uses an hdmi splitter for non-240p things with direct video off, via hdmi to s-video converter.

What I find interesting is that he manages to use directVideo enabled for 240p via a similar converter. Is that hard to find ebay converter really special or could there be a way to get 240p on all cores that support it to work? I guess it's worth a try once I get mine. What is not clear, is if he keeps the same settings for all 240p cores.

paulbnl wrote: Mon May 31, 2021 11:19 am BTW which one did you order?
I ordered this on Amazon after seing this youtube video, seing this thread, and thorr's thread, and making a few assumptions based on the info I gathered. There are so many ways and details to get various signals via the HDMI port, and so many posts assuming everyone has an io board, that it's easy to misunderstand what works and what doesn't.

Regarding the scart to yPbPr route, that retrotink converter (which I am sure is worth the price) is as expensive as an io board. Does that solution give better quality than an io board to yPbPr?

There would also be another solution I have not yet explored: RGB modding the TV. Am I correct to assume that would effectively be the same as using the retrotink converter, or perhaps better since it would be uncompressed colorspace?

Thanks for taking the time to clear things up!

Re: NES core colour changes in v201102

Posted: Mon May 31, 2021 8:43 pm
by paulbnl
pizaCat wrote: Mon May 31, 2021 3:15 pm What I find interesting is that he manages to use directVideo enabled for 240p via a similar converter. Is that hard to find ebay converter really special or could there be a way to get 240p on all cores that support it to work? I guess it's worth a try once I get mine. What is not clear, is if he keeps the same settings for all 240p cores.
There seems to be at least 2 versions of the HDMI->VGA+Component converter. The earlier revision does seem to work with Direct video on its Component output based on what Thorr said.
I ordered this on Amazon after seing this youtube video, seing this thread, and thorr's thread, and making a few assumptions based on the info I gathered.
That one has V2 in the title so it is likely to be the later version without Direct video support on the Component output.
Regarding the scart to yPbPr route, that retrotink converter (which I am sure is worth the price) is as expensive as an io board. Does that solution give better quality than an io board to yPbPr?
It will be much better quality than an IO board. The IO board only has 18bpp output compared to 24bpp of the HDMI converter. With RGB output this is not too bad but as you can see in this thread it results in big color inaccuracies with Component output. The IO board also has a hacky Sync on Green generation so compatibility is also less than good.
There would also be another solution I have not yet explored: RGB modding the TV. Am I correct to assume that would effectively be the same as using the retrotink converter, or perhaps better since it would be uncompressed colorspace?
If the encoding & decoding of YPbPr is done properly you won't see a difference compared to RGB. You would be risking the life of the TV and yourself so I don't know if it is worth it compared to the other methods. :)

BTW Don't forget to connect the power supply when you are using the HDMI converter. It works without it somewhat but most cores will have issues.

Re: NES core colour changes in v201102

Posted: Fri Jun 04, 2021 6:32 pm
by thorr
I have three of those converters. One works perfectly. One works mostly. One doesn't work at all. I can't remember what the difference is with the one that works mostly, but I think it had trouble with some edge case timings that would work with the "perfect" converter. I think they have gone through several revisions over the years and it is a crap shoot whether you will get a good one or not. I seem to recall that the direct video to component output provides better color than using the analog board according to a video I saw on youtube. I don't have an analog VGA IO board anymore to test with.

That RGB2Comp looks interesting and is probably a safe bet in conjunction with an HDMI to VGA cable and a VGA to SCART cable. This is an expensive solution though.

After reviewing my other thread, I updated it with the following on the first post:
Edit 3: There seems to be a wide variety of versions of the HDMI to Component converters that have the VGA output on the box (the one that works great for me), so it is a crap shoot whether you get one that works or not. A better solution may be to get these two things:
https://www.ebay.com/itm/184127034242
https://www.amazon.com/gp/product/B00BIQER0E

Or you can get one of these in theory in combination with an HDMI to VGA cable and a VGA to SCART cable:
https://www.retrotink.com/product-page/rgb2comp
https://www.amazon.com/gp/product/B01MS611LJ
(don't have a link for the SCART cable)

Re: NES core colour changes in v201102

Posted: Fri Jun 04, 2021 7:17 pm
by thorr

Re: NES core colour changes in v201102

Posted: Mon Jun 07, 2021 3:55 am
by pizaCat
thorr wrote: Fri Jun 04, 2021 6:32 pm I have three of those converters. One works perfectly. One works mostly. One doesn't work at all. I can't remember what the difference is with the one that works mostly, but I think it had trouble with some edge case timings that would work with the "perfect" converter. I think they have gone through several revisions over the years and it is a crap shoot whether you will get a good one or not. I seem to recall that the direct video to component output provides better color than using the analog board according to a video I saw on youtube. I don't have an analog VGA IO board anymore to test with.
Thank you for the clarifications.

I have yet to receive my HDMI to Composite converter from Amazon, but meanwhile I received a GOOOA HDMI to VGA converter that looked like the one in the wiki for direct video, and a VGA to yPbPr cable. Unfortunately the GOOOA converter has a totally different chip inside and is not compatible with the MiSTer direct video mode. Here's a picture of the inside:

22sWA9J.jpg
22sWA9J.jpg (2.06 MiB) Viewed 18781 times

After that, a friend gave me an HDMI to VGA adapter he did not need. Besides the brand on the outside, "VICTSING", it looked identical. I confirmed that it has the AG6200 chipset with USB power and audio out, and that one worked perfectly with the VGA to component cable from Amazon! Thankfully the TV had no issues with the SOG mod/hack. I'm blown away by how clear the picture is, specially after tuning it with the Genesis 240p Test Suite. :D

I am still waiting to receive my SDRAM module, but I tried loading most cores to see if the TV would display them properly. Most worked, but I did have a few issues:
- Genesis doesn't work in EU mode, it's out of sync. I'm guessing that's because I have an NTSC TV, so I tried setting a min refresh rate. That did nothing, and I have to set it to US or JP. That's not a big issue, I have a workaround for Genesis, but other cores I could not get to work, like Vectrex, Odissey2, Moon Patrol... I am guessing direct_video overrides the min refresh rate setting, as well as vsync_adjust.
- ColecoVision works but the image is tiny and text in the menu is unreadable.
- Obviously all vertical arcade cores are sideways. I'll move to the HDTV when I want to play those to scale and rotate.
- All the jotego cores I tried only show credits. Is that because I don't have an SDRAM module?

What can I do for the out of sync cores to display properly on the TV? So far I tried finding a video_mode that works for NTSC and disabling direct_video to have the scaler and refresh adjustments work their magic, but I had no success getting a nice image.

Thanks a lot for the help guys! I'll make sure to update with the results when I get the HDMI to VGA/Composite converter, since I might as well try it.

Here's a pic of the VICTSING HDMI to VGA pcb:

V3JmRTH.jpg
V3JmRTH.jpg (2.49 MiB) Viewed 18781 times

Yes, the AG6200 chip is cracked, but it still works! :shock:

I should secure a backup...

Re: NES core colour changes in v201102

Posted: Mon Jun 07, 2021 6:51 pm
by thorr
Thanks for the update. I am somewhat surprised that the HDMI to VGA adapter can handle component signals. I have this cable, and it might work without any mods. I will have to give it a try:
https://www.summitsource.com/Eagle-6-FT ... 12775.aspx

This would be the simplest and cheapest solution.

Re: NES core colour changes in v201102

Posted: Mon Jun 07, 2021 11:04 pm
by pizaCat
thorr wrote: Mon Jun 07, 2021 6:51 pm Thanks for the update. I am somewhat surprised that the HDMI to VGA adapter can handle component signals. I have this cable, and it might work without any mods. I will have to give it a try:
https://www.summitsource.com/Eagle-6-FT ... 12775.aspx

This would be the simplest and cheapest solution.
It is documented in the mister wiki on the Direct Video page:
https://github.com/MiSTer-devel/Main_Mi ... pr-signals

You have to mod the HDMI to VGA adapter to sync on green, and your cable should work just fine. I added the SOG circuit inside the converter, and I added some hot glue to prevent future shorts after I took the picture.

8YuxLQt.jpg
8YuxLQt.jpg (2.14 MiB) Viewed 18699 times

Re: NES core colour changes in v201102

Posted: Tue Jun 08, 2021 3:03 am
by thorr
Thanks! I tried without the SOG mod and as expected it would not lock onto the signal. I am going to just leave it as is for now since I am going to be using other things besides the MiSTer with the TV and will need the HDMI to component converter to make those things work anyway.

I bought a Wii to HDMI cable that doesn't have a scaler in it so it will work at 480i: https://www.amazon.com/gp/product/B072K2DCFM
I bought an HDMI switcher: https://www.amazon.com/gp/product/B08LVF2S1M
I will route my PC configured for 480i output, my Wii running at 480i, and my MiSTer running at 240p through the HDMI switcher and the output will go to my HDMI to Component converter and then to the TV's component input. The HDMI switcher auto-senses which input is turned on, and you can manually switch it as well.

In addition, I will send the MiSTer HDMI out to a splitter: https://www.amazon.com/gp/product/B007NKOC2W
I will route one output of the splitter to the HDMI switcher as stated above to send to the TV in component 240p.
Another output will go to my HDMI to 480i Svideo scaler: https://www.amazon.com/gp/product/B00V2ULFAQ so I can have 480i with the MiSTer for higher resolution cores or vertical arcade cores that I want to use on my big CRT TV on the Svideo input.
A third output will go to my eventual arcade cabinet which will have its own HDMI to component adapter.
Another output could go to an HDMI / DVI flat panel monitor. I have an HDMI audio extractor as well if I want to hook up separate speakers.

Re: NES core colour changes in v201102

Posted: Wed Jun 09, 2021 5:08 am
by pizaCat
Hi guys,

I received the EnjoyGadgets HDMI to VGA & Component YPbPr Converter 2019 V2 today, and had a little time to try it out. Here's what I know so far:
  1. The audio RCA out works great. I even have hdmi_audio_96k=1 and no problem. I did not try the optical out but I suspect it works too.
  2. With the VGA output, and using my VGA to component cable, no SOG mod:
    • If direct_video=1 and ypbpr=1 in the ini file, it actually works most of the time! I say most of the time because if it is a black image with a little text, or if it is not too bright, it has trouble syncing. Or when loading a ROM, it can loose then re-aquire sync. It actually is not scrolling vertically, and I manage to navigate the menu, but the image keeps zig-zagging horizontally until there is a full image on the screen. Even when synched, I can see that sometimes vertical lines are not totally straight if there are dark areas in the image.
    • If composite_sync=1 or =0, it doesn't change anything. I think it's because I did not do the SOG hack, and I suspect that would fix the sync problems. I am just surprised that it is working at all without it.
    • If ypbpr=0, colors are off (purple).
    • If direct_video=0, I could not get it to work. Maybe it would with the right video_mode, but I don't know how to calculate custom values.
  3. With YPbPr output, I could not get it to work. I tried all combinations of direct_video, ypbpr, and composite_sync. None worked. Maybe here too with direct_video off and a custom video_mode it would have a chance? I don't know.
I might try the SOG mod to see if it works as well as the HDMI to VGA adapter with the AG6200, and post the results. I can also open it up and take pictures if you guys are interested.

Do you have any requests or ideas of settings to try?

Re: NES core colour changes in v201102

Posted: Wed Jun 09, 2021 12:07 pm
by paulbnl
pizaCat wrote: Mon Jun 07, 2021 3:55 am - Genesis doesn't work in EU mode, it's out of sync. I'm guessing that's because I have an NTSC TV, so I tried setting a min refresh rate. That did nothing, and I have to set it to US or JP. That's not a big issue, I have a workaround for Genesis, but other cores I could not get to work, like Vectrex, Odissey2, Moon Patrol... I am guessing direct_video overrides the min refresh rate setting, as well as vsync_adjust.
The min/max_refresh and vsync_adjust settings are scaler settings and direct_video bypasses the scaler.
- All the jotego cores I tried only show credits. Is that because I don't have an SDRAM module?
That is correct.
What can I do for the out of sync cores to display properly on the TV? So far I tried finding a video_mode that works for NTSC and disabling direct_video to have the scaler and refresh adjustments work their magic, but I had no success getting a nice image.
It is not possible to get a nice image if you want to display PAL on an NTSC TV. PAL has more lines so the image needs to be squashed vertically which will look bad. Converting 50 to 60 fps will also result in massive frame stutter.
Yes, the AG6200 chip is cracked, but it still works! :shock:
Wow. I thought it was just a marker line or something at first :D
If composite_sync=1 or =0, it doesn't change anything. I think it's because I did not do the SOG hack, and I suspect that would fix the sync problems. I am just surprised that it is working at all without it.
This sounds like the Sync on Green is leaking somewhat from the Component video to the VGA output somehow.
With YPbPr output, I could not get it to work. I tried all combinations of direct_video, ypbpr, and composite_sync. None worked. Maybe here too with direct_video off and a custom video_mode it would have a chance? I don't know.
With mine the Component output with direct_video only works on the menu. I think because the menu uses standard timings. If yours didn't work at all then you probably have third revision which Thorr said didn't work at all.

Re: NES core colour changes in v201102

Posted: Wed Jun 09, 2021 1:10 pm
by pizaCat
paulbnl wrote: Wed Jun 09, 2021 12:07 pm
pizaCat wrote: Mon Jun 07, 2021 3:55 am With YPbPr output, I could not get it to work. I tried all combinations of direct_video, ypbpr, and composite_sync. None worked. Maybe here too with direct_video off and a custom video_mode it would have a chance? I don't know.
With mine the Component output with direct_video only works on the menu. I think because the menu uses standard timings. If yours didn't work at all then you probably have third revision which Thorr said didn't work at all.
After reading your comment I realized I did not try the menu core with component. I started my tests with VGA and did not reset the MiSTer when changing settings and changing to component, I was reloading the config via the controller shortcut after editing it via ssh.

So I tried the menu, and with direct_video=1, ypbpr=0, composite_sync=0, I get a clean and properly sized image. I tried loading Genesis in US mode, and the image flashes at something like once a second. It is readable, and the size looks fine, it just flashes to white and jumps quickly once every second.

Re: NES core colour changes in v201102

Posted: Wed Jun 09, 2021 2:51 pm
by thorr
There is a little switch on the component converter. Make sure it is set to the component position. Use RCA cables with the converter, not the VGA cable.
Here are my ini settings that work with direct_video=1:
direct_video=1
forced_scandoubler=0
hdmi_limited=1
vsync_adjust=2
ypbpr=0
composite_sync=0
vga_scaler=0
video_mode=640,30,60,70,240,4,4,14,12587
refresh_min=57
refresh_max=62
vscale_mode=0
vscale_border=0
fb_size=0
fb_terminal=1
dvi_mode=0

For direct_video=0, I have an alternate ini file with these changes:
direct_video=0
vga_scaler=1
vscale_mode=1
video_mode= 1280, 170, 140,244,240, 2, 0, 22, 29020 ; Best for ao486 12-8-2020
;refresh_min=57
;refresh_max=62

For my HDMI to Svideo converter, I use this:
hdmi_limited=2
composite_sync=1
vscale_mode=0
video_mode=1440,242,140,98,1080,0,1,47,128208 ; 4:3

and another I sometimes use is this:
video_mode= 640, 16, 96,48,480, 10, 2, 32, 25152 ; 480i test - works pretty good with Svideo adapter and works with J-Tech but seeing double