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

machine/8042kbdc.cpp: make aux port to be alive with PS/2 interface #11797

Closed
wants to merge 1 commit into from

Conversation

angelosa
Copy link
Member

@angelosa angelosa commented Nov 28, 2023

  • Fix shutms11 recognizing mouse properly instead of indefinitely hang.

@angelosa
Copy link
Member Author

Opening as a PR because I'm not sure if this is the right fix. It looks like that 8042kbdc is really untested for anything PS/2 based.

  • pcipc just uses serial mouse
  • nforcepc doesn't set double as interrupt type (will fail later I presume)
  • pciagp still fails for another bug when it inits keyboard ...

@cuavas
Copy link
Member

cuavas commented Nov 30, 2023

Eugh, this thing still has the PS/2 mouse simulation in the controller, duplicating the separate PS/2 mouse simulation.

First thing, I would have thought it should be impossible to get to that point if m_mouse.on is false, since the mouse shouldn’t be processing commands at all if the auxiliary interface is disabled (KBC commands 0xa7/0xa8 control this).

Secondly, the mouse reset command (0xff) should set the following state:

  • 100 samples/second rate
  • 4 counts/millimetre resolution
  • 1:1 scaling
  • Reporting disabled

(For example see here: https://eaw.app/Downloads/PS2_Mouse.pdf – search for Reset Mode to find the reset state.)

After completing reset, it should do a self-test and report 0xaa (good) or 0xfc (fail), followed by its device ID 0x00.

So on the face of it, this change is wrong on both counts. If it improves behaviour, it’s working around bigger issues elsewhere. Given the history of this device, that shouldn’t be a surprise.

@angelosa
Copy link
Member Author

Thanks for the heads up, I'll investigate thru this branch (easy to revert)

My test rig is a FreeDOS 1.3 with CuteMouse driver, latter works up to pcipc but indefinitely hang with shutms11, and I presume the aux enable/disable state isn't respected at all here (reading something wrong?)
Other OSes (MSDOS, Windows 98 etc.) behaves in similar fashion (just pukes at current emulation)

@angelosa angelosa marked this pull request as draft December 16, 2023 00:51
angelosa added a commit that referenced this pull request Mar 23, 2024
- resolve hangs described in PR #11797 by using a microsoft serial mouse
@angelosa
Copy link
Member Author

Has no sense leaving this open after b77af1e

@angelosa angelosa closed this Mar 23, 2024
@angelosa angelosa deleted the sis_8042 branch March 23, 2024 00:55
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Development

Successfully merging this pull request may close these issues.

2 participants