





Motorola 68000 homebrew computer with actual PCI bus
I've been studying the PCI bus on my own and one evening I got an idea about making a homebrew computer with an actual PCI bus. I've never seen one, so I decided to try it myself. I also wanted to learn about the PCI bus in a practical way. I chose the Motorola 68000 CPU because of its balance in complexity - it's easy to interface, has nice performance/capabilities and has official GCC toolchain support.
The project began literally a month ago when I got a scrap lot from my friend Shadowdestroyer777 (huge thanks!) containing an industrial Motorola 68000 SBC and some old dead motherboards. I desoldered the SBC for the CPU and a few other parts. From one motherboard I grabbed connectors, ISA/PCI slots and many other things. One evening when I had everything on my desk (the CPU, the PCI slots and even a spare prototype PCB), the idea was born. Right before this project, I worked on an experimental PCI FPGA card, so I had a bit of practical PCI experience beforehand. I even read most of "PCI System Architecture" by MindShare!
The specs of this homebrew:
- Motorola 68000 @ 10 MHz
- 1 MB of SRAM
- 4 KB of ROM (just to fit an serial bootloader)
- MC68681P DUART for UART, timing and I/O
- Two 32-bit 5V PCI slots, interrupt capable, no bus mastering (DMA). Runs at the same frequency as the CPU (10 MHz)
- Spartan 2 FPGA XC2S100 as the PCI host bridge
- XC95144XL CPLD as the glue logic
- ATMega128 (used solely to quickly load the FPGA bitstream on boot)
As the base, I used an 18x12 cm prototype PCB. Connections were made using enameled wire, just like in my previous 486 homebrew project. To fit the PCI slots into the prototype board, I actually had to bend the PCI slot pins to fit the 2.54 mm grid! Don't even ask about this manually adapted FPGA... It's another story - it just works.
I won't go into detail here on exactly how the PCI bus works and what I had to do, but generally, the bridge translates CPU accesses into PCI accesses. It maps memory 1:1 and for the I/O and configuration spaces, I do some translation tricks. It's all done inside the XC2S100 FPGA in VHDL. In addition to basic accesses, PCI hardware interrupts also work. I omitted DMA mainly because I ran out of pins on the FPGA. There were various challenges in this process, like the different endianness (PCI is designed around little-endian systems, while the Motorola 68000 is big-endian). I’ve shared all the source code on GitHub and more details on my website.
So, thanks to my efforts, I managed to support 3 types of card:
- Serial PCI card: I had a Moschip NM9835 dual serial port card. It was a nice test target because it's 16C550 UART compatible, making it relatively simple to write a driver for. With this card, I also got hardware interrupts to work so on serial receive, the CPU handles it nicely.
- VGA graphics cards: For me, these are one of the coolest parts. I managed to "wake up" three cards: a Cirrus Logic GD5440, an S3 Trio64V2/DX (S3 86C775) and partially an IGS IGA 1680_A. The thing is, I can't execute their VBIOSes because of the architecture mismatch. However, there is some documentation on the internet that shows how to wake these cards up. After waking them up, they program like standard VGA cards - it all comes down to standard VGA initialization (like programming the CRTC, DAC, etc). I got 80x25 16-color text and 320x200 256-color graphics modes to work perfectly!
- RTL8029 network card: With the help of AI (as I was exhausted from working on the homebrew - soldering, designing the logic, etc. and I just wanted to see what was possible with the correct software), I got this homebrew on the internet! I got an RTL8029 driver, a simple network stack, telnet and a http server to work. I can say that I got a 10 MHz CPU from the 80s to serve a web page over a 32-bit PCI network card from the end of 90s.
The lack of DMA is quite limiting as I can't use cards that depend on it, such as later network adapters, SCSI controllers, USB controllers and more. However, for my first project like this, I think it's pretty good anyway. Honestly, it's crazy to think about (even for me) that I got an '80s CPU to work well with late '90s PCI hardware and serve a webpage. All in one month of hard work.
I also wrote a massive, detailed article on my website about this project, including my previous experimental PCI card, a brief PCI introduction, the build process and the results. This is just a very short description of the project, but I wanted to share it!
Project site: https://maniek86.xyz/projects/homebrew_m68k_pci.php