Skip to the content
PCBKitNew board
2 layers236.8 × 129.1 mmCoCoTANG, the printed circuit board in 3D

CoCoTANG upgrades the Radio Shack/Tandy Color Computer with a Tang Nano 20K FPGA board and CoCo 3 video and memory features.

Size
236.8 × 129.1 mm
Copper layers
2
Thickness
1.6 mm
Parts
127
Nets
213
Pads
868
Tracks, vias
3,403, 309
Pours
6
Routed
Yes
KiCad
KiCad 10.99 (file 20260831)
Created
4 Sep 2026
Updated
7 Nov 2026

Overview

CoCoTANG is an open-source printed circuit board by lfantoniosi, from the lfantoniosi/CoCoTANG repository on GitHub. It is a 2-layer board of 236.8 × 129.1 mm with 127 parts on 213 nets, routed with 3,403 tracks and 309 vias.

It is built around the 74LVC245AD, 74HCT245 and 74HC139D, with the 74HCT11D, 74HCT138D and 74HCT30D among its other parts. Its parts include 32 resistors, 27 capacitors, 25 connectors, 18 ICs and 9 transistors.

Main components

10

README

README.md

CoCoTANG

CoCoTANG logo

Overview

CoCoTANG upgrades the Radio Shack/Tandy Color Computer with a Tang Nano 20K FPGA board and CoCo 3 video and memory features. It retains the MC6809E CPU and motherboard PIAs while the FPGA implements the GIME video and memory subsystem, HDMI and analog video outputs, and a Glenside-compatible IDE interface backed by a microSD card. It also provides 8 MB of RAM, Orchestra-90 audio with stereo over HDMI, and Tandy Speech/Sound Cartridge (SSC) support.

This repository contains the FPGA sources, KiCad designs, fabrication files, and bill of materials.

Render of the complete CoCoTANG PCB panel

The assembly uses a main board for the CPU and Tang Nano 20K, PIA0 and PIA1 adapter boards, and an address mux board that replaces the motherboard 74LS138. An analog video hat and an HDB-DOS ROM cartridge are optional. The render above shows the boards arranged as a PCB panel. HDB-DOS can also be supplied through an FD-502 ROM socket or CoCo SDC flash bank.

The design uses NTSC machine clocking. The GIME's 50 Hz setting remains available, but selecting it does not switch to a PAL crystal. PAL-encoded CVBS/S-Video output is also supported. See Build on macOS or Linux for video targets and the FPGA pin and bus map for hardware connections.

Compatibility

Games

So far, The Contras is the only game found to fail to load in its original form. CoCoTANG's 262.5-scanline timing drifts relative to the original CoCo 3. The resulting timing difference affects an unprotected code section in the game and prevents the original version from loading.

Use the patched version of The Contras instead. This patched version also includes keyboard enhancements.

Multi-Pak Interface and real floppy drives

A Multi-Pak Interface (MPI) holds the cartridge data bus in a way that prevents access to CoCoTANG's internal peripheral registers. With an MPI connected, the internal Glenside IDE, SSC sound/speech, and Orchestra-90 are unavailable. Software that uses these internal devices must be run without the MPI.

An MPI is required to use real floppy drives. Plug the floppy disk controller into the MPI and connect the drives to that controller. This setup uses the external floppy controller, with the internal IDE, SSC, and Orchestra-90 unavailable as described above.

Current FPGA features

  • GIME video and memory mapping with 8 MB NoCan3-style RAM support and readable Disto MMU page bits.
  • Simultaneous HDMI and analog video, with separate RGB, YPbPr, and CVBS/S-Video build targets.
  • Six motherboard RESET selections combining normal, reversed, or disabled artifact colours with SSC sound/speech off or on.
  • Tandy Speech/Sound Cartridge PSG, buffered allophones, and ASCII English text-to-speech, alongside the CoCo DAC and Orchestra-90 audio.
  • HDMI status labels and an optional analog status banner with a larger font.

Hardware and files

ItemFile or notes
PCB fabrication filesGerber/drill ZIPs for each board
KiCad schematic and PCBkicad/
ComponentsFull bill of materials below
FPGA project and sourcesfpga/
FPGA pin/bus mapfpga/docs/pinout.md

Board quantities and Gerber downloads

For one CoCoTANG installation, you need one main board, one address mux board, and two PIA boards: one for PIA0 and one for PIA1. There are two main-board versions, for motherboard revisions 20261043 and 20261058; choose the version that matches your motherboard. The HDB-DOS cartridge and video hat are optional.

BoardQuantity per installationGerber/drill ZIP
Main board (CPU / Tang Nano 20K)1 required; choose the matching versionSee the compatibility table below
Address mux (addrmux)1 requiredgerber_addrmux.zip
PIA card2 required: PIA0 and PIA1gerber_pia.zip
HDB-DOS cartridge1 optionalgerber_cart.zip
Video hat1 optionalgerber_avideo.zip
External keyboard extension1 optionalgerber_extkey.zip

Use the same PIA Gerber ZIP to fabricate both PIA cards. Upload each desired board's ZIP separately to your PCB manufacturer and select the quantities above, subject to the manufacturer's minimum order quantity.

Select 1.2 mm PCB thickness when ordering the adapter boards. The thinner boards reduce the installed profile and help the assembly fit under the keyboard.

Motherboard compatibility

Tandy used several motherboard layouts for the CoCo 2. Identify your motherboard before ordering boards: the CPU and address mux adapters must fit its layout. Only the revisions marked compatible below are currently supported; other layouts may need different adapters.

Motherboard revisionCompatibleMain board Gerber ZIP
20261043Yesgerber_main_20261043.zip
20261058Yesgerber_main_20261058.zip
20261044No—
20261045No—
20261059No—

CoCo 1 compatibility has not yet been tested.

Bill of materials

Both main-board versions (20261043 and 20261058) use the same components and quantities; only the PCB layout differs. Use the fabrication drawing and silkscreen for the version you are assembling.

Logic families and supply voltages

Use HCT parts for the 5 V logic: U9/U16 (74HCT245, depending on the main-board version), U1 (74HCT138), U22 (74HCT11), and U7 (74HCT30). Their TTL-compatible inputs accept the logic levels used at the motherboard interface. The table below gives the manufacturer part numbers, matching DigiKey part numbers, and TSSOP packages.

U3/U6 are 74HC139 decoders powered from 3.3 V, with their select inputs driven by the FPGA. Keep the HC version here: 74HCT139 is specified for a 4.5–5.5 V supply. A 3.3 V supply makes HC139 suitable for this 3.3 V logic domain; it does not turn HC into a generally TTL-compatible family. The KiCad labels now identify both decoder instances as HC139.

The four 74LVC245 buffers on each main board remain LVC parts for the 3.3 V interface; their reference designators are listed for both layouts below. Their TSSOP ordering code is SN74LVC245APWR.

Main board — both versions

The reference columns identify the same components on each layout. Lists follow the same order across both columns. The three interrupt/reset resistors and the additional R/W pull-up are listed separately. The other adapter boards below are shared between both versions.

QtyValueDescriptionDigiKey P/N20261043 references20261058 referencesAlternative link
1Tang Nano 20KTang Nano 20K FPGA BoardN/AU5U17AliExpress
60.1 µFCAP CER 0805 0.1UF 100VDC X7R399-C0805F104K1RACAUTOCT-NDC2, C3, C4, C5, C6, C7C13, C16, C19, C14, C18, C15
3MMBT3904-TPTRANS NPN 40V 0.2A SOT-23MMBT3904TPMSCT-NDQ7, Q8, Q9Q1, Q3, Q6
1SS14DIODE SCHOTTKY 40V 1A DO214ACSS14CT-NDD2D4
310KRES 10K OHM 1% 1/8W 0805311-10.0KCRCT-NDR2, R4, R6R14, R18, R15
34.7KRES 4.7K OHM 1% 1/8W 0805311-4.70KCRCT-NDR3, R5, R7R20, R22, R21
14.7KR/W pull-up, 1% 1/8W 0805311-4.70KCRCT-NDR19R13
247KRES SMD 47K OHM 1% 1/8W 0805YAG3735CT-NDR8, R9R25, R26
24.7KRES ARRAY 8 RES 4.7K OHM 9SIP4609X-101-472LF-NDRN1, RN2RN4, RN3
4SN74LVC245APWR8-bit bus transceiver, 1.65–3.6 V, TSSOP-20296-1233-1-NDU8, U10, U11, U12U4, U13, U15, U14
1SN74HCT245PWR8-bit bus transceiver, TTL inputs, 4.5–5.5 V, TSSOP-20296-8404-1-NDU9U16
174HC139PW,118Dual 2-to-4 decoder, CMOS inputs, 2–6 V; used at 3.3 V, TSSOP-161727-6580-1-NDU3U6
1SIL FEMALE HDRMACHINE PIN SOCKET 40P 2.54MM PISMC-1A-40-1-GT-HTU5U17AliExpress
1DIP-40 SOCKETMACHINE PIN SOCKET, IC, DIP, 40PICM-640-1-GT-HTJ1J19AliExpress

PIA0 adapter

QtyValueDescriptionDigiKey P/NReferencesAlternative link
10.1 µFCAP CER 0805 0.1UF 100VDC X7R399-C0805F104K1RACAUTOCT-NDC1
1DIP-40 SOCKETMACHINE PIN SOCKET, IC, DIP, 40PICM-640-1-GT-HTJ4AliExpress
174HCT30PW,1188-input NAND gate, TTL inputs, 4.5–5.5 V, TSSOP-141727-6632-1-NDU7
21,800 pFCAP CER 1800PF 250V C0G/NP0 0805490-GCM21A5C2E182FX01DCT-NDC10,C12
2SD103BWDIODE SCHOTTKY 30V 0.35A SOD123F4878-SD103BWCT-NDD1,D3

PIA1 adapter

QtyValueDescriptionDigiKey P/NReferencesAlternative link
1DIP-40 SOCKETMACHINE PIN SOCKET, IC, DIP, 40PICM-640-1-GT-HTJ4AliExpress

Address mux board

QtyValueDescriptionDigiKey P/NReferencesAlternative link
20.1 µFCAP CER 0805 0.1UF 100VDC X7R399-C0805F104K1RACAUTOCT-NDC32,C33
1SN74HCT138PWR3-to-8 decoder, TTL inputs, 4.5–5.5 V, TSSOP-16296-8388-1-NDU1
174HCT11PW,118Triple 3-input AND gate, TTL inputs, 4.5–5.5 V, TSSOP-141727-7964-1-NDU22
1DIP-16 SOCKETCONN IC DIP SOCKET 16POS GOLDSA163000J28AliExpress

HDB-DOS cartridge

QtyValueDescriptionDigiKey P/NReferencesAlternative link
1DIP-28 SOCKETCONN IC DIP SOCKET 28POS GOLD110-41-628-41-001000U2AliExpress
10.1 µFCAP CER 0805 0.1UF 100VDC X7R399-C0805F104K1RACAUTOCT-NDC34
1AT28C64B-15PUIC EEPROM 64KBIT PARALLEL 28DIPAT28C64B-15PU-NDU2

Analog video board

QtyValueDescriptionDigiKey P/NReferencesAlternative link
30.1 µFCAP CER 0805 0.1UF 100VDC X7R399-C0805F104K1RACAUTOCT-NDC29,C30,C31
3470 pFCAP CER 470PF 50V C0G/NP0 0805490-1617-1-NDC8,C9,C11
11 µFCAP CER 1UF 25V X7R 0805399-C0805C105K3RACTUCT-NDC15
61KRES 1K OHM 1% 1/8W 0805541-3977-1-NDR31,R17,R33,R1,R35,R16
375RES 75 OHM 1% 1/8W 0805541-CRCW080575R0FKEACCT-NDR10,R11,R12
34.7KRES 4.7K OHM 1% 1/8W 0805311-4.70KCRCT-NDR32,R34,R36
16.8 nFCAP CER 6800PF 250V C0G/NP0 0805490-GCM21B5C2E682JX0ALCT-NDC24
14.7 µFCAP CER 4.7UF 16V X7R 0805732-7666-1-NDC25
1100KRES 100K OHM 1% 1/8W 0805541-3978-1-NDR24
3MMBT3904-TPTRANS NPN 40V 0.2A SOT-23MMBT3904TPMSCT-NDQ2,Q4,Q5
1DIN-5 FEMALED5 PIN DIN SOCKET 180 DEGREE4654-FC680805-NDJ24AliExpress

Boards Interconnection

QtyValueDescriptionDigiKey P/NReferencesAlternative link
2PRPC040SBAN-M71RCCONN HEADER R/A 40POS 2.54MMS1111EC-40-ND
11950JUMPER WIRE F TO F 6" 28AWG1528-1961-ND

Assembly

Print the fabrication drawing and use it with the board silkscreen to identify component positions. Check diode orientation before soldering. The main-board bill of materials applies to both supported versions; component positions differ between layouts.

Several adapters have oversized socket holes. They require machined-pin sockets whose pins extend through the adapter to connect to the motherboard socket while holding the original IC above it. Use 1.2 mm PCBs to reduce the overall assembly height and improve clearance under the keyboard.

  1. Locate and desolder the CPU, VDG, SAM, PIA0, PIA1, and 74LS138.
  2. Keep the SAM, VDG, and 74LS138 as spares; the FPGA replaces their functions.
  3. Install sockets in the motherboard. Do not solder the adapter boards directly to it.
  4. Check clearance around the adapters. Some original capacitors marked 104 are oversized, and nearby radial capacitors may also interfere. Where necessary, desolder and reposition their leads before bending the capacitors closer to the motherboard.
  5. Populate the adapter boards, checking diode orientation. Configure each PIA adapter as described in PIA adapter configuration.
  6. Modify pin 5 of each joystick connector and wire it to the PIA0 adapter as described in Joystick second-button support.
  7. Fit the CPU and PIAs to their adapters, install the adapters, and connect the boards as shown in the installed prototype.
  8. Program the Tang Nano 20K with the desired .fs bitstream and CoCo 3 ROM, following the programming instructions below.
  9. If using the optional HDB-DOS cartridge, program its EEPROM with hdblba.rom using an EEPROM programmer.
  10. Turn on the computer. The boot screen should look like the example below.

Installed CoCoTANG prototype showing the adapter boards and wiring

CoCoTANG boot screen

Assembled boards

The photos below show the component population and header placement, in assembly order. Front and back views are included where available.

Main board

The main board carries the CPU socket, Tang Nano 20K headers, bus buffers, and connections to the other adapters. The photos show the assembled board before fitting the CPU and FPGA module. Choose the layout that matches your motherboard revision.

FrontBack
Assembled main board, front, showing CPU socket, FPGA headers, and bus buffersAssembled main board, back, showing motherboard connection pins
ADDRMUX board

The address mux adapter plugs into the motherboard's former 74LS138 position and connects to the main board. Leave the 74LS138 socket on the ADDRMUX adapter empty; do not reinstall the original IC in it. The adapter's onboard logic replaces its function.

Assembled ADDRMUX board with its 74LS138 socket deliberately left empty

PIA0 adapter

Populate the logic IC, diodes, capacitors, and headers required for PIA0, and select the PIA0 jumper setting. The external keyboard header is fitted only on this adapter. These photos show the board before installing the PIA.

FrontBack
Assembled PIA0 adapter, front, showing populated logic and headersAssembled PIA0 adapter, back, showing motherboard connection pins
PIA1 adapter

PIA1 uses the same PCB with the PIA1 jumper setting. Fit the socket and required signal header; leave the PIA0-only logic, diodes, capacitors, and external keyboard header unpopulated. These photos show the board before installing the PIA.

FrontBack
Assembled PIA1 adapter, front, showing the reduced component populationAssembled PIA1 adapter, back, showing motherboard connection pins
AVIDEO board

The optional analog audio/video board can be mounted in the original RF modulator/shield location. Enlarge the opening in the CoCo's cover to clear the 5-pin DIN connector. Use pin headers on the back of the AVIDEO PCB to secure it to the CoCo motherboard, as shown in the back view.

FrontBack / mounting headers
Assembled AVIDEO board, front, showing the analog output circuitry and connectorAVIDEO board, back, showing the pin headers used to secure it to the CoCo motherboard

The completed installation brings the main board, ADDRMUX, PIA adapters, and AVIDEO board together:

Fully assembled CoCoTANG installation

Complete assembly and umbilical cables

The photo below shows the fully assembled main board, PIA0, PIA1, ADDRMUX, AVIDEO, and external keyboard companion with their umbilical cables connected. Use it as an overview alongside the pin and bus map when connecting the boards.

Complete CoCoTANG assembly with the FPGA module, CPU, PIAs, ADDRMUX, AVIDEO, keyboard companion, and connecting umbilical cables

AVIDEO mounting and case opening

Prepare the RF modulator area

With the original RF module removed, prepare its mounting position for AVIDEO. Remove the plastic spacers from the mounting header pins so the AVIDEO PCB can sit close to the motherboard. Leave the metal pins in place for soldering the board, as shown below.

Former RF modulator position prepared for AVIDEO, with the plastic header spacers removed from the mounting pins

Trim the underside and solder the board close to the motherboard

Clip all excess component leads and header-pin ends on the underside of AVIDEO, and remove excess solder that would prevent the board from sitting close to the motherboard. Retain the mounting pins needed to secure it. Fit the board over the prepared RF-area mounting pins, align the DIN-5 connector with the rear of the case, and solder the mounting pins with the PCB close to the motherboard. Keep clearance between the underside solder joints and the motherboard.

Trimmed AVIDEO undersideMounted board, side view
AVIDEO underside showing trimmed component leads and solder joints before mountingAVIDEO soldered close to the motherboard in the former RF modulator position, with the DIN-5 connector facing the rear
Copy an existing opening onto tape

Use a neighboring DIN connector opening as a template. Apply masking tape over it and copy its outline by trimming the tape to match the opening. Peel off the tape and stick it over the original TO TV opening, aligning the bottom edge and checking its position against the installed AVIDEO connector. The transferred outline marks the enlarged opening needed for the DIN-5 plug.

Copy the opening onto masking tapeTransfer the tape to the TO TV opening
Masking tape cut to copy the shape of an existing DIN connector openingTape template transferred to the original TO TV opening to mark the larger DIN-5 cutout
Enlarge the opening with a Dremel bit

Remove the cover from the computer before machining it. Use a Dremel or similar rotary tool with a bit like the one shown to enlarge the opening to the tape outline. Remove material gradually, smooth the edges, and check the fit of the DIN-5 plug. Clear away the plastic debris before refitting the cover.

Rotary-tool bitFinished opening
Rounded abrasive rotary-tool bit used to enlarge the plastic case openingFinished enlarged TO TV opening shaped to clear the AVIDEO DIN-5 plug
Close the lid and connect the DIN-5 cable

Refit the cover, checking that the internal cables are clear of its edges. The DIN-5 plug should fit through the enlarged opening and seat fully in the AVIDEO socket. The finished installation below shows the closed lid, connected DIN-5 cable, and external keyboard companion.

Completed CoCoTANG installation with the lid closed, DIN-5 cable connected through the enlarged TO TV opening, and external keyboard companion attached

PIA adapter configuration

Both PIAs use the same adapter PCB, but they require different component populations and jumper settings:

  • PIA0: populate the adapter's logic IC, diodes, and capacitors listed in the PIA0 bill of materials, and set the selection jumper to PIA0. The photo below shows PIA0 fitted with the SC67331P chip.
  • PIA1: fit the PIA socket; the additional logic IC, diodes, and capacitors are not required. This adapter brings out only two signal pins. Set its selection jumper to PIA1.

The new PIA PCB also includes a pinout for an external keyboard. Populate and connect the external keyboard header only on PIA0.

PIA0 and PIA1 adapters showing their installed configuration and wiring

External keyboard companion

The optional four-key companion board uses 4 Cherry MX key switches, labeled CTRL, ALT, F1, and F2, and connects to the external keyboard header on PIA0. The photo shows the assembled companion beside the CoCo 2's built-in keyboard, with its cable attached. The PCB fabrication files are available as gerber_extkey.zip.

Assembled external four-key keyboard companion beside the CoCo 2 keyboard

Joystick second-button support

To support a second button on each joystick, disconnect pin 5 of each joystick connector from its original motherboard ground connection. Desolder the pin, pull it clear of the motherboard, and bend it upward as shown below. Keep the lifted pin clear of its original pad.

Use two jumper wires, one from each lifted pin, to connect the joystick second-button signals to the corresponding connections on the PIA0 adapter (SC67331P in the PIA photo above). To attach a jumper lead to a lifted pin, remove the plastic housing at that end and gently widen the metal contact to fit.

Joystick connector pin 5 lifted from the motherboard and connected with jumper wires

CPU choice: MC6809E or HD6309E

While the CPU is removed, you can replace the MC6809E with an HD6309E. NitrOS-9 supports the HD6309's native mode, and compatible applications can use its additional instructions. Choose the disk image that matches your installed CPU.

Audio / Video

HDMI

You can use this HDMI flat cable to expose the HDMI port outside the CoCo2 case. Being as flat just let it go through some port. Choose a model like A1-A4.

Audio Video Board

The optional CoCoTANG Audio/Video board provides a 5-pin DIN output and fits in the original RF modulator/shield location. Enlarge the cover opening for the connector and secure the PCB to the motherboard using the rear pin headers shown in the AVIDEO assembly photos. Follow the illustrated mounting and case-opening guide to prepare the RF area and enlarge the cover opening.

The revised J24 DIN-5 connector follows the Atari 800XL monitor pin assignment, with chroma connected to pin 5. The diagram shows the female socket viewed from the front, looking into the connector on the computer, with the keyway at the bottom. The cable plug's mating-face view is mirrored.

CoCoTANG DIN-5 pinout: female socket front view, with Atari 800XL-style CVBS/S-Video wiring and YPbPr/RGB assignments

DIN pinCVBS / S-VideoYPbPr componentRGB with sync on green
1Luminance (Y)YGreen + sync
2GroundGroundGround
3AudioAudioAudio
4Composite video (CVBS)PrRed
5Chrominance (C)PbBlue

Select the matching FPGA video image; the same physical pins carry different signals in each mode. For composite, use pins 4 (video), 3 (audio), and 2 (ground). For S-Video, use 1 (Y), 5 (C), and 2 (ground), with audio on pin 3.

For an example lead, see this 5-pin DIN to four-RCA cable; select the 5-pin version and verify its wiring against the table above.

Use an Atari 800XL-style monitor cable wired to this table for CVBS/S-Video. RGB and YPbPr need cables wired for their respective columns. Check the actual DIN pin connections rather than relying on RCA plug colors or the connector's pin count. This pinout applies to the revised AVIDEO PCB; check older boards before reusing a cable.

The assignments above match J24's current PCB nets: 1=G_Y, 2=GND, 3=AUDIO_RCA, 4=R_CVBS, 5=B_CHR. The diagram's editable source is din5-av-pinout.svg. For the Atari monitor-port reference, see the Atari 800XL service manual and Atari connector FAQ. CoCoTANG supplies chroma on pin 5, which was unconnected on many original 800XL machines.

Display compatibility and PVM connections

YPbPr component: use a TV or monitor that accepts 15 kHz standard-definition 480i/240p signals over its component inputs, such as a compatible PVM or a CRT TV with YPbPr inputs. Check that the particular display accepts 240p; support for 480i alone does not guarantee it. Connect DIN pin 1 to Y, 5 to Pb, and 4 to Pr, with pin 3 for audio.

RGB with sync on green (SoG): use a cable wired specifically for CoCoTANG's RGB pinout and a display that accepts sync on green. On a compatible PVM, you can instead use the same 5-pin DIN to four-RCA lead linked above, with RCA-to-BNC adapters on the three video leads:

DIN pin / leadPVM input
1 — Green + syncG / Y
4 — RedR / Pr
5 — BlueB / Pb
3 — AudioAudio input

Select RGB on the PVM and choose internal sync (INT), or turn EXT SYNC off, so it takes sync from green. The fourth RCA lead carries audio; a separate external-sync connection is not needed. For YPbPr, use the same three video connections but select component / YPbPr instead. Control names vary by model; see, for example, the Sony PVM-D14L5A/D20L5A operating instructions.

Preparing the microSD card

Download the appropriate CPU version of the CF disk image and write it to the microSD card used by CoCoTANG. These images require HDB-DOS, supplied by the optional cartridge or another supported ROM source.

On Linux, identify and unmount the card, then write the image to the whole device, replacing /dev/sdX with the correct device path:

sh
sudo dd if=CF_6309.IMG of=/dev/sdX bs=1M
sync

The example uses the HD6309 image. Writing the image replaces the card's contents, so verify the destination device before running the command.

Artifact colours and SSC sound/speech

The standard build includes the Tandy Speech/Sound Cartridge (SSC) PSG and speech engine. SSC always starts disabled at cold boot. Press the CoCo motherboard RESET to advance through these selections:

RESET presses since cold bootStatus labelSSC PSG and speech
0 (cold boot)ARTIFACT NORMALDisabled
1ARTIFACT REVERSEDisabled
2NO ARTIFACTDisabled
3ARTIFACT NORMAL - SSCEnabled
4ARTIFACT REVERSE - SSCEnabled
5NO ARTIFACT - SSCEnabled

The next RESET returns to ARTIFACT NORMAL with SSC disabled. RESET is debounced, and holding it down advances only once. Disabled SSC stays silent, holds both synthesizers in reset, and leaves $FF7D/$FF7E available to the motherboard/cartridge bus. Software cannot enable SSC by writing its registers while an SSC-off selection is active.

HDMI shows the selected label for about four seconds. The analog banner is optional and off by default: set ENABLE_ANALOG_BANNER=1 in fpga/src/top_coco3.v and rebuild to include it. Its font is doubled in both dimensions, with each font row occupying two analog scanlines. This applies to RGB, YPbPr, CVBS, and S-Video; the HDMI label keeps its original size.

When SSC is selected, software resets its interface by writing 1 then 0 to $FF7D. $FF7E accepts commands/data and returns status; bit 7 high means ready. The implementation supports direct PSG register writes, buffered sound events/register streams, buffered AL2 allophones, and immediate ASCII text terminated by carriage return. English text uses NRL letter-to-sound rules; this is command-level compatibility rather than a TMS7040 CPU emulation. The speech interface source documents the supported commands.

PSG and speech are combined and mixed into both HDMI channels and the physical mono output at 1.5× gain (about +3.5 dB). The CoCo DAC and Orchestra-90 gains are unchanged. The final sum saturates at the signed PCM limits instead of wrapping, and disabling SSC clamps its contribution to silence.

In custom builds, ENABLE_SSC_SPEECH=0 removes speech while retaining the PSG; ENABLE_SSC_PSG=0 removes both SSC engines and restores the three artifact-only reset selections. make test-ssc-toggle checks the real top-level reset cycle, disabled bus/audio behavior, and both analog-banner settings using Gowin's installed simulation library.

Orchestra-90 audio

Orchestra-90 audio is enabled by default and provides two 8-bit DACs without the cartridge ROM. Software writes unsigned samples to $FF7A (left) and $FF7B (right); 128 is the digital midpoint. Each channel holds its last sample until the next write. These are write-only DACs: reading the addresses does not change their values or provide readback.

Orchestra-90 requires no additional cartridge ROM or audio hardware. It is enabled by default in every normal machine image; no separate Orchestra-90 build is needed.

HDMI sends stereo PCM at 48 kHz. The existing CoCo PIA DAC is mixed equally into both channels at its normal gain; each Orchestra-90 DAC contributes at half gain, and the mixer clips at the signed PCM limits to prevent overflow. Both Orchestra-90 channels reset to the midpoint so they contribute silence before software uses them. The analog audio_out pin carries a mono mix of both Orchestra-90 channels and the CoCo PIA DAC. Each Orchestra-90 channel contributes at quarter gain to this downmix, while the CoCo PIA DAC keeps its normal gain; the sum is clipped before conversion to the physical 8-bit sigma-delta DAC.

To omit Orchestra-90 audio in a custom build, set the top_coco3 parameter ENABLE_ORCHESTRA90=0. Address and channel assignments follow XRoar's Orchestra-90 documentation and MAME's Orchestra-90 implementation.

Build on macOS or Linux

  1. Download GOWIN EDA Education for your OS from Gowin's official download page (an account may be required). Install the full EDA package, not only Gowin Programmer. The Education edition is intended for noncommercial education/research; check Gowin's current terms for your use.

  2. Install openFPGALoader and, for simulation, Icarus Verilog (iverilog and vvp). On macOS, brew install openfpgaloader icarus-verilog is one option. On Debian/Ubuntu, sudo apt install openfpgaloader iverilog is one option. Linux may also need the openFPGALoader udev rules for non-root USB access.

  3. From the FPGA directory, build and check the routed design:

    sh
    cd fpga
    make test
    make rebuild
    make timing

    make test is optional for building the bitstream. Its current recipes write simulation executables to /private/tmp, so on Linux that directory must exist and be writable if you run the tests; make rebuild and make timing do not need it.

The output is fpga/impl/pnr/CoCoTANG.fs. make rebuild always runs synthesis and place-and-route; make build rebuilds only when Make considers an input newer than the bitstream. The Makefile expects Gowin at /Applications/GowinIDE.app/Contents/Resources/Gowin_EDA/IDE on macOS or /opt/Gowin/IDE on Linux. If yours is elsewhere, pass GOWIN_IDE=/path/to/Gowin_EDA/IDE to Make.

Select an analog video output

Each mode has its own bitstream and fixed video-mode setting, independent of the default ANALOG_VIDEO_MODE in src/top_coco3.v:

OutputBuild if needed and programProgram existing imageBitstream in fpga/impl/pnr/
RGB with sync on greenmake program-rgbmake reprogram-rgbCoCoTANG-rgb.fs
YPbPr componentmake program-ypbprmake reprogram-ypbprCoCoTANG-ypbpr.fs
NTSC CVBS and S-Videomake program-cvbsmake reprogram-cvbsCoCoTANG-cvbs-minimal.fs

Run these commands from fpga/. To build without programming, use make build-rgb, make build-ypbpr, or make build-cvbs. Use make rebuild-rgb, make rebuild-ypbpr, or make rebuild-cvbs to force a rebuild, and the corresponding make timing-rgb, make timing-ypbpr, or make timing-cvbs to check the routed timing. The reprogram-* targets never rebuild; their named image must already exist.

The artifact/SSC status banner is off on analog outputs by default. Set ENABLE_ANALOG_BANNER=1 in fpga/src/top_coco3.v and rebuild to enable its larger font in any analog video mode. The HDMI status label and reset selector are always available.

Rebuild every variation

Run these commands from fpga/:

sh
make build-all     # build missing or outdated images
make rebuild-all   # force synthesis and place-and-route for every image

Both targets cover six images: standard, RGB, YPbPr, CVBS/S-Video, PAL, and the standalone bus tester. The NTSC S-Video targets share the confirmed CVBS image, so it is built once. Logger/debug images are excluded.

Builds run sequentially, even with make -j, because Gowin shares the impl/ directory between projects. Every variant is attempted, and routed timing is checked after each successful build. The target returns a failure status if any build or timing check fails; it never programs the board or changes placement settings. Per-variant logs and summary.json are written to fpga/impl/build-all/ or fpga/impl/rebuild-all/.

Debug and bus testing

The standalone bus tester is included in the aggregate builds. The normal production images keep the bus logger disabled; logger/debug projects are not restored by the aggregate targets.

For board bring-up, make data-test-program-sram builds the standalone bus tester if needed and loads it into FPGA SRAM for a temporary test. Use make data-test-program to store the tester in flash. It holds the CPU in reset and displays the data sweep and bus readback over HDMI. See the bus tester notes for controls and verification commands.

Program on macOS or Linux

Connect the Tang Nano 20K by USB. The FPGA configuration and CoCo 3 ROM are two separate writes to the module's external SPI flash:

Flash addressContentsCommand from fpga/
0x000000FPGA configuration (impl/pnr/CoCoTANG.fs)make program or make reprogram
0x100000 (1,048,576 decimal)32 KiB CoCo 3 ROM (roms/coco3.rom)make rom
sh
cd fpga
make program     # builds if needed, then writes persistent FPGA configuration
make rom         # writes the ROM at 0x100000; needed for first setup

make reprogram flashes the existing bitstream without rebuilding. These Make targets use openFPGALoader's tangnano20k board support. The ROM offset is set by ROM_OFFSET=1048576 in the Makefile and by the FPGA flash loader; do not write the ROM at address zero, or it will overwrite the FPGA configuration. After both writes, power-cycle the board. The FPGA holds the CPU until its clocks, SDRAM, and ROM load are ready.

Test the bus and addresses in SRAM

Run make data-test-program-sram from fpga/ to build the standalone bus tester if needed and load CoCoTANG-data-test.fs into the FPGA's volatile SRAM. The tester holds the CPU in reset and displays the data sweep, address bus readback, and control signals over HDMI. It does not need a CoCo 3 ROM.

This leaves the stored FPGA configuration and ROM unchanged. Power-cycling restores the configuration stored in flash.

CoCoTANG standalone bus tester showing data, address, and control signal readback over HDMI

Using the tester to diagnose the board

The tester helps locate missing connections, solder bridges, swapped bus lines, and faults in the bus buffers or address mux. FPGA IN shows the data bus at the FPGA side of the data transceiver. CPU ADDRESS and the A15–A8 / A7–A0 fields show the address sampled through the mux; the tester reads these lines rather than driving them.

Use the Tang Nano's S2 button to switch between sweep and hold. In hold mode, S1 advances the data byte and S code by one; in sweep mode, S1 restarts both at zero. The S code controls motherboard device selection, so hold mode is useful when probing a fixed condition.

Prepare for manual pin testing: turn off the computer and remove the CPU before attaching jumpers. Removing it lets you set each address line independently without fighting the CPU's outputs. Make connections on the CPU/motherboard side of the adapters, using motherboard ground and the board's normal logic levels; do not apply 5 V directly to Tang Nano pins.

Test each data line:

  1. Load the tester with make data-test-program-sram and connect HDMI.
  2. Ground R/W for manual data-input testing. Check that the screen shows RW:0 and DRIVE:0 before grounding any data pin. R/W low releases the FPGA's data outputs and selects the input direction through the data transceiver.
  3. With the other data inputs at a known high level through suitable pull-ups, ground D0 and check that only bit 0 of FPGA IN goes low. The expected byte is $FE.
  4. Move the ground connection to D1 through D7, one pin at a time. The expected bytes are $FD, $FB, $F7, $EF, $DF, $BF, and $7F. Remove each connection before testing the next pin. These values assume all ungrounded data lines remain high; floating inputs are not a reliable reference.

DATA OUT is the sweep generator's requested byte. While DRIVE:0, it is not being driven onto the data bus, so it does not need to match FPGA IN. A pin that does not change its displayed bit suggests an open connection or buffer problem; a different bit changing suggests swapped wiring, and two bits changing together suggests a short.

Test each address line:

  1. Keep the CPU removed and R/W grounded. Establish known levels on A0–A15 using the board's pull-ups or suitable test pull-ups.
  2. Ground A0, then A1 through A15, one at a time. Check that only the corresponding bit changes in CPU ADDRESS and the address bit fields. With all other address lines high, grounding A0 gives $FFFE, grounding A1 gives $FFFD, and grounding A15 gives $7FFF.
  3. Check MUX0 LOW for A0–A7 and MUX1 HIGH for A8–A15. The high-address mux uses a remapped bit order; use the decoded address fields to identify CPU address bits.

A line that never changes can indicate an open joint, missing connection, or buffer/mux fault. An unexpected address bit changing can indicate incorrect wiring or an address-remap problem. The display shows the FPGA's sampled result; a meter or logic analyzer at the CPU socket and buffer pins helps locate where the signal is lost.

Turn off the computer before removing the test jumpers or reinstalling the CPU. Remove the R/W ground connection before returning to normal operation. Power-cycling also restores the FPGA image stored in flash.

Windows: Gowin Programmer

For Windows, use the Gowin Programmer supplied with Gowin EDA Education (or Gowin's standalone Programmer). The repository's Makefile is written for macOS/Linux and uses openFPGALoader; it is not a native Windows programming recipe. Gowin's Programmer User Guide describes the device-configuration dialog.

  1. Install Gowin's USB programmer driver, connect the Tang Nano 20K, and open Gowin Programmer. Scan the cable/device; the board uses a GW2AR-18C in a QN88 package.
  2. To test without preserving the configuration after power-off, choose SRAM Mode → SRAM Program and select fpga/impl/pnr/CoCoTANG.fs.
  3. To make the FPGA configuration persistent, open Edit → Configure Device, choose External Flash Mode, select exFlash Erase, Program thru GAO-Bridge (or its verify variant), choose fpga/impl/pnr/CoCoTANG.fs, set External Flash Options → Start Address to 0x000000, save, then click Program/Configure.
  4. Program the ROM as a separate raw binary operation: configure External Flash Mode, choose exFlash C Bin Erase, Program thru GAO-Bridge (or its verify variant), select fpga/roms/coco3.rom under FW/MCU/Binary Input Options → Firmware/Binary File, choose Generic Flash if a flash-device choice is required, and set External Flash Options → Start Address to 0x100000. Save and program. The dialog wording varies between Gowin releases; the important distinction is the raw-binary operation and the 1 MiB start address.
  5. Power-cycle the board. If the FPGA configures but the CPU does not start, recheck the ROM write and its offset.

Windows USB driver choice: Gowin Programmer and openFPGALoader may require different USB drivers. The normal Windows path above uses Gowin's driver. If you choose to use openFPGALoader on Windows instead, install its Windows build and use Zadig to bind WinUSB to the Tang Nano 20K's programming/JTAG interface (enable Options → List All Devices if necessary). Check the device/interface identity before clicking Install/Replace Driver—do not replace an unrelated USB interface. Switching to WinUSB can stop Gowin Programmer from seeing the board; restore the Gowin driver in Device Manager or reinstall it when returning to Gowin Programmer. libusb's Windows guidance recommends WinUSB for libusb applications.

Project status

This is an actively developed hardware/RTL project. Review the pin and bus map, fabrication drawing, and KiCad files before building hardware. Flashing a new FPGA image or ROM changes the board's nonvolatile contents; keep a known-good image available while experimenting.

Showcase

Games, NitrOS-9, and a graphics demo running on CoCoTANG:

Calixto IslandContras
Calixto Island adventure running on CoCoTANGContras gameplay running on CoCoTANG
NitrOS-9Sock Master's Drive Thru demo
NitrOS-9 EOU running on CoCoTANG with a 6309 CPU in native modeSock Master's colorful Drive Thru graphics demo running on CoCoTANG

Parts

127
QtyValueFootprintReferences
19104Capacitor_SMD:C_0805_2012Metric_Pad1.18x1.45mm_HandSolderC1, C2, C3, C4, C13, C14, C15, C16, C18, C19, C29, C30, C31, C32, C33, C34 +3
114.7KResistor_SMD:R_0805_2012Metric_Pad1.20x1.40mm_HandSolderR3, R5, R7, R13, R19, R20, R21, R22, R32, R34, R36
9MMBT3904-TPFPGA_Common:SOT-23_MCCQ1, Q2, Q3, Q4, Q5, Q6, Q7, Q8, Q9
874LVC245Package_SO:TSSOP-20_4.4x6.5mm_P0.65mmU4, U8, U10, U11, U12, U13, U14, U15
71KResistor_SMD:R_0805_2012Metric_Pad1.20x1.40mm_HandSolderR1, R16, R17, R23, R31, R33, R35
610KResistor_SMD:R_0805_2012Metric_Pad1.20x1.40mm_HandSolderR2, R4, R6, R14, R15, R18
44.7KResistor_THT:R_Array_SIP9RN1, RN2, RN3, RN4
447KResistor_SMD:R_0805_2012Metric_Pad1.20x1.40mm_HandSolderR8, R9, R25, R26
3470pFCapacitor_SMD:C_0805_2012Metric_Pad1.18x1.45mm_HandSolderC8, C9, C11
375Resistor_SMD:R_0805_2012Metric_Pad1.20x1.40mm_HandSolderR10, R11, R12
3SUPPORTConnector_PinSocket_2.54mm:PinSocket_1x02_P2.54mm_VerticalJ11, J20, J22
21800pFCapacitor_SMD:C_0805_2012Metric_Pad1.18x1.45mm_HandSolderC10, C12
274HC139Package_SO:TSSOP-16_4.4x5mm_P0.65mmU3, U6
274HCT245Package_SO:TSSOP-20_4.4x6.5mm_P0.65mmU9, U16
2ADDRMUX_INConnector_PinHeader_2.54mm:PinHeader_1x07_P2.54mm_VerticalJ3, J17
2AV_HEADERConnector_PinSocket_2.54mm:PinSocket_1x06_P2.54mm_VerticalJ7, J10
2CPUFPGA_Common:DIP-40_W15.24mm-OVERSIZEDJ1, J19
2PIA0_INConnector_PinHeader_2.54mm:PinHeader_1x03_P2.54mm_VerticalJ14, J16
2PIA1_INConnector_PinHeader_2.54mm:PinHeader_1x02_P2.54mm_VerticalJ12, J15
2SD103BWDiode_SMD:D_SOD-123FD1, D3
2SS14Diode_SMD:D_SMAD2, D4
2Tang_Nano_20kFPGA_Common:Tang_Nano_20kU5, U17
1100KResistor_SMD:R_0805_2012Metric_Pad1.20x1.40mm_HandSolderR24
11uFCapacitor_SMD:C_0805_2012Metric_Pad1.18x1.45mm_HandSolderC17
14.7uFCapacitor_SMD:C_0805_2012Metric_Pad1.18x1.45mm_HandSolderC25
16.8nFCapacitor_SMD:C_0805_2012Metric_Pad1.18x1.45mm_HandSolderC24
174HCT11Package_SO:TSSOP-14_4.4x5mm_P0.65mmU22
174HCT138Package_SO:TSSOP-16_4.4x5mm_P0.65mmU1
174HCT30Package_SO:TSSOP-14_4.4x5mm_P0.65mmU7
1ADDRMUXFPGA_Common:DIP-16_W7.62mm-OVERSIZEDJ28
1ADDRMUX_OUTConnector_PinHeader_2.54mm:PinHeader_1x07_P2.54mm_VerticalJ2
1ALTButton_Switch_Keyboard:SW_Cherry_MX_1.00u_PCBSW1
1AT28C64B-15PUFPGA_Common:28P6_ATMU2
1AUTOSTARTJumper:SolderJumper-2_P1.3mm_Open_Pad1.0x1.5mmJP1
1AVFPGA_Common:SWITCHCRAFT_57PC5FJ24
1CMP_INConnector_PinHeader_2.54mm:PinHeader_1x06_P2.54mm_VerticalJ18
1CTRLButton_Switch_Keyboard:SW_Cherry_MX_1.00u_PCBSW2
1CoCo_CartFPGA_Common:COCO_CARTJ13
1EXTKEYConnector_PinSocket_2.54mm:PinSocket_1x05_P2.54mm_VerticalJ5
1EXTKEY_INConnector_PinSocket_2.54mm:PinSocket_1x05_P2.54mm_VerticalJ9
1F1Button_Switch_Keyboard:SW_Cherry_MX_1.00u_PCBSW3
1F2Button_Switch_Keyboard:SW_Cherry_MX_1.00u_PCBSW4
1MountingHoleMountingHole:MountingHole_4.3mm_M4H1
1PIA0Jumper:SolderJumper-2_P1.3mm_Open_Pad1.0x1.5mmJP3
1PIA0FPGA_Common:DIP-40_W15.24mm-OVERSIZEDJ4
1PIA0_OUTConnector_PinHeader_2.54mm:PinHeader_1x03_P2.54mm_VerticalJ8
1PIA1Jumper:SolderJumper-2_P1.3mm_Open_Pad1.0x1.5mmJP4
1RGB_CVBSConnector_PinSocket_2.54mm:PinSocket_1x03_P2.54mm_VerticalJ21
1SUPPORTConnector_PinHeader_2.54mm:PinHeader_1x10_P2.54mm_VerticalJ6
1TRGConnector_PinHeader_2.54mm:PinHeader_1x02_P2.54mm_VerticalJ23

Questions

How big is the CoCoTANG PCB?

It measures 236.8 × 129.1 mm and has 2 copper layers, 1.6 mm thick.

What parts does the CoCoTANG use?

127 parts, built around the 74LVC245AD, 74HCT245, 74HC139D and 74HCT11D. 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 CoCoTANG KiCad files?

From the lfantoniosi/CoCoTANG repository on GitHub, at the commit this page was made from: the board is kicad/CoCoTANG.kicad_pcb and its schematic kicad/CoCoTANG.kicad_sch. PCBKit opens the board in the browser, with nothing to install.

Can I use the CoCoTANG design in my own project?

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

Similar boards

  • 2 layers368.3 × 215.9 mmTTL 6510 Computer fab, the printed circuit board in 3D

    TTL 6510 Computer fab

    StefansAI/TTL-6510-Computer

    Yet another CPU made from TTL chips

    330 parts1
  • 4 layers280 × 140 mmP8x cf card, the printed circuit board in 3D

    P8x cf card

    ksr/p8x

    Generated by generators/genkicad.py from the canonical geneagle netlist (CARDS["peripheral-card"]), same standard as the memory card: 4-layer (F/B signals, In1=GND, In2=VCC planes), a bypass cap above each IC, a…

    35 parts
  • 4 layers230 × 100 mmEda, the printed circuit board in 3D

    Eda

    nojan1/project-wrass

    The purpose of Project Wrass is to develop the Wrass 1.

    80 parts
  • 2 layers150 × 90 mmInterruptAndKeyboard, the printed circuit board in 3D

    InterruptAndKeyboard

    daveho/DIY8bit

    Files and resources for DIY 8 bit computer video series

    39 parts19
  • 4 layers209.5 × 108.5 mmMemory, the printed circuit board in 3D

    Memory

    89Mods/LVDC

    Replica of the Launch Vehicle Digital Computer using 74-series logic

    58 parts2MIT
  • 4 layers133.8 × 102.9 mmVca backplane, the printed circuit board in 3D

    Vca backplane

    brer-rabbit/zoxnoxious

    Analog synth / software interface

    102 parts68GPL-3.0
  • 2 layers112 × 45 mmPc1715-esp32vga, the printed circuit board in 3D

    Pc1715-esp32vga

    mgoegel/robotron-esp-vga.pcb

    Robotron MDA Adapter, ESP32S3 based PCB Layout in KiCad 8.0

    36 parts3
  • 4 layers66.8 × 60 mmIMD SAFETY 2024, the printed circuit board in 3D

    IMD SAFETY 2024

    PUT-Motorsport/PUTM_EV_IMD_SAFETY

    Bender Insulation Monitoring Device Shutdown Circuit driver, based on TW & SS project

    100 parts