Mouse Input - SUCCESSFULLY REVERSE-ENGINEERED!

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.

 

  • Left-click: A
  • Right-click: B
  • Move left: Select
  • Move right: Select + Start (at the same time)
  • Move down: Up (confusing - be careful with this one)
  • Move up: Up + Down (at the same time)

 

 

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?

Views: 22

Tags: hardware, input, joystick, mouse, program, reverse-engineer, subor

Comment

You need to be a member of PLAYPOWER Volunteer Network to add comments!

Join PLAYPOWER Volunteer Network

Comment by Smoke Fumus on January 14, 2011 at 6:17pm
you know you're bit wrong - subor itself haven't any mouse - only lpt port (try to hack that - it used in subor's text editor to print) - later educational computer called in russia "magistr" (old russian defenition which means word "master") had one.

© 2012   Created by Daniel Rehn.   Powered by

Badges  |  Report an Issue  |  Terms of Service