Skip to the content
2 layers182 × 138.8 mm-816-board, the printed circuit board in 3D

A retro computer motherboard for the W65C816S CPU. Dual-core expandable, 16mb extended memory, four expansion ports.

Size
182 × 138.8 mm
Copper layers
2
Thickness
1.6 mm
Parts
141
Nets
244
Pads
1,187
Tracks, vias
7,943, 670
Routed
Yes
KiCad
KiCad 9.0 (file 20241229)
Created
25 May 2025
Updated
25 Jul 2025

Overview

-816-board is an open-source printed circuit board by snippyrow, from the snippyrow/-816-board repository on GitHub, published under the MIT licence. It is a 2-layer board of 182 × 138.8 mm with 141 parts on 244 nets, routed with 7,943 tracks and 670 vias.

It is built around the 74HC245D, 74HC373D and 74HC688D, with the 74HC00D, 74HC04D and 74HC138 among its other parts. Its parts include 44 capacitors, 44 ICs, 21 resistors, 17 connectors and 9 diodes.

Main components

12

README

README.md

Retro computer board!

image

A retro computer motherboard for the W65C816S CPU. Dual-core expandable, 16mb extended memory, four expansion ports.

WHY did I make this??

I have always loved building things with my hands, especially electronics things. I also love computers, and always to learn how they work. I believe that this is part of that hobby, building myself a computer system to play around with. I want to develop software, as well as expandable hardware. My end goal is to write a complete opertaing system for this build, and have it run DOOM!

Basic Specifications

The primary core is a W65C816S microcontroller, with 32kb of SRAM. EEPROM Space is only accessible to the primary controller. Each core has its own cache, or SRAM chip. Located in the upper-half of the first page, each is 32kb. If the primary controller wants to access EEPROM, I.E. to copy data to another portion of memory, it only needs to access the lower-half. If the primary wants to access the secondary core cache, it uses the expanded memory space. There are two types of busses: core-only and global. The global bus is arbitrated between the two cores. The primary gets priority, then the secondary. In order for the first to access secondary, it must first disable the secondary core. This allows it to always be able to write. The primary core must not access the secondary core too often, as it must be disabled beforehand. If the secondary core needs to access the main bus, it queues to wait before the primary CPU does an internal cycle. At that moment it will take whatever is in the queue registers. This means that the secondary must not access the main memory too often. The secondary cache is only exposed to the global bus if the primary is using it for a transfer.

The system is powerful enough to run a basic operating system, and provides options to expand into a workable computer system.

Advanced

The system uses two cores, the W65C816S core. It is not a drop-in replacement for the W65C02S, and samples data during the falling edge of the PHI2. Each core starts in a 6502-emulation mode, and then transitions to the native '816 mode. Each core can access up to 16MB of memory and has 16-bit internal registers. The primary core contains 32kb of EEPROM space as well as 32kb of SRAM space. The secondary core is disabled at runtime, and must be re-enabled later. The low 65kb of the memory (2^16 bytes worth) are used to communicate and run simple programs. The 32kb space acts as a sort of cache system for each core, and they can communicate largely based on the upper shared memory. Beyond the low 65kb there are devices and expansion memory. The secondary core is unable to reach the primary core, though the primary core can access the secondary core by an expansion device. The first devices after the local memory are the expansion devices. Not only are the expansion ports physically on the board mapped here, but so is the control register for the secondary core, as well as the built-in serial port controller.

While the primary core is not actively using the global/shared memory, the secondary core is free to do so. To upload a program or start a second process, the secondary core must first be disabled and reset. Then, the cache is accessed and the program is copied. The reset vector will point to some location in the cache, and it will be re-enabled. Do not set the reset vector elsewhere. As stated previously, when the secondary core needs to access shared memory, whether that be an expansion device or general memory, it latches the address. If reading, it sets a control bit and waits for a NMIB. If writing, it sets the control but the other way and latches the write data. When the write is completed, I.E. once the primary is not active, a NMIB signal is sent signaling that the memory transaction was completed. The WAI (wait for interrupt) can be used. The system is based off an expanion-type model, where it encourages expansion devices to be built and used. Some examples could be a VGA card, sound card, or a keyboard/mouse system.

image

Primary core operation

The core is initiated during a power-on reset phase. The secondary core is disabled during this time, and no secondary transactions are happening. The primary will disable the built-in serial port built in directly to the secondary, and can work without using the secondary core at all. It can use the global bus like the internal core bus.

Secondary core operation

There are two bits that control the secondary core: ENABLE (0) and RESET (1). The ENABLE bit is used to turn the core on or of. It uses the RDY pin to do this. Enabling this also allows the queue to begin transferring data. The IRQB pin is used for the serial adapter, and the NMIB is used when an external read request has been completed. The RESET pin is used to control the RESB pin on the secondary, to reset it to a known state. It is recommended to disable the core using the ENABLE bit before changing data on the secondary cache. When the primary CPU goes into an internal cycle, it takes whatever value is in the address latches and will attempt a memory transaction. The only accessible area for the secondary is the expansion planes and the expanded memory lanes. The RWB bit will control whether it is reading or writing. Since this all takes a single cycle, timing does not matter. The secondary should not attempt frequent external writes due to speed limitations. The secondary only has access to up to half the expandable memory space, as the last bit is used internally for deciding whether it is reading the MMU register. A NMI also happens after a write, to tell the core that the write succeeded before overwriting the register again.

Built-in serial adapter

The built-in serial adapter is wired directly to the secondary core IRQB pin. If it should be disabled, it can be done so by accessing the internal registers. It uses the R6551 chip. Does not include RS232. When reading data from the serial port, it must use the R6551 as an expansion device, located in the external memory lane. This is so that it can be externally controlled by the primary core. Attempt to read by accessing the global data bus, and wait for an interrupt on the NMIB pin. WAI can be used. The same goes for sending data. The secondary should rely in the WAI instruction to manage external reads and writes, but could also be triggered by an IRQB signal from the serial adapter. Internal control should be programmed to prevent this. NMI has priority, after that an IRQB will be sent. The flow should be as follows: first an IRQB signal is sent, then an attempt to read the device will be followed by a NMIB signal. When a NMIB is sent during the IRQB routine, it will cause a nested interrupt to occur, allowing it to service properly. image

Timing Control

Timing control is critical for this system. When PHI2 (the clock) goes from high to low, it indicated the start of a new cycle. VDA/VPA pins change about half-way during the PHI2 low period, and indicate whether the CPU is undergoing an internal cycle. Write and read cycles are all sampled on the falling edge. When VDA/VPA update shortly after the falling edge, the primary core is disconnected from the global bus, and it prepares to do a transaction by updating the address that was latched before. write data is also placed onto the data bus if necessary. On the next falling edge, data is written or data is read. If read, it then sends a NMI to tell the core that it read the data. From there it will read the data back from a specific register. When using it to read, it does not exactly read directly from the memory devices. Instead, it reads from a memory management unit that waits for the primary core to open. The secondary can read the MMU register, located in the upper half of the expandable memory space (bit 23). In order to disconnect the primary, BE is set high, disconnecting the data and address busses. Afterwards, the latches are turned on. Immediately after the bank address is pushed to the data bus, all read data begins to enter through either the cache space or the shared memory space. RDY is toggled by the control of the first bit in the control register, and is only sampled and updated on the following falling edge of the PHI2.

Examples

If the primary wants to upload something to the secondary, I.E. change the task, it will first disable the core and push it into a reset. This prevent erroneous memory accesses. Then, with the cache mapped as an expansion memory device, begins accessing. The primary is blocked from accessing the secondary cache if the core is active. The only way for the two to communicate is through the shared global memory tables. After it is completed, re-enable the secondary.

Expansion Ports

The machine contains four expansion ports, wired directly to the primary. Two of the slots are larger, and each one of the two is either wired to IRQB or NMIB. The other two are simply expansion devices. The larger ones have A0-A3, and the smaller ones have A0-A1 as register addresses. The shared memory on the global bus is beyond the 65K from the two cores. The controller for the secondary, the controller for the serial port, and just about everything else is connected in through the expansion device encoder to save on space.

Physical Board Explaination

Primary Core

The primary core uses the W65C816S, with a 24-bit address bus and an 8-bit data bus. The highest byte of the address bus (A16-A23) is pushed onto the data bus during the low phase of PHI2, and is latched at the rising edge of the clock. The address bus comes stable around the same time. During these times, all the chips may stabilize into selecting the correct hardware for the write. Each core has a 74HC373 and a 74HC245 to moderate the data bus and the banked address busses. The BE pin will set the data bus, address bus and RWB pins to high-Z. The banked address byte is fed into a chip that detects if it is anything >0x00. This means that an external cycle is being attempted. If not, the selection uses A15 to select from either RAM or ROM to read/write from. In an external cycle, the primary is shut off from the rest of the device. During an external cycle, the full address is passed to the global address bus, and the data is either passed through from the data bus directly or read in through an octal buffer. The RWB pin is multiplexed along with the secondary. The expansion slots are wired directly into the primary core NMIB/IRQB pins, and are pulled high on the board.

Secondary Core

The secondary core has much the same setup as the primary core, but has some key differences. It can work independently of the primary through its own cache, but lacks an EEPROM space. In order to perform an external read/write, when it detects an external memory transaction it always writes to a large set of registers. These registers latch A0-A22, as well as whether it wants to read or write. It may not be necessary for it to use the full 16MB address space. The secondary cache lies outside of the range that the secondary can reach. When it is latched, it also sets a D-flipflop into a HIGH state. The state of the first flip-flop is transferred over to the external memory device selector, which can choose which device to enable. It is only active during either an external cycle made by the primary or the secondary waiting to write/read data. Now that the devices have a stable address, when an external cycle happens, it sets the second flip-flop into a HIGH state. This will immediately reset both back to LOW, but sends a NMI to the secondary processor. During an external cycle, the secondary processor latches are always pushed out to the global bus, as well as any data. If no core is desiring to read from the global data bus, then it may go floating. If the secondary desired to write previously, that old data would be pushed, otherwise nothing holds on to the data bus. Therefore the global data bus is always pulled LOW. A15 is always pulled LOW, and in order to read data coming from the global busses, any address from 0x0000-0x7FFF will work. It simply takes the place of the EEPROM space. On the secondary the cache is in the upper half rather than lower. The secondary processor has two control bits, ENABLE and RESET. ENABLE will control the processor state, pausing it and disabling the address/data busses. The RESET bit will cause it to reset back to a known state. The secondary processor will have all of its data and address busses disabled during this time. The cache can be accessed by the primary core processor during this time, while it is disabled. It cannot access while running. While the address and data busses are in a High-Z state, the cache can be selected as an expansion device, and the address/data/RWB for the primary processor are pushed in. The secondary local data bus are always pulled LOW. The secondary address bus is always matches the primary address bus while not enabled, as a way to drive it.

Serial adapter

As mentioned earlier, the serial adapter is wired directly to the secondary core, and works as any other expansion device would. The secondary should either disable the adapter or mask interrupts if it were to be doing something other than serial work.

Memory selector

The memory selector works entirely off the global address busses for selection, choosing serial devices or memory expansion cards. Devices are only selected if either there is an external cycle or the secondary is waiting to write data.

Datasheets

https://www.westerndesigncenter.com/wdc/documentation/w65c816s.pdf

BOM

ItemQuantityPrice (USD)
JLCPCB 180x140mm5$25.15
10K Resistor10$1.85
SN74HC373N Latch10$9.77
W65C816S6PG-14 MPU2$24.20
L78L33 Regulator5$1.40
10uF Capacitor5$1.15
LED (Red)10$2.60
SN74HC04N Inverter5$6.55
SN74HC21N Gate4$2.60
Tactile Switch5$1.50
SN74HC245N Transceiver10$6.22
AT28C256 EEPROM1$11.62
150Ω Resistor4$1.44
AS6C62256 SRAM2$9.50
1MΩ Resistor4$1.44
SN74HC138N Decoder5$5.50
1N914 Diode5$0.50
SN74HC10N Gate4$2.52
10kΩ Resistor20$0.30
1kΩ Resistor10$0.27
SN74HC32N Gate4$2.20
SN74HC688N Comparator6$8.52
4.7kΩ Resistor10$0.47
SN74HC126N Buffer4$2.64
SN74HC00N Gate5$3.00
2N3904 Transistor10$0.77
30pF Capacitor10$1.18
0.1uF Capacitor100$4.00
1MHz Oscillator2$6.90
SN74HC08N Gate4$2.40
SN74HC74N Flip Flop4$3.60
20-pin Socket24$3.10
16-pin Socket20$2.42
14-pin Socket20$2.20
28-pin Socket6$3.84
40-pin Socket4$3.68

Total: $167.00

Parts

141
QtyValueFootprintReferences
300.1ufCapacitor_SMD:C_1206_3216MetricC1, C2, C3, C12, C15, C16, C17, C18, C19, C20, C22, C24, C26, C27, C28, C29 +14
10C_SmallCapacitor_SMD:C_1206_3216MetricC10, C21, C30, C31, C32, C33, C34, C35, C36, C45
974HC245Package_DIP:DIP-20_W7.62mm_SocketU5, U10, U20, U21, U22, U38, U39, U40, U45
874HC373Package_DIP:DIP-20_W7.62mm_SocketU4, U9, U41, U42, U43, U44, U47, U49
71kResistor_SMD:R_1206_3216Metric_Pad1.30x1.75mm_HandSolderR5, R10, R11, R15, R16, R17, R18
64.7kResistor_SMD:R_1206_3216Metric_Pad1.30x1.75mm_HandSolderR1, R2, R3, R12, R14, R21
5MCP1792x-3302xDBPackage_TO_SOT_SMD:SOT-89-3_HandsolderingU13, U28, U29, U30, U31
4Conn_01x01MountingHole:MountingHole_3mm_PadJ17, J18, J19, J20
4LEDLED_SMD:LED_1206_3216MetricD4, D5, D6, D7
310kResistor_SMD:R_1206_3216Metric_Pad1.30x1.75mm_HandSolderR6, R7, R13
34k7Resistor_SMD:R_1206_3216Metric_Pad1.30x1.75mm_HandSolderR8, R9, R20
374HC688Package_DIP:DIP-20_W7.62mm_SocketU15, U24, U35
3LEDLED_THT:LED_D3.0mmD1, D2, D3
274HC00Package_DIP:DIP-14_W7.62mm_SocketU16, U27
274HC04Package_DIP:DIP-14_W7.62mm_SocketU17, U36
274HC138Package_DIP:DIP-16_W7.62mm_SocketU26, U32
2C_Polarized_SmallCapacitor_THT:CP_Radial_D5.0mm_P2.00mmC13, C14
2Conn_01x02Connector_PinHeader_2.54mm:PinHeader_1x02_P2.54mm_VerticalJ10, J11
2Conn_01x08Connector_PinSocket_2.54mm:PinSocket_1x08_P2.54mm_VerticalJ13, J14
2Conn_02x10_Counter_ClockwiseEdgeConn:AliExpress_20J3, J4
2Conn_02x12_Counter_ClockwiseEdgeConn:AliExpress_24J1, J2
2Conn_02x17_Counter_ClockwiseEdgeConn:AliExpress_36J5, J6
2HM62256BLPPackage_DIP:DIP-28_W15.24mm_SocketU3, U33
2R_Network08Resistor_THT:R_Array_SIP9RN1, RN2
2WD65C816SPackage_DIP:DIP-40_W15.24mm_SocketU1, U8
11.8432mhzCrystal:Crystal_HC52-6mm_VerticalY2
1150Resistor_THT:R_Axial_DIN0204_L3.6mm_D1.6mm_P7.62mm_HorizontalR4
11MResistor_THT:R_Axial_DIN0207_L6.3mm_D2.5mm_P7.62mm_HorizontalR19
11N914Diode_SMD:D_1206_3216Metric_Pad1.42x1.75mm_HandSolderD9
11mhzOscillator:Oscillator_DIP-8Y1
128C256Socket:DIP_Socket-28_W11.9_W12.7_W15.24_W17.78_W18.5_3M_228-1277-00-0602JU7
12N3904Package_TO_SOT_THT:TO-92_InlineQ1
130pfCapacitor_THT:C_Disc_D3.0mm_W2.0mm_P2.50mmC25
174126Package_DIP:DIP-14_W7.62mm_SocketU23
174HC14Package_DIP:DIP-14_W7.62mm_SocketU18
174HC74Package_DIP:DIP-14_W7.62mm_SocketU19
174LS08Package_DIP:DIP-14_W7.62mm_SocketU2
174LS10Package_DIP:DIP-14_W7.62mm_SocketU25
174LS21Package_DIP:DIP-14_W7.62mm_SocketU46
174LS32Package_DIP:DIP-14_W7.62mm_SocketU14
1Barrel_JackConnector_BarrelJack:BarrelJack_HorizontalJ9
1C_PolarizedCapacitor_THT:CP_Radial_D10.0mm_P3.50mmC11
1Conn_01x04Connector_PinSocket_2.54mm:PinSocket_1x04_P2.54mm_VerticalJ8
1Conn_02x12_Counter_ClockwiseConnector_PinSocket_2.54mm:PinSocket_2x12_P2.54mm_VerticalJ12
1LED_SmallLED_SMD:LED_1206_3216Metric_Pad1.42x1.75mm_HandSolderD8
1SW_PushButton_Switch_THT:SW_PUSH_6mmSW1
1W65C51NPackage_DIP:DIP-28_W15.24mm_SocketU11

More from snippyrow/-816-board

2
  • 2 layers137.2 × 88.8 mmGPU SCH, the printed circuit board in 3D

    GPU SCH

    snippyrow/-816-board

    A retro computer motherboard for the W65C816S CPU. Dual-core expandable, 16mb extended memory, four expansion ports.

    67 partsMIT
  • 2 layers77.8 × 72.2 mmRAM SCH, the printed circuit board in 3D

    RAM SCH

    snippyrow/-816-board

    A retro computer motherboard for the W65C816S CPU. Dual-core expandable, 16mb extended memory, four expansion ports.

    17 partsMIT

Similar boards

  • 4 layers100 × 100 mm74HCT6526, the printed circuit board in 3D

    74HCT6526

    dmolinagarcia/74HCT6526

    74HCT6526

    80 parts14
  • 2 layers208 × 110 mm8 16 computer 2, the printed circuit board in 3D

    8 16 computer 2

    halfburnttoast/TCPU816-v1

    Version 1.1 of my 8-bit, TTL computer.

    120 parts21
  • 4 layers188 × 128.3 mmZAK180, the printed circuit board in 3D

    ZAK180

    agkaminski/ZAK180

    DIY all-in-keyboard computer featuring Z180 and floppy drive

    140 parts
  • 2 layers190 × 125 mm68hc11, the printed circuit board in 3D

    68hc11

    mggates39/68hc11_SBC

    Building a Single Board Computer around the MC68HC11. It will include my first attempt with KiCad designing a PCB

    58 parts4GPL-3.0
  • 2 layers178 × 711 mmMSAP-2 rev.A SMD, the printed circuit board in 3D

    MSAP-2 rev.A SMD

    mehrantsi/MSAP-2

    An 8-bit computer. Successor to MSAP-1

    658 parts13MIT
  • 2 layers315 × 147.4 mmSteuereinheitBackgammonMoM, the printed circuit board in 3D

    SteuereinheitBackgammonMoM

    stonedDiscord/Automatenplatinen

    Reverse engineerte Hardware aus deutschen Spielautomaten.

    50 parts5BSD-2-Clause

Questions

How big is the -816-board PCB?

It measures 182 × 138.8 mm and has 2 copper layers, 1.6 mm thick.

What parts does the -816-board use?

141 parts, built around the 74HC245D, 74HC373D, 74HC688D and 74HC00D. 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 -816-board KiCad files?

From the snippyrow/-816-board repository on GitHub, at the commit this page was made from: the board is main.kicad_pcb and its schematic EXP/GPU_SCH/main.kicad_sch. PCBKit opens the board in the browser, with nothing to install.

Can I use the -816-board design in my own project?

Its repository publishes it under the MIT licence: you may reuse it on that licence's terms (keep the author's notice, and for a copyleft licence share your changes alike).