Page 1 of 2

Adjustable Composite Converter?

Posted: Thu Mar 10, 2022 2:42 am
by matijaerceg
TL;DR: Is there a composite converter that can adjust for dot crawl / rainbow banding?

I've had a MiSTer for a few months now, and it's the greatest thing since sliced bread.

The only .. annoyance .. I have is the passion (read: anger) that I see come out online in forums and on twitter around analog output, single/dual SDRAM slots, and the fact that the only 'official' video output is HDMI. The very nature of MiSTer attracts esoteric nitpicks (such as myself) who love both the accuracy of the cores, as well as the opportunity to play said cores on period-accurate hardware (ie. original controllers via SNAC, or CRTs via analog out). But old hardware will eventually become too rare for the casual user. So there seem to be two camps:
  • please make the PSX core work with one SDRAM Robert! -VS- Fuck off CRT plebs, don't sacrifice anything, use both sticks
  • composite is a truer experience -VS- RGB is superior
  • HDMI is the superior output -VS- digital displays can't match the look of a CRT even with filters
I can understand both camps in each case, since the scarcity of developers means that time and effort spent in either direction means less time spent in the other. But in the long run, it's not a zero sum game. I'm sure eventually everyone will be happy..

On that note, I digress, since I'm here to ask about adjustable (?) composite output/converters.

I am a total noob when it comes to analog video signal technology. My limited understanding is that original consoles would tune the .. color carrier signal (?) frequency to deliberately (or not) correspond with the resolution (or pixel arrangement) of their system, such that the resulting artifacts such as dot crawl would look a certain way or be minimized. Correct me if I'm wrong.

Now, when I use a composite adapter, such as Antonio Villena's, with my MiSter, some cores look pretty great, while others like Genesis look rather bad, much worse than original hardware. I like a little bit of dot crawl, but not this much. I get the feeling it will be a long time, if ever, before we see cores that send the correct frequency to adapters like Antonio's that support the signal. Which brings me to my question:

Does anyone know of some kind of RGB to Composite converter that is adjustable? Something that can, perhaps with a knob, adjust the sub carrier frequency so that I can fine tune the final look myself?

Re: Adjustable Composite Converter?

Posted: Thu Mar 10, 2022 9:48 am
by akeley
matijaerceg wrote: Thu Mar 10, 2022 2:42 am
  • please make the PSX core work with one SDRAM Robert! -VS- Fuck off CRT plebs, don't sacrifice anything, use both sticks
That's a curious one. Is it because of the assumption that you can only output to a CRT via analog I/O board, as if DV didn't exist? And completely bypassing the fact that 1 stick would be great for people on tight budgets? It's amazing how weirdly nonsensical online arguments can get.

As for composite on original hardware, the quality has varied from machine to machine (usually the older ones had it worse). Eg, on my MSX1 VG8020 you can see the dot crawl pretty bad, on MSX2 F1-AS not at all.

I'm interested in getting one myself but so far haven't heard of a problem-free one, at least in composite (S-Video seems to be fine from what people say). There is this open source adapter, but from what I understand it also has these extra artifacts in composite.

It seems it mostly depends on adjusting the cores, not the adapter hardware itself (though maybe that could help too, I don't know) and since this is a niche-within-a niche issue, it's unlikely we will see it happen soon, if ever (though never say never in the MiSTer world).

Re: Adjustable Composite Converter?

Posted: Thu Mar 10, 2022 2:32 pm
by dmckean
Just hold off several more weeks until native s-video and composite drops. Any external scan converter is too big a compromise.

Re: Adjustable Composite Converter?

Posted: Thu Mar 10, 2022 2:50 pm
by akeley
dmckean wrote: Thu Mar 10, 2022 2:32 pm native s-video and composite
WTH? Is this one of these things luddites like me don't hear about because we're not on Twitter/Discord/... ? ;)

Re: Adjustable Composite Converter?

Posted: Thu Mar 10, 2022 3:10 pm
by antoniovillena
matijaerceg wrote: Thu Mar 10, 2022 2:42 am Does anyone know of some kind of RGB to Composite converter that is adjustable? Something that can, perhaps with a knob, adjust the sub carrier frequency so that I can fine tune the final look myself?
With my adapter is possible to send directly the color carrier clock, through vsync pin. But there is no support for that in the cores.

Re: Adjustable Composite Converter?

Posted: Thu Mar 10, 2022 3:20 pm
by dmckean
akeley wrote: Thu Mar 10, 2022 2:50 pm
dmckean wrote: Thu Mar 10, 2022 2:32 pm native s-video and composite
WTH? Is this one of these things luddites like me don't hear about because we're not on Twitter/Discord/... ? ;)
Yes.

https://twitter.com/MikeSimone3

https://github.com/MikeS11/Test_Pattern_YC

Currently only S-video is implemented over the analog board. But he's looking to add composite support and direct video support.

Re: Adjustable Composite Converter?

Posted: Thu Mar 10, 2022 3:36 pm
by akeley
Ah, that's the guy from that thread I linked to above. Didn't know he's still working on it (the repo for the board itself had no activity recently). If he can make the changes to the cores so the composite works ok, it'd be great news.

Re: Adjustable Composite Converter?

Posted: Thu Mar 10, 2022 7:48 pm
by dmckean
akeley wrote: Thu Mar 10, 2022 3:36 pm Ah, that's the guy from that thread I linked to above. Didn't know he's still working on it (the repo for the board itself had no activity recently). If he can make the changes to the cores so the composite works ok, it'd be great news.
He gave up on his board and decided to implement it all natively instead. It's been really interesting to follow along with.

Re: Adjustable Composite Converter?

Posted: Sun Mar 13, 2022 6:20 am
by matijaerceg
antoniovillena wrote: Thu Mar 10, 2022 3:10 pm With my adapter is possible to send directly the color carrier clock, through vsync pin. But there is no support for that in the cores.
Yup, exactly, that's what I meant when I said "I get the feeling it will be a long time, if ever, before we see cores that send the correct frequency to adapters like Antonio's that support the signal." And that's why I'm wondering if there's some kind of adapter that's manually adjustable so we can play with the clock by hand, if that even makes sense.

Re: Adjustable Composite Converter?

Posted: Sun Mar 13, 2022 2:10 pm
by dmckean
matijaerceg wrote: Sun Mar 13, 2022 6:20 am
antoniovillena wrote: Thu Mar 10, 2022 3:10 pm With my adapter is possible to send directly the color carrier clock, through vsync pin. But there is no support for that in the cores.
Yup, exactly, that's what I meant when I said "I get the feeling it will be a long time, if ever, before we see cores that send the correct frequency to adapters like Antonio's that support the signal." And that's why I'm wondering if there's some kind of adapter that's manually adjustable so we can play with the clock by hand, if that even makes sense.
There isn't going to be a need for external scan converters anymore. The cores will be able to generate Y/C and composite video internally and output passively over the VGA ports. You'll just need adapter cables.

Re: Adjustable Composite Converter?

Posted: Sun Mar 13, 2022 2:55 pm
by matijaerceg
Does each core developer have to apply this 'template' to their core? Or is it something I'd have to 'install' to my MiSTer myself?

Re: Adjustable Composite Converter?

Posted: Sun Mar 13, 2022 3:06 pm
by dmckean
matijaerceg wrote: Sun Mar 13, 2022 2:55 pm Does each core developer have to apply this 'template' to their core? Or is it something I'd have to 'install' to my MiSTer myself?
This is a template that will need to be applied to all the cores, I'm pretty sure MikeS plans to apply it to all the cores himself though. There's already test cores in the github link above that output Y/C over the analog board. He's working on getting Y/C working over direct video now and then will work on combining Y&C in the core for composite.

Re: Adjustable Composite Converter?

Posted: Sun Mar 13, 2022 3:10 pm
by matijaerceg
Ah okay, so we'll have to wait and see if the correct composite color carrier clock will be able to be sent this way?

Re: Adjustable Composite Converter?

Posted: Sun Mar 13, 2022 4:13 pm
by paulbnl
matijaerceg wrote: Sun Mar 13, 2022 6:20 am
antoniovillena wrote: Thu Mar 10, 2022 3:10 pm With my adapter is possible to send directly the color carrier clock, through vsync pin. But there is no support for that in the cores.
Yup, exactly, that's what I meant when I said "I get the feeling it will be a long time, if ever, before we see cores that send the correct frequency to adapters like Antonio's that support the signal." And that's why I'm wondering if there's some kind of adapter that's manually adjustable so we can play with the clock by hand, if that even makes sense.
Yeah it is gonna take a long time if ever. I was working on it but Antonio's adapters don't work when sending the Color carrier clock on the Vsync pin of the IO board. I have tried to work with him to fix it but he doesn't want to help.

Also he hasn't provided any core for MiSTer that works with sending the color carrier clock to prove his claim.

Re: Adjustable Composite Converter?

Posted: Sun Mar 13, 2022 5:07 pm
by matijaerceg
So what I'm hearing is that the answer to my question is no, there's no hardware that lets me adjust the color carrier clock manually.

Re: Adjustable Composite Converter?

Posted: Sun Mar 13, 2022 6:01 pm
by akeley
matijaerceg wrote: Sun Mar 13, 2022 5:07 pm So what I'm hearing is that the answer to my question is no, there's no hardware that lets me adjust the color carrier clock manually.
No, there isn't. If there was we'd have mentioned it already.

Regardless, the news that MikeS is working on a blanket, in-built solution, which won't require any additional adapters is simply fantastic. So for now you'll have just to be patient. Does your TV only have Composite/S-Video, btw?

Re: Adjustable Composite Converter?

Posted: Sun Mar 13, 2022 6:53 pm
by matijaerceg
akeley wrote: Sun Mar 13, 2022 6:01 pm Does your TV only have Composite/S-Video, btw?
See the first half of my original post. It's not a matter of necessity, but preference, as well as historical analysis. Here's an example of something only composite video can do: https://en.wikipedia.org/wiki/Composite ... dering.jpg

Re: Adjustable Composite Converter?

Posted: Sun Mar 13, 2022 7:05 pm
by dmckean
matijaerceg wrote: Sun Mar 13, 2022 6:53 pm
akeley wrote: Sun Mar 13, 2022 6:01 pm Does your TV only have Composite/S-Video, btw?
See the first half of my original post. It's not a matter of necessity, but preference, as well as historical analysis. Here's an example of something only composite video can do: https://en.wikipedia.org/wiki/Composite ... dering.jpg
You seem to not be understanding.

The changes MikeS are making will allow the cores to generate and output actual S-video and composite video without an external scan converter. You'll only need adapter cables to connect the correct pins from the VGA dongle to the s-video or composite inputs on your TV/monitor. This is not some simulated effect.

Re: Adjustable Composite Converter?

Posted: Sun Mar 13, 2022 7:17 pm
by akeley
matijaerceg wrote: Sun Mar 13, 2022 6:53 pm See the first half of my original post. It's not a matter of necessity, but preference, as well as historical analysis. Here's an example of something only composite video can do: https://en.wikipedia.org/wiki/Composite ... dering.jpg
Geez, buddy, I know a thing or two about composite artifacting and all that jazz :) I was simply asking in case you wanted to consider other options. A number of early computers/consoles had a native RGB after all too, so you could use that while waiting for composite.

Re: Adjustable Composite Converter?

Posted: Sun Mar 13, 2022 7:21 pm
by matijaerceg
I fully understand. I acknowledge that Mike Simone is developing a solution that doesn't use an external adapter. I follow his work on Twitter, as well as both of his composite/s-video GitHub projects. If that work is ever completed, I will be ecstatic! Until then, can I ask about what all our options are?

Re: Adjustable Composite Converter?

Posted: Sun Mar 13, 2022 8:22 pm
by antoniovillena
paulbnl wrote: Sun Mar 13, 2022 4:13 pm Yeah it is gonna take a long time if ever. I was working on it but Antonio's adapters don't work when sending the Color carrier clock on the Vsync pin of the IO board. I have tried to work with him to fix it but he doesn't want to help.

Also he hasn't provided any core for MiSTer that works with sending the color carrier clock to prove his claim.
You sent me a core that doesn't work. I have tested with cores for other FPGA (ZXDOS) so the hardware is working. I will provide a MiSTer core in near future that prove that too.

Re: Adjustable Composite Converter?

Posted: Sun Mar 13, 2022 8:27 pm
by matijaerceg
akeley wrote: Sun Mar 13, 2022 7:17 pm I know a thing or two about composite artifacting and all that jazz :)
That's a really cool project, thanks for sharing. Photographing CRTs digitally is a very difficult task!

Re: Adjustable Composite Converter?

Posted: Sun Mar 13, 2022 8:28 pm
by matijaerceg
antoniovillena wrote: Sun Mar 13, 2022 8:22 pm I will provide a MiSTer core in near future that prove that too.
If you need help with testing, lmk, I have your adapter and a variety of CRTs (consumer, pvm, bvm).

Re: Adjustable Composite Converter?

Posted: Mon Mar 14, 2022 11:29 am
by paulbnl
antoniovillena wrote: Sun Mar 13, 2022 8:22 pm You sent me a core that doesn't work. I have tested with cores for other FPGA (ZXDOS) so the hardware is working. I will provide a MiSTer core in near future that prove that too.
I am looking forward to your MiSTer core source. I am assuming you will simply output a 4x color clock to the Vsync output?

Re: Adjustable Composite Converter?

Posted: Wed Mar 16, 2022 2:14 pm
by MikeS1
Hi All,

I started going down the path last year in fabricating my own NTSC/PAL encoder that used a trim capacitor to adjust the frequency a bit to lock onto different core frequencies, but I found that even if I could adjust the frequency a bit, I still was not happy with the image. Especially with a commodore 1702 monitor where its extremely picky, I could tune the encoder to work really well on SNES, NES, Atari, but then you would have issues with the sega cores and others. And Also you could never tune arcade cores to look good at all.

That brought me down the path of generating (And tuning sometimes), the clock frequency within the FPGA for both PAL and NTSC and modulating the chroma. This works very well for S-Video but it creates high frequency noise that needs to be filters when you combine them for composite. On the plus side, S-Video, which even that didnt work well with external encoders, works much better now. And I've been working to get some breakout boards build that can both filter noise or if just be a straight through adapter swap. (I've also added an option to use direct video thats in testing).

I've got a bunch of test cores: https://github.com/MikeS11/Test_Pattern ... %20Release and am currently working through an easy way to make it modular for the framework and ensure its well optimized. I don't know if it will be added to the framework, even though its quite compact, but I just want to make it work as well as possible and at least give people another option.

For anyone who wants to see my previous iteration of the changes: https://github.com/MikeS11/Template_MiS ... its/master There are two commits, one major commit, and another that fixed pal's timing. Though I've since made it a bit more robust to better lock onto the clock frequencies by updating to a 40 bit phase accumulator and a 8 bit sine LUT.

I just love seeing my MiSTer running on my 1702, in all its glory :)

Re: Adjustable Composite Converter?

Posted: Wed Mar 16, 2022 2:40 pm
by matijaerceg
Despite not being part of the official manifesto, s-video and composite implementation work is, in my opinion, one of the last remaining critical parts of the MiSTer 'framework'. I'm very grateful that someone who understands it on a low level is working on a native solution, so thank you Mike!

For anyone trying your test cores, is there anything we can specifically give your feedback about?

Also, is there a filter for the composite noise currently available anywhere or would it have to be a custom thing?

Re: Adjustable Composite Converter?

Posted: Wed Mar 16, 2022 6:11 pm
by MikeS1
matijaerceg wrote: Wed Mar 16, 2022 2:40 pm Despite not being part of the official manifesto, s-video and composite implementation work is, in my opinion, one of the last remaining critical parts of the MiSTer 'framework'. I'm very grateful that someone who understands it on a low level is working on a native solution, so thank you Mike!

For anyone trying your test cores, is there anything we can specifically give your feedback about?

Also, is there a filter for the composite noise currently available anywhere or would it have to be a custom thing?
There are two approaches to the filtering, I could try to implement an IIR/FIR filter through the FPGA to clean up the signals, similar to what Alexey did with the audio, or you can try to actively or passively filter things externally. Adding filtering on the FPGA is resource intensive and probably something we should avoid. Also its not required at all for S-Video.

I'm going to try active filtering right now because its cheap to add to a breakout board, and I'm not sure if there is anything that is off the shelf that could be tested..

Having a basic breakout board with S-Video and no filtering works really well, so this is really to see how well I can clean up the composite signal.

As for feedback, probably nothing right now unless one wants to get into helping iron our the the hardware design! I might have to work with Pork on getting something more robust :)

This was what i've prototyped so far

FN2aCC4VUAMPswn.png
FN2aCC4VUAMPswn.png (109.43 KiB) Viewed 5089 times

If I can get to a point where I'm confident, Ill post the Eagle / gerber source on github and maybe work on selling a few batches.

Re: Adjustable Composite Converter?

Posted: Wed Mar 16, 2022 6:42 pm
by matijaerceg
I'd be first in line to buy one!

Is there a way to test composite with your test cores currently? I tried the Genesis core, but seems to only be for sending s-video via two cables, rather than composite via one?

Re: Adjustable Composite Converter?

Posted: Wed Mar 16, 2022 7:07 pm
by MikeS1
I wouldn't really try composite right now without filtering. I'm still trying to see how I can get that working well. And I might have to look at optimizing the verilog timing as well, I'd be happy to have experts like Paul look at the verilog changes and provide guidance :)

Re: Adjustable Composite Converter?

Posted: Mon Mar 21, 2022 12:55 pm
by Hetzen
I'd also be interested when you get this worked out.