Skip to the content
2 layers178.4 × 115.6 mmCR2021 CPU v2, the printed circuit board in 3D

This is my hobby project in making a 6502 based 8-bit computer from scratch. The end goal is to have it run Castle Runner, a game I made many moons ago.

Size
178.4 × 115.6 mm
Copper layers
2
Thickness
1.6 mm
Parts
47
Nets
172
Pads
550
Tracks, vias
1,050, 59
Pours
2
Routed
Yes
KiCad
KiCad 9.0 (file 20241229)
Created
31 Jan 2021
Updated
24 Aug 2026

Overview

CR2021 CPU v2 is an open-source printed circuit board by derpflanz, from the derpflanz/castle-runner repository on GitHub. It is a 2-layer board of 178.4 × 115.6 mm with 47 parts on 172 nets, routed with 1,050 tracks and 59 vias.

It is built around the ATMEGA328-PU, 74LS540PC and LM324, with the 74HCU04D, 74LS163APC and 74LS273PC among its other parts. Its parts include 8 ICs, 3 capacitors, 3 resistors, 2 connectors and 1 diode. It belongs with the AVR (ATmega, ATtiny) boards of this library.

Main components

6

README

README.md

castle-runner

This is my hobby project in making a 6502 based 8-bit computer from scratch. The end goal is to have it run Castle Runner, a game I made many moons ago.

CR Assembler

Castle Runner is built from scratch, including the assembler (new version, written in C). I created my own assembly language dialect to assemble the machine language code. That ML can then be written to a EEPROM. For which I built my own EEPROM programmer.

Layout

By default, the RESET vector is set to $8000, which is the start of the ROM in the CR001 computer. The VirtualCR001 uses that as well by default. When programming the EEPROM, this vector is sent as the first two bytes and stored in $FFFC/$FFFD in the ROM.

Note that the assembler can have a DATA section at the start, which will cause to use another RESET vector to be written at the start of the .hex file.

Parts

47
QtyValueFootprintReferences
474LS273Package_DIP:DIP-20_W7.62mm$4002, $4003, OUT1, OUT2
222pFCapacitor_THT:CP_Radial_Tantal_D4.5mm_P2.50mmC1, C2
27400Package_DIP:DIP-14_W7.62mmU3, U4
274LS138Package_DIP:DIP-16_W7.62mmIN_DEMUX1, OUT_DEMUX1
274LS540Package_DIP:DIP-20_W7.62mmIN1, IN2
2LM324Package_DIP:DIP-14_W7.62mmU1, U7
1!IO_ActiveConnector_PinHeader_2.54mm:PinHeader_1x01_P2.54mm_VerticalPIN2
1+5VConnector_PinHeader_2.54mm:PinHeader_1x02_P2.54mm_VerticalCONN6
1100uFCapacitor_THT:CP_Radial_D6.3mm_P2.50mmC3
110MResistor_THT:R_Axial_DIN0207_L6.3mm_D2.5mm_P10.16mm_HorizontalR_CLK1
110kPotentiometer_THT:Potentiometer_Piher_PT-10-V10_VerticalRPOT1
11kResistor_THT:R_Axial_DIN0204_L3.6mm_D1.6mm_P5.08mm_HorizontalR1
122Resistor_THT:R_Axial_DIN0207_L6.3mm_D2.5mm_P10.16mm_HorizontalR_CLK2
13.3kResistor_THT:R_Axial_DIN0204_L3.6mm_D1.6mm_P5.08mm_HorizontalR3
132 kB RAMPackage_DIP:DIP-28_W15.24mmRAM1
1330Resistor_THT:R_Axial_DIN0204_L3.6mm_D1.6mm_P5.08mm_HorizontalR2
174HCU04Package_DIP:DIP-14_W7.62mmU2
174LS163Package_DIP:DIP-16_W7.62mmU5
1ADDRBUS_16BITConnector_PinHeader_2.54mm:PinHeader_1x16_P2.54mm_VerticalBUS2
1ADDRSEL_INConnector_PinHeader_2.54mm:PinHeader_1x06_P2.54mm_VerticalCONN7
1ADDRSEL_OUTConnector_PinHeader_2.54mm:PinHeader_1x06_P2.54mm_VerticalCONN8
1ATmega328-PPackage_DIP:DIP-28_W7.62mmU6
1Atmega328 Programmer InterfaceConnector_IDC:IDC-Header_2x03_P2.54mm_VerticalJ3
1Conn_02x06_Odd_EvenConnector_PinHeader_2.54mm:PinHeader_2x06_P2.54mm_VerticalJ1
1Crystal 8MHzCrystal:Crystal_HC18-U_VerticalY1
1DATABUS_8BITConnector_PinHeader_2.54mm:PinHeader_1x08_P2.54mm_VerticalBUS1
1DisplayConnector_PinHeader_2.54mm:PinHeader_1x16_P2.54mm_VerticalCONN5
1EXT_CLKConnector_PinHeader_2.54mm:PinHeader_1x01_P2.54mm_VerticalPIN_CLK1
1IN1Connector_Dsub:DSUB-9_Male_Horizontal_P2.77x2.84mm_EdgePinOffset9.90mm_Housed_MountingHolesOffset11.32mmCONN3
1IN2Connector_Dsub:DSUB-9_Male_Horizontal_P2.77x2.84mm_EdgePinOffset9.90mm_Housed_MountingHolesOffset11.32mmCONN4
1IO_ActiveLED_THT:LED_D3.0mmD1
1OUT1Connector_Dsub:DSUB-9_Male_Horizontal_P2.77x2.84mm_EdgePinOffset9.90mm_Housed_MountingHolesOffset11.32mmCONN1
1OUT2Connector_Dsub:DSUB-9_Male_Horizontal_P2.77x2.84mm_EdgePinOffset9.90mm_Housed_MountingHolesOffset11.32mmCONN2
1R/!WConnector_PinHeader_2.54mm:PinHeader_1x01_P2.54mm_VerticalPIN1
1RESETButton_Switch_THT:SW_Tactile_Straight_KSL0Axx1LFTRSW1
1ROM ZIF SocketPackage_DIP:DIP-28_W15.24mmROM1
1SpeakerConnector_PinHeader_2.54mm:PinHeader_1x02_P2.54mm_VerticalLS1
1W65C22NxPPackage_DIP:DIP-40_W15.24mmU8
1WD65C02SPackage_DIP:DIP-40_W15.24mmCPU1

More from derpflanz/castle-runner

1
  • 2 layers57.2 × 73.7 mmProgrammer, the printed circuit board in 3D

    Programmer

    derpflanz/castle-runner

    This is my hobby project in making a 6502 based 8-bit computer from scratch. The end goal is to have it run Castle Runner, a game I made many moons ago.

    3 parts

Similar boards

  • 4 layers96 × 70 mmSPI Unit, the printed circuit board in 3D

    SPI Unit

    oberrow/i8088-computer

    Code for an i8088-based non-PC compatible breadboard computer

    29 parts1MIT
  • 2 layers426 × 307 mmI7000, the printed circuit board in 3D

    I7000

    felipesanches/Itautec_I7000_KICAD

    Esquemáticos do computador Itautec I-7000 G desenhados a partir de inspeção do circuito das PCBs

    115 parts
  • 4 layers298.9 × 270 mmDino v0 0 2, the printed circuit board in 3D

    Dino v0 0 2

    robertrico/dino-homebrew

    A perfboard with the bus edge and the slot decode every DINO card repeats. Plug it into any of J1-J8 on the Rev 1.0 mainboard, pick the slot with one shunt, bodge the card on the grid.

    239 parts
  • 2 layers235 × 160 mmInput output.Disk, the printed circuit board in 3D

    Input output.Disk

    lynchaj/duodyne

    Duodyne is a hobbyist retrocomputer system designed to run ROMWBW. It is comprised of modules on a system bus

    136 parts15
  • 2 layers57.9 × 83.9 mmKEY2USB, the printed circuit board in 3D

    KEY2USB

    acwright/KEY2USB

    Commodore 64 / C128 expansion port cartridge to USB HID keyboard

    23 parts4CERN-OHL-P-2.0
  • 2 layers95.1 × 72.1 mm4004MainBoard, the printed circuit board in 3D

    4004MainBoard

    novi/4004MainBoard

    Intel 4004 Single Board Computer (KiCad project)

    162 parts4CC-BY-4.0
  • 2 layers100 × 100 mmTD4 imem, the printed circuit board in 3D

    TD4 imem

    akita11/TD4_OR1

    4bit CPU TD4 using OpenRule1um PDK

    161 parts1MIT

Questions

How big is the CR2021 CPU v2 PCB?

It measures 178.4 × 115.6 mm and has 2 copper layers, 1.6 mm thick.

What parts does the CR2021 CPU v2 use?

47 parts, built around the ATMEGA328-PU, 74LS540PC, LM324 and 74HCU04D. 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 CR2021 CPU v2 KiCad files?

From the derpflanz/castle-runner repository on GitHub, at the commit this page was made from: the board is ComputerDesigns/CR2021_CPU_v2/CR2021_CPU_v2.kicad_pcb and its schematic ComputerDesigns/CR2021_CPU_v2/6522.kicad_sch. PCBKit opens the board in the browser, with nothing to install.

Can I use the CR2021 CPU v2 design in my own project?

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