Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

At least RMB need to be open collector output #8

Closed
TzOk83 opened this issue Jul 25, 2019 · 5 comments
Closed

At least RMB need to be open collector output #8

TzOk83 opened this issue Jul 25, 2019 · 5 comments

Comments

@TzOk83
Copy link

TzOk83 commented Jul 25, 2019

Actually all outputs should be open-collector type, but on Atari ST the right mouse button is a must, as in other case it will conflict with a joystick fire button (they are shorted together on Atari side).

@simoninns
Copy link
Owner

Can you elaborate more about the use-case here as I'm not really sure what your issue description is trying to solve. This can't be a 'must' since there are many people using SM2 with Atari STs and it works. What is the actual issue you are testing in order to reach your conclusion?

@TzOk83
Copy link
Author

TzOk83 commented Jul 30, 2019

This is a formal requirement of a mouse/joystick port - all outputs should be open-collector type (either in high impedance, or shorted to ground). All pins have the pull-up resistors on the Atari side. In most cases it will work with a normal output, but problem will arise when you will try to use mouse on port 0 and joystick on port 1. Right mouse button on port 0 (pin 9) is connected together with a fire button on port 1 (pin 6). All signals are active low, so at idle they are held high (+5V). When you press fire on the joystick, the pin 9 of port 0 is directly shorted to ground, while on the same time SM2 tries to hold this pin high. In most cases it will work, but stressing the PC6 pin over its limits, and unnecessarily drawing over 20mA. Microswitch based joysticks will work fine, but some universal Atari/CPC or game-pads with rubber switches - won't due to high closed switch resistance.

@dh219
Copy link

dh219 commented Dec 6, 2019

Can confirm what TzOk83 says. At least on the ST pressing fire on joystick 1 causes a short in the SmallyMouse2 with stock firmware. I've instigated a fix (for buttons only) in my fork. I'm not really familiar enough with Git to know how to submit a change to your repo for that file only. The diff is small and visible here, however, if you're interested: dh219@803f7c1

Regards.

@TzOk83
Copy link
Author

TzOk83 commented Dec 7, 2019

@dh219 You should have created a Pull Request to the Master branch of the original project in order to integrate your patch with it.

@simoninns
Copy link
Owner

In the V1.2 release I have added support for open-collector mouse buttons for all 3 buttons (as it shouldn't have any negative effects on other machines) - I've tested it with a BBC Micro and an Acorn Archimedes and it functions fine.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants