-
-
Notifications
You must be signed in to change notification settings - Fork 77
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
Potential Hyperkin mouse read errors with FastROM #287
Comments
Following. |
I've coded a fix with the necessary delay to the mouse read loop in commit 8bb8ac8 I've also written a test ROM that displays the mouse state. To prevent lag it only reads the mouse from port 2. The test also includes a button to deliberately lag the test when the B button on controller port 1 is held. We will need to find someone with a Hyperkin mouse to test it. They should test the 3 speed settings (set by pressing Y, X or A with controller 1) and test mouse movement with lag (hold B on controller 1 while moving the mouse). Test ROM source code: https://gist.github.com/undisbeliever/fa6d1b0407a64556cb400250eb10646e |
I tested this with an FXPak Pro and the Hyperkin mouse and I was able to move the cursor around and detect button presses just fine, with or without the B button pressed. The Hyperkin mouse ignores attempts to change the speed, which is a known thing, but I was able to change the speed and move the cursor similarly on a Nintendo branded mouse. |
The SNESdev wiki states the Hyperkin mouse requires at least 170 master cycles between $4017/$4018 reads (Source).
I manually m-cycle counted the
_MouseData
read-loop with the aid of Nova's SNES instruction speed compare toollda REG_JOYA,x ; lsr ; rol mouse_x,x ; rol mouse_y,x ; dey ; bne @_m30
I'll fix the FastROM read-loop over the weekend but I will need to find and coordinate with someone who owns a hyperkin mouse to verify the fix works.
I also do not know if a Hyperkin mouse is compatible with how the new VBlank ISR handles lag frames. So I will need to test that as well.
The text was updated successfully, but these errors were encountered: