

Plaid bib cpld
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
474LS245SC
-0℃~+70℃ 12ns@5V,45pF 15mA 24mA 4.75V~5.25V 74LS 8 Bidirectional Output enable Schmitt trigger Tri-State - Buffers, Drivers, Receivers, Transceivers ROHSTexas InstrumentsBuffers, Drivers, Receivers, TransceiversLM386N
DIP-80.2% 0℃~+70℃ 1-Channel 4V~12V 4mA 700mWx1@8Ω、325mWx1@8Ω ESD protection DIP-8 Audio Amplifiers ROHSHTC Korea TAEJIN TechAudio AmplifiersRC4136N
PDIP-14-15V~-5V、5V~15V 0℃~+70℃ 1.7V/us 11.3mA 140nA 3MHz 4 500uV 5nA 8nV/√Hz@1kHz 90dB Built-in compensation PDIP-14 Operational Amplifier ROHSTexas InstrumentsOperational Amplifier74LS04PC
PDIP-140℃~+70℃ 4.75V~5.25V 6 6.6mA 74LS PDIP-14 InvertersonsemiInverters
README
README.mdThe 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.

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.
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 1 | Point 2 | Description |
|---|---|---|
| CN2 pin 1 | CN2 pin 11 | V3V3 to VIO strap |
| CN3 pin 1 | CN3 pin 3 | VBUS to VCC strap |
| CN2 pin 3 | CN3 pin 12 | V3V3 to VIO strap (2) |
| CN2 pin 5 | JTAG cable pin 6 | V3V3 to Plaid Bib (optional) |
| CN2 pin 2 | JTAG cable pin 5 | GND |
| CN2 pin 7 | JTAG cable pin 4 | AD0, aka TCK |
| CN2 pin 9 | JTAG cable pin 3 | AD2, aka TDO |
| CN2 pin 10 | JTAG cable pin 2 | AD1, aka TDI |
| CN2 pin 12 | JTAG cable pin 1 | AD3, 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.
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.
| Computer | Model | CPU | Adapters | Compatible ? |
|---|---|---|---|---|
| IBM PS/2 Model 50 | 8550-021 | 80286-10 | Partial¹ | |
| IBM PS/2 Model 50Z | 8550-031 | 80286-10 | Hard disk (ID:DF9F), IBM SCSI 71G3575 | Yes |
| IBM PS/2 Model 55SX with Reply Turboboard | 8555 | 486SLC2-50 | Yes | |
| IBM PS/2 Model 70 | 8570-E61 | 386-16 | Adaptec AHA-1640 | Yes |
| IBM PS/2 Model 70 | 8570-121 | 386-20 | Yes | |
| IBM PS/2 Model 80 | 8580-071 | 386DX-16 | Yes² | |
| IBM PS/2 Model 85 | 9585 | 486SX-33 | Yes | |
| IBM PS/2 Model 95 | 8595 | 486DX2-50 | Yes |
¹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.
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| Qty | Value | Footprint | References |
|---|---|---|---|
| 11 | 0.1uF | AdlibMCA:CAP23 | C1, C2, C3, C8, C9, C14, C15, C24, C28, C29, C30 |
| 8 | 1uF | AdlibMCA:CAP23 | C4, C5, C6, C7, C31, C32, C33, C34 |
| 6 | 10uF | AdlibMCA:CAPAP200 | C10, C11, C12, C13, C22, C25 |
| 6 | 2.2K | AdlibMCA:RESA500 | R3, R4, R7, R8, R12, R13 |
| 4 | 10K | AdlibMCA:RESA500 | R6, R10, R11, R19 |
| 4 | 4700pF | AdlibMCA:CAP23 | C16, C17, C18, C19 |
| 3 | 10 | AdlibMCA:RESA500 | R16, R17, R18 |
| 2 | TestPoint | AdlibMCA:MH_125 | TP1, TP2 |
| 1 | 0.047uF | AdlibMCA:CAP23 | C27 |
| 1 | 1.5K | AdlibMCA:RESA500 | R9 |
| 1 | 1000pF | AdlibMCA:CAP23 | C21 |
| 1 | 10K | AdlibMCA:RK14J11A000G | R15 |
| 1 | 12K | AdlibMCA:RESA500 | R5 |
| 1 | 1N914 | AdlibMCA:DIOA500 | CR1 |
| 1 | 220uF 16V | AdlibMCA:CAPA1000 | C26 |
| 1 | 270pF | AdlibMCA:CAP23 | C23 |
| 1 | 2N3904 | AdlibMCA:TO92-IL | Q1 |
| 1 | 4.7uF | AdlibMCA:CAPAP200 | C20 |
| 1 | 74LS04 | Active:DIP254P762X635-14 | U2 |
| 1 | 74LS245 | AdlibMCA:DIP300_20N | U1 |
| 1 | 8.2K | AdlibMCA:RESA500 | R14 |
| 1 | BUS_MCA | AdlibMCA:BUS_MCA_ADLIB | J2 |
| 1 | Conn_01x03 | AdlibMCA:SJ1-3553 | J1 |
| 1 | Conn_01x06 | Pin_Headers:Pin_Header_Straight_1x06_Pitch2.54mm | J3 |
| 1 | L78L05_TO92 | AdlibMCA:TO92-IL | U11 |
| 1 | LM386N | AdlibMCA:DIP300_8N | U10 |
| 1 | LOGO | AdlibMCA:PlaidBib | G*** |
| 1 | RC4136 | AdlibMCA:DIP300_14N | U9 |
| 1 | SPX2920M3-3.3_SOT223 | Active:SOT230P700X170-3 | U3 |
| 1 | XC9572XL-TQ100 | Active:TQFP50P1600X1600X140-100 | U5 |
| 1 | YM3014B | AdlibMCA:DIP300_8N | U8 |
| 1 | YM3812 | AdlibMCA:DIP600_24N | U7 |
Similar boards
- 2 layers135.3 × 106.7 mm

- 2 layers163.9 × 88.3 mm

- 2 layers104.1 × 73.7 mm

- 2 layers135.3 × 106.7 mm

- 2 layers213 × 65 mm

- 2 layers78.5 × 70.4 mm

- 2 layers80.5 × 108.9 mm

208 Timbre Workshop
triglav-modular/208_Timbre_Workshop
Eurorack adaptation of the late 208 wavefolder section.
92 parts15Unlicense - 2 layers160 × 100 mm

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.