Skip to the content
2 layers163.9 × 88.3 mmPlaid bib cpld, the printed circuit board in 3D

A replica of the Ad Lib MCA sound card, now with a CPLD instead of the bus interface chip

Size
163.9 × 88.3 mm
Copper layers
2
Thickness
1.6 mm
Parts
68
Nets
95
Pads
413
Tracks, vias
1,474, 121
Pours
2
Routed
Yes
KiCad
KiCad 5 (file 20171130)
Created
9 Jan 2020
Updated
22 Jul 2021

Overview

Plaid bib cpld is an open-source printed circuit board by schlae, from the schlae/plaid-bib-cpld repository on GitHub. It is a 2-layer board of 163.9 × 88.3 mm with 68 parts on 95 nets, routed with 1,474 tracks and 121 vias.

It is built around the 74LS245SC, LM386N and RC4136N, with the 74LS04PC among its other parts. Its parts include 34 capacitors, 17 resistors, 9 ICs, 3 connectors and 1 transistor. It belongs with the fPGA and programmable logic and audio and music boards and the FPGA and CPLD boards of this library.

Main components

4

README

README.md

The Plaid Bib CPLD edition - an Ad Lib MCA Clone

The Plaid Bib is a 100% compatible clone of the Ad Lib MCA sound card. This is an Ad Lib card designed for Micro Channel Architecture machines, such as the IBM PS/2 family and other compatibles from NCR, Tandy, Dell, and others.

Plaid Bib photo, CPLD edition

Here are the design files. The BOM includes Mouser Electronics part numbers for everything except for the YM3812 and the Y3014B, both of which are available from brokers in China such as UTSource.

Schematic

Bill of Materials

Fab Files

The logic family used for U1 is critical. Do not substitute LS, HC, HCT, or similarly slow logic families. Use ALS, ACT, AHCT, or even F.

It's a good idea to use sockets for all the DIP chips just in case you need to swap parts out.

CPLD Notes

The Plaid Bib uses a CPLD (Complex Programmable Logic Device) to interface between the MCA bus and the YM3812 synthesizer chip. Compared with the original design that uses the 82C611 interface chip, this version is much simpler and incorporates much of the external logic into a single device.

The CPLD must be programmed with the bitstream before you can use the card. You can find the bitstream here.

I've had good luck using the Linux command line program 'xc3sprog' with a FTDI FT2232H Mini Module datasheet here.

Wiring for the FT2232H mini module:

Point 1Point 2Description
CN2 pin 1CN2 pin 11V3V3 to VIO strap
CN3 pin 1CN3 pin 3VBUS to VCC strap
CN2 pin 3CN3 pin 12V3V3 to VIO strap (2)
CN2 pin 5JTAG cable pin 6V3V3 to Plaid Bib (optional)
CN2 pin 2JTAG cable pin 5GND
CN2 pin 7JTAG cable pin 4AD0, aka TCK
CN2 pin 9JTAG cable pin 3AD2, aka TDO
CN2 pin 10JTAG cable pin 2AD1, aka TDI
CN2 pin 12JTAG cable pin 1AD3, aka TMS

You need to provide external power to the Plaid Bib through the 3.3V wire on the programming header. The optional wire does this, or you can use a bench supply.

I obtained xc3sprog here. You can compile and run this program on a Raspberry Pi using the Pi GPIO lines instead of the FTDI mini module. In my case, I chose to patch it (TBD) to remove references to the Pi GPIO library and ran it on a regular Linux PC.

Using the FTDI mini module, programming is quite simple. Connect the cable to the assembled Plaid Bib board, then run the following command.

xc3sprog -c ftdi -v mcadlib.jed

If you run into issues with the cable not being detected, check your udev rules. In theory you could run xc3sprog as root, but that's bad practice. ;)

Building the CPLD Project

If you're feeling particularly masochistic, you can try building the CPLD project using the Xilinx ISE Webpack tools. Because the ISE Webpack only supports Ubuntu 14.7, it's simplest to run the program from a Docker container. I use docker-xilinx.

How the CPLD Works

This isn't meant to be an exhaustive tutorial on how Micro Channel bus works, but here are a few basic functions the CPLD provides:

  • Card setup and POS (programmable option select)
  • Address decoding logic
  • MCA bus logic interface to the YM3812
  • A clock divider to provide 3.57MHz to the YM3812

Each card implements several 8-bit registers (POS registers). Two of these registers are fixed and implement the 16-bit card ID value, which is how the BIOS and the reference disk software identify the card. The remaining POS registers can be used for any configuration-related function and are designed to replace configuration jumpers. The meanings of each register bit are up to the card designer, with the exception of a reserved bit that is used by the BIOS to enable or disable a card; this way, the BIOS can resolve conflicts automatically. Typically POS register bits control IO and memory address assignments, IRQ lines, and so forth.

The CPLD implements the two required ID registers as well as two additional POS registers. The first contains only a single bit -- the card enable signal. The second register programs bits [8:4] of the I/O address. This should always be 0xC0 so that the card appears at 0x388/0x389.

When you add a new card to a MCA bus system, the BIOS detects the new card and requires you to run the reference disk configuration program. This program searches for an ADF file associated with the new card. The ADF file is human-readable text that tells the BIOS which I/O address, IRQ, etc match up with each POS register bit. The reference disk program uses this information to find a configuration for all the cards in the computer so that none of them conflict with each other. When it's done, it writes the raw POS register values along with the card ID values to the battery-backed SRAM on the motherboard.

The CPLD decodes the I/O address (0x388 and 0x389) to ensure the card only responds when it is addressed directly by the computer. On the MCA bus, the address lines and control lines (s0 and s1 aka write and read) get latched on the falling edge of the ADL# (address latch) control line.

The data transfer itself begins a little later with the falling edge of the CMD# control line and ends with rising edge. MCA pipelines address and data; during the data transfer, the MCA prepares the address for the next bus transfer! The CPLD turns these signals into the typical asynchronous transfer used by the YM3812.

Finally, the CPLD takes the MCA bus 14.3MHz clock signal and divides it by 4 to get the 3.57MHz clock used by the YM3812.

Bracket

MCA brackets are no longer available. You have a few options:

  • Remove the bracket from an existing card, like a token ring card or something
  • 3D print the bracket
  • Use the card without a bracket at all

If you want to print your own, here are STEP models of the bracket and the plastic clip.

Bracket

Clip

Please note that neither file is designed specifically for 3D printing; they're meant to match the real hardware exactly. The clip might print just fine, but the bracket is probably too thin to print well.

Compatibility

The Plaid Bib has been tested on some models of PS/2. More to be added as people provide test reports.

ComputerModelCPUAdaptersCompatible ?
IBM PS/2 Model 508550-02180286-10Partial¹
IBM PS/2 Model 50Z8550-03180286-10Hard disk (ID:DF9F), IBM SCSI 71G3575Yes
IBM PS/2 Model 55SX with Reply Turboboard8555486SLC2-50Yes
IBM PS/2 Model 708570-E61386-16Adaptec AHA-1640Yes
IBM PS/2 Model 708570-121386-20Yes
IBM PS/2 Model 808580-071386DX-16Yes²
IBM PS/2 Model 859585486SX-33Yes
IBM PS/2 Model 958595486DX2-50Yes

¹One user reported compatibility problems with the hard drive (ID:DF9F)

²PS/2 Model 80 machines with the type 1 planar (16MHz 386) and an installed MCA memory card may have compatibility issues; the Plaid Bib behaves erratically in one user's machine, but works fine in another one.

Installation

You will need the ADF (adapter description file) in order to set up the Plaid Bib on your MCA computer.

Plaid Bib ADF

Place the file on a 3 1/2" floppy disk. After you install the card and boot the computer, it will detect that a new card has been installed and prompt you to insert the reference disk. Do this and follow the prompts. When the setup utility asks you to insert the option disk, use the one that contains the ADF file. After the setup utility configures the card, it will prompt you to reboot the machine.

Once that's finished, try out the Plaid Bib with your favorite game!

Troubleshooting

Keep in mind that Micro Channel systems can be difficult to troubleshoot due to the large number of possible configurations and the varied implementations of the bus. Not all games will even work on some PS/2 systems, even without a sound card!

Here are a few things to try out first before you really start digging in:

  • Is the CPLD soldered in correctly, with no solder bridges? If you have a microscope, check every solder joint! Did you program the CPLD?
  • Are there any bad or fake chips? Some users have reported issues with fake 74ALS245 buffer chips, fake YM3812s, and fake Y3014B chips
  • Try running SBDIAG

Symptom-by-Symptom

Computer will not boot at all, Computer boots but does not detect the card

Suspect the CPLD. Check for bad solder joints. Is pin 1 oriented correctly? Compare it with the photo.

Did you use something other than a 74ALS245, 'ACT245, 'AHCT245, or 'F245? Slower logic families can "crash the bus" and prevent the system from booting.

The card causes random errors with the hard disk, or with other cards

Did you buy a legitimate 74ALS245, or is it a fake? Try swapping it out.

License

This work is licensed under a Creative Commons Attribution-ShareAlike 4.0 International License. See https://creativecommons.org/licenses/by-sa/4.0/.

Parts

68
QtyValueFootprintReferences
110.1uFAdlibMCA:CAP23C1, C2, C3, C8, C9, C14, C15, C24, C28, C29, C30
81uFAdlibMCA:CAP23C4, C5, C6, C7, C31, C32, C33, C34
610uFAdlibMCA:CAPAP200C10, C11, C12, C13, C22, C25
62.2KAdlibMCA:RESA500R3, R4, R7, R8, R12, R13
410KAdlibMCA:RESA500R6, R10, R11, R19
44700pFAdlibMCA:CAP23C16, C17, C18, C19
310AdlibMCA:RESA500R16, R17, R18
2TestPointAdlibMCA:MH_125TP1, TP2
10.047uFAdlibMCA:CAP23C27
11.5KAdlibMCA:RESA500R9
11000pFAdlibMCA:CAP23C21
110KAdlibMCA:RK14J11A000GR15
112KAdlibMCA:RESA500R5
11N914AdlibMCA:DIOA500CR1
1220uF 16VAdlibMCA:CAPA1000C26
1270pFAdlibMCA:CAP23C23
12N3904AdlibMCA:TO92-ILQ1
14.7uFAdlibMCA:CAPAP200C20
174LS04Active:DIP254P762X635-14U2
174LS245AdlibMCA:DIP300_20NU1
18.2KAdlibMCA:RESA500R14
1BUS_MCAAdlibMCA:BUS_MCA_ADLIBJ2
1Conn_01x03AdlibMCA:SJ1-3553J1
1Conn_01x06Pin_Headers:Pin_Header_Straight_1x06_Pitch2.54mmJ3
1L78L05_TO92AdlibMCA:TO92-ILU11
1LM386NAdlibMCA:DIP300_8NU10
1LOGOAdlibMCA:PlaidBibG***
1RC4136AdlibMCA:DIP300_14NU9
1SPX2920M3-3.3_SOT223Active:SOT230P700X170-3U3
1XC9572XL-TQ100Active:TQFP50P1600X1600X140-100U5
1YM3014BAdlibMCA:DIP300_8NU8
1YM3812AdlibMCA:DIP600_24NU7

Similar boards

  • 2 layers135.3 × 106.7 mmAdlib, the printed circuit board in 3D

    Adlib

    schlae/adlib

    Reproduction AdLib Sound Card, OPL2, Circa 1990

    61 parts168
  • 2 layers163.9 × 88.3 mmPlaid bib, the printed circuit board in 3D

    Plaid bib

    schlae/plaid-bib

    A replica of the Ad Lib MCA sound card

    68 parts21
  • 2 layers104.1 × 73.7 mmIsa opl2, the printed circuit board in 3D

    Isa opl2

    skiselev/isa-opl2

    ISA OPL2 Card

    61 parts36
  • 2 layers135.3 × 106.7 mmAdLib, the printed circuit board in 3D

    AdLib

    monotech/AdLib

    AdLib clone. Based on schlae's PCB, with some modifications.

    63 parts21
  • 2 layers213 × 65 mmSizif512, the printed circuit board in 3D

    Sizif512

    UzixLS/zx-sizif-512

    ZX Spectrum CPLD-based clone for rubber case

    195 parts195MIT
  • 2 layers80.5 × 108.9 mm208 Timbre Workshop, the printed circuit board in 3D

    208 Timbre Workshop

    triglav-modular/208_Timbre_Workshop

    Eurorack adaptation of the late 208 wavefolder section.

    92 parts15Unlicense
  • 2 layers160 × 100 mmCOM, the printed circuit board in 3D

    COM

    Desval27/FormantKO

    Knock-off of the Elektor Formant Synthesizer project with the initial goal of being quasi-authentic and secondary goal undecided. Probably tweaks of some kind.

    85 partsMIT

Questions

How big is the Plaid bib cpld PCB?

It measures 163.9 × 88.3 mm and has 2 copper layers, 1.6 mm thick.

What parts does the Plaid bib cpld use?

68 parts, built around the 74LS245SC, LM386N, RC4136N and 74LS04PC. The full list of its parts is on this page, with links to each part's symbol and footprint where PCBKit's library has them.

Where can I download the Plaid bib cpld KiCad files?

From the schlae/plaid-bib-cpld repository on GitHub, at the commit this page was made from: the board is PlaidBibCPLD.kicad_pcb. PCBKit opens the board in the browser, with nothing to install.

Can I use the Plaid bib cpld design in my own project?

Its repository states no licence, so its author keeps all rights: ask schlae before reusing the design.