Author Topic: 464+ controller port issue  (Read 2563 times)

0 Members and 1 Guest are viewing this topic.

Offline Cwiiis

  • CPC664
  • ***
  • Posts: 127
  • Country: gb
    • Blog
    • Awards
464+ controller port issue
« on: 00:02, 29 July 21 »
I just got a 464+ off eBay (lucky me!) and while most everything seems fine, it seems like the 1st player (nearest the narrow edge of the machine) port has issues. If I plug a pad in 2P, each press generates one keypress, but in the 1P port, they generate a whole miriad of presses. Trying to play a GX4000 cart game doesn't really work, presumably because of the spurious presses. Navigating in the C4CPC menu works fine with the pad in the 2P port, but goes a bit crazy in the 1P port, again, presumably for the same reasons.

Is this just me not understanding how the Plus computers work, or is this a problem? If the latter, any ideas as to what to check/tweak to fix it? I've no problem with opening it up and getting the soldering iron out (waiting for bits to upgrade it in fact, though they might be a while).
 
like
0
No reactions

Offline Cwiiis

  • CPC664
  • ***
  • Posts: 127
  • Country: gb
    • Blog
    • Awards
Re: 464+ controller port issue
« Reply #1 on: 09:13, 29 July 21 »
Having read the manual, it seems my DEL key might also be having issues - though it works in the keyboard tester app, when I press it at the BASIC terminal, it inserts ".0%u220F%u29D6" and doesn't delete anything. So I guess there's an issue with whatever handles input... Interestingly, the key-repeat of DEL works correctly, it's just the initial press that has issues. This appears to be the same with the controller inputs too.
« Last Edit: 09:15, 29 July 21 by Cwiiis »
like
0
No reactions

Offline Bryce

  • The Hardware Guy.
  • Supporter
  • 6128 Plus
  • *
  • Posts: 12.473
  • Country: wf
  • It's not broken, it just hasn't been fixed yet.
    • index.php?action=treasury
    • Awards
Re: 464+ controller port issue
« Reply #2 on: 09:56, 29 July 21 »
Disconnect the keyboard membrane and see if the joystick problem persists. You may just need to clean the membrane.


Bryce.
like
0
No reactions

Offline Cwiiis

  • CPC664
  • ***
  • Posts: 127
  • Country: gb
    • Blog
    • Awards
Re: 464+ controller port issue
« Reply #3 on: 11:25, 29 July 21 »
Disconnect the keyboard membrane and see if the joystick problem persists. You may just need to clean the membrane.


Bryce.
Just tried this and unfortunately the joypad problems persist... Does that point to a bad AY chip? Or are there more debugging steps before that point?
like
0
No reactions

Offline GUNHED

  • 6128 Plus
  • ******
  • Posts: 2.850
  • Country: de
  • Reincarnation of TFM
    • FutureOS - The quickest OS for the CPC and Plus
    • Awards
Re: 464+ controller port issue
« Reply #4 on: 11:52, 29 July 21 »
Easy fix: Get rid of the resistor network in the 464plus. That will work. See thread about it somewhere here.
like
0
No reactions
http://futureos.de --> Get the revolutionary FutureOS (Update: 2021.01.24)
http://futureos.cpc-live.com/files/LambdaSpeak_RSX_by_TFM.zip --> Get the RSX-ROM for LambdaSpeak :-) (Updated: 2021.07.15)

Offline Cwiiis

  • CPC664
  • ***
  • Posts: 127
  • Country: gb
    • Blog
    • Awards
Re: 464+ controller port issue
« Reply #5 on: 12:11, 29 July 21 »
Easy fix: Get rid of the resistor network in the 464plus. That will work. See thread about it somewhere here.
Searching around, I see that advised - given that basically everything works for me except that one key and the 1P joypad though, is that likely to be the issue? I suppose desoldering it isn't going to hurt anything so I may as well give it a go...

Edit: Just another piece of information in case it wasn't clear before, every wrong result I get from the 1P pad and the DEL key is perfectly consistent - they all result in the same combination of inputs in the same order every time it seems. I can alter them sometimes by holding other keys while pressing them.
« Last Edit: 12:20, 29 July 21 by Cwiiis »
like
0
No reactions

Offline Bryce

  • The Hardware Guy.
  • Supporter
  • 6128 Plus
  • *
  • Posts: 12.473
  • Country: wf
  • It's not broken, it just hasn't been fixed yet.
    • index.php?action=treasury
    • Awards
Re: 464+ controller port issue
« Reply #6 on: 13:13, 29 July 21 »
As the problem effects the Joystick port, it's less likely to be a resistor network problem. The only other two components involved are the ASIC and the AY. Let's hope it's just a bad AY.

Bryce.
like
0
No reactions

Offline Cwiiis

  • CPC664
  • ***
  • Posts: 127
  • Country: gb
    • Blog
    • Awards
Re: 464+ controller port issue
« Reply #7 on: 13:36, 29 July 21 »
I snipped off the resistor network (not after spending more time than I'd have liked trying to desolder it...) and yes, no difference at all. I guess I'll be sourcing a new AY chip :| I have a GX4000, maybe I should take the chip from that to test with, though I'm going to need to get a decent desoldering station. If it's anything like this 464+ I don't really trust that I can desolder it using just a pump+wick...

There's some other odd behaviour I've noticed... If I'm holding down other keys, some keys will input multiple characters - this becomes obvious as you touch-type - so 1+2, then 3 inputs '43', o+u, then n inputs 'oumn'... Is this expected?
like
0
No reactions

Offline eto

  • Supporter
  • 464 Plus
  • *
  • Posts: 474
  • Country: de
    • Awards
Re: 464+ controller port issue
« Reply #8 on: 13:56, 29 July 21 »
There's some other odd behaviour I've noticed... If I'm holding down other keys, some keys will input multiple characters - this becomes obvious as you touch-type - so 1+2, then 3 inputs '43', o+u, then n inputs 'oumn'... Is this expected?

Yes, that's a side effect of a keyboard matrix. If you have already pressed 1+2, Line &48 will be selected and also bit 0 and 1. When you now hit 3 while the others are still pressed, line &47 will be selected, but since bit 0 and 1 are also already active, it will detect both 4 and 3.

Check out the matrix here: https://www.cpcwiki.eu/index.php/Programming:Keyboard_scanning

DEL and joystick one are also on the same line, so whatever causes this, is probably related to this line. When you start BASIC and hit the joystick directions, does it only show arrows or will there also be other characters?

Regarding this:  ".0%u220F%u29D6", do you mean it shows . then 0 then % then u then 2 then 2 again then 0 then F then ... or is "%u220F" and "%u29D6" a unicode character that somehow got not properly copy/pasted?
like
0
No reactions

Offline Bryce

  • The Hardware Guy.
  • Supporter
  • 6128 Plus
  • *
  • Posts: 12.473
  • Country: wf
  • It's not broken, it just hasn't been fixed yet.
    • index.php?action=treasury
    • Awards
Re: 464+ controller port issue
« Reply #9 on: 14:25, 29 July 21 »
I snipped off the resistor network (not after spending more time than I'd have liked trying to desolder it...) and yes, no difference at all. I guess I'll be sourcing a new AY chip :| I have a GX4000, maybe I should take the chip from that to test with, though I'm going to need to get a decent desoldering station. If it's anything like this 464+ I don't really trust that I can desolder it using just a pump+wick...

There's some other odd behaviour I've noticed... If I'm holding down other keys, some keys will input multiple characters - this becomes obvious as you touch-type - so 1+2, then 3 inputs '43', o+u, then n inputs 'oumn'... Is this expected?

Before you go ordering anything, I'd remove and (carefully) clean the membrane with warm soapy water using a soft cloth. Don't use anything abrasive!And don't take the AY from your GX. You'll end up damaging the GX board, when you can get an AY cheaply on ebay.

Bryce.
like
0
No reactions

Offline Cwiiis

  • CPC664
  • ***
  • Posts: 127
  • Country: gb
    • Blog
    • Awards
Re: 464+ controller port issue
« Reply #10 on: 14:30, 29 July 21 »
Yes, that's a side effect of a keyboard matrix. If you have already pressed 1+2, Line &48 will be selected and also bit 0 and 1. When you now hit 3 while the others are still pressed, line &47 will be selected, but since bit 0 and 1 are also already active, it will detect both 4 and 3.

Check out the matrix here: https://www.cpcwiki.eu/index.php/Programming:Keyboard_scanning

DEL and joystick one are also on the same line, so whatever causes this, is probably related to this line. When you start BASIC and hit the joystick directions, does it only show arrows or will there also be other characters?

Regarding this:  ".0%u220F%u29D6", do you mean it shows . then 0 then % then u then 2 then 2 again then 0 then F then ... or is "%u220F" and "%u29D6" a unicode character that somehow got not properly copy/pasted?
Ok, I thought the matrix thing might be the case, though interestingly the keyboard tester seems to be clever enough to work around that. Re those symbols, yes, it was unicode that got mangled by this forum - here's a screenshot: https://photos.app.goo.gl/3yrAhWaqCDRB6xgf8
That's the result of me pressing each button once and hitting return (after typing out the label). Left is a bit confusing because it includes a break in it... If I press the buttons multiple times, it results in the same inputs in the same order (at least it seems that way) and if I keep the button held, the correct behaviour happens. At the end of each string, you can see it actually inputs the correct character. I'm not sure if that's happening with Del, I don't see another character that gets deleted, but it might just be happening too quickly for me to see.
like
0
No reactions

Offline Cwiiis

  • CPC664
  • ***
  • Posts: 127
  • Country: gb
    • Blog
    • Awards
Re: 464+ controller port issue
« Reply #11 on: 14:31, 29 July 21 »
Before you go ordering anything, I'd remove and (carefully) clean the membrane with warm soapy water using a soft cloth. Don't use anything abrasive!And don't take the AY from your GX. You'll end up damaging the GX board, when you can get an AY cheaply on ebay.

Bryce.
Given this happens with the keyboard entirely removed, is there much point? Doesn't hurt to be clean of course :) But in terms of fixing the problem...
like
0
No reactions

Offline Bryce

  • The Hardware Guy.
  • Supporter
  • 6128 Plus
  • *
  • Posts: 12.473
  • Country: wf
  • It's not broken, it just hasn't been fixed yet.
    • index.php?action=treasury
    • Awards
Re: 464+ controller port issue
« Reply #12 on: 14:39, 29 July 21 »
No, it won't solve the issue, but it is a good idea to do it anyway when you have the computer apart.

Bryce.
like
0
No reactions

Offline eto

  • Supporter
  • 464 Plus
  • *
  • Posts: 474
  • Country: de
    • Awards
Re: 464+ controller port issue
« Reply #13 on: 14:59, 29 July 21 »
That's the result of me pressing each button once and hitting return (after typing out the label). Left is a bit confusing because it includes a break in it... If I press the buttons multiple times, it results in the same inputs in the same order (at least it seems that way) and if I keep the button held, the correct behaviour happens.

If you compare the exact output to the keyboard matrix, then you see, that anything that happens on line 48 will trigger everything else on the same bit of all lines.

Gamepad right is most easy to explain, as there are no special characters involved: F9, F8, ], p, i, y t, w, q, joystick right, which is exactly bit 3, line &40 - &49

I am no expert in electronics and hopefully Bryce can correct me if I am wrong, but if the soundchip would be malfunctioning, I doubt that it would have this effect. To me it looks much more like there must be somewhere a short between line 49 and either ground or 5v (not sure which one though...). If I understand the keyboard scanning correctly, whenever bit 3 is checked by the computer (which is done for every line starting at 40, that's why they are always in exactly the same sequence), it will will always detect that the key on each line is pressed, as long as the respective key on line 49 is pressed.

If that's the case, then carefully check if the membrane is clean, especially where it connects to the board, check the connector, if something is in there. Or maybe some short on the membrane. Or on the PCB...
like
0
No reactions

Offline Bryce

  • The Hardware Guy.
  • Supporter
  • 6128 Plus
  • *
  • Posts: 12.473
  • Country: wf
  • It's not broken, it just hasn't been fixed yet.
    • index.php?action=treasury
    • Awards
Re: 464+ controller port issue
« Reply #14 on: 15:14, 29 July 21 »
Close but not 100% correct. I'm not sure what you mean with "line 48" or "line 49", but if there was a direct short then you would get characters appearing without pressing anything. What can happen is that inputs (AY) or ouputs (ASIC) can end up being connected inside the chips due to unexpected voltages (if some idiot connected a powered joystick to the joystick port for example). Then the failure only occurs when a key is pressed. The AY then "thinks" that every key on a certain row/column is pressed. What has actually happened inside the IC is that the pullup resistors have either lost their connection to the 5V rail or the resistors have shorted (become 0 ohms).


Bryce.
like
0
No reactions

Offline eto

  • Supporter
  • 464 Plus
  • *
  • Posts: 474
  • Country: de
    • Awards
Re: 464+ controller port issue
« Reply #15 on: 15:27, 29 July 21 »
I'm not sure what you mean with "line 48" or "line 49",

I am referring to the map in this document and there it's called line &40-&49: https://www.cpcwiki.eu/index.php/Programming:Keyboard_scanning

Thanks for the clarification. Then let's hope it's the AY and not the ASIC.


like
0
No reactions

Offline Cwiiis

  • CPC664
  • ***
  • Posts: 127
  • Country: gb
    • Blog
    • Awards
Re: 464+ controller port issue
« Reply #16 on: 15:44, 29 July 21 »
Interesting, I've got an AY on the way, here's hoping it's that... I assume by ASIC, you're referring to the big Amstrad branded chip that I guess is basically impossible/pointless to replace? Is there anything worth testing outside of the chips, just in case? I did test for ground/5V shorts, I didn't find any but then I don't really know what I'd be looking for either...
like
0
No reactions

Offline GUNHED

  • 6128 Plus
  • ******
  • Posts: 2.850
  • Country: de
  • Reincarnation of TFM
    • FutureOS - The quickest OS for the CPC and Plus
    • Awards
Re: 464+ controller port issue
« Reply #17 on: 18:35, 29 July 21 »
Sorry to hear. I did remove (by moving the network back and forward a couple of times) the resistor network and that way I got three 6128plus working again (regarding the keyboard failures).
Hope you'll find a working solution.
like
0
No reactions
http://futureos.de --> Get the revolutionary FutureOS (Update: 2021.01.24)
http://futureos.cpc-live.com/files/LambdaSpeak_RSX_by_TFM.zip --> Get the RSX-ROM for LambdaSpeak :-) (Updated: 2021.07.15)

Offline Bryce

  • The Hardware Guy.
  • Supporter
  • 6128 Plus
  • *
  • Posts: 12.473
  • Country: wf
  • It's not broken, it just hasn't been fixed yet.
    • index.php?action=treasury
    • Awards
Re: 464+ controller port issue
« Reply #18 on: 21:16, 29 July 21 »
Sorry to hear. I did remove (by moving the network back and forward a couple of times) the resistor network and that way I got three 6128plus working again (regarding the keyboard failures).
Hope you'll find a working solution.

The resistor network solution only resolves keyboard problems, because the membrane has a relatively high resistance. Joysticks have real buttons or contacts, so the resistance should be a lot lower and they won't be effected by the resistor network issue.

Bryce.
like
0
No reactions

Offline Cwiiis

  • CPC664
  • ***
  • Posts: 127
  • Country: gb
    • Blog
    • Awards
Re: 464+ controller port issue
« Reply #19 on: 11:41, 30 July 21 »
I guess it's very unlikely, but it could possibly be a shorted/bust resistor too? I'm going to check all of the relevant ones later... Will probably be a few days before the AY chip arrives, so may as well. I suppose I can get on without a delete key and without the 1P pad, though it's a shame given that the system otherwise works perfectly, even the tape drive...
like
0
No reactions

Offline eto

  • Supporter
  • 464 Plus
  • *
  • Posts: 474
  • Country: de
    • Awards
Re: 464+ controller port issue
« Reply #20 on: 11:56, 30 July 21 »
Close but not 100% correct.

Just out of curiosity: what is actually happening there? From the code on the Wiki page I would expect it to be something like this: Rows/lines are by default high. As long as no key is pressed, the bits (AY) are ... floating? To identify key presses on all rows/lines the computer iterates over the rows/lines and switches every single row for a short period to low. Since the computer now knows which line is selected a logical 0 on a respective bit will indicate that a specific key is pressed.
like
0
No reactions

Offline Cwiiis

  • CPC664
  • ***
  • Posts: 127
  • Country: gb
    • Blog
    • Awards
Re: 464+ controller port issue
« Reply #21 on: 13:12, 30 July 21 »
Testing resistor values around the control port,

R58-60 test at about 3.98K

R61-63 test at 0.916, 0.926 and 0.936 K respectively - I guess that's within tolerance?
R67 and R64 test at 7.1K

R65 and R66 test at 7.7K

All the diodes around there test the same, so I assume are functional (0V in one direction, 0.610V in the other).

On IC16, there's also a 4.5K resistor between legs 14 and 2 and a diode between legs 3 and 4 that tests 1.4V in one direction and the same as the rest (0.610V) in the other... Is that expected?
Please excuse my lack of electronics knowledge, I'm very happy to be educated 🙂
Edit: Took a bunch of pictures of the board, in case anyone wanted to look or if it's helpful for someone in the future: https://photos.app.goo.gl/vAZgNScxPm6mEkPT8
« Last Edit: 13:23, 30 July 21 by Cwiiis »
like
0
No reactions

Offline pelrun

  • Supporter
  • 6128 Plus
  • *
  • Posts: 795
  • Country: au
    • index.php?action=treasury
    • Awards
Re: 464+ controller port issue
« Reply #22 on: 13:50, 30 July 21 »
As long as no key is pressed, the bits (AY) are ... floating?


Not floating, but pulled up weakly with a resistor (internal for the original AY, external with the -A version). That way they stay high unless connected to ground, i.e. through a pressed switch to a row pin when it's currently being scanned.
like
0
No reactions

Offline Bryce

  • The Hardware Guy.
  • Supporter
  • 6128 Plus
  • *
  • Posts: 12.473
  • Country: wf
  • It's not broken, it just hasn't been fixed yet.
    • index.php?action=treasury
    • Awards
Re: 464+ controller port issue
« Reply #23 on: 15:38, 30 July 21 »
Just out of curiosity: what is actually happening there? From the code on the Wiki page I would expect it to be something like this: Rows/lines are by default high. As long as no key is pressed, the bits (AY) are ... floating? To identify key presses on all rows/lines the computer iterates over the rows/lines and switches every single row for a short period to low. Since the computer now knows which line is selected a logical 0 on a respective bit will indicate that a specific key is pressed.

All correct except for the floating bit that pelrun has just explained.

Bryce.
like
0
No reactions

Offline GUNHED

  • 6128 Plus
  • ******
  • Posts: 2.850
  • Country: de
  • Reincarnation of TFM
    • FutureOS - The quickest OS for the CPC and Plus
    • Awards
Re: 464+ controller port issue
« Reply #24 on: 16:30, 30 July 21 »
The resistor network solution only resolves keyboard problems, because the membrane has a relatively high resistance. Joysticks have real buttons or contacts, so the resistance should be a lot lower and they won't be effected by the resistor network issue.
Bryce.
True! For the joystick. Not for the DEL key. As told it worked for me in three cases. In the CPC6128 there is actually a spot for this resistor network on the PCB, but unused ;-) They got it. But back to topic...
like
0
No reactions
http://futureos.de --> Get the revolutionary FutureOS (Update: 2021.01.24)
http://futureos.cpc-live.com/files/LambdaSpeak_RSX_by_TFM.zip --> Get the RSX-ROM for LambdaSpeak :-) (Updated: 2021.07.15)