-
Notifications
You must be signed in to change notification settings - Fork 38
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Video dropouts when using HDMI switcher #76
Comments
Do you know the vsync_adjust setting you have on the MiSTer? Would you be willing to try using the SNESTang module on your Tang to see if it produces the same problem? It might help find if it's the frame buffer that is causing this. |
I can give those a shot.
Yes, I'll give that a shot tomorrow.
What do you mean by this? Do you mean that the video output lags behind one frame to ensure synchronization with the HDMI output? |
For the NESTang there is a one frame buffer which means there will be one frame of extra lag. Further explanation is available here: |
I see. Is there no way around that? I was hoping to use this for competitive play and speed-runs and those necessitate frame-perfect input. |
There ultimately are ways to reduce it to a minimum. As long as the monitor has very low input lag, and supports the frame rates of the original NES (slightly above standard NTSC at ~60.098). This is where problems tend to come in. There are a few ways around this. The MiSTer has some vsync modes that add 1 to 2 frames of lag, and some that go down to as little as a few scanlines of delay. Which is well under a frame. If you can get the buffer to be as low as a few scanlines or get the output from the "console" to come out at closer to a standard rate it should be possible to get an extremely low lag environment set up. The NES has an inbuilt ~16ms delay on each frame. Then the CRT draws the picture from top to bottom in about 16ms. Sorry if you already know most of this but hopefully it helps. |
To clarify you can still hit the frame perfect inputs with the Nestang but you would end up used to hitting them one frame later. Because the lag is consistent it is still technically doable in the current state. If not ideal. But ideally I still want as close as possible to the original on a CRT as I can get. |
Excellent, this is my primary motivation too.
There's at least a way to test the lag of LCDs deterministically, here: https://github.com/MiSTer-devel/MiSTerLaggy_MiSTer Testing for capabilities for non-standard framerates would be harder. Do you know of any in particular that do this? This also makes me think, if we are unable to obviate this requirement, perhaps adding VGA out and using a CRT computer monitor might be easier and less expensive than to find an LCD with all these requirements, if we have enough LUTs to do it. There's a VGA encoder for another NES FPGA implementation here: https://github.com/brandonpelfrey/ice40-nes/blob/master/src/mod_vga_encoder.v
This is super helpful, thank you! |
I don't want to sidetrack this issue page too much so I continued the conversation over on a discussion page on this topic. |
Ok, I've tested this with both the MiSTer and the Tang SNES core. MiSTer configuration:
Tang SNES core also works without a hitch. Testing the NES core some more to narrow down the issue:
Again, it doesn't have this problem when I'm connected directly to the TV. Also, another issue that I found that I thought was unrelated, but now I think might be: another of my monitors will refuse to output sound with the NES core. I had never tested sound with this display before, so I assumed it was just a problem with the monitor. However, when I was testing to see if the SNES core loaded correctly, I noticed the display would happily play sound with that. |
Thanks for testing 👍 I think the simplest fix for now is to port over the upscaling from SNESTang to use with NESTang.
The SNESTang scaler can be found here: I think further down the line porting over some of the scaling methods from the MiSTer would be useful for advanced users. Especially the vsync_adjust=2 with minimum latency. As for the audio problems the only obvious difference I can see is the output sample rate. |
That would be quite excellent, good luck <3 Just curious, is there a discord or something where development is being coordinated? EDIT: there is, but the invite link is expired |
Thanks 😄 Trying to figure this scaler out is taking me down a rabbit hole of clock timings and syncing signals. I haven't been on the NESTang Discord but I think almost all the work has been done by Nand2mario (very appreciated). |
@nikitalita here's the Discord Invite though not much going on lately |
The issue seems to have gotten worse with the most recent release; now I'm experiencing dropouts on every display that I try this with, switcher or no. Has anyone else experienced this? |
That's strange. Is it still not happening without the switcher and on the other displays when using the Snestang module? Or if you roll back to the earlier Nestang? |
I use this chinese bugger: and honestly after I started working on the cheats engine, I've been seeing random glitches where the screen turns completely black for 1-1,5[S] and then it comes back. I thought it was the cheats engine introducing a delay in the system and maybe there was a timing issue there, but I've been having it also without the cheats engine. |
Interesting. We are thinking something in the framebuffer implementation is causing it. Maybe because of the non standard NTSC frame rate? Would you be willing to try with the Snestang module to see if there's any difference on yours? I've been trying to port over the Snestang buffer to the Nestang but I have been having trouble figuring it out properly. |
I'd be happy to but I don't have a compatible controller for SNES, so can't properly test |
Ah ok. |
So I also tried it without the HDMI and they were also there. Still random. Sometime you plug it and they are there. Sometimes it goes for hours without any glitch |
I saw that in |
This HDMI Switcher I am using is having some severe video dropouts when I attempt to use it with this:
https://www.amazon.com/gp/product/B07MJ783KG/ref=ppx_yo_dt_b_search_asin_title?ie=UTF8&psc=1
Every time I perform some some action that results in horizontal scrolling, the video drops out momentarily. If I stay still, I experience no dropouts, but as soon as I move, the video stops displaying for about a second.
I experience no dropouts at all if I hook into the TV/monitor directly. I have no problems at all with any other HDMI devices using this switcher, including a MiSTer.
This HDMI switcher has an undocumented HDCP stripper (like pretty much all HDMI switchers), which might be a contributing factor here.
#70 might be related, since this only occurs when horizontally scrolling. This makes me think the underlying issue might be HDMI timing problems.
The text was updated successfully, but these errors were encountered: