Re: I hope this is allowed but it may help.
I don't have schematics for you, but i do have more protocol information than you're likely to find anywhere else (googling for information lead me here). Unfortinately, i don't have voltage, timing, or logic-level information to go along with the protocol.
The SNES controller port has 7 pins, laid out something like this:
Code:
_________________ ____________
| | \
| (1) (2) (3) (4) | (5) (6) (7) |
|_________________|____________/
The pins are:
1: +5v (power)
2: Clock
3: Latch
4: Data1
5: Data2
6: IOBit
7: Ground
The SNES reads the port in a serial manner. First, Latch is toggled 1 then 0, which signals the device to latch state in preparation for output. Then Clock is set active, Data1 and Data2 are sampled, and Clock is set inactive. The SNES may repeat this read cycle as many times as it likes before latching again, and there may be an arbitrary delay in between each read cycle.
IOBit is simply that, a single bit I/O channel. The 'default' value is 1, and either the SNES or the device may set it to 0 (but if one side sets 0, the other cannot set 1). IOBit of controller port 2 is also connected to the PPU H/V Counter latch; guns set this to 0 when they see the TV's electron gun, and the SNES reads the latched values at the end of the frame to determine where the gun was pointing.
The mouse outputs 32 bits of data on Data1, if more reads are attempted then the mouse presumably outputs 1 bits until the next latch. The bits are "00000000 rlss0001 YyyyyyyyXxxxxxxx". 'r' and 'l' are the left and right mouse buttons. 'Yyyyyyyy' and 'Xxxxxxxx' are the movement deltas since the last latch, in sign-magnitude format (Y/X set is up/left). 'ss' are known as "speed bits", but what this signifies is unknown. The value is initially 0, and is incremented mod 3 if a read cycle is attempted while Latch is 1. If these speed bits are not emulated, the game will likely report an electronics error in the mouse.
I would not be surprised to find 4 of the 4021 chips mentioned at
http://www.gamesx.com/controldata/nessnes.htm inside the mouse.
AFAIK, the mouse does not use Data2 (0 is always returned) or IOBit. If someone finds schematics or dissects a mouse, I would be interested in whatever information is discovered. Hopefully the "Notify me when a reply is posted" checkbox works, otherwise i can be found on the snes9x.com developer forum.