• Stars
    star
    475
  • Rank 92,465 (Top 2 %)
  • Language
    C
  • License
    MIT License
  • Created over 8 years ago
  • Updated over 7 years ago

Reviews

There are no reviews yet. Be the first to send feedback to the community and the maintainers!

Repository Details

A Z80 retro computer without the retro baggage

Alt text

Alt text

FAP80, A retro computer without the retro baggage

FAP80 is a Z80-based retro computer with a sprinkling of modern twists to make the experience of designing, programming, and debugging this computer as painless and straightforward as possible.

A lot of retro computer projects today are rooted on nostalgia, they tend to use “period correct” components to get the “feelings” right, and the result often ends up on perfboard or self-etched circuit boards, rudimentary video capacity if at all, few I/O ports, and a sea of 74 series chips.

While there is nothing wrong with that, I wasn’t around during the 80s home computer era, so I didn’t have the same attachment to how things was done back then. So instead of trying to recreate the “good old days”, I made the decision to liberally use modern parts to simplify the design process, employing configurable logics such as FPGA, CPLD and microcontrollers, making this computer highly flexible and easy to program with very little overheads.

The project started life hand-assembled, but now lives properly on PCBs because of noise problems.

Project Blog

See my blog for detailed write-ups about this project.

And here is a video of it in action, running a Twitch IRC client.

Specification

Overview

  • 8MHz CMOS Z80
  • 5-slot active backplane, USB powered
  • 32KB ROM, 16KB RAM, 16KB double buffered VRAM
  • 64 color 640x480 VGA graphics
  • PS/2 keyboard, ESP8266, SD card, I2C EEPROM, RTC, UART, Timers

Active Backplane

  • 3.3V bus allows modern peripherals
  • All Z80 signals on bus
  • managed by STM32 microcontroller
  • Z80 clock from PWM channel
  • speed variable from single step to 8MHz
  • breakpoints and traces
  • read/write into EEPROM/RAM directly
  • interrupt chaining supported
  • bus address and data display on LCD
  • pushbutton for Z80 reset, single step, run/stop, etc.

CPU Board

  • All signals buffered and shifted to 3.3V

Memory Board

  • 32KB ROM
  • 16KB RAM
  • buffered output
  • ROM write-protected during normal execution

Video Card

  • FPGA based
  • 64 colors
  • 640x480 VGA output
  • 80x30 codepage 437 text mode
  • 16KB double-buffered VRAM, or 32KB unbuffered
  • bitmap or sprite mode can be implemented easily

I/O Board

  • CPLD based
  • STM32 IO/interrupt controller
  • all interrupt modes supported
  • 16 ports
  • 2 UARTs
  • I2C EEPROM
  • SD card
  • RTC
  • PS/2 Keyboard

Design philosophy

As I said above I made the decision to use modern parts for simplicity and flexibility in the design. Take the active backplane for example, the entire bus is connected to a STM32 microcontroller, which drives Z80 clock via one of its PWM channels. At the same time the uC monitors the contents on the bus, so setting breakpoints or obtaining execution traces can be easily done. The uC can also reset the Z80, or even take over the bus and read/write directly into EEPROM and RAM.

Notice how a cheap modern part eliminates the need for separate reset circuitry, clock circuitry, debugger, and EEPROM programmer. And because the uC is programmable, it can be customized even after hardware design is done.

Similarly, a FPGA replaces the VDC, a CPLD replaces 2 dozens of 74 chips, and another STM32 is used as I/O and interrupt controller. This gives an enormous amount of flexibility to suit individual needs. Text mode graphics too limited? Write your own sprite/bitmap mode. Want more I/O ports or a different interrupt mode? Just modify the CPLD code. The ability to be able to continue expand and evolve the capability of the computer without having to change the hardware becomes an exciting aspect as a result.

I also intended this project as a study in embedded development as it involves a little bit of everything: microcontrollers, FPGAs, CPLDs, digital circuits, PCB design and fabrication, surface mount soldering, setting up cross assembling/compiling environment, assembly programming, and a lot others that I couldn't think of at the moment. Yes it's harder to put together than a through-hole kit, but it was all part of the challenge.

Current Progress

Finished

  • Current hardware design
  • Firmware for all uC/FPGA/CPLD
  • Python script for program upload
  • Cross assembler setup
  • SDCC setup
  • Simple print functionalities in C and assembly
  • Write an IRC client for FAP80

In Progress

  • Finish up project documentation

Planned

  • A new memory board with 32MB flash memory for both ROM and RAM and a CPLD controller for configurable memory decoding and paging
  • A new VGA video card with on-board FPGA instead of using Mojo V3 with larger VRAM and more interrupt options

Getting Started

See doc folder

Acknowledgments

  • This project is heavily inspired by Quinn Dunki’s Veronica, a 6502-based retro computer.

  • FAP stands for FPGA Assisted Processor, inspired by Steve Ciarcia's 1981 book Build Your Own Z80 Computer, in which he called his computer ZAP, short for Z80 Application Processor.

More Repositories

1

daytripper

Hide-My-Windows Laser Tripwire
C
3,675
star
2

Nintendo_Switch_Reverse_Engineering

A look at inner workings of Joycon and Nintendo Switch
C
3,437
star
3

bob_cassette_rewinder

Renew and Refill Bob Cassettes for 98% Cost Saving!
C
1,441
star
4

duckyPad

Do-It-All Mechanical Macropad
C
1,200
star
5

pimp_my_microwave

Installing a RGB mechanical keypad on my microwave.
C++
493
star
6

Amazon_Dash_Button

Components and pinouts of Amazon Dash Button
C
361
star
7

STM32_tutorials

STM32 tutorial with STM32Cube and Keil MDK-ARM
C
340
star
8

exixe

Miniature driver modules for IN-12 and IN-14 Nixie tubes
C
234
star
9

USB4VC

USB Keyboard/Mouse/Gamepads on Retro Computers!
C
203
star
10

RGBeeb

BBC Micro in an ATX PC case!
HTML
168
star
11

ATX4VC

Replace aging vintage computer power supply with modern ATX PSU
C
99
star
12

PicoRC

PicoPSU adaptor for retro computers
Python
87
star
13

gc3ds

an adaptor that let you use Nintendo GameCube controller on Nintendo 3DS consoles.
C++
84
star
14

facepunch

Raspberry Pi based facial recognition punch clock
Python
81
star
15

Powerduino

A user-programmable power strip with energy monitoring and wireless connectivity.
77
star
16

joyAnalog

Custom board for Joycon input automation
C
57
star
17

3xtDS

3DS Streaming Console with External Control Interface.
C++
51
star
18

duckyPad-profile-autoswitcher

Python
48
star
19

Kentucky_Route_Zero_Official_Developer_Wiki

Official Internal Developer Wiki for Kentucky Route Zero
Shell
43
star
20

duckyPad-Pro

Advanced Input Automation with duckyScript
C
34
star
21

exixe_clock

GPS-disciplined high-accruacy Nixie tube clock using exixe modules.
C
27
star
22

Modeck

A physical control panel for Twitch Broadcasters
Eagle
17
star
23

PulseHPT

C
15
star
24

Poke-O-Matic

Automatic shiny finder / breeder for Pokemon X/Y
C
14
star
25

traffic-cone-film-scanning

Shell
13
star
26

Vintage_Computer_ROM_Dumps

ROM Dumps of my retro hardwares
Python
12
star
27

hirc

A simple command line IRC client for Twitch chat.
Python
6
star
28

Twitch_Chatlogs

Twitch chat logs of major Twitch events, and the chat logger itself.
Python
4
star
29

dekunukem.github.io

github webpage test
HTML
3
star
30

usb4vc-configurator

Update and add custom gamepad mappings to USB4VC with this cross-platform configurator!
Python
3
star
31

duckyPad-expansion-modules

C
2
star