Original analog video without I/O board? Possible!

https://github.com/MiSTer-devel/Main_MiSTer/wiki

Moderators: Mug UK, Zorro 2, Greenious, spiny, Sorgelig, Moderator Team

Sorgelig
Ultimate Atarian
Ultimate Atarian
Posts: 5390
Joined: Mon Dec 14, 2015 10:51 am
Location: Russia/Taiwan

Re: Original analog video without I/O board? Possible!

Postby Sorgelig » Fri Aug 30, 2019 8:53 am

I think it's not a problem to make a custom board using AG6201 chip. Schematics is pretty much just about connecting chip to connectors plus couple resistors.

paulbnl
Atari maniac
Atari maniac
Posts: 75
Joined: Wed Oct 24, 2018 9:43 am

Re: Original analog video without I/O board? Possible!

Postby paulbnl » Fri Aug 30, 2019 9:25 am

Since the Ugreen adapter only changes the dark shades, I have tested changing the CSC scaling factors set to output RGB 16-255 and that works great to get proper 0-255 out of it.

Might be worth adding a hdmi_limited=2 option for Limited 16-255.

These are the CSC changes:
0x18 8D-> 8E
0x19 BC-> FE

0x22 0D -> 0E
0x23 BC -> FE

0x2C 0D -> 0E
0x2D BC -> FE

Sorgelig
Ultimate Atarian
Ultimate Atarian
Posts: 5390
Joined: Mon Dec 14, 2015 10:51 am
Location: Russia/Taiwan

Re: Original analog video without I/O board? Possible!

Postby Sorgelig » Fri Aug 30, 2019 12:33 pm

paulbnl wrote:Might be worth adding a hdmi_limited=2 option for Limited 16-255.

These are the CSC changes:
0x18 8D-> 8E
0x19 BC-> FE

0x22 0D -> 0E
0x23 BC -> FE

0x2C 0D -> 0E
0x2D BC -> FE

Ok, i will add this change.

Lightwave
Atari maniac
Atari maniac
Posts: 76
Joined: Sun Dec 16, 2018 8:18 pm

Re: Original analog video without I/O board? Possible!

Postby Lightwave » Fri Aug 30, 2019 1:21 pm

Sorgelig wrote:
paulbnl wrote:Might be worth adding a hdmi_limited=2 option for Limited 16-255.

Ok, i will add this change.


Great! Looking forward to testing this as soon as my adapter arrives.

paulbnl
Atari maniac
Atari maniac
Posts: 75
Joined: Wed Oct 24, 2018 9:43 am

Re: Original analog video without I/O board? Possible!

Postby paulbnl » Fri Aug 30, 2019 8:22 pm

Sorgelig wrote:Ok, i will add this change.


Thanks!

JamesF
Captain Atari
Captain Atari
Posts: 155
Joined: Sat Dec 15, 2018 6:46 am

Re: Original analog video without I/O board? Possible!

Postby JamesF » Sat Aug 31, 2019 8:52 am

Thank you paulbnl, it works great!

@Sorgelig
Seems like the SOG resistor+diode injection of csync to the Y (luma), it signal pulls is slightly below 0v so the black shades are clipped when using the VGA adapter with this resistor+diode SOG mod.
The IO boards has a buffer transistor for SOG and does not change the Y signal, but this quick resistor+diode mod does.

Sorgelig
Ultimate Atarian
Ultimate Atarian
Posts: 5390
Joined: Mon Dec 14, 2015 10:51 am
Location: Russia/Taiwan

Re: Original analog video without I/O board? Possible!

Postby Sorgelig » Sat Aug 31, 2019 10:08 am

JamesF wrote:Thank you paulbnl, it works great!

@Sorgelig
Seems like the SOG resistor+diode injection of csync to the Y (luma), it signal pulls is slightly below 0v so the black shades are clipped when using the VGA adapter with this resistor+diode SOG mod.
The IO boards has a buffer transistor for SOG and does not change the Y signal, but this quick resistor+diode mod does.

Both circuits doing the same. Y signal is pulled up at some level (depending on resistor) during active area (which must be treated as black level by display) and remove pull during sync signal and let the Y drop bellow the black level. This is how sync is injected.
Depending on display and its ability to auto-adjust the black level independently on each component you may or may not see slight green component discolouration. This is why I/O board has SOG switch which you set to OFF position if SOG is not required, so it won't affect TV/Monitor expecting normal VGA signal without negative sync on green.

Original circuit with transistor doing 2 functions: 1) mixes hsync+vsync 2) inject the sync to Y/G. Since MiSTer has option to provide CSync (over HSync) from all cores, only HSync is required, so diode is enough for MiSTer.

You may increase the resistor to reduce the pulling level. For me 2K works fine too. This will decrease level of sync pulses as well. So it will depend on your display ability to catch the sync pulses.

More complex SOG circuit needs negative power supply (or power inverter) to inject the syncs as true negative pulses without pulling Y/G.

z00pster
Atariator
Atariator
Posts: 18
Joined: Sat Apr 06, 2019 10:23 pm

Re: Original analog video without I/O board? Possible!

Postby z00pster » Sat Sep 07, 2019 8:38 am

Is the direct video mode now supported in the main framework and available for other cores to support?

Thanks

Sorgelig
Ultimate Atarian
Ultimate Atarian
Posts: 5390
Joined: Mon Dec 14, 2015 10:51 am
Location: Russia/Taiwan

Re: Original analog video without I/O board? Possible!

Postby Sorgelig » Sat Sep 07, 2019 9:00 am

Yes, but it's still in developing stage.

z00pster
Atariator
Atariator
Posts: 18
Joined: Sat Apr 06, 2019 10:23 pm

Re: Original analog video without I/O board? Possible!

Postby z00pster » Sat Sep 07, 2019 10:21 am

Thanks Sorgelig. So best for core developers to wait?

Sorgelig
Ultimate Atarian
Ultimate Atarian
Posts: 5390
Joined: Mon Dec 14, 2015 10:51 am
Location: Russia/Taiwan

Re: Original analog video without I/O board? Possible!

Postby Sorgelig » Sat Sep 07, 2019 10:57 am

Yeah, it's best to wait a couple of weeks more.

ShyBry
Atarian
Atarian
Posts: 6
Joined: Wed Oct 10, 2018 9:09 pm

Re: Original analog video without I/O board? Possible!

Postby ShyBry » Sat Sep 07, 2019 9:07 pm

Lightwave wrote:
I’m thinking of getting this Rankie pigtail adapter to test, has anyone had any success with it?

https://www.amazon.ca/gp/product/B00ZMV7RL2/


I have this one. It works with direct_video=1. Different board layout inside than some of the pictures in this thread though.

It has a 3.5mm connector for analog audio but it's backwards - the tip of the connector is supposed to be for the left audio channel, but with this adapter it's the right audio channel.

With YPbPr, the composite sync mod, and when hooked up to a CRT, is it normal for there to be coloured static when loading the menu and switching between cores? Unsure whether this is expected (maybe a more modern display would just show nothing while it syncs) or maybe this adapter and/or my cabling doesn't have enough shielding. Seems fine once I'm in a core which is what matters.

(Incidentally, a Wiistar HDMI to YPBPR adapter does NOT work with direct_video=1. I tried this first because I have both this and the Rankie, was hoping to skip the composite sync mod but no such luck. With the Wiistar, picture rolls violently with hdmi_limited=0, rolls slowly vertically with occasional horizontal distortion with hdmi_limited=1, didn't try hdmi_limited=2.)

Sorgelig
Ultimate Atarian
Ultimate Atarian
Posts: 5390
Joined: Mon Dec 14, 2015 10:51 am
Location: Russia/Taiwan

Re: Original analog video without I/O board? Possible!

Postby Sorgelig » Sat Sep 07, 2019 11:30 pm

YPbPr over direct video is a little tricky as it requires very short blanking so display can pickup correct levels. Not all displays work correctly. I suggest to find some external converter from RGB to YPbPr if your TV doesn't work correct.

Stremon
Atari User
Atari User
Posts: 33
Joined: Fri Mar 22, 2019 3:47 am

Re: Original analog video without I/O board? Possible!

Postby Stremon » Sat Sep 28, 2019 5:06 am

Forgive me if it's not the place to ask, but would 240p at 120Hz work with direct video mode compared to the IO board VGA?
I know it's kind of possible to get it working with the HDMI scaler, but it's not great for latency and video mode matching.

Sorgelig
Ultimate Atarian
Ultimate Atarian
Posts: 5390
Joined: Mon Dec 14, 2015 10:51 am
Location: Russia/Taiwan

Re: Original analog video without I/O board? Possible!

Postby Sorgelig » Sat Sep 28, 2019 9:31 am

Stremon wrote:Forgive me if it's not the place to ask, but would 240p at 120Hz work with direct video mode compared to the IO board VGA?
I know it's kind of possible to get it working with the HDMI scaler, but it's not great for latency and video mode matching.

Direct Video from its name means video directly from the emulated system without processing. So, if core originally outputs 120Hz, then it will go to HDMI. I never tried 120Hz and i don't know if there is any limitations. I don't have such monitor.

If original core outputs 60Hz, then you have to delay the video by at least one frame. It's like a scaler, it needs to accumulate one frame so it will be able to repeat it 3 times. So it's definitely not for low-lag option.

harryd91
Retro freak
Retro freak
Posts: 10
Joined: Wed Sep 25, 2019 1:52 pm

Re: Original analog video without I/O board? Possible!

Postby harryd91 » Sat Sep 28, 2019 12:22 pm

Tested this out today with a cheapo adapter and a VGA to SCART lead. The snes, sms and nes all work from what I tried but a lot have the right side of the picture cut off. Genesis, Atari 2600, C64, neogeo and tg16 all had this issue.

Have tried this on 2 TVs (a crt and an led) and have the same problem on each. Analog out from IO board works as it should. Dont really want to open the adapter up as Im using it for my main pc and Im liable to break it but will try a different one when i can get hold of one

Stremon
Atari User
Atari User
Posts: 33
Joined: Fri Mar 22, 2019 3:47 am

Re: Original analog video without I/O board? Possible!

Postby Stremon » Sat Sep 28, 2019 2:44 pm

Sorgelig wrote:
Stremon wrote:Forgive me if it's not the place to ask, but would 240p at 120Hz work with direct video mode compared to the IO board VGA?
I know it's kind of possible to get it working with the HDMI scaler, but it's not great for latency and video mode matching.

Direct Video from its name means video directly from the emulated system without processing. So, if core originally outputs 120Hz, then it will go to HDMI. I never tried 120Hz and i don't know if there is any limitations. I don't have such monitor.

If original core outputs 60Hz, then you have to delay the video by at least one frame. It's like a scaler, it needs to accumulate one frame so it will be able to repeat it 3 times. So it's definitely not for low-lag option.

240p at 120Hz is not a true 120Hz mode, it's actually detected by PC CRT as 480p 60Hz but is displayed as 240p with true black lines. It's just a clever trick to get true 240p on any 30kHz PC/arcade CRT.
It's a bit like original 240p mode is a trick to display half resolution progressive mode in an interlaced TV screen.
But yeah I do understand that cores are feeding the VGA out directly.
I still haven't managed to understand the logic behind the scandoubler function, I tried few time but it's way above my coding knowledge :oops:
Because the scandoubler scanlines are sadly not so great and way different than true scanlines.

Stremon
Atari User
Atari User
Posts: 33
Joined: Fri Mar 22, 2019 3:47 am

Re: Original analog video without I/O board? Possible!

Postby Stremon » Mon Sep 30, 2019 7:25 am

Hey guys,

Can any of you confirm that the main menu is working with direct video and scandoubler in 480p mode?
With my adapter (tail type with audio and microUSB power), it's working flawlessly in any core that support direct video, no matter the video mode.
But in the main menu I get no signal with or without scandoubler.

I updated everything, even updated the menu.rbf manually, tried different versions, nothing changes.
I'm using a PC CRT (that doesn't support 15kHz video signal obviously).

The weird thing is that I get no signal at all, whereas on the IO board VGA I get the normal image with scandoubler on, and unsupported signal error message when scandoubler off.

Sorgelig
Ultimate Atarian
Ultimate Atarian
Posts: 5390
Joined: Mon Dec 14, 2015 10:51 am
Location: Russia/Taiwan

Re: Original analog video without I/O board? Possible!

Postby Sorgelig » Mon Sep 30, 2019 8:18 am

It works fine for me.
Make sure you didn't enable menu_pal option.
Otherwise may be your monitor doesn't like some specific resolution..

Stremon
Atari User
Atari User
Posts: 33
Joined: Fri Mar 22, 2019 3:47 am

Re: Original analog video without I/O board? Possible!

Postby Stremon » Mon Sep 30, 2019 8:45 am

Sorgelig wrote:It works fine for me.
Make sure you didn't enable menu_pal option.
Otherwise may be your monitor doesn't like some specific resolution..

Pal option is disabled.
My monitor works perfectly at those resolutions through the IO board VGA port (no hdmi scaler).
And even when a resolution is unsupported, the monitor displays unsupported mode, here there is just no signal...
Do you know which precise video mode the menu is using?

warham
Obsessive compulsive Atari behavior
Obsessive compulsive Atari behavior
Posts: 104
Joined: Fri Oct 12, 2018 7:17 am

Re: Original analog video without I/O board? Possible!

Postby warham » Mon Sep 30, 2019 9:01 am

I tried direct vid in one of the nintendo cores but it shifted the screen like 2cm to the right. I saw someone elses screenshot look the same as mine. Is there a way to adjust screen centering for this? The is on an LCD.

Sorgelig
Ultimate Atarian
Ultimate Atarian
Posts: 5390
Joined: Mon Dec 14, 2015 10:51 am
Location: Russia/Taiwan

Re: Original analog video without I/O board? Possible!

Postby Sorgelig » Mon Sep 30, 2019 2:07 pm

warham wrote:I tried direct vid in one of the nintendo cores but it shifted the screen like 2cm to the right. I saw someone elses screenshot look the same as mine. Is there a way to adjust screen centering for this? The is on an LCD.

Direct video outputs the same video timings as on VGA. There are no any altering within the line (horizontal position).
I don't see any difference between VGA output from I/O board and Direct Video.
You need to understand direct video output is ONLY for HDMI->VGA converter to provide analog video.
If you try to connect HDMI or DVI monitor in direct video then it may work incorrectly as this mode uses super-sampled pixel clock which will be seen by monitor (it will show high horizontal resolution) and you may get unexpected behaviour.

User avatar
witchmaster
Obsessive compulsive Atari behavior
Obsessive compulsive Atari behavior
Posts: 112
Joined: Wed Jun 15, 2011 10:50 am

Re: Original analog video without I/O board? Possible!

Postby witchmaster » Mon Sep 30, 2019 3:31 pm

Just tested direct video, damn that picture is clean! :) I'm having some issues though (using VGA to Scart cable on CRT TV). In several cores, all I get is a scrambled screen (according to the attached image). Cores that I experience this problem with include: Genesis, TurboGrafx16, Vectrex, MSX, C64, Atari 2600, Gameboy and BBC Micro.

Cores that work for me include: Minimig, C16, Atari 5200, ColecoVision, NES, SNES and SMS.

I ran the update script an hour ago, before testing the cores. Any idea what could be the problem?

direct-video-scrambled.jpg
You do not have the required permissions to view the files attached to this post.

User avatar
witchmaster
Obsessive compulsive Atari behavior
Obsessive compulsive Atari behavior
Posts: 112
Joined: Wed Jun 15, 2011 10:50 am

Re: Original analog video without I/O board? Possible!

Postby witchmaster » Mon Sep 30, 2019 5:37 pm

Damn, I assumed that my adapters had the AG620x but they both have the CM6616, even being of this type (one with audio port), buyers beware:
bad-hdmi-vga-adapters.jpg

I ordered a UGreen adapter now that will hopefully work.
You do not have the required permissions to view the files attached to this post.

Sorgelig
Ultimate Atarian
Ultimate Atarian
Posts: 5390
Joined: Mon Dec 14, 2015 10:51 am
Location: Russia/Taiwan

Re: Original analog video without I/O board? Possible!

Postby Sorgelig » Mon Sep 30, 2019 11:10 pm

I'm testing on AG620x.
I would like to buy CM6616 based adaptor, but it's hard to find it..


Return to “MiSTer”

Who is online

Users browsing this forum: albconde, Grabulosaure and 10 guests