Page 1 of 2

The case of the disappearing STFM keyboard.

Posted: 13 Feb 2025 16:02
by stephen_usher
This morning I drove over to Wokingham (I'm sure that some political party will want to change that name for some reason...) to pick up an STFM motherboard and a keyboard.

It was explained to me that the machine would boot to the desktop but whatever keyboard was used it wouldn't work (but no constant key click sound). The supplied keyboard just had broken DB9 solder joints... the usual.

Anyway, I got it home and ran diagnostics using the cartridge and was surprised that the keyboard worked fine. Pulled the diag cart and sure enough the keyboard didn't work in TOS. All the 'Z' diagnostic run fine so I'm a bit stumped. How could the keyboard work fine in the diag cart but the ROM routines not work?

OK, it's TOS 1.00 but that shouldn't make any difference.

Unfortunately I don't have a 6 chip set of a later TOS to test, but surely that can't be the issue here.

So, anyone have any thoughts?

Re: The case of the disappearing STFM keyboard.

Posted: 13 Feb 2025 16:10
by alexh
Could it be a broken IKBD interrupt line?

The cart bangs the metal and maybe polls for keyboard events in registers but TOS KBDVBASE uses interrupts?

Re: The case of the disappearing STFM keyboard.

Posted: 13 Feb 2025 17:00
by stephen_usher
Thanks... good thought. Suggesting a possible duff U54 ACIA.

Re: The case of the disappearing STFM keyboard.

Posted: 13 Feb 2025 20:54
by stephen_usher
alexh wrote: 13 Feb 2025 16:10 Could it be a broken IKBD interrupt line?

The cart bangs the metal and maybe polls for keyboard events in registers but TOS KBDVBASE uses interrupts?
I've just checked....

When the diag ROM is running the 6850 is producing interrupts with the interrupt line high most of the time.

When running the normal ROM the interrupt line is held low continuously, so the keyboard problem is a symptom of some other chip holding the interrupt line low continuously but only if initialised by the main ROM.

Re: The case of the disappearing STFM keyboard.

Posted: 13 Feb 2025 21:18
by stephen_usher
OK, the only other chip on that line is the other 6850, for the MIDI interface.

Booting into the diag ROM and then selecting the MIDI test changes the behaviour. The second 6850 keeps generating a spurious interrupt after the MIDI test fails (expected to fail without a loop-back cable) for some reason.

I think the next thing I'm going to do is desolder the MIDI 6850. There is then nothing but the keyboard 6850 on the interrupt line other than the input to the 68901. If the interrupt line is being held low by that when booted from the ROM I can desolder that and try the MIDI one in place.

I've ordered a couple of spare 6850s from eBay just in case.

Re: The case of the disappearing STFM keyboard.

Posted: 14 Feb 2025 14:23
by Badwolf
Good investigation!

I hadn't seen this thead before I watched the video and came up with the theory as Alex.

We were two thirds of the way there. :)

BW

Re: The case of the disappearing STFM keyboard.

Posted: 14 Feb 2025 17:43
by stephen_usher
Spoiler warning.... The conclusion was that the MIDI 6850 was bad and held the IRQ line low... Now you don't need to see part 2 of the video, where I accidentally think the MIDI ACIA is the keyboard one and vice versa and get a bit confused.

Re: The case of the disappearing STFM keyboard.

Posted: 14 Feb 2025 21:26
by stephen_usher
Here's the "part 2" video which shows my diagnosis.



Just need to await a replacement 6850.

Re: The case of the disappearing STFM keyboard.

Posted: 16 Mar 2025 15:42
by stephen_usher
Well, After waiting weeks for the replacement 6850s to arrive and a few weeks since I've had a chance to look into this and more "fun" trying to work out why the microphone wasn't working... and an unreliable 16 channel logic analyser... I've finally reached a conclusion.

The video will come out within the next day or so but the upshot was that not only was the MIDI 6850 dead but so was the PC900 optocoupler to the MIDI IN port, and that was pulling the MDI RX line low, making the 6850 think that there was data and hence triggering the IRQ line.

Some very high voltage must have gone into that MIDI port to take out the optocoupler and then spark through that to the 6850 input.

Re: The case of the disappearing STFM keyboard.

Posted: 16 Mar 2025 16:57
by stephen_usher
And here's the finished video.