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

BSNESv115+ SNES Mouse out of sync #4119

Open
Ragowit opened this issue Nov 20, 2024 · 4 comments
Open

BSNESv115+ SNES Mouse out of sync #4119

Ragowit opened this issue Nov 20, 2024 · 4 comments
Labels
App: EmuHawk Relating to EmuHawk frontend Core: BSNES Super Nintendo Entertainment System (SNES) / Super Famicom (SFC) / Super Game Boy (SGB) core Enhancement For feature requests or possible improvements

Comments

@Ragowit
Copy link

Ragowit commented Nov 20, 2024

Summary

Tried to enable the SNES Mouse in BSNESv115+, but it doesn't follow the computer mouse cursor. Render it kinda useless.

Repro

  1. Load Civilization (U) [!] game into BizHawk
  2. Make sure you're using BSNESv115+ core (haven't tried any other)
  3. Setup Mouse support (SNES --> Controller Configuration)
  4. Continue setup mouse support (Config --> Controllers...)
  5. (Optional) Disable double-click (Config --> Display.... -> Window --> uncheck "Allow Double-Click Fullscreen...")
  6. (Optional) Disable right-click (Config --> Customize --> uncheck "Enable Context Menu")

Host env.

  • BizHawk 2.9.1; Win11 Pro 23H2; Intel/NVIDIA
Screen.Recording.2024-11-20.083749.mp4
@CasualPokePlayer
Copy link
Member

CasualPokePlayer commented Nov 20, 2024

This is somewhat an architectural issue within BizHawk, but you wouldn't really get what you want regardless even if the "correct thing" was done (only really working if the mouse cursor is hidden, and you'd probably need the mouse cursor captured into the window).

Mouse inputs on actual hardware do not report absolute positions, rather they report relative positions. Absolute positions of a mouse is something resolved at a higher level by software (on the host side this is something resolved by the OS, for the emulated side this is something resolved by the game's code). BizHawk sends in the absolute positions of the mouse as for axis inputs, but since the axis inputs just represent relative inputs, you end up getting desynchrony with the host and emulated mouse.

Of course, this also just means even if you do send in the relative host mouse positions, you still would likely have desynchrony against the emulated mouse and host mouse with their absolute coordinates, although they should be relatively in sync with each other. As such, you wouldn't want the mouse cursor actually visible (since that won't be in sync at all with the emulated mouse) and you would want the mouse cursor "captured" into the window since you will likely need to move your host mouse cursor "outside" of the window to get the wanted emulated mouse position, without the host mouse cursor actually leaving the window.

Also, fwiw, "Allow Double-Click Fullscreen..." and "Enable Context Menu" are normally supressed if you have Mouse L or R respectively bound to an emulated input (overridden if you hold Shift at the same time as the double click or right click).

@Ragowit
Copy link
Author

Ragowit commented Nov 20, 2024

Ah, okay. Thanks for the detailed answer.

I also found that there's a LUA script that seems to fix it for Shadowrun (https://github.com/Gamachara/SNES-Shadowrun-Mouse-Script/), and BizHawk port of LUA code (https://gamefaqs.gamespot.com/boards/588651-shadowrun/79691759).

So I guess one can do game specific LUA scripts for mouse support?

@YoshiRulz YoshiRulz added Enhancement For feature requests or possible improvements App: EmuHawk Relating to EmuHawk frontend Core: BSNES Super Nintendo Entertainment System (SNES) / Super Famicom (SFC) / Super Game Boy (SGB) core labels Nov 20, 2024
@YoshiRulz
Copy link
Member

Duplicate of #1925?

@CasualPokePlayer
Copy link
Member

That is some issue with the virtual pad, which is unrelated to how BizHawk translates host mouse inputs to emulated inputs for casual usage.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
App: EmuHawk Relating to EmuHawk frontend Core: BSNES Super Nintendo Entertainment System (SNES) / Super Famicom (SFC) / Super Game Boy (SGB) core Enhancement For feature requests or possible improvements
Projects
None yet
Development

No branches or pull requests

3 participants