480i (576i) to 240p (288p) sync converter (Extron RGB alt.)

The place for all discussion on gaming hardware
User avatar
donluca
Posts: 865
Joined: Sat Feb 28, 2015 8:51 pm
Location: Italy
Contact:

Re: 480i (576i) to 240p (288p) sync converter (Extron RGB al

Post by donluca »

I beg pardon, I was thinking about a complete video processor.

Of course, we only care about the sync signal.

You should be absolutely fine with a discrete solution ;)

EDIT: anyway! I've just bought all the parts required. The grand total was 31€, not counting the enclosure (which will be a small wooden box, ~5€).

At 30€ it's a solution with a very specific task and it doesn't come for cheap.
You can buy an Extron RGB interface for 20€ which will provide a small LCD telling you the frequencies on the input and a bunch of options.

We'll see how it turns out with this unit and if it will be worth it.
User avatar
donluca
Posts: 865
Joined: Sat Feb 28, 2015 8:51 pm
Location: Italy
Contact:

Re: 480i (576i) to 240p (288p) sync converter (Extron RGB al

Post by donluca »

Ah, one thing that crossed my mind...

Does the Arduino save the last settings used? Or does it forget it when the power is turned off?

Also, what are the standard settings when powered up the first time?
User avatar
dooklink
Posts: 85
Joined: Fri Nov 07, 2014 6:16 am
Location: Australia

Re: 480i (576i) to 240p (288p) sync converter (Extron RGB al

Post by dooklink »

donluca wrote:Ah, one thing that crossed my mind...

Does the Arduino save the last settings used? Or does it forget it when the power is turned off?

Also, what are the standard settings when powered up the first time?
I don't think it remembers, I haven't coded that at all.
I believe that startup is just bypass mode.
User avatar
donluca
Posts: 865
Joined: Sat Feb 28, 2015 8:51 pm
Location: Italy
Contact:

Re: 480i (576i) to 240p (288p) sync converter (Extron RGB al

Post by donluca »

It would be convenient to program it to output various info on the LCD arduino module.

Like the Horizontal and Vertical Frequency on the input and, most important imho, what option you've actually selected among the ones available and its value.

I've never coded for Arduino so I have no idea how difficult it is. Looks like normal C to me.
User avatar
donluca
Posts: 865
Joined: Sat Feb 28, 2015 8:51 pm
Location: Italy
Contact:

Re: 480i (576i) to 240p (288p) sync converter (Extron RGB al

Post by donluca »

I'm almost there, boys.
Only the LMH1980 is missing and we're good to go.
Spoiler
Image
By they way, for its name I thought about GeneSync.

The name comes from the fusion of Genesis which is my favorite rock progressive (pun intended) band of all time and, of course, Sync.

I'll report back when I'll have it (hopefully) up and running!

EDIT: meanwhile I've compiled the code you provided on the first page. It compiled fine and uploaded without issues to my Arduino Nano! Fingers crossed!
User avatar
donluca
Posts: 865
Joined: Sat Feb 28, 2015 8:51 pm
Location: Italy
Contact:

Re: 480i (576i) to 240p (288p) sync converter (Extron RGB al

Post by donluca »

The Sync separator arrived...

Image

Fun times ahead, I guess... :?

EDIT: aaaaand I broke one pin.
Game over.

This cannot be done with an LMH1980, the IC comes only in that tiny package and there's no way in hell you'll be able to properly solder it without accidentally snapping one pin.

I'll try sourcing out an ISL59885 although they are almost impossible to find.
User avatar
donluca
Posts: 865
Joined: Sat Feb 28, 2015 8:51 pm
Location: Italy
Contact:

Re: 480i (576i) to 240p (288p) sync converter (Extron RGB al

Post by donluca »

Ok, I've made the circuit following the schematics in the first post... and it doesn't work.
It's not outputting any sync.

dooklink are you sure the schematic is correct? I've double and triple checked all the connections and everything's good and follows the schematic.

I've checked every single component alone (LM1881, ISL59885, Arduino nano, etc...) and they're working as intended.

EDIT: I stand corrected, it works, but I had to remove the low pass filter I use on the Sync signal. This is driving me mad, I don't understand why it doesn't work with my filter... maybe the signal is too low?

Oh well, whatever, I still need to box this thing, I'll do it ASAP and test again to make sure everything is working as intended.

EDIT 2: I stand corrected, again.
The sync is unstable and in some cases (240p test suite) it gives a warped image like the one in picture.
Spoiler
Image
Notice that the image is static, it doesn't move, it's just severely warped.

When I first power up my Mega Drive the image is scrambled, like there's no sync. After a minute or so the image stabilizes but there's some small warping in the picture.
In games, whenever there's a change of picture (for example you start a new level), it looks like it loses sync and after a couple of seconds the image turns somewhat stable, but with again some small warping.
Also, the image is shifted to the left to the point that even putting the Video Phase completely to the right I still have a part of the screen cropped off.

What could the problem be?
Insufficient power? I'm using a USB Charger with 2A output fed into the arduino and then I take the 5V from the arduino and feed them to the various ICs.
I've measured 4.8V on arduino's 5V pin, maybe I should use a secondary power source?

EDIT 3: It's not power related, I've tried feeding 5.2V straight from a USB Battery and if anything it even went worse, with the the Horizontal Rate jumping to 100Khz+.
Good thing I'm making all these tests with the Extron and monitor turned off.
User avatar
donluca
Posts: 865
Joined: Sat Feb 28, 2015 8:51 pm
Location: Italy
Contact:

Re: 480i (576i) to 240p (288p) sync converter (Extron RGB al

Post by donluca »

Progress!

The instability was caused by a bad capacitor.

Now the converter "works", meaning that it outputs what the input passes.... and that's pretty much it.

The buttons don't seem to do anything.

Normally they are open and when I press them they connect ground to the pin on the Arduino.
Is this correct? Or do I need a push-to-break switch (which is the exact opposite)?
User avatar
donluca
Posts: 865
Joined: Sat Feb 28, 2015 8:51 pm
Location: Italy
Contact:

Re: 480i (576i) to 240p (288p) sync converter (Extron RGB al

Post by donluca »

Uhm, actually something happens by pushing the buttons in a certain order.

Like the screen flickers for a second.
Once the screen also started rolling vertically.

I'm not sure how menuing on this thing works.

When I turn it on, I should be in bypass mode, and on menu item number 1. Force Progressive

By pushing "Option" I should activate Progressive Mode, right?

EDIT: I don't know why but it seems like the two buttons are working reversed. Option alone doesn't do anything, ever, and Select is the one that actually does something.

Pushing Select on power up doesn't do anything apparently, but if I push Select two times the screen gives a little flicker.

Pushing Option and then Select gives me a vertically rolling screen.

Pushing Option two times and then Select doesn't change anything.

Pushing Option three times and then Select doesn't change anything.

Pushing Option four times gets me back to the first menu item.

I believe it's pretty pointless keeping up my writing in this thread, maybe I should send doolink a PM and see if we can sort this out.
User avatar
donluca
Posts: 865
Joined: Sat Feb 28, 2015 8:51 pm
Location: Italy
Contact:

Re: 480i (576i) to 240p (288p) sync converter (Extron RGB al

Post by donluca »

Quick update! I've finally got it working. There was a bug in the code and I've fixed it.

Now the problem is with the Even/Odd fields: in 480i it doesn't matter what line is swapped, I get one half of the screen shaking by 1 line (jitter?).

I'm working on it atm to fix this.

EDIT: ok, in 576i the entire screen has the 1 line shake, doesn't matter which line swapped. Uhm.
User avatar
donluca
Posts: 865
Joined: Sat Feb 28, 2015 8:51 pm
Location: Italy
Contact:

Re: 480i (576i) to 240p (288p) sync converter (Extron RGB al

Post by donluca »

Alright, I'm posting a bit of updates on this.
dooklink has been working tirelessly on this project and hopefully we'll reach perfection soon™
As of now, at least for me, this is the status of this sync converter: it works, but it has small issues in some cases.


Input signal:

240p/288p = All good (obviously, since it's basically doing nothing)

240p scaled to 480i = All good, perfect scanlines, rock solid image. (Wii VC games, 240p Test Suite, ecc...)

true 480i = flickering lines (1 line flicker, almost unnoticeable) on random lines. (Saturn's Virtua Fighter 2, Radiant Silvergun's title screen, ecc...)

Videos to explain better the issue:

https://www.youtube.com/watch?v=pTqoLTGJQtk

https://www.youtube.com/watch?v=quUJhhNE7dY


288p scaled to 576i = it depends

A - when 288p gets scaled to 576i with an entire line offset it works perfectly. (Wii 240p Test Suite)

B - when 288p gets scaled to 576i with an half line offset it makes the entire screen flicker (Wii 240p Test Suite)

C - when 288p gets scaled to 576i and stretched to full screen it makes the entire screen flicker (most PAL Wii VC games)

Video to explain better the issue:

https://www.youtube.com/watch?v=53np7eHc1fM


true 576i - entire screen flickers.


ATM if you're planning to use the sync converter to play 240p games which have been scaled to 480i (like some Wii VC games) you're in business.

If you're planning to use the sync converter to play 288p games scaled to 576i you may be good, depending on how the 576i is offset and if it's stretched to full screen, otherwise you're getting a one line flicker on the entire screen.

If you're planning to use the sync converter to play true 480i games in "fake" 240p, losing half the resolution to regain scanlines, there's the one line flicker issue on random lines on screen.

If you're planning to use the sync converter to play true 576i games in "fake" 288p, losing half the resolution to regain scanlines, there's the one line flicker issue on the entire screen.


I'll keep you updated if/when dooklink will manage to get stuff sorted out. ;)
Last edited by donluca on Thu Apr 30, 2015 12:22 pm, edited 2 times in total.
User avatar
BazookaBen
Posts: 2159
Joined: Thu Apr 17, 2008 8:09 pm
Location: North Carolina

Re: 480i (576i) to 240p (288p) sync converter (Extron RGB al

Post by BazookaBen »

So I think most of the modes you just posted are not what most people are interested in.

I think most people, myself included, are interested downscaling low-res 480i titles (Mega Man 9 on Wii, Cave Shmups on Xbox 360) to 240p. How does that work out?
User avatar
donluca
Posts: 865
Joined: Sat Feb 28, 2015 8:51 pm
Location: Italy
Contact:

Re: 480i (576i) to 240p (288p) sync converter (Extron RGB al

Post by donluca »

BazookaBen wrote:So I think most of the modes you just posted are not what most people are interested in.

I think most people, myself included, are interested downscaling low-res 480i titles (Mega Man 9 on Wii, Cave Shmups on Xbox 360) to 240p. How does that work out?
240p scaled to 480i = All good, perfect scanlines, rock solid image.

Because that's what those titles are. Those are 240p titles which have been scaled to 480i.
You can see that at the beginning of the third video I shot, using my Wii via Component with the 240p Test Suite.

If you want I can *cough* "get" Mega Man 9 on Wii and shoot a video of it and show you the results.

Please let me know if there's any part in particular you're interested in!
User avatar
BazookaBen
Posts: 2159
Joined: Thu Apr 17, 2008 8:09 pm
Location: North Carolina

Re: 480i (576i) to 240p (288p) sync converter (Extron RGB al

Post by BazookaBen »

Oh ok, for some reason I read that as you taking 240p games then scaling them to 480i. That's good news then. I'd love to see a couple close-up pictures, doesn't necessarily have to be Mega Man 9.

And did you follow dooklink's schematic precisely, or did you use any slightly different chips/processors? Also, how difficult do you think it would be to make one that is compatible with component YPbPr? I guess it's simple enough to strip sync and then add it back in, but I wonder if you need to clean sync from the Y/G signal completely. I guess I could just use an Extron RGB to do that for me.
User avatar
donluca
Posts: 865
Joined: Sat Feb 28, 2015 8:51 pm
Location: Italy
Contact:

Re: 480i (576i) to 240p (288p) sync converter (Extron RGB al

Post by donluca »

BazookaBen wrote:Oh ok, for some reason I read that as you taking 240p games then scaling them to 480i. That's good news then. I'd love to see a couple close-up pictures, doesn't necessarily have to be Mega Man 9.
I'll use MM9 so we can have a direct comparison with your pics ;)
And did you follow dooklink's schematic precisely, or did you use any slightly different chips/processors?
I followed the schematic precisely, it didn't work at the beginning due to a bug in the code I fixed myself (I'll gladly provide the fixed code if you want, but I'd rather wait for the new code from dooklink himself)
Also, how difficult do you think it would be to make one that is compatible with component YPbPr? I guess it's simple enough to strip sync and then add it back in, but I wonder if you need to clean sync from the Y/G signal completely.
it would be a piece of cake, especially if you're willing to have separated sync instead of Sync on Green on output.
I guess I could just use an Extron RGB to do that for me.
Extron RGB + this converter = big no no. They don't work together, I think dooklink explained this somewhere in the thread. I've tried myself and it's a bloody mess.
User avatar
BazookaBen
Posts: 2159
Joined: Thu Apr 17, 2008 8:09 pm
Location: North Carolina

Re: 480i (576i) to 240p (288p) sync converter (Extron RGB al

Post by BazookaBen »

donluca wrote:Extron RGB + this converter = big no no. They don't work together, I think dooklink explained this somewhere in the thread. I've tried myself and it's a bloody mess.
You mean with ADSP on, right? Because I'm talking about ADSP off, just using the Extron to separate sync from component video (YPbPr ---> YPbPrS). That said, I'm not even sure Extrons do that with ADSP off, they may just pass-through the signal.

My thinking is that if you were to make a component-compatible version of this, you would need to clean the sync from the Y-line, correct? Like, you run Y through the LM1881, but after that you still have the original sync on the Y line, which would probably cause interference when you mix in the modified "fake 240p" sync later.
User avatar
donluca
Posts: 865
Joined: Sat Feb 28, 2015 8:51 pm
Location: Italy
Contact:

Re: 480i (576i) to 240p (288p) sync converter (Extron RGB al

Post by donluca »

BazookaBen wrote:You mean with ADSP on, right? Because I'm talking about ADSP off, just using the Extron to separate sync from component video (YPbPr ---> YPbPrS). That said, I'm not even sure Extrons do that with ADSP off, they may just pass-through the signal.
It doesn't matter if ADSP is on or off. It just doesn't like it.

dooklink talked about PLL loops or something similar.
My thinking is that if you were to make a component-compatible version of this, you would need to clean the sync from the Y-line, correct? Like, you run Y through the LM1881, but after that you still have the original sync on the Y line, which would probably cause interference when you mix in the modified "fake 240p" sync later.
You just need an Y-cable (splitter) which takes the "green" cable and sends one end into the sync converter and the other end into the Green input on your monitor. Then you connect the sync converter's output to your monitor's sync input and that's pretty much it.


Anyway... phone was on low battery so I took only a couple photos instead of a video.

Here we go:
Spoiler
Image

Image

If you look closely, there's a tiny black bar above Megaman's head. That was there also with the sync converter disabled.
Not sure why it's there, maybe it's due to the original 240p to 480i conversion they did for this game?
User avatar
BazookaBen
Posts: 2159
Joined: Thu Apr 17, 2008 8:09 pm
Location: North Carolina

Re: 480i (576i) to 240p (288p) sync converter (Extron RGB al

Post by BazookaBen »

Pics look great! Zero hint of any bleeding above or below letters.
donluca wrote:You just need an Y-cable (splitter) which takes the "green" cable and sends one end into the sync converter and the other end into the Green input on your monitor. Then you connect the sync converter's output to your monitor's sync input and that's pretty much it.
Ok, I had a concern that maybe the green line would look slightly off since it still had sync on it.

However, I'm guessing if you wanted to do this on an NTSC consumer TV, which doesn't have an EXT sync option, you would need to find a way to wipe the original 480i sync from G/Y before you mixed in the new "240p" sync. Probably not an problem for you in PAL land but it's something I may look into in the future.
User avatar
donluca
Posts: 865
Joined: Sat Feb 28, 2015 8:51 pm
Location: Italy
Contact:

Re: 480i (576i) to 240p (288p) sync converter (Extron RGB al

Post by donluca »

There are several ways to "recreate" the Green signal with the new sync.

One way would be using a comparator (a very simple IC) to strip the Green signal of the sync and then add the new one in it.

Or you can use a simple high pass filter to "cut" the sync from the Green signal and then add the new one, although this last method isn't a very clean one.

If you're using a professional monitor like a Sony BVM/PVM you don't have to worry about it too much as they have the ext sync connector.
User avatar
donluca
Posts: 865
Joined: Sat Feb 28, 2015 8:51 pm
Location: Italy
Contact:

Re: 480i (576i) to 240p (288p) sync converter (Extron RGB al

Post by donluca »

Hi!

My code was actually bugged, you should try sending a PM to dooklink and ask him to send you the latest version of his code.
aluqard89
Posts: 1
Joined: Wed Aug 10, 2016 6:04 pm

Re: 480i (576i) to 240p (288p) sync converter (Extron RGB al

Post by aluqard89 »

I have made this circuit on a board took some time to get all the parts. All seem to working but the buttons dont seem to be working properly
the scanlines at the top seem to overlay correcly . any update on the arduino code as stated above?
Post Reply