CPS2 digital AV interface

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

Re: CPS2 digital AV interface

Post by marqs »

Did you see similar noise on all resolutions or just 1080p and higher? Anyway, I uploaded a new version which is supposed to be timing clean up to 183MHz (which is getting near to the limits of Cyclone 10 LP).
User avatar
NoAffinity
Posts: 1019
Joined: Mon May 07, 2018 5:27 pm
Location: Escondido, CA, USA

Re: CPS2 digital AV interface

Post by NoAffinity »

Awesome thanks! I will check tonight and report back.

It was the same on all resolutions - you can see the switching to the different resolution in the video, any time it says no signal.

Sent from my SM-G955U using Tapatalk
User avatar
Epyc
Posts: 11
Joined: Tue Jan 28, 2020 11:36 pm

Re: CPS2 digital AV interface

Post by Epyc »

marqs wrote:Did you see similar noise on all resolutions or just 1080p and higher? Anyway, I uploaded a new version which is supposed to be timing clean up to 183MHz (which is getting near to the limits of Cyclone 10 LP).
I was just able to test the new firmware and it's much better. I only noticed a couple sparkly pixels when first booting in 1080p, it quickly goes away after a min or so and doesn't seem to come back. I can't test 1440p as my 4K and 1440p monitors (Acer Predator XB321HK and LG 32GK850G-B) for some reason doesn't support that resolution/mode (out of range), but does via my PC Win10?
User avatar
NoAffinity
Posts: 1019
Joined: Mon May 07, 2018 5:27 pm
Location: Escondido, CA, USA

Re: CPS2 digital AV interface

Post by NoAffinity »

I'm sorry to report, no improvement. I fixed the issue with the volume down button and am able to cycle through all resolutions. In the video, resolution cycling is signified by momentary signal loss.

All resolutions exhibit the same behavior. A new video below, if it helps. I am unable to capture to 2 "edge" resolutions, but they display on my TCL 49S405 with no problem...other than the stated problem. :p

https://youtu.be/0JoNcS6H1ys

I reverted again to the previous firmware, and it does not have the problem.
Kavas
Posts: 10
Joined: Thu Dec 21, 2017 12:54 am

Re: CPS2 digital AV interface

Post by Kavas »

Hello,

Just finished last night installing the DarkSoft Multi kit into my Cps2. Already had done this HDMI mod some time last year. Everything works great!

I notice now there is a firmware update for the AV Interface. Couple questions:

1. Will updating this at all interfere with the multi kit? It says in the multi kit not to update it while it has the key writing wires connected. Not sure if this is at all passable from your unit as they are completely different chips but it never hurts to be 100% sure.

2. It says I need a USB Blaster. A digikey search led me to some $225 piece of kit... Amazon leads me to a $15 dollar kit. And a page back it is recommended a $50 kit. Where can I find a suitable Blaster for a good price for a consumer level use? I almost am sure I will not be needing such a device all that often...

Thanks!
User avatar
NoAffinity
Posts: 1019
Joined: Mon May 07, 2018 5:27 pm
Location: Escondido, CA, USA

Re: CPS2 digital AV interface

Post by NoAffinity »

Usb blaster on amazon: https://www.amazon.com/dp/B0761QJJ8D/re ... HEbNZ1CH27

1) isolate the a board
2) power the a board
3) connect usb blaster to pc
4) connect usb blaster to cps digi av jtag connector
5) open quartus on pc (assuming youve already done the manual driver install referenced in the ossc how-to I linked above, post #200)
6) follow the instructions in the ossc how-to, using the cps digi av firmware file (.jic) you want to flash

Sent from my SM-G955U using Tapatalk
Kavas
Posts: 10
Joined: Thu Dec 21, 2017 12:54 am

Re: CPS2 digital AV interface

Post by Kavas »

NoAffinity wrote:Usb blaster on amazon: https://www.amazon.com/dp/B0761QJJ8D/re ... HEbNZ1CH27

1) isolate the a board
2) power the a board
3) connect usb blaster to pc
4) connect usb blaster to cps digi av jtag connector
5) open quartus on pc (assuming youve already done the manual driver install referenced in the ossc how-to I linked above, post #200)
6) follow the instructions in the ossc how-to, using the cps digi av firmware file (.jic) you want to flash

Sent from my SM-G955U using Tapatalk
Thank you, I have placed my order for that device. Seems you can get the Altera version cheaper elsewhere but unsure if those are just Chinese clones. That listing does not have any ratings so here's hoping that all works well. :)
Steam313
Posts: 1
Joined: Fri Apr 03, 2020 10:10 pm

Re: CPS2 digital AV interface

Post by Steam313 »

Disregard, found a lifted pin on the clock buffer, tscked it back down, changed the solder point to the back of the oscillator and flashed the mew firmware again. Works perf!
Last edited by Steam313 on Tue Apr 07, 2020 4:34 pm, edited 1 time in total.
User avatar
NoAffinity
Posts: 1019
Joined: Mon May 07, 2018 5:27 pm
Location: Escondido, CA, USA

Re: CPS2 digital AV interface

Post by NoAffinity »

NoAffinity wrote:I'm sorry to report, no improvement. I fixed the issue with the volume down button and am able to cycle through all resolutions. In the video, resolution cycling is signified by momentary signal loss.

All resolutions exhibit the same behavior. A new video below, if it helps. I am unable to capture to 2 "edge" resolutions, but they display on my TCL 49S405 with no problem...other than the stated problem. :p

https://youtu.be/0JoNcS6H1ys

I reverted again to the previous firmware, and it does not have the problem.
@marqs any thoughts on this?

Sent from my SM-G955U using Tapatalk
User avatar
marqs
Posts: 1034
Joined: Sat Dec 15, 2012 12:11 pm
Location: Finland

Re: CPS2 digital AV interface

Post by marqs »

NoAffinity wrote:
NoAffinity wrote:I'm sorry to report, no improvement. I fixed the issue with the volume down button and am able to cycle through all resolutions. In the video, resolution cycling is signified by momentary signal loss.

All resolutions exhibit the same behavior. A new video below, if it helps. I am unable to capture to 2 "edge" resolutions, but they display on my TCL 49S405 with no problem...other than the stated problem. :p

https://youtu.be/0JoNcS6H1ys

I reverted again to the previous firmware, and it does not have the problem.
@marqs any thoughts on this?
It seems like the CPS2 signals are sampled too close to their transition. Since 16MHz clock is used for sampling (i.e. 2 cycles per pixel), I'll have to analyze which out of the 4 clock edges would provide most robust point for reading pixel data.

CPS3 version is also updated now and I didn't notice such issues there either. It has direct dot clock available for sampling which supports previous theory, or then I'm just lucky in silicon lottery.
dannahan
Posts: 14
Joined: Tue Mar 03, 2020 9:30 pm

Re: CPS2 digital AV interface

Post by dannahan »

marqs, just want to tell you thank you for the firmware update and for everything you do for the community! It works amazing!
https://imgur.com/a/4a6EPfc
I modified a 2007fpb (4:3) with an HDMI board.
The 1920x1440 setting has a bit of a pillarbox for me
Image
Image
Image
Image
Would it be possible to add a 960p (1280x960) or higher resolution?
If it’s too much trouble, it’s not a problem, i can work with this or the 768x448 resolution
Image
Either way, thank you again for your contributions!
User avatar
Unseen
Posts: 723
Joined: Sun May 25, 2014 8:12 pm
Contact:

Re: CPS2 digital AV interface

Post by Unseen »

marqs wrote:It seems like the CPS2 signals are sampled too close to their transition. Since 16MHz clock is used for sampling (i.e. 2 cycles per pixel), I'll have to analyze which out of the 4 clock edges would provide most robust point for reading pixel data.
Could you auto-align it? Sample all four edges, put them in a shift register (bits labelled 0123 from newest to oldest), output a pixel using bit 0 if there is a transition between bit 2 and 3 or every four clocks after a transition is seen - maybe lock the phase after a sufficient number of transitions is observed. For the whole parallel bus, either do it for each bit individually and align them afterwards or do the edge detection on just one of them and sample the others at the time, hoping that the skew between them is small enough.
User avatar
marqs
Posts: 1034
Joined: Sat Dec 15, 2012 12:11 pm
Location: Finland

Re: CPS2 digital AV interface

Post by marqs »

Unseen wrote:
marqs wrote:It seems like the CPS2 signals are sampled too close to their transition. Since 16MHz clock is used for sampling (i.e. 2 cycles per pixel), I'll have to analyze which out of the 4 clock edges would provide most robust point for reading pixel data.
Could you auto-align it? Sample all four edges, put them in a shift register (bits labelled 0123 from newest to oldest), output a pixel using bit 0 if there is a transition between bit 2 and 3 or every four clocks after a transition is seen - maybe lock the phase after a sufficient number of transitions is observed. For the whole parallel bus, either do it for each bit individually and align them afterwards or do the edge detection on just one of them and sample the others at the time, hoping that the skew between them is small enough.
I don't think that kind dynamic adjustment is necessary since HSYNC timing should be consistent enough to be used as a reference point. I just analyzed the signals and found out that HSYNC delay is around 0.3-0.4 cycles from (supposed) launch rising edge, and then RGB & fade data delay is 0.3-1.3 cycles from the same edge. The best place for capture would thus be every second rising edge starting from the reference which leaves some margin for variation (silicon, temperature etc.). I uploaded a test version here where this is applied.
User avatar
NoAffinity
Posts: 1019
Joined: Mon May 07, 2018 5:27 pm
Location: Escondido, CA, USA

Re: CPS2 digital AV interface

Post by NoAffinity »

Absolutely fantastic marqs! A quick video switching through the resolutions that my capture card supports:

https://youtu.be/7cvHn5XJZ4w

The previous video was unlisted. This one is public. :D

Question: will the audio output via CPS2 Digi AV always be stereo, regardless of what the settings menu is set to?
djpweb
Posts: 6
Joined: Sun Apr 05, 2020 4:22 pm

Re: CPS2 digital AV interface

Post by djpweb »

marqs wrote:
Unseen wrote:
marqs wrote:It seems like the CPS2 signals are sampled too close to their transition. Since 16MHz clock is used for sampling (i.e. 2 cycles per pixel), I'll have to analyze which out of the 4 clock edges would provide most robust point for reading pixel data.
Could you auto-align it? Sample all four edges, put them in a shift register (bits labelled 0123 from newest to oldest), output a pixel using bit 0 if there is a transition between bit 2 and 3 or every four clocks after a transition is seen - maybe lock the phase after a sufficient number of transitions is observed. For the whole parallel bus, either do it for each bit individually and align them afterwards or do the edge detection on just one of them and sample the others at the time, hoping that the skew between them is small enough.
I don't think that kind dynamic adjustment is necessary since HSYNC timing should be consistent enough to be used as a reference point. I just analyzed the signals and found out that HSYNC delay is around 0.3-0.4 cycles from (supposed) launch rising edge, and then RGB & fade data delay is 0.3-1.3 cycles from the same edge. The best place for capture would thus be every second rising edge starting from the reference which leaves some margin for variation (silicon, temperature etc.). I uploaded a test version here where this is applied.
Hey, thanks for the hardwork !
This new build fixed the issue I had with random horizontaly shifting lines. Thanks !

Before, for reference: https://www.youtube.com/watch?v=AEarbRrftr4
User avatar
marqs
Posts: 1034
Joined: Sat Dec 15, 2012 12:11 pm
Location: Finland

Re: CPS2 digital AV interface

Post by marqs »

@NoAffinity: am I right to presume the test firmware solved your issues then? Digital audio is tapped from CPS2's audio DAC inputs, so L/R signals are most likely the same that you get from respective RCA outputs but someone should check and confirm.

@dannahan: framework for output mode configuration is now in place so it's easy to add new modes. 1280x960, 1280x1024 and 1600x1200 might be useful for 4:3 / 5:4 display owners. The visible area is always integer-scaled from CPS1 resolution (384x224) so most output modes have some black bars and slightly incorrect aspect. It'd possible to set active area to that as well (e.g. 1152x896) and let displays scale it to full screen, but that would decrease compatibility and ruin effects like scanlines. In future horizontal interpolation options could perhaps be added, though.
User avatar
NoAffinity
Posts: 1019
Joined: Mon May 07, 2018 5:27 pm
Location: Escondido, CA, USA

Re: CPS2 digital AV interface

Post by NoAffinity »

I saw one instance of 2 sparkly pixels in ken's winning stance animation on chun li's stage. I was unable to replicste it tho. Im happy with the result.

The A board i used for the hdmi kit has an issue with right channel audio being lower than left channel audio, at the rca outputs. It is something ive never taken the time to try to diagnose and fix. Audio from the hdmi kit is perfectly balanced tho. Not sure if that info is useful. I havent tested to see if changing from stereo to mono makes a difference at the hdmi output. I'm out of time for playing with toys, for this weekwnd. Will check when i get a chance, later in the week.

Sent from my SM-G955U using Tapatalk
User avatar
Epyc
Posts: 11
Joined: Tue Jan 28, 2020 11:36 pm

Re: CPS2 digital AV interface

Post by Epyc »

Hi marqs,

I flashed the latest firmware (cps2_digiav_20200405_test.jic) on my CPS2 setup and I did not notice any artifacting or any issues at all. It's looking absolutely amazing! Great work!

I am however unable to display 1920x1200 and 1920x1440 on my display monitor (LG 32GK850G, "Out of Range" error), even though I am able to set that mode manually in Windows 10 and display those resolutions with no issues. Any ideas on the issue? Is my display incompatible with the VESA standard?
User avatar
marqs
Posts: 1034
Joined: Sat Dec 15, 2012 12:11 pm
Location: Finland

Re: CPS2 digital AV interface

Post by marqs »

Epyc wrote:Hi marqs,

I flashed the latest firmware (cps2_digiav_20200405_test.jic) on my CPS2 setup and I did not notice any artifacting or any issues at all. It's looking absolutely amazing! Great work!

I am however unable to display 1920x1200 and 1920x1440 on my display monitor (LG 32GK850G, "Out of Range" error), even though I am able to set that mode manually in Windows 10 and display those resolutions with no issues. Any ideas on the issue? Is my display incompatible with the VESA standard?
To try out those same modes on Win10 PC, you need to use CRU / Nvidia custom resolution tool and select reduced blanking timings.
User avatar
Epyc
Posts: 11
Joined: Tue Jan 28, 2020 11:36 pm

Re: CPS2 digital AV interface

Post by Epyc »

marqs wrote:
Epyc wrote:Hi marqs,

I flashed the latest firmware (cps2_digiav_20200405_test.jic) on my CPS2 setup and I did not notice any artifacting or any issues at all. It's looking absolutely amazing! Great work!

I am however unable to display 1920x1200 and 1920x1440 on my display monitor (LG 32GK850G, "Out of Range" error), even though I am able to set that mode manually in Windows 10 and display those resolutions with no issues. Any ideas on the issue? Is my display incompatible with the VESA standard?
To try out those same modes on Win10 PC, you need to use CRU / Nvidia custom resolution tool and select reduced blanking timings.
Ah, yes. I tested the same resolution in Windows 10 with "CVT reduced blank" timing enabled and I am now getting the same "Out of Range" error. I was hoping my low latency G-sync monitor would be able to handle it but I guess not. Is this something the DigiAV board is limited to or is this fixable in firmware? Just curious how and why standards aren't respected when manufacturers make new monitors.
User avatar
marqs
Posts: 1034
Joined: Sat Dec 15, 2012 12:11 pm
Location: Finland

Re: CPS2 digital AV interface

Post by marqs »

Epyc wrote:Is this something the DigiAV board is limited to or is this fixable in firmware? Just curious how and why standards aren't respected when manufacturers make new monitors.
Reduced blanking is used on higher resolutions to minimize pixel clock since the hardware is not capable of running at 200+MHz frequencies. 1600x1200 could still use basic VESA/CVT timings since that's only ~160MHz. It's a bit surprising to hear that a modern monitor (especially gaming one) does not accept reduced blanking modes, though.
User avatar
marqs
Posts: 1034
Joined: Sat Dec 15, 2012 12:11 pm
Location: Finland

Re: CPS2 digital AV interface

Post by marqs »

I've reorganized the repository so that all versions are now under master branch with code split into common and board-specific sections. It makes the project easier to manage and reduces the effort for adding support for additional boards. All CPS1-3 versions are now on the same line with regards to functionality, and the plan is to add support for Toaplan V2 soon.
djpweb
Posts: 6
Joined: Sun Apr 05, 2020 4:22 pm

Re: CPS2 digital AV interface

Post by djpweb »

I've played a bit more with the latest firmware, and there is one situation where I still have an issue : almost pure black areas.

I made 2 videos so you can see it in action, one recorded with a camera on a LG OLED C7, the other captured on an Elgato 4K Pro

Elgato (color are wrong, don't know why but show the issue even better): https://www.youtube.com/watch?v=panU4ZncK9c&t=23
Camera : https://www.youtube.com/watch?v=jVnQbbAWIeM

Hope it helps.
It's pretty much only on this Capcom logo screen on SFA3 that I've seen it.
User avatar
marqs
Posts: 1034
Joined: Sat Dec 15, 2012 12:11 pm
Location: Finland

Re: CPS2 digital AV interface

Post by marqs »

That looks like an issue unrelated to sampling since complete lines are blanked during the logo sequence. Can you confirm this also occurs on 06/2019 fw and is unaffected by output resolution in current fw?
djpweb
Posts: 6
Joined: Sun Apr 05, 2020 4:22 pm

Re: CPS2 digital AV interface

Post by djpweb »

Doesn't happends with the 06/2019 firmware, but now that I've reflashed the latest firmware it doesn't happen either... :oops:
Haven't changend anything since yesterday in my config. It used to happen on all (compatible resolutions, from720p to 1200p).

sorry for the inconsistant results...
User avatar
marqs
Posts: 1034
Joined: Sat Dec 15, 2012 12:11 pm
Location: Finland

Re: CPS2 digital AV interface

Post by marqs »

All versions now include 1280x1024 and 1600x1200 output modes targeted for 5:4 / 4:3 desktop LCDs. Support for Toaplan V2 hardware is added as well.
User avatar
Arthrimus
Posts: 106
Joined: Mon Apr 02, 2018 5:49 pm
Location: Arkansas

Re: CPS2 digital AV interface

Post by Arthrimus »

marqs wrote:All versions now include 1280x1024 and 1600x1200 output modes targeted for 5:4 / 4:3 desktop LCDs. Support for Toaplan V2 hardware is added as well.
Nice, any updates on the DVI TX mode option?
plus ça change,
plus c'est la même chose,
The more that things change,
The more they stay the same.- RUSH- Circumstances

I install and sell mods at arthrimus.com | SNES RGB Bypass+Dejitter available now! | Watch me live stream my work on YouTube
User avatar
marqs
Posts: 1034
Joined: Sat Dec 15, 2012 12:11 pm
Location: Finland

Re: CPS2 digital AV interface

Post by marqs »

Arthrimus wrote:
marqs wrote:All versions now include 1280x1024 and 1600x1200 output modes targeted for 5:4 / 4:3 desktop LCDs. Support for Toaplan V2 hardware is added as well.
Nice, any updates on the DVI TX mode option?
An option is added on rev1 branch whice enables DVI TX if VOL- is held down during power-on. I don't have the old board installed so I can't verify functionality, but you can download the firmware and try it. TX mode selection for rev2 will be added as menu option once OSD is implemented.
Kavas
Posts: 10
Joined: Thu Dec 21, 2017 12:54 am

Re: CPS2 digital AV interface

Post by Kavas »

Hi,

I've installed this kit awhile ago but haven't put in the hours to fully test it. I just saw sound and video worked at a glance and called it a day.

Well I went to play some Battle Circuit the other day and noticed this:

Image

There are a few pixels here and there that shimmer. There are some weird pixels on the edge of the screen. And the words don't come out. I have tested this with my HAS and it works fine. I have already rechecked the onboard contacts. It was updated to the latest firmware. If someone can point me in the right direction what might be causing this issue I will check that line. Thanks!
User avatar
Epyc
Posts: 11
Joined: Tue Jan 28, 2020 11:36 pm

Re: CPS2 digital AV interface

Post by Epyc »

I had this happen in previous firmwares also but it went away after a while. In new firmware revisions I noticed it was much better and non-existent after a few minutes of play. Maybe silicon lottery is playing a factor when we're close to maxing out the FPGA? Does it happen at lower resolutions?
Post Reply