VOGONS


First post, by JUCED

User metadata
Rank Newbie
Rank
Newbie

Hello everyone, i'm trying to add mouse and keyboard support to an embedded board based on STPC Elite CPU (pretty old). Sadly, the old STMCU forum is offline and i can't download STPC Elite documents and manuals anymore, making the situation more difficult, but i found reference schematics 😁

The board i have, doesn't have any PS/2 port or any other kind of input device (except for i2c keys, which does not help). But there is a Xilinx CPLD (which still has nothing to do with keyboard).

I think that the only way would be:

-Add a Super I/O chip on the ISA bus (the board doesn't have any): i don't know if it will require software modifications to the BIOS (that seems to be the evaluation one) or if it's just plug and play. Maybe FDC37B782 or W83977ATF.

-Add a keyboard controller on the ISA bus (8742, 8255, ecc.)

Thanks to everyone 😀

Attachments

Reply 1 of 31, by dionb

User metadata
Rank l33t++
Rank
l33t++

You say the board doesn't have an ISA bus, but that sure looks like a PC/104 connector on the right on the last image. PC/104 is basically ISA in a different form factor. So you probably do have ISA.

Reply 2 of 31, by JUCED

User metadata
Rank Newbie
Rank
Newbie

Yes, there is ISA bus of course, in PC/104 format. I don't have any input device support or PS/2 connector for a keyboard. That's why i was considering to add somehow, a keyboard interface or a Super/IO chip with integrated keyboard controller

Reply 3 of 31, by rasz_pl

User metadata
Rank l33t
Rank
l33t

Xilinx under 087033 sticker?
I can see discrete serial chip 16c2850 so Im guessing above is doing some address decoding for it and three more optional ones.
I would be more worried about the firmware loaded, it doesnt look like PC BIOS compatible so I wouldnt count on automagically working after adding superIO

Open Source AT&T Globalyst/NCR/FIC 486-GAC-2 proprietary Cache Module reproduction

Reply 4 of 31, by JUCED

User metadata
Rank Newbie
Rank
Newbie
rasz_pl wrote on 2023-12-27, 20:57:

Xilinx under 087033 sticker?
I can see discrete serial chip 16c2850 so Im guessing above is doing some address decoding for it and three more optional ones.
I would be more worried about the firmware loaded, it doesnt look like PC BIOS compatible so I wouldnt count on automagically working after adding superIO

Yes, the xilinx is under the 087033 sticker. About the serial chip, you are right, in the original prototype there were 4 of them in total. About the BIOS, i can't really say. During the boot, it's possible to read "STPC consumer Elite eval board" but i don't know if it's the standard one supplied by ST or if it has been modified. I can try to add a serial mouse on one of the COM ports but the keyboard is still a problem here 😒

Reply 5 of 31, by rasz_pl

User metadata
Rank l33t
Rank
l33t

It does look industrial, industrial SBCs usually expect to be talked to over serial console so no keyboard support is needed. Did you dump this firmware/bios?

Open Source AT&T Globalyst/NCR/FIC 486-GAC-2 proprietary Cache Module reproduction

Reply 6 of 31, by DerBaum

User metadata
Rank Oldbie
Rank
Oldbie

I cant quite read the text on these pins... Whats the text near them?

Screenshot 2023-12-29 014230.png
Filename
Screenshot 2023-12-29 014230.png
File size
83.38 KiB
Views
765 views
File license
CC-BY-4.0

Have you found this?
https://web.archive.org/web/20000831062804/ht … w.com/index.htm
Its not very informative but at least something...

FCKGW-RHQQ2

Reply 8 of 31, by JUCED

User metadata
Rank Newbie
Rank
Newbie
rasz_pl wrote on 2023-12-28, 22:50:

It does look industrial, industrial SBCs usually expect to be talked to over serial console so no keyboard support is needed. Did you dump this firmware/bios?

Yes, it's industrial (it's a diagnostic monitor used on trains). There seems to be a serial port, but sadly i don't have any software or documentation. There is also a LAN connector that was probably used to boot something. I already inspected all the connectors and headers and there seems to be no keyboard support at all indeed. The CPLD may be programmed to integrate a keyboard controller but i don't think. Is it possible that they never used a keyboard on this device? Everything was done through serial port?

Reply 9 of 31, by JUCED

User metadata
Rank Newbie
Rank
Newbie

I also have the BIOS dump. I also attached the structure of the device. It looks like the serial connector is listed under the ethernet one

Attachments

  • Structure.PNG
    Filename
    Structure.PNG
    File size
    34.33 KiB
    Views
    725 views
    File license
    Public domain
  • Filename
    BIOSTC_1B.rar
    File size
    86.97 KiB
    Downloads
    17 downloads
    File license
    Public domain

Reply 10 of 31, by rasz_pl

User metadata
Rank l33t
Rank
l33t

Yes, no keyboard on industrial modules even if they run on x86 CPU/SoC. That "Connectore" box in the diagram is for Ethernet connector, serial is above under "canali serie"
this is the firmware its running https://cdn.embeddedts.com/resource-attachmen … 86-ebios-43.pdf
on one hand
"PC compatibility requires much more than just an x86 processor. It requires PC compatible memory and I/O maps as well as a PC compatible BIOS. The General Software EMBEDDED BIOS offers a high degree of compatibility with past and present BIOS standards allowing it to run off-the shelf operating systems and application software.

The EMBEDDED BIOS has been tested with all major versions of DOS, including MS-DOS, DR-DOS, and Embedded DOS 6-XL; all major versions of OS/2, including MS-OS/2 and IBM OS/2; MS-Windows 3.1, Windows-95, Windows NT, and NetWare 386."

on the other this is a custom beast and isnt something plug&play. It does support Keyboard redirect over serial port, alternatively you can plonk this card and get VGA keyboard, mouse and CF https://www.embeddedts.com/products/TS-9500. Diagram showing ordinary 82c42 keyboard controller https://cdn.embeddedts.com/resource-attachmen … 0-schematic.pdf so your plan of adding just that does look very viable

Open Source AT&T Globalyst/NCR/FIC 486-GAC-2 proprietary Cache Module reproduction

Reply 11 of 31, by DerBaum

User metadata
Rank Oldbie
Rank
Oldbie
JUCED wrote on 2023-12-29, 08:03:

serial connector is listed under the ethernet one

Does that mean serial over ethernet?
EDIT... Ok i understand now ... it says RX and TX are "crossed" ...

---
Different story to just elaborate on this:

rasz_pl wrote on 2023-12-29, 08:39:

"PC compatibility requires much more than just an x86 processor."

I have a Router with a 186 Processor and always wanted to make it into a SBC... but its so locked up and reduced down to its router functions that i changed my plan to not use this thing and just put the Processor in my collection...

FCKGW-RHQQ2

Reply 12 of 31, by JUCED

User metadata
Rank Newbie
Rank
Newbie
rasz_pl wrote on 2023-12-29, 08:39:
Yes, no keyboard on industrial modules even if they run on x86 CPU/SoC. That "Connectore" box in the diagram is for Ethernet con […]
Show full quote

Yes, no keyboard on industrial modules even if they run on x86 CPU/SoC. That "Connectore" box in the diagram is for Ethernet connector, serial is above under "canali serie"
this is the firmware its running https://cdn.embeddedts.com/resource-attachmen … 86-ebios-43.pdf
on one hand
"PC compatibility requires much more than just an x86 processor. It requires PC compatible memory and I/O maps as well as a PC compatible BIOS. The General Software EMBEDDED BIOS offers a high degree of compatibility with past and present BIOS standards allowing it to run off-the shelf operating systems and application software.

The EMBEDDED BIOS has been tested with all major versions of DOS, including MS-DOS, DR-DOS, and Embedded DOS 6-XL; all major versions of OS/2, including MS-OS/2 and IBM OS/2; MS-Windows 3.1, Windows-95, Windows NT, and NetWare 386."

on the other this is a custom beast and isnt something plug&play. It does support Keyboard redirect over serial port, alternatively you can plonk this card and get VGA keyboard, mouse and CF https://www.embeddedts.com/products/TS-9500. Diagram showing ordinary 82c42 keyboard controller https://cdn.embeddedts.com/resource-attachmen … 0-schematic.pdf so your plan of adding just that does look very viable

Thanks! That's some really good info! It seems that the ts-9500 board is using a CPLD from Xilinx. So i guess it's not possible to wire a keyboard controller directly on ISA Bus. I think i will look for this board. What about adding a Super I/O? It's plug and play or it needs software modifications?

Reply 13 of 31, by rasz_pl

User metadata
Rank l33t
Rank
l33t

Whole superio chip might collide with serial thats already on board.
Keyboard controller just needs 60/64h. All you need is address decoder to send Chip Select to 82c42 (74ls688 and some and gates should be enough?), A0/RD/WR/reset/D0-7 all go straight to ISA pins.

Open Source AT&T Globalyst/NCR/FIC 486-GAC-2 proprietary Cache Module reproduction

Reply 14 of 31, by JUCED

User metadata
Rank Newbie
Rank
Newbie
rasz_pl wrote on 2023-12-30, 11:19:

Whole superio chip might collide with serial thats already on board.
Keyboard controller just needs 60/64h. All you need is address decoder to send Chip Select to 82c42 (74ls688 and some and gates should be enough?), A0/RD/WR/reset/D0-7 all go straight to ISA pins.

Perfect, i will study a bit and pick some components. I will keep you guys updated 😀

Happy New Year!

Reply 15 of 31, by JUCED

User metadata
Rank Newbie
Rank
Newbie
rasz_pl wrote on 2023-12-30, 11:19:

Whole superio chip might collide with serial thats already on board.
Keyboard controller just needs 60/64h. All you need is address decoder to send Chip Select to 82c42 (74ls688 and some and gates should be enough?), A0/RD/WR/reset/D0-7 all go straight to ISA pins.

Now that i'm looking i think there is another problem. D0:D7 will go directly on the PC104 ISA Bus. The same happens with RD#, WR#, Reset# and A0.

But i still need to connect CS# and the keyboard interrupt KBD_IRQ. Now i was tracing some tracks on the PCB and discovered that almost all the PC104 ISA connector pins go to the Xilinx CPLD. Indeed on the document of this board i found this info about the CPLD:

-Chip select decoding of dual uarts.
-Route/handling of dual uart and flash-disk interrupts.
-Treatment of various types of resets (watchdog, power-on, VCC3 OK, reset generated by the Elan SC410 chip).
-Control signals of the chips that make the flash disk.
-I/O strobe recovery signal buffer.
-Implementation of watchdog functions.
-MUX/DEMUX of interrupt and DMA signals (The STPC Elite processor has multiplexed DMA and interrupt signals).

So it seems that it is also used for interrupt signals mux/demux. There is no way to know if on one of the Xilinx pins, i have IRQ[1] input for the keyboard interrupt. If i need to add an address decoder for the CS# and IRQ[1] interrupt for the keyboard, i need to connect to IRQ_MUX[0] and IRQ_MUX[1] (which for sure, are already connected to the Xilinx). Is it possible to connect multiple devices on IRQ_MUX pins for address decoding or the Xilinx is a problem since it's already connected here, and there will be a conflict?

Attached, some keyboard/mouse interface schematics i found on various projects. For sure i will buy a VT82C42 to start playing.

Edit: I also found that, coming out from the STPC Elite CPU there is an I/O signal called "KBCS#" (Keyboard Chip Select). I wonder if it can be used for the VT82C42.

Attachments

Reply 16 of 31, by rasz_pl

User metadata
Rank l33t
Rank
l33t

Looked at ts-9500 again and they route IRQ1 to A1 (IOCHCHK/), Dont know whats going on, maybe the SBC ts-9500 is intended to be used with has nonstandard pinout? You could use irq12 and modify firmware.

>Edit: I also found that, coming out from the STPC Elite CPU there is an I/O signal called "KBCS#" (Keyboard Chip Select). I wonder if it can be used for the VT82C42.

oh thats lovely of them 😀

looking at IRQ_MUX I think CPLD will indeed by pulling it low when you want it high with Keyboard interrupt, so you might have to cut CPLD IRQ_MUX[0] output and route it thru OR gate together with output from you own 74F153 and hope/calculate OR gate delay still fits timings constraints. actually route all four CPLD IRQ_MUX outputs thru 74LS32 so the delay is the same on all of them.

Open Source AT&T Globalyst/NCR/FIC 486-GAC-2 proprietary Cache Module reproduction

Reply 17 of 31, by JUCED

User metadata
Rank Newbie
Rank
Newbie

Yes, i also took a look at the ts9500 schematics and the interrupt is going on IOCHK#... weird.

I don't know if IRQ_MUX pins can be used on multiple devices like any D0:D7 pins, so i can wire an address decoder and take what i need from there (IRQ1).

The CPLD does everything. I don't know if they coded it to handle also IRQ1, there is no way to know. I'm writing down a pinout from the tracks i traced back.

The "cleanest" way would be to reprogram it, since i am sure that IRQ_MUX signals ends there. But i don't have the source code, so i should first code it from scratch and make it work again with the actual components and then try to add the keyboard feature, but i never touched a CPLD and i think it's not that easy to code.

Crazy to think that today, on modern computers you can just plug a usb keyboard in, and you are ready to go 😀

Reply 18 of 31, by rasz_pl

User metadata
Rank l33t
Rank
l33t
JUCED wrote on 2024-01-01, 03:14:

I don't know if IRQ_MUX pins can be used on multiple devices like any D0:D7 pins, so i can wire an address decoder and take what i need from there (IRQ1).

Thats why I suggested 74LS32 (quad OR gates). Just plugging another signal in parallel has a chance of CPLD pulling IRQ_MUX[0] low at the same time, that would be bad. Gating IRQ_MUX [0-3] behind 4 OR gates one the other hand will make sure there is no fighting during keyboard interrupt. 3 of the OR gates can have one side pulled low, with 4th concatenating CPLD IRQ_MUX[0] output and your own 74F153.
Edit: now that I think about it you dont need 4 gates after all (just one), IRQ_MUX multiplexes in time domain, all four IRQ_MUX pins are independent and encode their own set of four interrupt lines.

There is another even easier option. IRQ_MUX[0] sends information about interrupts 0-3:
0 Timer 0 - STPC%20Elite%20Datasheet.pdf mentions internal 8254, so interrupt will also be generated internally, can be ignored.
1 keyboard
2 Slave PIC - for cascading second PIC, but both 8259A are already build in so CPLD wont generate this.
3 COM2/COM4 - I think this is the only real potential IRQ generated by CPLD.
You can sacrifice IRQ3 by disconnecting IRQ_MUX[0] from CPLD completely. At that point you can wire your own 74F153 safely (copy demultiplexing diagram from STPC%20Elite%20Reference%20Schematic.pdf) to pin E23.

JUCED wrote on 2024-01-01, 03:14:

The "cleanest" way would be to reprogram it, since i am sure that IRQ_MUX signals ends there. But i don't have the source code, so i should first code it from scratch and make it work again with the actual components and then try to add the keyboard feature, but i never touched a CPLD and i think it's not that easy to code.

Sounds like whole new adventure. Personally I would be starting learning verilog with something simpler, standalone and more verifiable, like a led blinker 😀

JUCED wrote on 2024-01-01, 03:14:

Crazy to think that today, on modern computers you can just plug a usb keyboard in, and you are ready to go 😀

Keyboard support is not a common occurrence in industrial SBCs to this day.

Open Source AT&T Globalyst/NCR/FIC 486-GAC-2 proprietary Cache Module reproduction

Reply 19 of 31, by JUCED

User metadata
Rank Newbie
Rank
Newbie

Thanks for the answer 😀

First i will try to trace and locate IRQ mux signals, then i will think about what to do. Meanwhile i already bought the keyboard controller.

I noticed there is also a microswitch with 4 switches near the Xilinx, but there is no information in the document about what it's used for.

About industrial SBCs (that's the first time i'm working with them), i didn't know that keyboard support was not that common. I believe that after using the STPC development kit (that includes my beloved ps/2 connector) they build the final platform using as few components as possible for it's final purpose.