
Raven
agranlund/raven
Homemade MC68060 + DSP56303 Atari-compatible computer. Hardware, firmware, and software stack

8-bit homebrew computer; version 2
Pda6502v2 is an open-source printed circuit board by pda, from the pda/pda6502v2 repository on GitHub. It is a 4-layer board of 100 × 100 mm with 94 parts on 209 nets, routed with 2,260 tracks and 321 vias.
It is built around the ICE40HX4K-TQ144, AS6C4008-55PCN and DS1818-5+, with the SC28L92A1B, TLV1117-33DCY and 1N4148W among its other parts. Its parts include 32 capacitors, 20 resistors, 11 ICs, 11 diodes and 9 connectors. It belongs with the retro computing and games boards and the FPGA and CPLD boards of this library.
pda6502v2 is a single-board homebrew computer built around the 8-bit 6502 CPU, varitions of which powered the venerable Commodore 64, Apple II, Nintendo Entertainment System and lots more.
This repository contains all aspects of its development:
| Directory | Description | Language / Tool |
|---|---|---|
kicad/ | hardware schematic / PCB design | KiCad |
bifröst/ | BIFRÖST FPGA system controller | Verilog |
os/ | pda6502v2 firmware/OS/software | 6502 assembly |
emu/ | pda6502v2 emulator | Rust |
eeprog/ | SPI EEPROM in-circuit programmer | C, Arduino C++ |
pda6502v2 is redesigned from scratch to address the pain points encountered creating and programming the original pda6502 several years earlier:
These issues and more have been improved:
| pda6502 | pda6502v2 | |
|---|---|---|
| Bootloader / firmware | EEPROM | In-circuit programmable Flash EEPROM |
| SPI | 6522 bit-bang | FPGA hardware accelerated |
| UART | none | Dual UART (SC28L92) |
| GPIO | 6522 VIA | Dual 6522 VIA |
| Sound | none | ARMSID (SID emulation) |
| RAM | 32 KiB | 512 KiB (FPGA can bank-switch) |
| Clock | 1 MHz oscillator | FPGA generated; variable |
| Address decode logic | 7400-series chips | FPGA programmable |
| Voltage | 5.0V | 3.3V |
| Schematic/layout tool | EAGLE | KiCad |
An FPGA (Lattice ICE40HX4K-TQ144) acts as a system controller (dubbed BIFRÖST) with three primary functions;
Startup code is stored in an on-board SPI serial EEPROM (Microchip AT25M01) which can be written from an external computer via SPI ICSP header.
(Microchip AT25M01 replaced by ON Semiconductor CAT25M01 due to availability).
BIFRÖST bootstraps the system by copying a fixed size/location bootloader from serial EEPROM into main RAM before starting CPU. The bootloader may load further code/data from the serial EEPROM.
This solves the main pain point of version one, in which program/bootloader development involved removing and rewriting an EEPROM on every development iteration.
Mapping of the address space to SRAM and I/O chips is also handled by BIFRÖST. This provide very low propagation time allowing for fast clock speed, and is in-circuit programmable for flexible address space / logic design without hardware changes.
BIFRÖST has the entire address bus, data bus, control signals and clock, allowing for arbitrary address mapping. For example a control register could be exposed for state-based mapping, e.g. memory layer switching like the Commodore 64.
BIFRÖST is implemented as a Lattice ICE40HX4K-TQ144 FPGA with a Microchip AT25M01 SPI flash EEPROM for configuration storage. The EEPROM also acts as the 6502 system ROM, loaded into RAM by BIFRÖST during boot.
Any signal that can be routed through / controlled by BIFRÖST should be, so that design decisions are pushed from hardware schematic and into FPGA HDL which can be easily altered after assembly.
BIFRÖST needs the following signals:
| Signals | Count |
|---|---|
Bus: ADDR 0..15 + extended ADDR 16..18 | 19 |
SPI: MISO, MOSI, SCLK, SS x 8 | 11 |
6502: CLK RWB BE IRQB MLB NMIB RDY SOB SYNC VPB RESB | 10 |
UART: CS, IM, IRQ, RDN, RXAIRQ, RXBIRQ, TXAIRQ, TXBIRQ, WRN | 9 |
Bus: DATA 0..7 | 8 |
VIA1 & VIA2: CS, IRQ | 4 |
SRAM CS | 1 |
CLOCKSRC (in from oscillator) | 1 |
~RESET | 1 |
This brings the total I/O pin requirement to at least 64.
The ICE40HX1K-VQ100 FPGA lacks PLL; PLL could be useful?
The TQ144 package includes PLL and has the same 0.5 mm pitch, so shouldn't be materially harder to hand-solder.
The ICE40HX4K is bigger/better, with immaterial cost difference at this volume.
Alliance Memory AS6C4008-55PCN 512K x 8 SRAM with 55ns access time at 2.7~5.5V in a PDIP-32 package provides 512 KiB RAM.
This is 8 times larger than the 6502's 16-bit address space; access to RAM beyond the first 64 KiB is managed by BIFRÖST.
(Earlier during system design, a pair of AS6C62256 32K x 8 PDIP-28 was chosen to provide a less overkill and more era-appropriate 64 KiB of RAM, then lure of 1 MiB RAM made that 2 x 512 KiB, then the second 512 KiB was removed to make PCB space for SID.
BIFRÖST maps registers into the 6502 address space, implementing SPI master similar to http://6502.org/users/andre/spi65b/index.html
This hardware SPI communication is orders of magnitude faster than 6522 bit-banging, making SPI display output more viable.
A pair of WDC W65C22S (6522) VIA provide two 8-bit GPIO ports each, as well as timers etc.
NXP SC28L92 3.3V dual UART (SC28L92A1A: PLC44-44 package)
Useful information on UARTs: REPLACING THE 65C51 on 6502.org forums.
ARMSID emulates MOS6581 or MOS8580 SID.
I believe this will only function correctly when running at ~1 MHz.
An email reply from the creator re. voltage and clock:
The ARMSID has its own LDO regulator, so it needs at least 3.45 V (max. 5.5 V) on pin 24 for proper operation. The value of the output signals is logic 3.3 V, the inputs are tolerant to 5 V. Therefore, it is not a problem to connect it to a 3.3 V system. The clock signal is designed for use in the C64, so it is guaranteed in the range of 0.985 to 1.023 MHz and directly controls the emulation rate (just like the original SID). Lower frequencies are not a problem, higher frequencies can disable emulation. All write and read operations should take at least 350ns for proper operation.
TLV1117-33 LDO linear regulator brings 4.75V–15V down to the main 3.3V / 800mA supply, used for all internal/external I/O.
LT3030 dual LDO linear regulator brings the 3.3V supply down to 2.5V / 750mA and 1.2V / 250mA for the additional FPGA voltage requirements.
The In-Circuit System Programming (ICSP) header can power the AT25M01 SPI flash EEPROM (1.7–5.5V) only, isolated from the rest of the system via 1N4148 Diode.
Maxim DS1818-5 “3.3V EconoReset with Pushbutton” handles holding RESET active-low during power-on, brown-out, and when a RESET button is pressed.
Memory mapping is controlled by BIFRÖST, so it may be reconfigured. Currently, everything is RAM except 0xD000–DFFF.
0xD400 SID (nobomi ARMSID)0xDC00 VIA1 (WDC 65C22)0xDC10 VIA2 (WDC 65C22)0xDC20 UART (NXP SC28L92)This roughly matches Commodore 64's I/O space.
R26 (0 ohm) and R27 (open) labels are swapped. The one closer to LT3030 vreg is R26 and should be 0 ohm (jumper/shorted). The one further from the LT3030 vreg is R27 and should be open (not connected).
EEPROM triple drama:
RESET lines for BIFRÖST FPGA and the 6502 system are coupled. This is a terrible idea; BIFRÖST needs to reset the CPU without resetting itself. Workaround: use a knife to physically cut the RESET trace coming from top-right pin of RESET switch, next to pin 1 of ARMSID, and then airwire from EXT[0] to 6502 RESET.
| Qty | Value | Footprint | References |
|---|---|---|---|
| 22 | 0.1μF | pda6502v2:C_0805_2012Metric_Pad1.18x1.45mm_HandSolder | C1, C2, C3, C10, C11, C14, C15, C16, C17, C22, C23, C24, C25, C26, C27, C32 +6 |
| 9 | 1K | pda6502v2:R_0805_2012Metric_Pad1.20x1.40mm_HandSolder | R28, R29, R30, R31, R32, R33, R34, R35, R36 |
| 8 | LED | pda6502v2:LED_0805_2012Metric_Pad1.15x1.40mm_HandSolder | D3, D4, D5, D6, D7, D8, D9, D10 |
| 7 | 10K | pda6502v2:R_0805_2012Metric_Pad1.20x1.40mm_HandSolder | R1, R2, R3, R4, R21, R22, R23 |
| 2 | 10nF | pda6502v2:C_0805_2012Metric_Pad1.18x1.45mm_HandSolder | C18, C19 |
| 2 | 10uF | pda6502v2:C_0805_2012Metric_Pad1.18x1.45mm_HandSolder | C20, C21 |
| 2 | 10uF | pda6502v2:CP_EIA-3528-15_AVX-H_Pad1.50x2.35mm_HandSolder | C29, C30 |
| 2 | 1800 pf | pda6502v2:C_0805_2012Metric_Pad1.18x1.45mm_HandSolder | C28, C31 |
| 2 | W65C22SxP | pda6502v2:DIP-40_W15.24mm | U2, U3 |
| 1 | 0 | pda6502v2:R_0805_2012Metric_Pad1.20x1.40mm_HandSolder | R26 |
| 1 | 100uF | pda6502v2:CP_Radial_D5.0mm_P2.00mm | C12 |
| 1 | 10uF | pda6502v2:CP_Radial_D5.0mm_P2.00mm | C13 |
| 1 | 1N4148W | Diode_SMD:D_SOD-123 | D11 |
| 1 | 1N5819 | Diode_THT:D_DO-41_SOD81_P10.16mm_Horizontal | D1 |
| 1 | 243k | pda6502v2:R_0805_2012Metric_Pad1.20x1.40mm_HandSolder | R25 |
| 1 | 255k | pda6502v2:R_0805_2012Metric_Pad1.20x1.40mm_HandSolder | R24 |
| 1 | 3.6864 MHz | pda6502v2:Oscillator_SMD_5.0x3.2mm_HandSolder | X2 |
| 1 | 8 MHz | pda6502v2:Oscillator_SMD_5.0x3.2mm_HandSolder | X1 |
| 1 | ARMSID | Package_DIP:DIP-28_W15.24mm_Socket | U6 |
| 1 | AS6C4008-55PCN | Package_DIP:DIP-32_W15.24mm | U5 |
| 1 | AT25M01 | Package_SO:SOIC-8_3.9x4.9mm_P1.27mm | U7 |
| 1 | Conn_02x04_Odd_Even | Connector_PinHeader_2.54mm:PinHeader_2x04_P2.54mm_Vertical | J5 |
| 1 | DS1818 | Package_TO_SOT_SMD:SOT-23_Handsoldering | U4 |
| 1 | FPGA_EXT | Connector_PinHeader_2.54mm:PinHeader_2x08_P2.54mm_Vertical | J8 |
| 1 | GPIO1 | Connector_PinHeader_2.54mm:PinHeader_2x12_P2.54mm_Vertical | J1 |
| 1 | GPIO2 | Connector_PinHeader_2.54mm:PinHeader_2x12_P2.54mm_Vertical | J2 |
| 1 | ICE40HX4K-TQ144 | Package_QFP:TQFP-144_20x20mm_P0.5mm | U8 |
| 1 | ICSP | Connector_PinHeader_2.54mm:PinHeader_2x03_P2.54mm_Vertical | J6 |
| 1 | LED | LED_THT:LED_D3.0mm | D2 |
| 1 | LOGO | pda6502v2:pda6502_v2_silk | G*** |
| 1 | LOGO | pda6502v2:PA_initials | G*** |
| 1 | LOGO | pda6502v2:pda6502_v2_mask | G*** |
| 1 | LT3030 | Package_SO:HTSSOP-20-1EP_4.4x6.5mm_P0.65mm_EP2.85x4mm | U10 |
| 1 | SC28L92A1B | Package_QFP:PQFP-44_10x10mm_P0.8mm | U11 |
| 1 | SID | Connector_PinHeader_2.54mm:PinHeader_2x04_P2.54mm_Vertical | J9 |
| 1 | SPI | Connector_PinHeader_2.54mm:PinHeader_2x10_P2.54mm_Vertical | J7 |
| 1 | SW_Push | Connector_PinHeader_2.54mm:PinHeader_1x02_P2.54mm_Vertical | SW2 |
| 1 | SW_Push | Button_Switch_THT:SW_PUSH_6mm_H5mm | SW1 |
| 1 | Screw_Terminal_01x02 | TerminalBlock_Phoenix:TerminalBlock_Phoenix_MPT-0,5-2-2.54_1x02_P2.54mm_Horizontal | J4 |
| 1 | TLV1117-33 | Package_TO_SOT_SMD:SOT-223 | U9 |
| 1 | UART | Connector_PinHeader_2.54mm:PinHeader_2x06_P2.54mm_Vertical | J3 |
| 1 | W65C02SxP | pda6502v2:DIP-40_W15.24mm | U1 |
| 1 | open | pda6502v2:R_0805_2012Metric_Pad1.20x1.40mm_HandSolder | R27 |
The 90 most common of 94 parts.
It measures 100 × 100 mm and has 4 copper layers, 1.6 mm thick.
94 parts, built around the ICE40HX4K-TQ144, AS6C4008-55PCN, DS1818-5+ and SC28L92A1B. 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.
From the pda/pda6502v2 repository on GitHub, at the commit this page was made from: the board is kicad/pda6502v2.kicad_pcb and its schematic kicad/pda6502v2.kicad_sch. PCBKit opens the board in the browser, with nothing to install.
Its repository states no licence, so its author keeps all rights: ask pda before reusing the design.

agranlund/raven
Homemade MC68060 + DSP56303 Atari-compatible computer. Hardware, firmware, and software stack


fachat/csa_ultracpu
The CPU board for a 17MHz Colour-PET clone with modern interfaces


oomlout/oomlout_oomp_project_bot_v_2

alexanderenrique/denton-rain-maker
Four-channel 24 VAC ESP32 sprinkler controller — KiCad schematic/PCB for Denton's Rainmaker

nguyenduchan/fiberboard
Fiberboard là bo mạch điều khiển logic tích hợp (AIO), không có driver stepper Nema. Cùng chức năng module ESP32 công nghiệp thông dụng: 4 ngõ vào cách ly + 4 relay + RS485.
