PDA

View Full Version : C64 NEOS Mouse, Keyboard Issues



BG101
May 18th, 2009, 02:41 AM
Quite some time ago I wrote a GUI for my Commie (actually had been developing it for some time) and I bought a NEOS mouse which came with the OCP art studio. So, since I wasn't happy with the "performance" of the Datex mouse (which basically works like a digital joystick), I wrote a mouse driver to make the NEOS compatible with my program. A proper proportional mouse at last, I thought! I'm now reviving the project, but there is a hurdle I'd like to overcome ...

The only problem is, in order to use the keyboard, the mouse has to be unplugged, which is a PITA and, as I've found out via the forums, also risks static damage :(

Has anyone else experienced this, and is there a straightforward solution? I'd considered putting an inline switch in the mouse lead and modding the mouse driver to detect when the mouse was disconnected but this isn't ideal, so I wondered if it would be better (or possible) to add code to capture the keyboard buffer and translate the garbage to the correct key codes?

Other than that, are there any other proportional mice for the Commie, or is the PS2 mouse adaptor capable of proportional operation without interfering with the keyboard? No problem writing/adding a suitable driver.

TIA

BG

Zeela
May 18th, 2009, 03:56 AM
There's the 1351 mouse from Commodore. It's a proportional mouse.
Then there was a mouse called GEOS Mouse, for use with GEOS. It probably was proportional.

A couple of interfaces:
http://www.zimmers.net/anonftp/pub/cbm/documents/projects/interfaces/mouse/Mouse.html
http://www.vesalia.de/e_micromys.htm

carlsson
May 18th, 2009, 06:40 AM
I suppose you may toggle some bits in the CIA registers to enable or disable mouse. Exactly which bits I don't know, but look for the Data Direction Register.

BG101
May 21st, 2009, 12:25 AM
Thanks for the suggestions - wasn't sure about the 1351 but now I know it's proportional I'll look out for one.

As for the CIA registers, I hadn't thought of that - good idea. I'll have a go next time I have a programming session :)


BG

carlsson
May 21st, 2009, 02:02 AM
I think this is what you need to play with:

DC00 56320
Data Port A (Keyboard, Joystick, Paddles, Light-Pen)
7-0 Write Keyboard Column Values for Keyboard Scan
7-6 Read Paddles on Port A / B (01 = Port A, 10 = Port B)
4 Joystick A Fire Button: 1 = Fire
3-2 Paddle Fire Buttons
3-0 Joystick A Direction (0-15)

DC01 56321
Data Port B (Keyboard, Joystick, Paddles): Game Port 1
7-0 Read Keyboard Row Values for Keyboard Scan
7 Timer B Toggle/Pulse Output
6 Timer A: Toggle/Pulse Output
4 Joystick 1 Fire Button: 1 = Fire
3-2 Paddle Fire Buttons
3-0 Joystick 1 Direction

DC02 56322
Data Direction Register - Port A (56320)

DC03 56323
Data Direction Register - Port B (56321)
I can't recall if you can alter DC02 directly or need to do something more (disable interrupts etc).