redshirt
redshirt copied to clipboard
Implemented PS/2 for the mouse and keyboard
I thought I wouldn't have to do this, but apparently emulators still don't default to USB. Fortunately PS/2 is very simple.
The challenge here is that on modern machines PS/2 is often handled by some piece of code that "owns" the USB controllers. When the USB controller is initialized by the operating system, ownership is withdrawn from that piece of code.
Consequently, we should actually use PS/2 only after USB controllers have been initialized.
The other challenge is that whether a PS/2 controller exists is indicated by ACPI, and how drivers communicate with the ACPI tables is still very blurry.