CPS2 digital AV interface

The place for all discussion on gaming hardware
Post Reply
User avatar
marqs
Posts: 1034
Joined: Sat Dec 15, 2012 12:11 pm
Location: Finland

CPS2 digital AV interface

Post by marqs »

CPS2 mainboard has digital video (384x224, 4bpc) and audio (24kHz i2s) readily available, making it relatively easy to losslessly hook the system up to a modern display. I've been working on a small add-on board that handles necessary format conversions, currently implementing integer scaling to HDTV formats (480p/720p/1080p/1200p) and audio upsampling to 48kHz.

There are some extra features that are planned which should be doable with little or no additional hardware:

-CEA timings compliancy (excl. refresh rate)
-non-integer scaling
-scanline overlay
-OSD plus control via CPS2 side buttons

The PCB still needs 1-2 revisions before it can be considered release quality. Ideally it could be fitted inside CPS2 case with just one extra hole for HDMI connector. Board design files, gerbers, firmware etc. will all be freely available once the project is more mature. Below is a couple photos of the current prototype (click for bigger versions).

Image Image Image

Also, big thanks for undamned for providing CPS2 hardware for the project.
User avatar
parodius
Posts: 720
Joined: Wed Jan 26, 2005 5:54 am
Location: Singapore

Re: CPS2 digital AV interface

Post by parodius »

Hooray ! Digital audio on CPS2 !
Well digital video will also be very nice.

Keep up the good work !
My sales thread : 2020/07/20..MASTER.VER.
juji82
Posts: 349
Joined: Sat Nov 16, 2013 3:05 am
Location: Tokyo, Japan

Re: CPS2 digital AV interface

Post by juji82 »

awesome!
User avatar
RGB
Posts: 520
Joined: Sat Aug 04, 2007 3:11 pm
Location: Europe

Re: CPS2 digital AV interface

Post by RGB »

Amazing as usual :wink:
User avatar
SmokeMonster
Posts: 38
Joined: Tue Feb 10, 2015 10:11 am

Re: CPS2 digital AV interface

Post by SmokeMonster »

Incredible work. That's a beautiful board design. I'd love to add this to my Darksoft rig.
User avatar
gusmoney
Posts: 13
Joined: Sun Mar 08, 2015 2:44 am
Location: Philly

Re: CPS2 digital AV interface

Post by gusmoney »

SmokeMonster wrote:Incredible work. That's a beautiful board design. I'd love to add this to my Darksoft rig.
I was just thinking the same thing. My gosh, all CPS2 games--arcade-perfect--on virtually any display. Sounds awesome.
nio
Posts: 39
Joined: Thu Apr 16, 2015 12:18 pm

Re: CPS2 digital AV interface

Post by nio »

Very impressive!
Unessential
Posts: 5
Joined: Tue Dec 06, 2011 9:35 pm

Re: CPS2 digital AV interface

Post by Unessential »

As long as sub-frame input lag, <3 this. Can't wait for the schematics so I can possibly stick this on a breadboard myself.
Dragon Warrior Jasen
Posts: 100
Joined: Sun Apr 13, 2008 10:29 pm
Location: Herndon, VA
Contact:

Re: CPS2 digital AV interface

Post by Dragon Warrior Jasen »

I need to follow this closely. Great work! Let me know if you want/need any help with manufacturing, etc. Between this, the CPS2 MultiKit, and the new case I designed for them I see a very slick DIY (easily built) kit possible.

Jasen
User avatar
mikejmoffitt
Posts: 629
Joined: Fri Jan 08, 2016 7:26 am
Location: Tokyo, Japan

Re: CPS2 digital AV interface

Post by mikejmoffitt »

This looks great. Are you scaling with a buffer to 1080p, or are you doing a line multiplier with tight timings?
Image
User avatar
D
Posts: 3743
Joined: Tue Feb 01, 2005 3:49 pm
Location: Almere, Netherlands
Contact:

Re: CPS2 digital AV interface

Post by D »

This is awesome news.
The resolution could be upscaled by 500%
That will get
1920X1120
It means you will lose (1120-1080) 40 lines on the top and bottom of the screen.
But regarding the source it would be just horizontal 8 lines less.
Not sure how bad the cps-II video will look with 4 lines cropped from the top and 4 lines cropped from the bottom.

300% will get you.
1152X672
User avatar
Fudoh
Posts: 13015
Joined: Mon Mar 06, 2006 3:29 am
Location: Germany
Contact:

Re: CPS2 digital AV interface

Post by Fudoh »

The resolution could be upscaled by 500%
That will get 1920X1120
not all displays support 4:3 AR for 16:9 source material and many users prefer to play CPS2 slightly wider than 4:3.
User avatar
marqs
Posts: 1034
Joined: Sat Dec 15, 2012 12:11 pm
Location: Finland

Re: CPS2 digital AV interface

Post by marqs »

Dragon Warrior Jasen wrote:I need to follow this closely. Great work! Let me know if you want/need any help with manufacturing, etc. Between this, the CPS2 MultiKit, and the new case I designed for them I see a very slick DIY (easily built) kit possible.
Thanks for the proposal. I was planning to just release the project as a DIY design once it's nearer completition, but if there's enough interest then it might make sense to look into manufacuring pre-assembled boards as well.
mikejmoffitt wrote:This looks great. Are you scaling with a buffer to 1080p, or are you doing a line multiplier with tight timings?
Currently it's a simple line multiplier, so basically no latency but not perfect display compatibility either. The FPGA has enough block RAM to store at least 40 input scanlines, so buffering can be used to resolve line count discrepancies up to 1080p. Generation of suitable pixel clock will be more challenging: e.g. for frame-locked 1080p output, 2200*1125=2475000 pixel clock cycles should ideally be generated each frame while CPS2 outputs 512*262=134144 cycles. Exact (2475000/134144)=(309375/16768) ratio is probably unattainable even with a cascade of fractional PLLs, but I have 2 ideas I've been planning to try out:

1. Generation of near-ideal pixel clock (e.g. 147.6MHz for 1080p), and then dynamically adjusting one blanking line length to keep output frame-locked. Not sure how displays will react to this. Probably at least some will accept that fine if adjustment is no more than a couple pixels.

2. Slightly relaxed CEA timings to allow suitable PLL ratio. In thet 1080p example, total output width of 2227 would allow ratio of (2505375/134144)=(19125/1024)=(153/32)*(125/32) which should be implementable with 2 cascaded PLLs.
Fudoh wrote:not all displays support 4:3 AR for 16:9 source material and many users prefer to play CPS2 slightly wider than 4:3.
Suitable integer-multiplied resolutions for near-correct aspect ratio are 1152x896 and 1536x1120, the former fitting nicely into 1280x960 frame and the latter almost nicely into 1920x1080 frame.
Dragon Warrior Jasen
Posts: 100
Joined: Sun Apr 13, 2008 10:29 pm
Location: Herndon, VA
Contact:

Re: CPS2 digital AV interface

Post by Dragon Warrior Jasen »

marqs wrote:Thanks for the proposal. I was planning to just release the project as a DIY design once it's nearer competition, but if there's enough interest then it might make sense to look into manufacturing pre-assembled boards as well.
Any time. I have a number of good quality manufacturing contacts both inside the US and out that I have used for my small contributions to the hobby. Might be a good resource for those that are a bit less adept at soldering, manufacturing, and sourcing parts or simply don't want to deal with it. In any case, Ill be getting at least one made up to install and test out.
User avatar
zeruel85
Posts: 150
Joined: Mon Nov 30, 2015 3:47 pm
Location: Italy

Re: CPS2 digital AV interface

Post by zeruel85 »

Thank you marqs for just another amazing project! :mrgreen:
User avatar
Xyga
Posts: 7181
Joined: Tue Nov 05, 2013 8:22 pm
Location: block

Re: CPS2 digital AV interface

Post by Xyga »

Most cps games at 1120 fit amazingly well on a 1080 panel... IF you can switch/pan the image up or down a few lines.
Because sometimes health bars/meters are placed either at the top or the bottom.
Strikers1945guy wrote:"Do we....eat chicken balls?!"
User avatar
becker
Posts: 61
Joined: Mon May 30, 2016 4:21 pm
Location: USA - West Coast

Re: CPS2 digital AV interface

Post by becker »

Very cool. Looking foreward to this. CPS II is my favorite arcade hardware.
User avatar
undamned
Posts: 3273
Joined: Sat Jan 29, 2005 9:27 am
Location: Phoenix

Re: CPS2 digital AV interface

Post by undamned »

Brief discussion about the board and installation:

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

-ud
Righteous Super Hero / Righteous Love
User avatar
emphatic
Posts: 7917
Joined: Mon Aug 18, 2008 3:47 pm
Location: Alingsås, Sweden
Contact:

Re: CPS2 digital AV interface

Post by emphatic »

This is amazing.
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
undamned
Posts: 3273
Joined: Sat Jan 29, 2005 9:27 am
Location: Phoenix

Re: CPS2 digital AV interface

Post by undamned »

Rough 1080p Demo (on a BenQ RL2460):

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

-ud
Righteous Super Hero / Righteous Love
User avatar
undamned
Posts: 3273
Joined: Sat Jan 29, 2005 9:27 am
Location: Phoenix

Re: CPS2 digital AV interface

Post by undamned »

Performance compared to a CRT setup:

https://www.youtube.com/watch?v=4h3o1Hf1HDg

-ud
Righteous Super Hero / Righteous Love
User avatar
Sumez
Posts: 8019
Joined: Fri Feb 18, 2011 10:11 am
Location: Denmarku
Contact:

Re: CPS2 digital AV interface

Post by Sumez »

Wow, that's really impressive. I'd buy one.
User avatar
marqs
Posts: 1034
Joined: Sat Dec 15, 2012 12:11 pm
Location: Finland

Re: CPS2 digital AV interface

Post by marqs »

A small progress report:

I'm planning to publish files for the version shown on the first post in a couple weeks since hw/code has been working stable for a while now. I just need to clean things up a bit and add an OSD to enable dynamically changing settings such as 640x480/1080p selection, scanlines etc.

However, I'll be making an updated PCB after that with the following changes:

* Add Si5351C clock generator. With that it's possible to generate exact fractional ratios for CEA 720p/1080p modes, meaning full compatibility with HDTVs as long as they support 59.63Hz refresh rate.
* Replace IT6613E HDMI transmitter with ADV7513. The latter is smaller in size and has better availability.

The second revision is the one development will eventually switch to, so most people probably will want to wait for that.
User avatar
becker
Posts: 61
Joined: Mon May 30, 2016 4:21 pm
Location: USA - West Coast

Re: CPS2 digital AV interface

Post by becker »

Exciting stuff. How does the clock generator work? Can it be implemented on the OSSC to help with compatibility?
Can a more generic version be made with 8bpp? Like for a 3DO?
You might be starting a new level of modding. It started with everyone looking for analog RGB in consoles. Now they will be looking for the digital lines before the encoder.
User avatar
marqs
Posts: 1034
Joined: Sat Dec 15, 2012 12:11 pm
Location: Finland

Re: CPS2 digital AV interface

Post by marqs »

becker wrote:Exciting stuff. How does the clock generator work? Can it be implemented on the OSSC to help with compatibility?
Si5351C has quite flexible 2-stage clock synthesis, allowing accurately setting the ratio by which input clock (16MHz in CPS2 case) is multiplied. It could be used with OSSC as well (with some extra line buffers), but then the parameters would need to be calculated dynamically to allow various sources and sampling rates.
becker wrote:Can a more generic version be made with 8bpp? Like for a 3DO?
By utilizing some unused FPGA inputs the board could be easily made to process digital 24bit RGB/YCbCr sources in general.
becker wrote:You might be starting a new level of modding. It started with everyone looking for analog RGB in consoles. Now they will be looking for the digital lines before the encoder.
Many consoles with digital RGB extractable already have such mods, e.g. NES, N64, DC, GC, Wii.
User avatar
marqs
Posts: 1034
Joined: Sat Dec 15, 2012 12:11 pm
Location: Finland

Re: CPS2 digital AV interface

Post by marqs »

Code and pcb files for first revision are now publicly available. OSD is not yet implemented so currently functions are directly mapped to CPS2 vol+/- buttons.
User avatar
zeruel85
Posts: 150
Joined: Mon Nov 30, 2015 3:47 pm
Location: Italy

Re: CPS2 digital AV interface

Post by zeruel85 »

marqs wrote:Code and pcb files for first revision are now publicly available. OSD is not yet implemented so currently functions are directly mapped to CPS2 vol+/- buttons.
Awesome work! :)

Have you already planned when it will be available the next hardware revision (ADV7513, Si5351C, etc.)?
User avatar
undamned
Posts: 3273
Joined: Sat Jan 29, 2005 9:27 am
Location: Phoenix

Re: CPS2 digital AV interface

Post by undamned »

You are a champ, sir! Continued thanks for all your work on this project! :D
-ud
Righteous Super Hero / Righteous Love
User avatar
emphatic
Posts: 7917
Joined: Mon Aug 18, 2008 3:47 pm
Location: Alingsås, Sweden
Contact:

Re: CPS2 digital AV interface

Post by emphatic »

Very impressed.
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
marqs
Posts: 1034
Joined: Sat Dec 15, 2012 12:11 pm
Location: Finland

Re: CPS2 digital AV interface

Post by marqs »

zeruel85 wrote:Have you already planned when it will be available the next hardware revision (ADV7513, Si5351C, etc.)?
Updating PCB design with those parts shouldn't be a big task, but I'm awaiting some feedback from the current revision before starting that.
Post Reply