MS-DOS made it much more difficult... using one mouse required that a mouse driver be resident in the 640k base memory and connected via COM or PS/2. Settlers had internal code to access a second serial based mouse but it wasn't straight-forward at all.
The DOS port of Lemmings didn't bother.
Basically, the mouse buttons were wired directly to pins - the same pins that joystick buttons would be wired to. Then also, the left/right and up/down steps would be indicated by a rising pulse on one pin with a direction indicated on another pin. The same pins that would be used for the left/right and up/down microswitches on a joystick. The way this was implemented by most early mice was to have two sensors on a sense wheel slightly out of phase, so as the sense wheel rotated it would produce a square wave on both wires. When one pin had a rising pulse, the other wire would be high if the wheel was going in one direction, and low if it was going in the other direction.
I tested that at one point when one of the 6526's on my C64 broke. I don't think the reverse would work, as I think AmigaOS used the timers, but never tested.
(My parents were not amused that I opened the machines and swap chips around...)
If one mouse goes into the keyboard PS/2 keyboard connector (I think they were the same connector) then yes, very unusual magic.