Login
Back to forumReply to this topicGo to last reply

Posted By

Luca
on 2022-11-27
10:59:24
 3rd joystick on SIDcard: original SIDcard and NAE/CAE

Few days ago, @Rüdiger has added an easy 5-minutes hack by me for Karting Grand Prix in order to play it with a 3rd player using the usual joystick port on a SIDcard. It simply reads LDA$FD80 and then JMP where the code compares the values for players 1 and 2, all regular. It works on YAPE and emulators in general.

First him, then me, we tested this hack on the real hardware, and I got this weird surprise: it perfectly works on @BSZ's NAE/CAE, it badly works on a classic Solder's SID Card.
What does happen on the latter case, is that it works "on a hiccup", it works as expected but literally stops for a while, then works back again and stops again, every half second circa.

I tested the same setup with Tron 6 and works flawlessly.

Where's my bad here? Should I add some LDA#$00 STA$FF08 before LDA$FD80? And, if something about coding will work, why it actually works on the new generation of SIDcards and doesn't on the classic one?



EDIT
Aha! If you LDA$FD80 STA$0C00, you can see the right output; if you do it but slightly delayed (LDA$FD80 BIT$FF STA$0C00) the output continuously oscillates on bit6: the untouched joystick's output value, for example, oscillates between the regular $FF and a $BF!. In facts, even Tron 6 has a smart AND#$0F in order to avoid this annoying value oscillation, and I'm starting to think that it was a specific issue of the hardware! What is happening here?



Posted By

BSZ
on 2022-11-27
12:27:47
 Re: 3rd joystick on SIDcard: original SIDcard and NAE/CAE

With the Solder's card, Bit 7/6/5 should always be 1, I think. If you experience anything else, it's probably the card's fault. (Maybe a short circuit somewhere?)

However, unused bits should be ignored. Perhaps they will be used for some function in a later hardware.

Posted By

Luca
on 2022-11-27
12:28:15
 Re: 3rd joystick on SIDcard: original SIDcard and NAE/CAE

@BSZ, yes, at first me and Rüdiger though it would possibly be a card's fault, but I tested on mine too, and the result is exactly the same. Is the original SIDcard originally bugged too?

Posted By

BSZ
on 2022-11-27
12:33:53
 Re: 3rd joystick on SIDcard: original SIDcard and NAE/CAE

Maybe missing the D6 connection from the bus-driver? That's exactly what it could do. (Do you have an measure instrument handy? Can you measure resistance?)

Posted By

Luca
on 2022-11-27
12:36:56
 Re: 3rd joystick on SIDcard: original SIDcard and NAE/CAE

Eeeh nope, not here. What I can say for sure is: we are 2 on 2. If @Chronos would test it too, we'll see if we're gonna reach 3/3 wink

Posted By

BSZ
on 2022-11-27
12:46:42
 Re: 3rd joystick on SIDcard: original SIDcard and NAE/CAE

happy Based on the drawing, you should check that the pin 21 of the SID is connected to the pin 12 of the 74LS245 below it. (On the LS245 this may be a different pin, the wiring diagram I found is marked 12.)

Posted By

SukkoPera
on 2022-11-27
13:03:23
 Re: 3rd joystick on SIDcard: original SIDcard and NAE/CAE

What you are seeing is odd, as bits 5/6/7 on Solder's SIDcard will always read as 1, you can see that clearly from the schematics. Writing to the port MUST also be avoided unless you know what you are doing, as it can potentially create short circuits.

This is also true for ReSeed V1, as it used the exact same circuit, while V2 will incorporate some countermeasures.

Posted By

Luca
on 2022-11-27
13:09:18
 Re: 3rd joystick on SIDcard: original SIDcard and NAE/CAE

@SukkoPera writing on the...what? I simply read the output address grin

@BSZ the card I tested is exactly the one here, so although the pictures aren't that well defined, you can check what is connected to what wink

Posted By

SukkoPera
on 2022-11-27
13:13:43
 Re: 3rd joystick on SIDcard: original SIDcard and NAE/CAE

I meant writing to $FD8x. I know you're not doing it, it was just a sort of "by the way" happy.

Posted By

BSZ
on 2022-11-27
13:25:20
 Re: 3rd joystick on SIDcard: original SIDcard and NAE/CAE

@Luca: There are also pictures of the @Chronos card on the site, they are better. But this detail is not visible in the pictures. sad

Posted By

Luca
on 2022-11-27
13:25:39
 Re: 3rd joystick on SIDcard: original SIDcard and NAE/CAE

Ah btw, tested it with no SID plugged in, but hardly this could have affected the test.

Posted By

BSZ
on 2022-11-27
14:04:49
 Re: 3rd joystick on SIDcard: original SIDcard and NAE/CAE

@Luca: Yes, the SID chip should not affect this. If this problem affects all old cards, then I need to rethink my NAE/CAE detection code. grin

Posted By

Luca
on 2022-11-27
14:08:25
 Re: 3rd joystick on SIDcard: original SIDcard and NAE/CAE

@BSZ yes, that one! And @Gaia might think about different versions to emulate for the next YAPE wink

Posted By

SukkoPera
on 2022-11-28
03:39:25
 Re: 3rd joystick on SIDcard: original SIDcard and NAE/CAE

@Luca: can you provide test programs that I can run with ReSeed to test the behaviour?

Posted By

Luca
on 2022-11-28
03:45:07
 Re: 3rd joystick on SIDcard: original SIDcard and NAE/CAE

@SukkoPera do you mean anything SIDcard related?

Posted By

SukkoPera
on 2022-11-28
03:55:04
 Re: 3rd joystick on SIDcard: original SIDcard and NAE/CAE

Well no, I meant a quick'n'dirty program to test this odd behaviour you are seeing.

Posted By

Luca
on 2022-11-28
04:56:59
 Re: 3rd joystick on SIDcard: original SIDcard and NAE/CAE

Ah ok, type in Monitor what you see in the animated gif:

.1010 LDA $FD80
.1013 BIT $FF
.1015 STA $0C00
.1018 JMP $1010


Posted By

TLC
on 2022-11-28
06:09:45
 Re: 3rd joystick on SIDcard: original SIDcard and NAE/CAE

I couldn't reproduce this on my Plus/4 + old Synergy SID card + TAC-2 setup. Bit 6 appeared to be stable all the time during the test.

Looking up this part on the schematics (http://solder-synergy.de/plus4/hardware/makers/sid.gif), one'd think that $fd80 is pretty much supposed to return "1"'s for every unconnected port bits, given the 8*3.3k pull-up resistor pack RP's presence (upper right corner on the schematics).

Maybe, Q6 of the 74LS245 bus driver is missing it's connection to the respective pin of RP on this particular SID card. (Explanation: when a TTL input is left floating, it's typically on a weak high level by default - which can be pulled "low" by some electric noise very easily, i.e. by sinking very small currents. That is, if Q6 is missing it's 3.3k pull-up to +5V i.e. if this pin is left floating, then it can well pick up electric noise/crosstalk, and report 0's on some semi-periodic basis.) Ed.: similar behaviour could be also a result of Q6 having been accidentally tied to some other active signal during manufacturing (--> solder joints, slightly wrong PCB, whatever), which'd then interfere with this (otherwise unused) input.

Posted By

Chronos
on 2022-11-28
06:29:43
 Re: 3rd joystick on SIDcard: original SIDcard and NAE/CAE

A little bit late, but there grin Do you still need joytesting Solder sid card vs NAE?

Posted By

Luca
on 2022-11-28
09:13:48
 Re: 3rd joystick on SIDcard: original SIDcard and NAE/CAE

@TLC hence it could be due a bad manifacture of the card. What intrigued me is that me and Rüdiger had the same defect. Apropos @Rüdiger, please do the same test as for SukkoPera, let's see if is the same bit oscillating.

@Chronos yes please, would be more useful stats about it. Thank you in advance.

EDIT:
Problem solved lads! I cleaned it up a bit, and – no kidding! – one single hair was exactly in the 9 pins row named by TLC. One hair, could be possible? Once removed, it worked with no problems at all. Rüdiger we both simply must keep our SIDcard cleaner than we did before :D So try to clean up you SIDcard a bit, and let me know how happens. The hack for the game can be restored as it was in the first proposal, then. Much ado about nothing, I'm the Olympic Gold Medal of this sport.

Posted By

TLC
on 2022-11-28
11:20:16
 Re: 3rd joystick on SIDcard: original SIDcard and NAE/CAE

@Luca very interesting find, certainly wouldn't have expected that. (I'm a bit uncertain about that TBH, because I couldn't explain how a piece of hair could result in picking up that sort of noise. But the problem looks solved for now at least. happy )

Posted By

Luca
on 2022-11-28
11:31:05
 Re: 3rd joystick on SIDcard: original SIDcard and NAE/CAE

@TLC I'm doubtful seconding you, nonetheless it worked after the removal, and maybe it had the shape of a hair but wasn't a real "hair"...

@Rüdiger now it's up to you in order to have an ultimate word about this: clean up your SIDcard and test it again with the former cheat.

Posted By

SukkoPera
on 2022-11-28
13:09:19
 Re: 3rd joystick on SIDcard: original SIDcard and NAE/CAE

Just tested on ReSeed V1 and can confirm that the symbol that appears is stable and does not change with time.

Posted By

Chronos
on 2022-11-28
13:12:02
 Re: 3rd joystick on SIDcard: original SIDcard and NAE/CAE

tried both cards (solder+cae), working flawlessly, there is no magical changes..

Posted By

MMS
on 2022-11-28
13:32:17
 Re: 3rd joystick on SIDcard: original SIDcard and NAE/CAE

sceners with cat(s) are in a bigger threat than the others.
With my age I can hardly produce enough hair for this defect grin



Back to topReply to this topic


Copyright © Plus/4 World Team, 2001-2024