I noticed that Nestopia supports a mouse in various Subor and "Educational Computer" ROMs. This got me interested, so I decided to reverse-engineer the mouse protocol. Luckily, it was much simpler than I thought.
The mouse connects to joystick port 2. It then sends these signals, depending on the way it is moved.
Here is some psuedo-code which explains this:
Variables: x, y
Function UpdateCursor
Read Input Port 2
If Select and Start are pressed Then
Increment x
ElseIf Select is pressed then
Decrement x
End If
If Up and Down are pressed Then
Decrement y
ElseIf Up is pressed Then
Increment y
End If
Draw cursor at x, y
End Function
I have not yet had a chance to write any real code which uses this, but it is pretty simple so I should have a basic demo soon.
Also, as I do not have any original hardware (yet), I have relied on Nestopia and FCEU. If anyone has access to original hardware, could they test this?
Comment
Comment by Smoke Fumus on January 14, 2011 at 6:17pm
© 2012 Created by Daniel Rehn.
Powered by
You need to be a member of PLAYPOWER Volunteer Network to add comments!
Join PLAYPOWER Volunteer Network