Skip to content
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

Input change always happens at the same Y position #593

Open
Max833 opened this issue Nov 3, 2019 · 3 comments
Open

Input change always happens at the same Y position #593

Max833 opened this issue Nov 3, 2019 · 3 comments

Comments

@Max833
Copy link

Max833 commented Nov 3, 2019

SourMesen/Mesen-S#63

@bearoso
Copy link
Collaborator

bearoso commented Nov 8, 2019

With the existing frontend implementations we break out to process input only before NMI.

bsnes does something different, and polls whenever input is requested during the frame.

But that's completely unnecessary and won't work for us. On a modern system Snes9x takes less than 1 millisecond to emulate the entire SNES frame. The rest of the time is spent waiting to time video and audio output properly. So even if we poll during emulation it's still going to be more than a 15/16 chance to occur on that break point anyway. This might be enough to pass their test, but as we get faster it gets even more centralized and less likely to pass.

We could stretch the emulation out to fill the whole time frame, but that introduces far more negatives than positives. e.g. No fast forward or run ahead. Or we could register the time between frame markers the input occurs and wait to introduce the input until a certain time, but that would add lag.

I'm going to vote "won't fix" for this one. We can't sacrifice performance and features to pass a homebrew-only edge case that would only 100% pass on a hardware implementation.

@OV2
Copy link
Collaborator

OV2 commented Nov 9, 2019

IIRC we also already have SNES_JOY_READ_CALLBACKS which works similar to the bsnes way, but it's only used in the win port for some obscure frame advance feature.

@pinobatch
Copy link

bgb by beware is a Game Boy emulator. It passes the Game Boy version of this test using the following algorithm:
If a program reads the controller more than once per frame, and movie recording isn't enabled, randomize on which scanline the input changes. That way, a program can't use this predictability to discern that it's being emulated rather than executed on an authentic console.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants