SukkoPera / OpenAmigaJoyMouseSwitcher

Open Hardware Automatic Mouse/Joystick Switcher for Amiga Computers
Other
24 stars 2 forks source link

Why D6 was removed? #4

Closed lukasz-cielecki closed 3 years ago

lukasz-cielecki commented 3 years ago

Could you please explain why D6 from original design was removed? I assume it was protecting rmb/jb2 pin. If it's not needed why lmb/jb1 diode (D5) is still there?

SukkoPera commented 3 years ago

First of all all diodes serve no purpose on an Amiga computer. They are there just in case this adapter is connected to a C64.

On a C64 the direction and Button 1 lines are multiplexed with the keyboard matrix signals. You are not supposed to pull those lines high at any time, you are only allowed to set them low. If you connect push-pull outputs you need to put diodes inbetween in order to avoid the joystick to interfere with the keyboard scanning. See OpenC64MegadrivePadAdapter for more details.

Button 2, instead, is using pin 9, which in theory was designed to read analog controls (think paddles or basically a potentiometer), which means you are free to put any voltage in the 0-5V range on it.

The Amiga works mostly the same, if you look at the schematics you'll notice that pins 5 and 9 go to Paula, which has the analog read circuit, while pin 6 (Button 1) goes to one of the CIAs, which can only read digital inputs.

lukasz-cielecki commented 3 years ago

Thank you for detailed explanation!