NES core colour changes in v201102

thorr
Top Contributor
Posts: 1127
Joined: Mon Jul 06, 2020 9:37 pm
Has thanked: 557 times
Been thanked: 258 times

Re: NES core colour changes in v201102

Unread post 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.
User avatar
pizaCat
Posts: 11
Joined: Sat May 29, 2021 12:47 am
Has thanked: 6 times

Re: NES core colour changes in v201102

Unread post 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?
paulbnl
Core Developer
Posts: 206
Joined: Sun May 24, 2020 8:48 pm
Has thanked: 18 times
Been thanked: 196 times

Re: NES core colour changes in v201102

Unread post 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.
User avatar
pizaCat
Posts: 11
Joined: Sat May 29, 2021 12:47 am
Has thanked: 6 times

Re: NES core colour changes in v201102

Unread post 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.
thorr
Top Contributor
Posts: 1127
Joined: Mon Jul 06, 2020 9:37 pm
Has thanked: 557 times
Been thanked: 258 times

Re: NES core colour changes in v201102

Unread post 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
User avatar
pizaCat
Posts: 11
Joined: Sat May 29, 2021 12:47 am
Has thanked: 6 times

Re: NES core colour changes in v201102

Unread post by pizaCat »

thorr wrote: Wed Jun 09, 2021 2:51 pm 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
Yes I am using RCA cables and the switch is set to YPbPr. I tried your settings, and got the same very nice picture in the menu and the same flashing once per second in the Genesis core. I believe I got the same results because when direct_video=1 these settings are bypassed:
vsync_adjust, vga_scaler, video_mode, refresh_min, refresh_max, vscale_mode, vscale_border
thorr wrote: Wed Jun 09, 2021 2:51 pm 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
These settings give a vertically scrolling image that is distorted horizontally, even in the menu core.
thorr wrote: Wed Jun 09, 2021 2:51 pm 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
These settings give fully distorted images, but I understand that the first is high res and are meant to be downscaled. My TV does support 480i (tested with a dvd player via component out) but I thought the MiSTer does not?

Where can I learn more about video mode values and how to make my own?

edit: The PCB looks like an (updated?) version of the one posted by elvis. Here are some pictures I took:

E8VT75B.jpeg
E8VT75B.jpeg (1.18 MiB) Viewed 2249 times
X1L73dx.jpeg
X1L73dx.jpeg (688.75 KiB) Viewed 2249 times
whPggun.jpeg
whPggun.jpeg (1.48 MiB) Viewed 2249 times
5QWm3fx.jpeg
5QWm3fx.jpeg (1.35 MiB) Viewed 2249 times
KD2uggm.jpeg
KD2uggm.jpeg (850.49 KiB) Viewed 2249 times
GbyvAG6.jpeg
GbyvAG6.jpeg (487.69 KiB) Viewed 2249 times
jyhlacZ.png
jyhlacZ.png (264.79 KiB) Viewed 2249 times
thorr
Top Contributor
Posts: 1127
Joined: Mon Jul 06, 2020 9:37 pm
Has thanked: 557 times
Been thanked: 258 times

Re: NES core colour changes in v201102

Unread post by thorr »

I would return the component converter and say it doesn't work.
When you use the HDMI to VGA cable with the SOG mod, does the Genesis core have the flashing issue?
Regarding the 1440x1080 timings and 480i, I am using an external HDMI to SVideo converter that converts everything to 480i. The MiSTer unfortunately does not support outputting 480i, but the last timings I listed was an attempt to make it work at 480i.

Regarding learning, there are a couple of video timings calculators websites. I put in the resolution I want and adjust the numbers until the KHz clock signal matches the number that works with CRT TV's (around 15KHz, but I don't remember the exact number) and the refresh rate is close to 59.94 Hz. The front and back porch numbers adjust the positioning. Lots of experimentation is the best way to learn. I taught myself. You first need a reliable HDMI to component solution though. Hopefully when I get the new converter in July, it will work and I can recommend that one to people.

I will try to remember to post pictures of my working component converter internals just as a FYI to people as well.
User avatar
pizaCat
Posts: 11
Joined: Sat May 29, 2021 12:47 am
Has thanked: 6 times

Re: NES core colour changes in v201102

Unread post by pizaCat »

thorr wrote: Wed Jun 09, 2021 5:58 pm When you use the HDMI to VGA cable with the SOG mod, does the Genesis core have the flashing issue?
No, it syncs instantly, and works very well even when loading a ROM or when a game changes video mode back and forth, as long as it is not in EU (Pal) mode.
thorr wrote: Wed Jun 09, 2021 5:58 pm Regarding learning, there are a couple of video timings calculators websites. I put in the resolution I want and adjust the numbers until the KHz clock signal matches the number that works with CRT TV's (around 15KHz, but I don't remember the exact number) and the refresh rate is close to 59.94 Hz. The front and back porch numbers adjust the positioning. Lots of experimentation is the best way to learn. I taught myself. You first need a reliable HDMI to component solution though. Hopefully when I get the new converter in July, it will work and I can recommend that one to people.
Thanks for the tips, I will read up on the subject and try out timing calculators.

The enjoyGadgets converter works very well in direct_video mode in the menu core via component RCA cables. If only I could get the same image quality via direct_video off. Is there any documentation on that? I mean, what would be the video_mode that matches what the menu core outputs natively via direct_video when menu_pal=0 ? I want to try and find that info and configure a video_mode that matches.

I don't really understand how all these commercial devices could output a compatible signal via component for all brands and models of NTSC TVs, but all the video modes I tried don't work on my TV. How can we not have a video_mode and scaler setting that will work on all NTSC TVs? (with lag, and stuttering + bad scaling depending on the core, sure, but a stable image). Is that only due to using the HDMI output to convert to analog, or is it a limitation of the scaler? Does the io board have the same issues?
thorr wrote: Wed Jun 09, 2021 5:58 pm I will try to remember to post pictures of my working component converter internals just as a FYI to people as well.
For sure, every bit of extra detail helps. It's very hard to find the exact same brand and model, especially with generic low cost devices. The specs are always copy pasted and lack the details we need!
thorr
Top Contributor
Posts: 1127
Joined: Mon Jul 06, 2020 9:37 pm
Has thanked: 557 times
Been thanked: 258 times

Re: NES core colour changes in v201102

Unread post by thorr »

If the HDMI to VGA cable is working for you, then everything I posted above should apply to that solution. You could try those video timings (that have 240 for the vertical resolution) and they might work for you. You should be able to just use that and do everything you want to do. If the HDMI to VGA is working for you, what more are you looking to gain from the enjoyGadgets converter? The only thing I can think of is it has a switch on it if you wanted to hook up a VGA monitor. It might look better too. How does the menu screen compare between the enjoyGadgets and the HDMI to VGA cable? Are the colors and sharpness exactly the same? My fully working converter looks slightly different than my other converters and looks beautiful.

Regarding the menu timings, this is like deja vu for me. I went through the same thing with one of my previous HDMI to component devices working with the menu but not working with other things. paulbnl provided the menu timings to me and they still would not work when not using direct video. So, I would suspect the same would be for you if you tried the menu timings. Read through this thread if you want to read about my journey: viewtopic.php?f=33&t=1471
The menu timings are in that thread and they are video_mode=640,30,60,70,240,4,4,14,12587 which are the same ones I provided above as it turns out in the first section, but they don't get used because direct video is on. If I turn off direct video, the menu timings work fine with my fully working converter. I don't really care for them though because as I recall they have too much overscan cutting off part of the image.
User avatar
pizaCat
Posts: 11
Joined: Sat May 29, 2021 12:47 am
Has thanked: 6 times

Re: NES core colour changes in v201102

Unread post by pizaCat »

thorr wrote: Wed Jun 09, 2021 7:15 pm If the HDMI to VGA is working for you, what more are you looking to gain from the enjoyGadgets converter? The only thing I can think of is it has a switch on it if you wanted to hook up a VGA monitor. It might look better too.
I agree, and I will probably return the enjoyGadgets converter, unless I find a good way to use it and keep it as backup (since the AG6200 chip I have is cracked). I figured it can also help out anyone looking for a solution, since it is readily available on Amazon.

The good HDMI to VGA I got was given to me by a friend, and I was having a hard time buying a good one. It works with all cores except a few Pal ones. Vertical cores work but I won't be rotating a 32" CRT to play them, so I'll move to the HDTV for those!
thorr wrote: Wed Jun 09, 2021 7:15 pm How does the menu screen compare between the enjoyGadgets and the HDMI to VGA cable? Are the colors and sharpness exactly the same? My fully working converter looks slightly different than my other converters and looks beautiful.
The enjoyGadgets converter has teh same nice image in the menu, but I did notice more overscan than the AG6200. Another thing I noticed, is that if I cycle through the background images, the "static noise" background looks like it changes the screen resolution compared to the backgrounds that are pictures. This is also true on the AG6200 HDMI to VGA adapter.
thorr wrote: Wed Jun 09, 2021 7:15 pm Regarding the menu timings, this is like deja vu for me. I went through the same thing with one of my previous HDMI to component devices working with the menu but not working with other things. paulbnl provided the menu timings to me and they still would not work when not using direct video. So, I would suspect the same would be for you if you tried the menu timings. Read through this thread if you want to read about my journey: viewtopic.php?f=33&t=1471
The menu timings are in that thread and they are video_mode=640,30,60,70,240,4,4,14,12587 which are the same ones I provided above as it turns out in the first section, but they don't get used because direct video is on. If I turn off direct video, the menu timings work fine with my fully working converter. I don't really care for them though because as I recall they have too much overscan cutting off part of the image.
I will re-read through it now that I have a working direct_video adapter, and try the video modes on it.
thorr
Top Contributor
Posts: 1127
Joined: Mon Jul 06, 2020 9:37 pm
Has thanked: 557 times
Been thanked: 258 times

Re: NES core colour changes in v201102

Unread post by thorr »

Are you sure it is cracked? When I look at your photo, to me it looks like a black line on top of the chip. Here is my HDMI to VGA adapter and most likely it would work just as well but I don't want to mod it because I use it the way it is sometimes: https://www.amazon.com/gp/product/B01MS611LJ I was thinking there is probably a way to make an adapter with male and female VGA connectors on it with the SOG mod inside. I was also thinking my VGA to component cable would have the SOG mod because it only has three component cables on it and no sync cables, but it didn't work for me.
User avatar
pizaCat
Posts: 11
Joined: Sat May 29, 2021 12:47 am
Has thanked: 6 times

Re: NES core colour changes in v201102

Unread post by pizaCat »

thorr wrote: Wed Jun 09, 2021 8:59 pm Are you sure it is cracked? When I look at your photo, to me it looks like a black line on top of the chip.
Yes it is actually cracked, I felt it with my nail.
thorr wrote: Wed Jun 09, 2021 8:59 pm Here is my HDMI to VGA adapter and most likely it would work just as well but I don't want to mod it because I use it the way it is sometimes: https://www.amazon.com/gp/product/B01MS611LJ
I looked for that Moread adapter on amazon.ca and it is available to import. Did you open it to verify that it has the same AG6200 chip? If it is then I'll order one for peace of mind.
thorr wrote: Wed Jun 09, 2021 8:59 pm I was thinking there is probably a way to make an adapter with male and female VGA connectors on it with the SOG mod inside. I was also thinking my VGA to component cable would have the SOG mod because it only has three component cables on it and no sync cables, but it didn't work for me.
The SOG in a VGA male to VGA female custom adapter is a great idea.

As for the cable, it assumes that the signal on the VGA out is a component signal and already has SOG, just like the IO board does with the built in SOG switch. I guess that it can't be done via HDMI to VGA, so the mix in of the sync with SOG mod is a workaround and the HSync pin 13 is used as composite sync with the setting "composite_sync=1".
thorr
Top Contributor
Posts: 1127
Joined: Mon Jul 06, 2020 9:37 pm
Has thanked: 557 times
Been thanked: 258 times

Re: NES core colour changes in v201102

Unread post by thorr »

pizaCat wrote: Wed Jun 09, 2021 11:23 pm I looked for that Moread adapter on amazon.ca and it is available to import. Did you open it to verify that it has the same AG6200 chip? If it is then I'll order one for peace of mind.
It definitely is. I didn't open it, but I found it from a youtube video talking about it with the MiSTer. It worked perfectly with my VGA CRT monitor with the MiSTer before the monitor died.
pizaCat wrote: Wed Jun 09, 2021 11:23 pm The SOG in a VGA male to VGA female custom adapter is a great idea.
One of these: https://www.amazon.com/Willwin-Connecto ... B074V5KW9V
and a sacrificed male VGA cable with the end cut off should do the trick quite nicely assuming the above has all the needed pins in it. If not, there are other options that have all the pins available like this one: https://www.amazon.com/SinLoon-Solderle ... B07P6R918T
pizaCat wrote: Wed Jun 09, 2021 11:23 pm As for the cable, it assumes that the signal on the VGA out is a component signal and already has SOG, just like the IO board does with the built in SOG switch. I guess that it can't be done via HDMI to VGA, so the mix in of the sync with SOG mod is a workaround and the HSync pin 13 is used as composite sync with the setting "composite_sync=1".
That makes sense. Thanks for the explanation!

Also, I forgot to mention earlier that I use the Tendak SVideo converter for rotated vertical arcade cores at 480i on my TV and it works pretty well giving you 480 lines of resolution instead of 240. Hopefully someday the MiSTer will support 480i with the scaler.
thorr
Top Contributor
Posts: 1127
Joined: Mon Jul 06, 2020 9:37 pm
Has thanked: 557 times
Been thanked: 258 times

Re: NES core colour changes in v201102

Unread post by thorr »

FYI - I got the ao486 core working really good with these settings. They allow the refresh rate to be set to Variable in the ao486 core which is preferred so Second Reality works all the way through. I just added this to the bottom of my mister.ini so it only activates this for the ao486 core and everything else uses direct_video=1.

[ao486]
; Set it to "Variable" in the ao486 core instead of 60Hz
direct_video=0
vga_scaler=1
vsync_adjust=1
vscale_mode=3
video_mode= 1280, 170, 140,244,240, 2, 0, 22, 29020 ; Best for ao486
thorr
Top Contributor
Posts: 1127
Joined: Mon Jul 06, 2020 9:37 pm
Has thanked: 557 times
Been thanked: 258 times

Re: NES core colour changes in v201102

Unread post by thorr »

I just made a new custom mode and here is how I did it (I didn't end up using it though):
Go Here: https://www.epanorama.net/faq/vga2rgb/calc.html
You want the Horizontal Sync Frequency to be as close to 15.73 KHz as possible and the vertical sync to be as close to 59.94 Hz as possible when you click the Calculate button. They don't have to be exact.
Plug in the resolution you want with the vertical always being 240.
Put in values for the other spots (don't have real good advice here other than start with known values from another working resolution)
Click calculate.
Change the Pixel Clock Frequency until you get close to 15.73 KHz and 59.94 Hz. Then play with the Sync Pulse values until you get it as close as you can.
Once you have it, try it and see how it looks.
There are buttons to move the image around on the website, and you can see what it does to the numbers and see how it works. Keep playing with it until you get it the way you want it. If it is too wide or too narrow, play with the front and back porch values. This part is tricky and I can't remember how to do it at the moment.
Post Reply