-
-
Notifications
You must be signed in to change notification settings - Fork 335
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
Controller inputs are ignored for a few seconds following HDMI video mode change #873
Comments
I've posted a workaround for this issue in MiSTer-devel/Scripts_MiSTer#110. |
That's because "someone" abused HDMI mode change. So you create the problem and now you complain about it. |
I did not "abuse" anything. That's a needlessly mean and accusatory response with zero evidence to back it up. Other people in Discord are also having problems caused by the serial console output being slow and stalling the MiSTer process. They keep thanking me for trying to come up with solutions. Yesterday I saw someone trying to set the serial port to the fastest possible rate as a workaround, which you said is dangerous, so we need a better official solution. It is not only for me. This is a real issue that is impacting real people and legitimate usage scenarios. Please don't dismiss it just because it doesn't personally impact your usage. You don't like my shell script workaround, okay. You'd rather redirect stdout directly in C code, okay. The user would need a way to opt in/out. Maybe a new .ini setting? Something like |
There is a potential issue with the [video=] new header option. @zakk4223 knows the most about it, but he's not sure yet what it is. |
I think I need to provide at least two different sets of more detailed repro steps. One repro is for standard HDMI mode using vscale_mods 4 or 5. Another repro is for DirectVideo mode. And there may be more repros, too. I need to provide full details for each repro, including the contents of my .ini file and details about my display and input hardware and video chain. It will take me some time to collect and write up all of this information. Please hold this issue open while I do that. I will follow up. |
I talked to @zakk4223 on discord. There are 3 issues resulting from what Keith is describing here. I'll summarize:
This is all because Main blocks on write which suspends input polling, as Zakk put it to me a sec ago. @c0d3h4x0r Sorgelig was not talking about you, he was talking about this PR --> #567 - but he probably mixed you up with this person. |
Thank you Kevin! Yes, that's exactly the issue I am reporting. And thank you for clarifying about the personal confusion. I think sometimes important subtleties get lost in written form. |
Probably muting debug output while INI reparse on resolution change should help. That was my first post about. |
That would help some. It sounds like .ini parsing needs some performance work, too. But even 300-600ms is still too long. It interferes with gameplay. Reducing the amount of logging is good, but not a complete fix. Logging is never free, but I don't need it unless I'm diagnosing a problem. When I am diagnosing a problem, I accept reduced performance in exchange for more diagnostic info. Can MiSTer mute all logging by default, with an option to unmute it for troubleshooting? Does that create some other problem? |
Probably it's possible to redirect stdout to /dev/null programmatically in Main and then all printf will be muted. |
i've added "debug" option to INI. |
Thank you! I will try the new unstable build. |
This works great on my end! So much better than the shell script hackery I've been using as a workaround. I've verified that there's no debug output when Having the option is fantastic -- thanks again! |
If debug logging is causing issues then why is it now enabled by default? |
Issue happens only if per-resolution ini section is used. For vast majority of users it's not relevant. |
The issue also happens in other cases, even if the .ini file contains no |
But to be clear: As long as there's an official way to disable the debug logging, this is a huge improvement, regardless of the default. If someone in Discord reports an issue due to the slow logging, this will provide a safe, official, easy way to help them. |
ok. debug=0 is now default. |
Problem:
The
MiSTer
process blocks while writing console output to the slow serial port. It cannot handle user input until it finishes writing to the console.Many games (examples: Sonic the Hedgehog 2 for MegaDrive, or Agony for Amiga) change the core resolution during gameplay. With
vscale_mode=4
orvscale_mode=5
, that causes an HDMI video mode change.MiSTer
remains unresponsive for a noticeable time (~0.5 - 4.0 seconds) after the video mode change while it writes verbose information about the video mode change to the console. The user's controller inputs are ignored during this time, even though the game is still running. This interferes with gameplay.The duration of unresponsiveness depends upon the size of the user's .ini file, because it gets parsed, processed, and logged twice on every HDMI video mode change.
The impact of the issue varies depending upon the game being played. For games that switch resolutions at the beginning of a new level (such as an action-packed shooter), losing control for a couple seconds at the start is a big problem.
The text was updated successfully, but these errors were encountered: