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

Lantronics Spider KVM weird mouse issue #31

Open
reinauer opened this issue Mar 4, 2024 · 4 comments
Open

Lantronics Spider KVM weird mouse issue #31

reinauer opened this issue Mar 4, 2024 · 4 comments
Assignees

Comments

@reinauer
Copy link

reinauer commented Mar 4, 2024

Hi,

I started using the amigahid-pico with a Lantronics Spider KVM. The

keyboard works fine but the mouse does not:

  • Mouse is not shown as detected on the LCD
  • Mouse moves somewhat when I move the host mouse, but only in one direction (all the way down, or all the way to the right)
  • If I keep the right mouse button pressed, the mouse moves almost perfectly <-- this is the weird part
  • Mouse buttons seem to work fine

Also, is CTRL-AMIGA-AMIGA mapped to anything?

@borb
Copy link
Owner

borb commented Mar 4, 2024

Hello,

Depending on which branch you're using, the mouse connection count is incorrect. I strongly suspect the main branch is a culprit at the moment - I have the same issue with the hid-pico in my A1200. Once I get a little free time I'll put the mouse motion counter update into the branch which contains full support for HID report mode mice and merge it, because that fixes it. I'll try to do it this week but family life means I'm not usually free until ~10pm most evenings.

I've seen the motion issue as and it's really weird. I've also seen the issue where holding the right mouse button down causes motion to smooth out. I'm going to need to rewrite the mouse motion output because it's junk and fairly stupid. I've hacked it a couple of times and it's just really ugly.

As for reset: ctrl-leftgui-rightgui or ctrl-leftgui-menu will trigger the reset line, regardless of which branch you're on. However, as Claude reported, I'm not asserting the minimum pulse length of 50ms so as a manual hack, hold the keys long enough to keep it held. If you're connecting to an A2000/A3000/A4000, reset is handled by asserting the clock line for a period of time and it's picked up by a small circuit and translated into a reset signal. That's a fairly simple change and also needs to be done.

@reinauer
Copy link
Author

Ha, I am moving slow on this project as well. Thank you for your pointers. I switched to the development branch and the mouse started working a loooot better! Thank you for the suggestion.

As for asserting the clock line, is that something that could be done unconditionally? Or would this require adding a compile time option for A2000/3000/4000? Or even better, can the amigahid detect the Amiga somehow?

I'll play around with with this on my A3000.

@reinauer
Copy link
Author

This is probably not the right way to fix the issue, but I can confirm that the following patch will make CTRL-LeftWin-RightWin reboot the A3000

index 4088427..637b7ee 100644
--- a/src/platform/amiga/keyboard_serial_io.c
+++ b/src/platform/amiga/keyboard_serial_io.c
@@ -201,6 +201,10 @@ void amiga_assert_reset()
 {
     // ahprintf("[akb] *** RESET BEING ASSERTED ***\n");
     _keyboard_gpio_set(KBD_AMIGA_RST, LOW);
+    // Hold clock lo for 500us
+    _keyboard_gpio_set(KBD_AMIGA_CLK, LOW);
+    sleep_us(500000);
+    _keyboard_gpio_set(KBD_AMIGA_CLK, HIGH);
 }
 
 void amiga_release_reset()

@borb
Copy link
Owner

borb commented Mar 20, 2024

That was the way I was intending to handle the reset line (I don't have a big-box Amiga to check with); I'll ask another user I know who uses this project to check it with their A2000.

I don't think there's really a point to making it configurable; at the very least, the 500ms wait will help, since at the very least on my A1200 I frequently find that holding reset for too short a time will fail to reset the Amiga. Long term, once I've got the display menu+settings storage aspects working, I can make it a runtime configurable but certainly I don't believe there will be any ill effects using it on wedge Amigas.

I'll patch in the reset code now; it'll go into the development branch.

Should probably keep this issue open until development is merged down to main.

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

No branches or pull requests

2 participants