OSSC (DIY video digitizer & scandoubler)

The place for all discussion on gaming hardware
User avatar
RGB
Posts: 520
Joined: Sat Aug 04, 2007 3:11 pm
Location: Europe

Re: DIY video digitizer & scandoubler

Post by RGB »

Thank you for releasing the plans. It's an amazing project, I really hope you start to sell the complete PCBs (or at least kits) and it works out well for you :D
User avatar
RGB32E
Posts: 1400
Joined: Thu Nov 05, 2009 12:50 am

Re: DIY video digitizer & scandoubler

Post by RGB32E »

marqs wrote:I wouldn't expect anyone to buy a dev board just for this, but there are also cheaper boards for which the design could be easily converted. For example, Cyclone V GX Starter Kit is "only" $179 and it has newer FPGA and on-board HDMI transmitter.
Very tempting! Is the Cyclone V powerful enough to scale to 1080p?
marqs wrote:As for the standalone, it's still hard to give an estimate. Considering that the required extra ICs are not that expensive, I'd guess that you could buy all the necessary parts for yourself with around $50, plus perhaps $30 for the PCB. The prices would naturally go down with higher quantities, so if several people were interested building one, ordering the components and PCBs in a larger batch would be beneficial.
It would be great if you could get the analog input board manufactured, as the TV input IC looks like a real pain to solder by hand!
User avatar
BuckoA51
Posts: 3357
Joined: Sat Oct 02, 2010 10:08 am
Location: Ireland
Contact:

Re: DIY video digitizer & scandoubler

Post by BuckoA51 »

I'd be very interested in getting this to market, even willing to invest some of my savings :)
OSSC Forums - http://www.videogameperfection.com/forums
Please check the Wiki before posting about Morph, OSSC, XRGB Mini or XRGB3 - http://junkerhq.net/xrgb/index.php/Main_Page
User avatar
Fudoh
Posts: 13015
Joined: Mon Mar 06, 2006 3:29 am
Location: Germany
Contact:

Re: DIY video digitizer & scandoubler

Post by Fudoh »

absolutely. Once you have a working custom FPGA board design this needs to be produced. Either do a presale on a number of boards (here, Assembler and a few others) to collect some money or even consider a Kickstarter. Don't underestimate the impact of a simple to use and nicely working upscaler. You're easily looking at a few hundred pieces for the first run.
juji82
Posts: 349
Joined: Sat Nov 16, 2013 3:05 am
Location: Tokyo, Japan

Re: DIY video digitizer & scandoubler

Post by juji82 »

can this be chained with a xrgb mini for 1080p/720p output and scanlines?
User avatar
Fudoh
Posts: 13015
Joined: Mon Mar 06, 2006 3:29 am
Location: Germany
Contact:

Re: DIY video digitizer & scandoubler

Post by Fudoh »

No need, it does already upscale to 720p and add scanlines on its own, see here: http://shmups.system11.org/viewtopic.ph ... 2#p1082892
juji82
Posts: 349
Joined: Sat Nov 16, 2013 3:05 am
Location: Tokyo, Japan

Re: DIY video digitizer & scandoubler

Post by juji82 »

ahhh i missed that. HYPE!
User avatar
akumajo
Posts: 542
Joined: Thu Sep 04, 2008 12:37 am

Re: DIY video digitizer & scandoubler

Post by akumajo »

+1 for this project !

just do it before micomsoft ... :)
User avatar
marqs
Posts: 1034
Joined: Sat Dec 15, 2012 12:11 pm
Location: Finland

Re: DIY video digitizer & scandoubler

Post by marqs »

Thanks for all the encouraging comments!

I'll start to examine different manufacturing/assembly options after the design of next PCB is finished. The first revision of the standalone board will probably still be hand-assembled, but I'll try to make a couple extra units which I can send out for a few testers. In optimal case - assuming that there are no major issues and feedback is positive - the revision after that could be sold pre-assembled in a larger run.

The user interface is still an open question. The best option would naturally be an OSD overlay + remote control, since there's a bit too many adjustment options for the few buttons/switches that could be fitted economically on the next PCB. DE2-115 luckily includes an IR receiver and remote control, so I can test how that would work out.
RGB32E wrote:Very tempting! Is the Cyclone V powerful enough to scale to 1080p?
'Scaling' to 1080p would be problematic, because the system is based on line multiplication and 1080p is not a multiple of 240p. 1280x960 would be more realistic (and it'd be a valid target for 480p too) and probably doable even with the current Cyclone IV, but how many TVs support 1280x960 is another question...
RGB32E wrote:It would be great if you could get the analog input board manufactured, as the TV input IC looks like a real pain to solder by hand!
It's not actually that painful with flux and a good soldering iron. Still, it took ~2 hours to solder all the components without rushing. Considering that the next PCB will have at least 3 such IC packages, that will be a real pain to assemble by hand - it'd be probably a good idea to start looking towards reflow ovens :)
User avatar
emphatic
Posts: 7917
Joined: Mon Aug 18, 2008 3:47 pm
Location: Alingsås, Sweden
Contact:

Re: DIY video digitizer & scandoubler

Post by emphatic »

Hype! :D
Image | My games - http://www.emphatic.se | (Click) I have YEN stickers for sale
RegalSin wrote:Street Fighters. We need to aviod them when we activate time accellerator.
User avatar
RGB32E
Posts: 1400
Joined: Thu Nov 05, 2009 12:50 am

Re: DIY video digitizer & scandoubler

Post by RGB32E »

marqs wrote:
RGB32E wrote:Very tempting! Is the Cyclone V powerful enough to scale to 1080p?
'Scaling' to 1080p would be problematic, because the system is based on line multiplication and 1080p is not a multiple of 240p. 1280x960 would be more realistic (and it'd be a valid target for 480p too) and probably doable even with the current Cyclone IV, but how many TVs support 1280x960 is another question...
I think most all TVs should still accept PC resolutions on at least one HDMI input. Have you found many exceptions to this?

The suggestion I had for 1080p could just be a 5x line multiplier with a vertical position adjustment. I run my XRGB mini at 1080p and use the Zoom level setting of 90 for a 5x scale. Many games don't even use 224 lines, so overscan can be minimal and is one way to get rid of garbage at the top and/or bottom of the screen with a number of games. Wouldn't something like this still be possible?
User avatar
BuckoA51
Posts: 3357
Joined: Sat Oct 02, 2010 10:08 am
Location: Ireland
Contact:

Re: DIY video digitizer & scandoubler

Post by BuckoA51 »

Frankly as long as 240p to 480p works everything else is just icing on the cake.

I'd be VERY interested in a bulk order to sell here in the UK :mrgreen:
OSSC Forums - http://www.videogameperfection.com/forums
Please check the Wiki before posting about Morph, OSSC, XRGB Mini or XRGB3 - http://junkerhq.net/xrgb/index.php/Main_Page
User avatar
marqs
Posts: 1034
Joined: Sat Dec 15, 2012 12:11 pm
Location: Finland

Re: DIY video digitizer & scandoubler

Post by marqs »

RGB32E wrote:I think most all TVs should still accept PC resolutions on at least one HDMI input. Have you found many exceptions to this?
Personally I only have experience from Panasonic HDTVs (which are very picky and only accept 640x480 PC resolution), but I've also heard similar stories on some other models from other manufacturers. I may be wrong, but my understanding is that generally PC monitors are also far more tolerable on the input modes not exactly matching CEA/VESA standard modelines.
RGB32E wrote:The suggestion I had for 1080p could just be a 5x line multiplier with a vertical position adjustment. I run my XRGB mini at 1080p and use the Zoom level setting of 90 for a 5x scale. Many games don't even use 224 lines, so overscan can be minimal and is one way to get rid of garbage at the top and/or bottom of the screen with a number of games. Wouldn't something like this still be possible?
It'd be possible, assuming Cyclone V and the display could handle that high pixel clocks. I made a quick test with PC using this mode (5x262 = 1310 lines), and my 1440p monitor seemed to display that correctly even though it's quite far from CEA 1080p mode.
User avatar
Fudoh
Posts: 13015
Joined: Mon Mar 06, 2006 3:29 am
Location: Germany
Contact:

Re: DIY video digitizer & scandoubler

Post by Fudoh »

960p is classic quadrupling. I tried if often from various processors. Hardly any (TV) display will show it.

I would still implement 1080p, even if it's just 1280x960 active pixels with borders all around.
mybook4
Posts: 25
Joined: Sun Jan 18, 2015 11:35 pm

Re: DIY video digitizer & scandoubler

Post by mybook4 »

I'd definitely purchase one of these. I'd also be interested in testing/investing.
User avatar
HDgaming42
Posts: 331
Joined: Wed Jul 15, 2009 3:16 am
Location: Canada

Re: DIY video digitizer & scandoubler

Post by HDgaming42 »

I'm in for at least one. Very excited about this project. Thank-you!

Also let me echo the desire for 1080p with borders.
User avatar
emphatic
Posts: 7917
Joined: Mon Aug 18, 2008 3:47 pm
Location: Alingsås, Sweden
Contact:

Re: DIY video digitizer & scandoubler

Post by emphatic »

Fudoh wrote:I would still implement 1080p, even if it's just 1280x960 active pixels with borders all around.
^^This.
Image | My games - http://www.emphatic.se | (Click) I have YEN stickers for sale
RegalSin wrote:Street Fighters. We need to aviod them when we activate time accellerator.
User avatar
Xyga
Posts: 7181
Joined: Tue Nov 05, 2013 8:22 pm
Location: block

Re: DIY video digitizer & scandoubler

Post by Xyga »

Yes 1080p output will disable whatever bad internal upscaling a display can have (that's most FHD displays btw), and therefore greatly contribute to overall picture quality.

So where's the donate button ? :mrgreen:
Strikers1945guy wrote:"Do we....eat chicken balls?!"
User avatar
rtw
Posts: 1936
Joined: Wed Jan 26, 2005 6:46 pm
Location: Norway
Contact:

Re: DIY video digitizer & scandoubler

Post by rtw »

Read through this thread with great interest, very impressive work marqs :D

Just a small warning the TI TVP7002 is not recommended for new designs.

http://www.ti.com/product/TVP7002/samplebuy

It is listed as: NRND
http://world-of-arcades.net
The future of ST-V rests upon our work and your work
User avatar
invzim
Posts: 45
Joined: Tue Jul 24, 2007 8:40 am
Location: https://irkenlabs.com/
Contact:

Re: DIY video digitizer & scandoubler

Post by invzim »

Just saw this thread, very cool!! I'm playing with something really similar - my main focus is arcade PCB's upscaled for 31k CRT(VGA). Ended up with the AD9984 instead of the TVP7002 - they are very similar when it comes to capabilities.

http://kirurg.org/drop/IMG_3325.JPG

So far I've only tested it 1:1, not going through the FPGA dev board but directly to ADC and using a rpi for i2c control. As you did, I also made it for the Altera/Terasic FPGA dev boards and used an SMA connector to get the clock to a dedicated clock pin for the on-chip PLL. The plan is also to use inferred dual-ported RAM, again like you :), possibly with different clock domains.

http://kirurg.org/drop/IMG_3324.JPG

I got sidetracked a little when the factory that produces the JVS-PACs for me sent me a 100 non-working units - but really want to get back on track with this stuff.
User avatar
marqs
Posts: 1034
Joined: Sat Dec 15, 2012 12:11 pm
Location: Finland

Re: DIY video digitizer & scandoubler

Post by marqs »

rtw wrote:Read through this thread with great interest, very impressive work marqs :D

Just a small warning the TI TVP7002 is not recommended for new designs.

http://www.ti.com/product/TVP7002/samplebuy

It is listed as: NRND
Yeah, I'm aware of that - manufacturing is phased out and chips will be hard to acquire some day. I've looked at AD9883A and ADV7441A from Analog Devices, but they either have less features (AD9883A) or higher price (ADV7441A) than TVP7002. Furthermore, their status has also changed to "Not Recommended for New Designs" since I last checked. Unfortunately, it seems the same story goes for most video digitalization chips.
User avatar
marqs
Posts: 1034
Joined: Sat Dec 15, 2012 12:11 pm
Location: Finland

Re: DIY video digitizer & scandoubler

Post by marqs »

invzim wrote:Just saw this thread, very cool!! I'm playing with something really similar - my main focus is arcade PCB's upscaled for 31k CRT(VGA). Ended up with the AD9984 instead of the TVP7002 - they are very similar when it comes to capabilities.

http://kirurg.org/drop/IMG_3325.JPG

So far I've only tested it 1:1, not going through the FPGA dev board but directly to ADC and using a rpi for i2c control. As you did, I also made it for the Altera/Terasic FPGA dev boards and used an SMA connector to get the clock to a dedicated clock pin for the on-chip PLL. The plan is also to use inferred dual-ported RAM, again like you :), possibly with different clock domains.

http://kirurg.org/drop/IMG_3324.JPG

I got sidetracked a little when the factory that produces the JVS-PACs for me sent me a 100 non-working units - but really want to get back on track with this stuff.
Interesting project :) I'd interested to hear how well AD9984 performs (sync detection, configurability etc.). Multiple clock domains somewhat complicate the design, especially if you have dynamic clock muxes as I did (they increase skew). Definitely took a while to constrain the design so that timing closure was achieved.
User avatar
niall
Posts: 112
Joined: Thu Jan 09, 2014 12:58 am

Re: DIY video digitizer & scandoubler

Post by niall »

marqs wrote:Below is a link to a video which shows the system in action. I used Chrono Cross as test game, as it contains lots of 240p<->480i switching and uses "field 1"-signaling with 240p (confuses many video processors):
Nice project and nice testing criteria! Can't wait to see something handle a range of resolutions like ~220-256p -> 2160p with various scanline controls :D
lui
Posts: 37
Joined: Fri Mar 21, 2014 4:17 am

Re: DIY video digitizer & scandoubler

Post by lui »

Can you aware me to what the problem would be with having an integer scaling option to support 1200p?
User avatar
marqs
Posts: 1034
Joined: Sat Dec 15, 2012 12:11 pm
Location: Finland

Re: DIY video digitizer & scandoubler

Post by marqs »

lui wrote:Can you aware me to what the problem would be with having an integer scaling option to support 1200p?
There is no fundamental problem with integer scaling to 1600x1200, but that requires quite high pixel clock (~160MHz) which is close to practical limits on consumer-grade FPGAs. The current design has Fmax limit at ~140MHz according to timing analyzer, but in reality it can run at slightly higher frequency without issues. Another thing to keep in mind is (again) the compatibility of the resulting mode: if you scale 240p (262 lines) with 5x in vertical direction, you end up with 1200p (1310 lines), which is not very close to the standardized VESA 1600x1200 mode (1250 lines). Some monitors will display that perfectly fine, but some will have problems.
User avatar
rtw
Posts: 1936
Joined: Wed Jan 26, 2005 6:46 pm
Location: Norway
Contact:

Re: DIY video digitizer & scandoubler

Post by rtw »

Is it technically possible to pre-scale the image ?

I.e. always provide the TV with a 720P or 1080P with appropriate black bars to "fill" out the picture.
http://world-of-arcades.net
The future of ST-V rests upon our work and your work
User avatar
marqs
Posts: 1034
Joined: Sat Dec 15, 2012 12:11 pm
Location: Finland

Re: DIY video digitizer & scandoubler

Post by marqs »

rtw wrote:Is it technically possible to pre-scale the image ?

I.e. always provide the TV with a 720P or 1080P with appropriate black bars to "fill" out the picture.
Did you mean that the output would be fixed at 720p/1080p and the input frame would be shown in its original size (or 2x etc.) at the center? That's not possible with the current implementation method. To make that work for any given input mode, you'd need to generate 720p/1080p from scratch with exactly the same refresh rate as input (hard with a FPGA), and then draw the input frame in the middle of the output frame (buffering -> lag).
User avatar
Ed Oscuro
Posts: 18654
Joined: Thu Dec 08, 2005 4:13 pm
Location: uoıʇɐɹnƃıɟuoɔ ɯǝʇsʎs

Re: DIY video digitizer & scandoubler

Post by Ed Oscuro »

Very interesting discussion. I'm drawing a blank here - could you point me towards an explanation of how the current scaling method works?
User avatar
marqs
Posts: 1034
Joined: Sat Dec 15, 2012 12:11 pm
Location: Finland

Re: DIY video digitizer & scandoubler

Post by marqs »

Ed Oscuro wrote:Very interesting discussion. I'm drawing a blank here - could you point me towards an explanation of how the current scaling method works?
I haven't seen a good and illustrated explanation of line multiplication on the web, but the main principle is simple: One input scanline is written to a buffer, and then the buffer is read at higher speed so that the input scanline is scanned out 2 or 3 times while next input line is captured in another buffer, and so on. This results to an output with exactly 2x/3x height of the input, but with identical refresh rate.

The property that makes the current scaling method a bit more interesting (and complex) are the different horizontal sampling / scaling options. A line of analog video is a continuous signal bounded by 2 consecutive hsyncs which, in context of game consoles, is generated by a DAC converter operating at a certain rate. You can't tell the rate from the signal but ideally you want to capture the video with the same rate as the console's DAC to get best results. For example, if you know that the input is 320x240, you want to capture it with 320 samples per line (in reality, you'll also need to include the blanking portion). A simple linetriple would make it 320x720 which unfortunately would not be a very compatible output mode. However, by reading the input line with suitable frequency multiples (in addition to the 3x vertical rate), the current implementation can construct a 1280x720 frame, where the image is displayed at the center in perfect 4:3 ratio (960x720) with black bars on the sides. Hopefully that explained it a bit :)
User avatar
Ed Oscuro
Posts: 18654
Joined: Thu Dec 08, 2005 4:13 pm
Location: uoıʇɐɹnƃıɟuoɔ ɯǝʇsʎs

Re: DIY video digitizer & scandoubler

Post by Ed Oscuro »

I see, that's a good way of putting it. I'm trying to work back to how this method is incompatible with letterboxing. From what I see, the current (and best) method is per-line, whereas letterboxing an integer scaled image would be accomplished with a full-frame buffer. Is that correct so far, and is it correct to say that this continuous signal leaves no time to put padding lines for a "centered" integer scaled image (and padding could mess with the scaling as well, if not corrected)? I also notice that the details of how many lines of padding seem to change significantly if the input signal changes.
Post Reply