VOGONS


First post, by watz

User metadata
Rank Newbie
Rank
Newbie

Hi!

I recently acquired a 486 VLB board with some massive battery corrosion damage. Dozens of pins and pads of the QFP 82C206 AT bus controller had detached. After some 30+ patch wires I got this baby back to life. Looks like a big mess of wires, but it runs runs a DX2-66@80 together with VLB IDE and VGA cards nicely. Theres only one single annoying issue left:

The system randomly semi-freezes. It rarely happens in DOS. However, I found it easiest to reproduce during Doom demo playback. In the frozen state, game music keeps playing and the system can always be unfreezed by hitting any key on the keyboard. I've tried different keyboards and keyboard controllers without change. The issue is always -much- easier to reproduce when a sound card is present and sound effects are enabled. I've tried 3 different sound cards with different IRQ/DMA setting with the same results. With a soundcard present, Doom demo playback usually freezes after 10-20s. With sound effects disabled (music doesn't matter), it takes several minutes. It will also freeze when the keyboard is unplugged, although that takes even more time.

With a scope, I quickly found out that every time the freeze occurs, the INT1 line on the 82C206 is triggered even though I did not press any keys. So the keyboard controller is generating an interrupt.
Knowing that, I checked the PS/2 clock/data lines:

- in Bios, there is no activity on the clock/data lines unless I press a key
- in DOS, the clock line gets pulsed down every ~400ms without any activity on the data line (why?)
- during Doom demo playback, I also see the ~400ms pulse with no data activity
- when the freeze occurs, there is -always- an additional pulse ~50ms after the regular ~400ms one without any data activity

I've attached a scope screenshot of the issue (ellow=clock, blue=data).

Now I'm trying to put the puzzle pieces together to be able to track down the real cause, which is most likely yet another broken trace:

As far as I understand, pulling clock low without pulling data means "inhibit".
In what scenario would a keyboard controller both "inhibit" keyboard communication and generate an interrupt without having actually read any data from the keyboard?

Any ideas?

Thanks alot,
Watz

Attachments

  • bmp_21_000.jpg
    Filename
    bmp_21_000.jpg
    File size
    61.02 KiB
    Views
    395 views
    File license
    Public domain

Reply 1 of 3, by watz

User metadata
Rank Newbie
Rank
Newbie

Now thats unexpected: The freeze was triggered by the bios "Turbo switch function". If that function is turned on, which is default, there is a ~200us burst of activity on the CPU M/IO# line every ~400ms. During that time, the 82C495SLC LMCS#/KBCS# line goes nuts. Those two lines are or'ed together to form the keyboard controllers CS# line. If both are low, then the keyboard controller is activated to read/write data from the ISA bus. And as I don't press any keys, that obviously should not happen. But it does, and so the keyboard controller gets activated a dozen times every ~400ms and apparently reads data from the bus thats not meant for it. This is more likely while a sound card is playing sound effects. And as far as I've learned, there are notifications caused by security related keyboard controller control commands that will trigger INT1.

Once the "Turbo switch function" is disabled in bios, the strange bursts on M/IO# are gone, and so are the frequent chip selects of the keyboard controller. No more INT1 and no more freeze. Most interestingly, even if the option is turned off, the turbo switch still works. So I suspect the bios I've installed somehow doesn't match the board/chipset, although it is clearly from an OPTi 82C495SLC board. I'll have to try the old bios.

I've attached a screenshot of such a "burst". The blue line is M/IO# and the yellow line 82C495SLC LMCS#/KBCS#. It seems to me that there is some low frequency noise in the 10khz range overlayed here. I have yet to figure out if thats caused by poor probe connections or a real problem. That noise might even be the root cause (and not the "burst" itself).

Attachments

  • bmp_24_002.jpg
    Filename
    bmp_24_002.jpg
    File size
    82.76 KiB
    Views
    374 views
    File license
    Public domain

Reply 2 of 3, by kdr

User metadata
Rank Member
Rank
Member

Some quick thoughts:

The keyboard controller has a long history of being used as a "miscellaneous control" device: A20 gate, fast reset, etc. It's not uncommon for the keyboard controller to also be involved in the turbo mode control logic.

I would place good odds that the periodic activity you're seeing is the BIOS SMM handler communicating with the chipset and/or keyboard controller. Probably to check either (1) for the turbo mode enable/disable hotkeys or (2) examine the I/O lines attached to the keyboard controller, one or more of which might be tied into the turbo mode functionality.

Since you have access to a logic analyzer / scope, try checking the SMIACT# pin of the CPU and see if it is active during these mysterious keyboard controller accesses.

Reply 3 of 3, by watz

User metadata
Rank Newbie
Rank
Newbie

That sounds like a reasonable explanation. It had to be BIOS code being executed by an interrupt every~400ms, as these accesses began right before booting DOS but not before POST had finished.

The AMI "Turbo Switch Function" is not as self explanatory it seems. In the book "The BIOS Companion", I found the attached excerpt that indicates that this function may actually be related to A20 gate switching and it has nothing to do with the turbo button. It wouldn't make sense on this board anyway, since according to the 82C495XLC datasheet, the turbo button input pin is ignored in 486 mode. And as far as I've been able to trace the actual turbo button, it seems to effectively disable the CPUs first level cache.

Meanwhile, I burned the attached Mr. BIOS. Its meant for a 82C495XLC, but seems to run perfectly fine on my 82C495SLC chipset. I haven't had any crashes or lockups since. Even though I can't run 0 RAM read waitstates anymore with this Bios (I have 8x1MB 70ns), benchmark performance is still noticeably better. And the Bios has native support for 32 bit IDE block transfers, which gives me even 1MB/s more IDE speed in DOS than the controller manufacturers tool "wbide.exe" tool/driver (4.7MB/s now, which I consider pretty good).

Oh, and since I've gotten rid of these keyboard controller accesses, it also runs way cooler. I bet these not only caused random controller functions being called that sporadically triggered INT1, but they also caused bus conflicts that lead to high sink currents in the controller.

Attachments

  • P1110357_cr.jpg
    Filename
    P1110357_cr.jpg
    File size
    395.9 KiB
    Views
    315 views
    File license
    Public domain
  • P1110353.JPG
    Filename
    P1110353.JPG
    File size
    455.24 KiB
    Views
    315 views
    File license
    Public domain
  • TurboSwitchFunction.jpg
    Filename
    TurboSwitchFunction.jpg
    File size
    171.52 KiB
    Views
    315 views
    File license
    Public domain
  • Filename
    MR-3DX94.zip
    File size
    47.6 KiB
    Downloads
    30 downloads
    File license
    Public domain