English Amiga Board


Go Back   English Amiga Board > Support > support.Hardware

 
 
Thread Tools
Old 06 July 2020, 01:25   #41
solarmon
Registered User

solarmon's Avatar
 
Join Date: Dec 2018
Location: UK
Posts: 967
I did another test.

I disconnected the pin 9 wire on the Mega Drive pad board. I could see that the chip does pull the signal down to 0V when there is nothing connected to it.

So it is something on the A1200 side that is preventing it from pulling it down completely to 0V when it is connected. That would either be E363R, E363C, C314 or Paula itself on pin 39.

The only way to rule out Paula Pin 39 would be to isolate that pin, but since it is an SMD chip on the A1200, then that is a bit difficult to do.

EDIT: But when I short pin 9 on the joystick port to ground, it works. So is it because the chip on the Mega Drive pad is not pulling it down to 0V strong enough? So I really do suspect that it is something to do with Paula pulling the signal to 5V too strongly and/or the Mega Drive pad not pulling it down to 0V not strong enough.

Last edited by solarmon; 06 July 2020 at 01:33.
solarmon is offline  
Old 06 July 2020, 14:03   #42
Misclegend
Registered User

 
Join Date: Nov 2019
Location: Uranus
Posts: 186
Quote:
Originally Posted by nikosidis View Post

This resistor will be connected from 5v to the 2nd button pin, right?
right

btw, 10k= 10000 ohms
Misclegend is offline  
Old 06 July 2020, 17:30   #43
Daedalus
Registered User

Daedalus's Avatar
 
Join Date: Jun 2009
Location: Dublin, then Glasgow
Posts: 4,763
Quote:
Originally Posted by solarmon View Post
I did another test.

I disconnected the pin 9 wire on the Mega Drive pad board. I could see that the chip does pull the signal down to 0V when there is nothing connected to it.
If it's not connected to anything, very close to no current will flow, which makes it much easier to drop close to 0V. The problem is that it needs to pull the pin low and sink the current it provides, and that's where the issue crops up.

Quote:
So it is something on the A1200 side that is preventing it from pulling it down completely to 0V when it is connected. That would either be E363R, E363C, C314 or Paula itself on pin 39.
Well, sort of. Yes, they're preventing it from pulling down to 0V, but it shouldn't have to pull all the way down to 0V to assert the signal. So more specifically, it's something on the A1200 that's allowing a potential difference to develop between the pin and Paula's ADC. That could be the EMI components (though the measurements you made make that look unlikely), or the internals of Paula itself.

Quote:
The only way to rule out Paula Pin 39 would be to isolate that pin, but since it is an SMD chip on the A1200, then that is a bit difficult to do.
Yeah, possibly not worth the hassle.

Quote:
EDIT: But when I short pin 9 on the joystick port to ground, it works. So is it because the chip on the Mega Drive pad is not pulling it down to 0V strong enough? So I really do suspect that it is something to do with Paula pulling the signal to 5V too strongly and/or the Mega Drive pad not pulling it down to 0V not strong enough.
That's to be expected, since you said other controllers work fine, and pretty much sums up the situation. Neither side is really doing anything wrong, but the Amiga's implementation is marginal when it comes to the thresholds used. It could be as simple as the difference between different batches of Paula chip. If Paula didn't pull up so strongly, or the MD pad could pull down more strongly (known as sinking more current), then the issue would go away. And it's because of this that a pull-up is unlikely to improve things - there's already too much current to sink, and adding more will only increase the voltage that reaches Paula's input.

A small adaptor with a transistor switch to buffer the MD pad output and enable it to sink more current would probably solve it. It's possible that you could replace the EMI resistor with a lower value and solve it that way too. Not ideal really, but they're a couple of options.
Daedalus is online now  
Old 06 July 2020, 20:39   #44
solarmon
Registered User

solarmon's Avatar
 
Join Date: Dec 2018
Location: UK
Posts: 967
@Daedalus

Do you have any example transistor circuits I can refer to to make it sink more current? I can solder but I don't have a lot of electronics design knowledge.
solarmon is offline  
Old 07 July 2020, 15:37   #45
solarmon
Registered User

solarmon's Avatar
 
Join Date: Dec 2018
Location: UK
Posts: 967
I had tried the following circuit to try to pull the signal down:

http://tinyurl.com/ycnr23zb

Code:
$ 1 0.000005 10.20027730826997 50 5 50
w 352 160 496 160 3
L 272 176 128 176 0 1 false 5 0
g 352 192 352 256 0
R 352 96 352 48 0 0 40 5 0 0 0.5
r 352 96 352 160 0 650000
t 272 176 352 176 0 -1 5 5.3424546564428965e-8 100
x 146 156 227 159 4 24 _FIRE2
x 437 140 491 143 4 24 Pin\s9
r 496 96 496 160 0 3000000
R 496 96 496 48 0 0 40 5 0 0 0.5
o 0 64 0 4099 5 0.00009765625 0 2 0 3
However, it didn't seem to work. If anything, it increased the voltage, so that it didn't work on the previously working A1200.

I don't know how to make it 'sink the current' to pull down the voltage.
solarmon is offline  
Old 08 July 2020, 11:08   #46
Daedalus
Registered User

Daedalus's Avatar
 
Join Date: Jun 2009
Location: Dublin, then Glasgow
Posts: 4,763
Hmmm... Well, you'd need a base resistor in that circuit too, but anyway, I was more thinking along the lines of a JFET, for example: http://tinyurl.com/yb93g2nx

That's a nice website by the way I would expect the output voltage to be much higher in practice, but it's hard to say exactly because the equivalent pull-up provided by Paula is an unknown without some experiments.
Daedalus is online now  
Old 08 July 2020, 17:10   #47
solarmon
Registered User

solarmon's Avatar
 
Join Date: Dec 2018
Location: UK
Posts: 967
Yeah, that Falstad tool is really useful - it really allows me to better understand circuits when I can see the flow of current.

I haven't got any p-JFET transistors, so I've ordered some and will try again when I get it.
solarmon is offline  
Old 08 July 2020, 17:15   #48
nikosidis
Registered User

 
Join Date: Jan 2020
Location: oslo/norway
Posts: 251
This is little off topic but for mouse buttons, hold, must there be a resistor?
nikosidis is offline  
Old 08 July 2020, 17:15   #49
Daedalus
Registered User

Daedalus's Avatar
 
Join Date: Jun 2009
Location: Dublin, then Glasgow
Posts: 4,763
Indeed, I've bookmarked it - it's sure to come in handy.

Just bear in mind that the pull-up resistor might need to be changed (or removed completely) since the result will depend on Paula's internal pull-up, so some experimentation might be needed.

Quote:
Originally Posted by nikosidis View Post
This is little off topic but for mouse buttons, hold, must there be a resistor?
Mouse buttons don't need a pull-up, no.
Daedalus is online now  
Old 08 July 2020, 19:46   #50
nikosidis
Registered User

 
Join Date: Jan 2020
Location: oslo/norway
Posts: 251
Daedalues: I put this little wrong. I ment joystick buttons to hold as mouse buttons when pressed down, cause that does not work. Was there ever a rotary controller for Amiga? You know like the one in Arcanoid, Arcade. If not would that be easy to make? Connected to mouse port.
nikosidis is offline  
Old 08 July 2020, 22:05   #51
Daedalus
Registered User

Daedalus's Avatar
 
Join Date: Jun 2009
Location: Dublin, then Glasgow
Posts: 4,763
Quote:
Originally Posted by nikosidis View Post
Daedalues: I put this little wrong. I ment joystick buttons to hold as mouse buttons when pressed down, cause that does not work.
I'm totally lost so, I don't know what you mean there...

Quote:
Was there ever a rotary controller for Amiga? You know like the one in Arcanoid, Arcade. If not would that be easy to make? Connected to mouse port.
I don't know of any specifically for the Amiga, but the Amiga has a full implementation of the Atari standard on both ports, meaning you can use Atari paddle controllers without issue. It's the same way it reads analogue joysticks - a simple potentiometer control that's sampled by Paula's ADC to give analogue control in games. Of course, the game would need to support it - if the game only supports digital joysticks, then plugging in a paddle won't do much good.
Daedalus is online now  
Old 08 July 2020, 22:46   #52
nikosidis
Registered User

 
Join Date: Jan 2020
Location: oslo/norway
Posts: 251
Deadalus: Games like Arcanoid support mouse. Would that do it in port 0?
You know with holding mouse buttons in menus they stick, that does not happen if I route joystick buttons to mouse buttons and try to hold them?
nikosidis is offline  
Old 08 July 2020, 23:01   #53
Daedalus
Registered User

Daedalus's Avatar
 
Join Date: Jun 2009
Location: Dublin, then Glasgow
Posts: 4,763
Ah, sorry, I see what you're saying now. The mouse is actually digital, not analogue, and even if the game supports a mouse, it would also need to specifically support a paddle for that to work.

As for holding down the right button, a joystick with 2 buttons should do exactly the same thing. Electrically there's no difference between the left mouse button and joystick button 1, and no difference between the right mouse button and joystick button 2.
Daedalus is online now  
Old 09 July 2020, 00:00   #54
nikosidis
Registered User

 
Join Date: Jan 2020
Location: oslo/norway
Posts: 251
Daedalus: Look here: https://amigastore.eu/en/653-mouse-a...-switcher.html

This is the new version 1.01 with extra pull up resistors for fire button stability.

Why is that?
nikosidis is offline  
Old 09 July 2020, 09:58   #55
Daedalus
Registered User

Daedalus's Avatar
 
Join Date: Jun 2009
Location: Dublin, then Glasgow
Posts: 4,763
Ah yes, that's on the *input* side of the device's logic, not the output. It was an issue I spotted on that adaptor when someone was having issues with it. Because there are no pull-ups in either the mouse, joystick or the logic used in the original adaptor, the inputs were floating, which will normally tend towards a high signal with the type of chips used, but it can't be guaranteed. Electrical noise from other devices (or even the Amiga itself) could be picked up by the long joystick or mouse cables and interpreted as a button press by the device, causing it to switch inputs. The pull-ups added prevent this from happening by ensuring the unconnected inputs are held high instead of just floating high.

This doesn't happen on the Amiga side itself as the input is very different in nature. Using pull-ups on the Amiga motherboard would cause problems with analogue devices on the port, so instead Paula effectively applies pull-up behaviour to the pin only when necessary, and removes it when needed for analogue use.
Daedalus is online now  
Old 09 July 2020, 15:03   #56
nikosidis
Registered User

 
Join Date: Jan 2020
Location: oslo/norway
Posts: 251
Daedalus: Ok Interesting. I will have to check that button, mouse, click, hold behavior again. Thank you for the help.
nikosidis is offline  
Old 10 July 2020, 15:01   #57
solarmon
Registered User

solarmon's Avatar
 
Join Date: Dec 2018
Location: UK
Posts: 967
@Daedalus

So the p-JFET (J179) arrived and I used a 7.8K resistor I had.

I see the pullup resistance to VCC is abiut 3.3M and the voltage is 3.79V when Fire 2 button not pressed. When pressed, it only drops down to 0.7V, which does not trigger the Fire 2 signal.

I notice that the pull up resistance increased to 3.58, if that is of any significance.

Should I increase of reduce the pullup resistor used in this circuit?
solarmon is offline  
Old 10 July 2020, 18:16   #58
Daedalus
Registered User

Daedalus's Avatar
 
Join Date: Jun 2009
Location: Dublin, then Glasgow
Posts: 4,763
Sounds like the Pull-up in Paula is already enough. Try remove the pull-up altogether.

Edit: Another thing to note is that not all JFETs are entirely symmetrical - some work best in one particular orientation. In this case, the drain should be on the ground side.

Last edited by Daedalus; 10 July 2020 at 18:25.
Daedalus is online now  
Old 11 July 2020, 07:44   #59
solarmon
Registered User

solarmon's Avatar
 
Join Date: Dec 2018
Location: UK
Posts: 967
Tried it without the pullup resistor, with only pin 9 connected to Source, but it still doesn't drive it down below 0.7V.

I tried it the other way around, with pin 9 connected to Drain, and it has the same behaviour.

Frustrating! I don't understand why it is not driving it down to near 0V. If I short pin 9 directly to ground then that definitely works.
solarmon is offline  
Old 12 July 2020, 22:42   #60
Daedalus
Registered User

Daedalus's Avatar
 
Join Date: Jun 2009
Location: Dublin, then Glasgow
Posts: 4,763
Ugh, that is annoying alright. I guess the pull-up in Paula is quite strong, the equivalent of less than 1K maybe, which is very low. That will need a particularly low resistance to pull the signal down closer to 0V, and that transistor simply isn't low enough. Other than coming up with something more elaborate (e.g. using two transistors, since inverting the signal makes it easier to turn on and off, but a second transistor is needed to re-invert the signal) or using transistors with a lower on resistance, the only thing I can suggest is adding a pull-down resistor on the Amiga side of the transistor. Try a 330 or 470 ohm resistor between pin 9 and ground (basically between the source and drain of the JFET).
Daedalus is online now  
 


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools

Similar Threads
Thread Thread Starter Forum Replies Last Post
CD32 joypad blue button vs standard 2 button joystick jotd Coders. Asm / Hardware 6 08 May 2018 09:56
2nd button support for Mean Arenas rmcin329 Games images which need to be WHDified 0 17 June 2013 16:56
edit joy 2nd button ? turrican3 support.WinUAE 4 15 November 2012 10:30
2ND button joystick on a real Amiga Fabie support.Hardware 36 20 November 2009 12:02
2nd Fire Button Doozy support.WinUAE 7 22 January 2002 19:21

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT +2. The time now is 09:36.


Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2020, vBulletin Solutions Inc.
Page generated in 0.09054 seconds with 14 queries