# Glueing bits by hand: Building an Apple 2 clone on FPGA from scratch

- Speaker: [Shachar Shemesh](/wiki/speakers/shachar-shemesh.md)
- Event: [Reversim Summit 2022](/wiki/years/2022.md)
- Video: https://www.youtube.com/watch?v=_ajfVpwXdTA
- Transcript: [/transcripts/2022/55-_ajfVpwXdTA.md](/transcripts/2022/55-_ajfVpwXdTA.md)
- Language: Hebrew · Type: talk · Level: intermediate
- Topics: [Performance](/wiki/topics/performance.md), [Software Engineering](/wiki/topics/software-engineering.md), [IoT](/wiki/topics/iot.md), [Infrastructure](/wiki/topics/infrastructure.md)

> Written by an LLM from machine transcripts. It can contain errors. Check the transcript before you quote it.

## Summary

The speaker shares the journey of building an Apple II computer clone from scratch on an affordable FPGA board, primarily driven by a desire to learn digital hardware design. By studying historical data sheets and designing custom test harnesses, the speaker implemented a 6502 processor core and basic I/O interfaces. The talk highlights the immense learning value of tackling seemingly irrational and overly ambitious engineering projects. Ultimately, the speaker demonstrates that hands-on hardware exploration is a deeply rewarding way to master a new technical domain.

## Key points

- [3:28](https://www.youtube.com/watch?v=_ajfVpwXdTA&t=208s) The speaker decided to build an Apple II computer from scratch using an FPGA instead of using existing emulators or purchasing original hardware.
- [4:28](https://www.youtube.com/watch?v=_ajfVpwXdTA&t=268s) An FPGA is a blank-slate chip with programmable logic gates that allows developers to implement custom hardware designs.
- [9:37](https://www.youtube.com/watch?v=_ajfVpwXdTA&t=577s) A basic 1980s computer architecture consists of a CPU connected via a bus to memory and I/O devices.
- [11:44](https://www.youtube.com/watch?v=_ajfVpwXdTA&t=704s) The speaker chose to implement the MOS 6502 microprocessor, which powered most popular 8-bit computers of that era.
- [14:58](https://www.youtube.com/watch?v=_ajfVpwXdTA&t=898s) Using simulation tools like Vivado, the speaker tested the processor design cycle-by-cycle before deploying it to hardware.
- [17:06](https://www.youtube.com/watch?v=_ajfVpwXdTA&t=1026s) An Arduino Mega was utilized as a bridge to interface with physical 6502 chips and verify behavior via Python scripts.
- [25:03](https://www.youtube.com/watch?v=_ajfVpwXdTA&t=1503s) The speaker successfully booted AppleSoft BASIC on the custom FPGA setup with a terminal interface and audio output.

## Takeaways

- Choose ambitious, seemingly crazy projects as a vehicle for mastering completely new technical domains.
- Use hardware simulation tools to test and debug designs before deploying them to physical chips.
- Rely on historical data sheets and open-source specifications when attempting to recreate legacy computer architectures.

## Questions this talk answers

- How can you test and verify an FPGA processor design against a physical CPU?
- What are the steps to implement a retro 8-bit CPU on a modern budget FPGA board?
- How do you handle I/O mapping and memory address spaces when cloning legacy hardware?

## Technologies

FPGA, Apple II, Arduino, Python, Vivado, DDR3, USB, UART, HDMI

## Tags

assembly, embedded systems, fpga, hardware design, retro computing, reverse engineering
