FPGA 6502 (Apple IIe and C64)

From Stm32World Wiki
Jump to navigation Jump to search


The project recreates an Apple IIe and a Commodore 64 on a single FPGA. Both machines share a home-made, cycle-accurate 6502 core, a common HDMI video path and a CPU clock you can configure at run time. You can stop the machine, step it one cycle or one instruction at a time, and watch the address bus, data bus and control signals on LED boards. Floppy images will be read from an SD card.

Along the way there is an Apple-1 style machine with Integer BASIC. It runs on the Colorlight i5 and on the much smaller iCESugar v1.5 (iCE40UP5K), where it has been tested on real hardware.

The code lives in lbthomsen/6502-fpga on GitHub. It is written in plain Verilog, simulated with Verilator and built with the open-source yosys / nextpnr / Project Trellis / IceStorm toolchain.

Status

Milestone State
Board bring-up: clock control, LED/button boards, HDMI test pattern Done. Verified in simulation and the bitstream builds; not yet tested on hardware.
6502 core, all 256 NMOS opcodes (documented and undocumented) Done. Passes Klaus Dormann's functional test and all 2.56 million of Tom Harte's cycle-by-cycle tests.
Apple-1 style machine: own monitor, Integer BASIC, serial terminal Done. Running on a real iCESugar v1.5 and a real Colorlight i5.
Apple-1 screen on HDMI (Colorlight) Done in simulation (the screen text is read back from the decoded HDMI signal); bitstream builds and meets timing. Not yet tried on a monitor.
65C02 option (for the enhanced IIe) Next
Apple IIe: memory map, soft switches, text/lores/hires video, keyboard Planned
Commodore 64: PLA banking, VIC-II, 2 × CIA, SID Planned
SD card (SPI) with floppy images: Disk II (IIe) and 1541 (C64) Planned
IIe auxiliary memory and disk buffers in SDRAM Planned

Hardware

FPGA board

The target is a Colorlight i5 (revision 7.0) on the Colorlight extension board:

  • Lattice ECP5 LFE5U-25F-6BG381C: 24k LUT4, 56 × 18 kbit block RAM (about 112 KB)
  • 25 MHz oscillator (pin P3)
  • 8 MB SDRAM (EM638325, 32 bit)
  • HDMI connector on the extension board, driven directly from FPGA pins (DVI signalling)
  • UART through the extension board's debugger

Block RAM is enough for either machine's 64 KB of RAM plus its ROMs. Anything larger, such as the IIe's 64 KB auxiliary RAM or whole disk images, goes in SDRAM.

iCESugar v1.5

The iCESugar v1.5 runs the Apple-1 style machine:

  • Lattice iCE40UP5K-SG48: 5,280 LUT4, 128 KB SPRAM, 30 × 4 kbit block RAM, 12 MHz oscillator (pin 35)
  • The iCELink USB interface (pins: UART_TX P4, UART_RX P6, with the J5 jumpers fitted) gives a serial port (/dev/ttyACM0) and programming. icesprog writes the SPI flash when the J3 jumpers are set to "Prog flash".
  • RGB LED on pins 39 (blue), 40 (red) and 41 (green), active low. DIP switch on pins 18-21, shared with PMOD4.
Header Use
PMOD1 Not available: shares pins 4 and 6 with the serial port (and USB)
PMOD2 LED board. DIP switches 1-2 select: address high, address low, data, or status
PMOD3 Button board, with the same functions as on the Colorlight
PMOD4 Only 4 signals (the DIP switch)

The iCE40 has pull-ups but no pull-downs. The button pins therefore use pull-ups: when no button board is fitted, all eight read high and the design ignores them. When a board is fitted, its 10k pull-downs override the weak pull-ups, so the buttons read normally. The RGB LED is green while the CPU runs and red while it is stopped or stepping.

LED / button boards

The extension board groups its I/O in eights, each group with its own 3.3 V and GND. The LED/button boards (see ColorLight I5) plug into one group each. Every channel is a single FPGA pin with a button, an LED and a MOSFET:

  • As an output, driving the pin high turns on the MOSFET and the LED.
  • As an input, the button pulls the pin to 3.3 V. A 10k pull-down holds it low otherwise, and the 220 Ω / 100 nF network filters it. The LED lights while the button is pressed. The FPGA input has no internal pull (PULLMODE=NONE), and the design also debounces each button digitally for 10 ms.

The extension board's headers P2 to P6 are 2 × 15 pins. Each header carries two 8-signal groups: A (the upper half, pins 1-6 and 25-30) and B (the lower half, pins 10-21). Each group has its own 3V3 and GND, and takes one I/O board. Channel n of a board is IOn+1 of its group, the standard PMOD order, as on the iCESugar. The pin names come from Tom Verbeure's extension board pin mapping.

Header group litex name Use FPGA pins IO1 → IO8
P2B pmodd LEDs: address bus A15..A8 (channel 0 = A8) G20 K20 L20 N18 J20 L18 M18 N17
P3A pmode LEDs: address bus A7..A0 (channel 0 = A0) A18 A19 B19 D20 C17 B18 B20 F20
P3B pmodf LEDs: data bus D7..D0 (channel 0 = D0) E2 D2 B1 A3 D1 C1 C2 E3
P4A pmodg LEDs: status H3 F3 E4 E1 H4 G3 F1 F2
P5A pmodi Buttons: clock control D17 D16 E6 F4 D18 G5 F5 E5
P6A, P6B pmodk, pmodl Reserved: SD card, keyboard

The button inputs have the ECP5's internal pull-downs enabled. Without a button board they read "not pressed". (Before that fix, floating inputs made the clock controller see random presses, so the CPU crawled along at a few Hz.)

These groups are deliberately left free:

  • P2A (pmodc) shares pins with the on-module LED and the reset button.
  • P4B (pmodh) has only 6 usable pins.
  • P5B (pmodj) shares pins with the UART.

Status LEDs (P4A)

Channel Signal Meaning
0 sync The current bus cycle is an opcode fetch
1 rw High = read, low = write
2 cpu_ce Flashes for each CPU cycle (stretched to about 40 ms so single steps are visible)
3 running The CPU clock is running (not stopped or stepping)
4..6 speed Selected speed 0..7 (binary, channel 4 = LSB)
7 heartbeat Blinks at about 0.75 Hz while the FPGA is configured

Buttons (P5A)

Channel Function
0 Run / stop
1 Step one CPU cycle (when stopped)
2 Step one instruction: run until the next opcode fetch (when stopped)
3 Slower
4 Faster
5 Reset
6 Next video test pattern (bring-up only)
7 Unused

Architecture

One clock, many enables

Everything runs on a single system clock (25 MHz in the bring-up design; the machines will use a multiple of their master clock). Nothing uses a derived clock. The CPU and its bus peripherals advance only on clock cycles where cpu_ce is high. That makes stopping, stepping and slowing the CPU trivial, and the video keeps running while the CPU is halted, so the screen stays up while you single-step.

                 +------------------+
 machine_ce ---->|                  |
 sync (CPU) ---->|  clock_control   |----> cpu_ce ----> 6502 core, RAM, I/O
 buttons ------->|                  |----> running, speed_sel ----> status LEDs
                 +------------------+

 video_timing ----> machine video ----> dvi_out ----> HDMI      (never gated)

clock_control

rtl/common/clock_control.v produces cpu_ce:

Speed Rate
0 1 Hz
1 2 Hz
2 5 Hz
3 10 Hz
4 100 Hz
5 1 kHz
6 10 kHz
7 Full machine speed (follows machine_ce)
  • Speeds 0 to 6 come from a 32-bit phase accumulator (inc = hz × 232 / CLK_HZ), so any rate can be added.
  • At speed 7, cpu_ce is exactly the machine's own enable (for example 1.0205 MHz for the Apple IIe, or 0.985 MHz for a PAL C64). The CPU then stays cycle-locked to the video, as it does on the real hardware.
  • Step cycle issues exactly one cpu_ce.
  • Step instruction issues cpu_ce at the machine rate until at least one cycle has completed and the CPU presents SYNC (the next opcode fetch). The LEDs then show the address of the next instruction, with sync lit.
  • The step buttons are ignored while running. Speed changes take effect immediately.

The power-on state is running at full speed.

Video

The HDMI connector is driven as plain DVI:

  • video_timing: 640 × 480 at 60 Hz (800 × 525 total, negative syncs). It uses a 25 MHz pixel clock, which most monitors accept in place of 25.175 MHz.
  • tmds_encoder: the DVI 1.0 8b/10b TMDS encoder, with transition minimisation and DC balancing.
  • dvi_out: three encoders plus 10:1 serialisers. Each channel shifts 2 bits per 125 MHz clock into an ODDRX1F DDR output cell, giving 250 Mbit/s per lane. The TMDS clock lane sends 0000011111.
  • The P pins are declared LVCMOS33D, so the ECP5 generates the N side of each pair.

The machines' native resolutions will be scaled into the 640 × 480 frame. The Apple II's 280 × 192 (560 × 192 in double hires) doubles neatly to 560 × 384.

6502 core

rtl/cpu/cpu_6502.v is a cycle-accurate NMOS 6502 written from scratch. It implements all 256 opcodes, documented and undocumented. Every bus cycle of the real chip is reproduced:

  • dummy reads, such as the read of the next byte during implied instructions, and the read at the un-fixed address when indexing crosses a page
  • the dummy write of read-modify-write instructions (the old value is written back before the new one)
  • the page-crossing penalty cycles of indexed reads and taken branches
  • the 7-cycle reset and interrupt sequences

Further details:

  • NMOS decimal mode is exact, including the N, V and Z flags after decimal ADC and the results for invalid BCD digits.
  • Interrupts are polled on the second-to-last cycle of each instruction, as on the real chip. This reproduces its quirks: SEI or CLI take effect one instruction late, and a taken branch that doesn't cross a page delays an IRQ. An NMI that arrives during a BRK or IRQ sequence takes over its vector.
  • NMI is edge-triggered and IRQ is level-triggered. RDY stalls read cycles only (writes complete), like the NMOS part.

Undocumented opcodes

The undocumented opcodes fall out of the NMOS decode logic, and many C64 programs depend on them. They are all implemented:

Group Opcodes Behaviour
Read-modify-write combinations SLO, RLA, SRE, RRA, DCP, ISC The full read-modify-write cycle sequence (including the dummy write), then ORA, AND, EOR, ADC, CMP or SBC with the written value
Load and store LAX, LAS, SAX LAX loads A and X; LAS loads A, X and S with memory AND S; SAX stores A AND X
Immediate ANC, ALR, ARR, SBX, SBC ($EB) ARR includes the NMOS decimal-mode adjustment and its odd V and C flags
"Unstable" ANE, LXA Use the magic constant $EE. It varies between real chips; $EE is the value Tom Harte's tests were recorded with (derived from all 10,000 tests of each).
"Unstable" stores SHA, SHX, SHY, TAS Store the register AND (address high byte + 1). When indexing crosses a page, that value also replaces the address high byte, as on the real chip. TAS also sets S = A AND X.
NOPs 27 of them Use their real addressing modes, including the read of the operand and the page-crossing cycle
JAM 12 of them Lock the CPU until reset, with the real chip's bus pattern: reads of $FFFF, $FFFE, $FFFE, then $FFFF forever

Bus interface

              +-----------------+
 clk -------->|                 |----> addr[15:0]    (combinational from state)
 rst -------->|                 |----> data_out[7:0]
 ce --------->|    cpu_6502     |----> rw            (1 = read)
 rdy -------->|                 |----> sync          (opcode fetch)
 irq_n ------>|                 |<---- data_in[7:0]
 nmi_n ------>|                 |
 load_state ->|                 |----> reg_pc, reg_a, reg_x, reg_y, reg_s, reg_p
              +-----------------+
  • addr, rw, data_out and sync describe the bus cycle in progress. They are stable while ce is low.
  • A cycle completes on a clock edge with ce high. On a read, data_in is sampled on that edge. On a write, memory stores data_out on that edge.
  • With synchronous block RAM, the RAM output becomes valid one clock after the address settles. So ce may be high at most every other clock, which is always true at real machine speeds.
  • reg_* expose the registers for the debugger and the LED boards. load_state loads all registers and starts an opcode fetch at load_pc; the tests use it, and a debugger could too.

Verification

Test Result
Klaus Dormann's 6502 functional test, all documented opcodes, binary and decimal arithmetic Reaches the success trap at $3469: 30.6 million instructions, about 96 million cycles
Tom Harte's single-step tests (SingleStepTests/65x02, NMOS 6502), 10,000 per opcode for all 256 opcodes, documented and undocumented. The tests were recorded from a real chip. 2,560,000 of 2,560,000 pass. Every bus cycle's address, data and direction match, as do the final registers and memory.
Reset 7 cycles, then a fetch from the reset vector; S = $FD, I set

The Harte testbench was itself checked by planting a bug: making ROR shift in 0 instead of carry failed exactly the five ROR opcodes, in about half of their tests (those with carry set), and nothing else.

Size

LUT4 FF Fmax
cpu_6502 on ECP5 (place and route of the core alone, speed grade 6) about 1,900 108 60 MHz
cpu_6502 on iCE40 (synthesis) about 1,770 108 –

The undocumented opcodes add about 300 LUTs. Decimal mode costs almost nothing. Most of the logic is the instruction decode and the address and register multiplexers, which leaves room to shrink it later if LUTs get tight.

Apple-1 style machine

A small machine in the style of the Apple-1: the 6502, RAM, ROM, and an Apple-1 compatible PIA whose keyboard and display are a serial terminal. It was the quickest way to get the CPU running real software on real hardware, and it fits on both boards.

Address Contents
$0000-$CFFF RAM, 52 KB
$D010-$D013 PIA: KBD, KBDCR, DSP, DSPCR (as on the Apple-1)
$E000-$EFFF Apple-1 Integer BASIC (if fetched, see below)
$F800-$FFFF Monitor

HDMI screen (Colorlight)

On the Colorlight, everything the machine prints also appears on the HDMI output, like an Apple-1 on a TV. rtl/video/text_screen.v is a 40 × 24 character terminal at 640 × 480:

  • 16 × 20 pixel character cells, with a 5 × 7 font drawn in 2 × 2 pixels. The font is original to this project, generated by rtl/video/make_font.py.
  • Upper-case characters $20-$5F; lower case is shown as upper case.
  • The Apple-1's blinking @ cursor, and scrolling at the bottom (a circular row offset, so only the new line is cleared).
  • Ctrl-L clears the screen, like the Apple-1's separate CLEAR SCREEN key. Backspace moves the cursor left (the monitor uses it for rubout).
  • The CPU waits for the screen just as it waits for the serial port, so nothing is lost.

The keyboard is still the serial terminal. tb_apple1_hdmi checks the screen by reading the text back from the decoded HDMI signal: each character cell of the captured frame is matched against the font.

Terminal

Connect at 115200 8N1 to the board's USB serial port (/dev/ttyACM0 on both boards), for example microcom -p /dev/ttyACM0 -s 115200.

  • Input is converted as an Apple-1 keyboard would: lower case becomes upper case, backspace and delete become _ (the Apple-1 rubout), and line feeds are dropped.
  • Output: carriage return becomes CR LF.
  • A 256-character type-ahead buffer keeps keys typed while the CPU is busy.
  • Ctrl-R resets the CPU, like the Apple-1's RESET key.

Monitor

The monitor (firmware/monitor/monitor.s, 450 bytes) is an original program, not Apple's. It accepts the Woz Monitor's command syntax, so Apple-1 instructions and listings work with it:

Command Action
XXXX Examine the byte at XXXX
XXXX.YYYY Dump XXXX to YYYY, 8 bytes per line
.YYYY Dump from the last examined address to YYYY
XXXX: AA BB ... Store bytes from XXXX (: AA BB continues)
XXXXR Run the program at XXXX. It may return to the monitor with RTS.

Several commands may share a line, and Escape cancels the line. Programs can call a stable entry table: $F803 put_char, $F806 get_char, $F809 put_hex_byte, $F80C put_string.

Integer BASIC

E000R starts Steve Wozniak's Apple-1 Integer BASIC, and E2B3R re-enters it without clearing the program. Apple's code is not stored in the repository. firmware/apple1_basic/fetch.sh downloads it as source (Eric Smith's disassembly, adapted to ca65 by Jeff Tranter), and the build assembles it into the ROM with HIMEM set to $D000 instead of $1000, which gives programs the full 52 KB.

BASIC treats a key pressed while it is working as "break", exactly as on the Apple-1. Wait for the > prompt before typing the next line, or paste with a per-line delay.

On the iCESugar

A session on the real board (scripts/apple1_terminal_test.py):

6502-FPGA MONITOR
\300: A9 48 20 03 F8 A9 49 20 03 F8 60
0300:2B
\300R
0300:A9
HI
\10: 42
0010:FE
\320: A7 10 20 09 F8 8A 20 09 F8 60      (LAX $10 - an undocumented opcode)
0320:0B
\320R
0320:A7
4242
\E000R
E000:4C

>10 REM 6502-FPGA ON ICESUGAR
>20 FOR I=1 TO 10
>30 PRINT I*I;" ";
>40 NEXT I
>50 PRINT
>60 PRINT 6502*2
>70 END
>RUN
1 4 9 16 25 36 49 64 81 100
13004

>PRINT PEEK(77)
208

The machine uses 47% of the UP5K's logic (2,487 of 5,280 cells), 17 of its 30 block RAMs (8 KB ROM and the keyboard buffer), and 2 of its 4 SPRAM blocks for the 64 KB of RAM. It meets timing at 15.5 MHz, against the 12 MHz system clock.

PLL

pll_25 (an EHXPLLL) runs the VCO at 625 MHz from the 25 MHz input. It outputs 125 MHz (CLKOP, the TMDS bit clock) and 25 MHz (CLKOS, the pixel and system clock), both phase-aligned.

Simulation

The design is developed simulation-first. Every module has a self-checking Verilator testbench in sim/. Each one prints PASS or FAIL, and make fails on any FAIL.

Testbench What it checks
tb_tmds_encoder All 256 byte values plus 20,000 random words decode back correctly. The four control codes are right. Running disparity stays within ±8.
tb_clock_control Full speed follows machine_ce. Stop halts. A cycle step is exactly one cycle. An instruction step always stops at the first SYNC, whatever position it starts from. Speed clamps at 0 and 7. The 100 Hz rate is accurate. Steps are ignored while running.
tb_bringup_top The whole FPGA design with simulation models of the ECP5 PLL and DDR cells. The HDMI output is captured and decoded, and the frames are checked pixel by pixel. The buttons are pressed through the debouncers and the LED boards are checked.
tb_cpu_klaus Reset sequence, then Klaus Dormann's functional test (about 35 s)
tb_cpu_harte Tom Harte's single-step tests for all 256 opcodes, compared cycle by cycle (1,000 per opcode by default; make sim_cpu_harte HARTE_TESTS=10000 runs all 2.56 million in under 1.5 minutes)
tb_apple1 The Apple-1 machine driven through its serial port at 115200 baud: monitor commands, storing and running a program, rubout, Integer BASIC entering, listing and running a program, and Ctrl-R reset

The CPU test vectors are third-party (Klaus Dormann's under GPL-3.0, Tom Harte's under MIT), so they are downloaded rather than stored in the repository:

sim/vectors/fetch.sh          # Klaus Dormann's functional test
sim/vectors/fetch.sh harte    # plus Tom Harte's tests (about 1 GB of JSON)

HDMI capture model

rtl/sim_models/dvi_capture.v is a simulation-only DVI receiver:

  1. It samples the four TMDS lines on both edges of the bit clock.
  2. It finds word alignment from the clock lane.
  3. It decodes the control and data words.
  4. It rebuilds the 640 × 480 frame, checks line lengths and line counts, and writes each frame as a PPM image.

This tests the whole video chain (timing, TMDS encoding, serialisation and the DDR cells) without a monitor. Two frames captured from tb_bringup_top:

Building

Tools

On Debian or Ubuntu:

sudo apt install yosys nextpnr-ecp5 nextpnr-ice40 fpga-trellis fpga-icestorm verilator cc65 gtkwave openfpgaloader

icesprog for the iCESugar comes from MuseLab's iCESugar repository.

Older yosys / nextpnr / trellis builds in /usr/local may stop working after a system boost upgrade. Remove or rebuild them, because /usr/local/bin comes first in PATH.

Without root, scripts/local_tools.sh unpacks Verilator, nextpnr (ECP5 and iCE40), Project Trellis, IceStorm and cc65 from the Debian archive into tools/, and the Makefile then uses them automatically. nextpnr, ecppack and icepack expect their databases under /usr/share, so their wrappers bind-mount the unpacked copy there in a private, unprivileged mount namespace (unshare -rm).

Make targets

make sim                  # run all testbenches
make sim_bringup_top      # one testbench; frames go to build/sim/bringup_*.ppm
make lint                 # verilator lint of TOP
make synth                # yosys only
make bit                  # yosys + nextpnr + ecppack/icepack -> build/$(BOARD)/$(TOP).bit or .bin
make prog                 # Colorlight: load into SRAM; iCESugar: write flash (icesprog)
make flash                # write to SPI flash
make firmware             # monitor (+ BASIC if fetched) -> build/firmware/apple1_rom.hex

BOARD selects the board: colorlight_i5 (the default) or icesugar. TOP selects the design:

Board TOP Design
colorlight_i5 bringup_top (default) HDMI test patterns, clock control with a counter as the bus
colorlight_i5 apple1_top Apple-1 style machine with HDMI screen, 64 KB block RAM, all LED boards
icesugar icesugar_bringup_top (default) Smoke test: serial echo, RGB LED, LED/button boards
icesugar icesugar_apple1_top Apple-1 style machine, 64 KB SPRAM

For example: make prog BOARD=icesugar TOP=icesugar_apple1_top.

Resource use

Measured after place and route with nextpnr-ecp5 (speed grade 6):

Design LUT4 FF Block RAM Fmax
bringup_top about 600 429 0 38 MHz system clock (needs 25), 151 MHz TMDS clock (needs 125)
cpu_6502 (core only) about 1,900 108 0 60 MHz
apple1_top (Apple-1 machine with HDMI screen) – – 39 (64 KB RAM, 8 KB ROM, keyboard buffer, text RAM, font) 40.7 MHz (needs 25), TMDS 276 MHz (needs 125)

Budget

The LFE5U-25F has 24,288 LUT4 and 56 block RAMs (18 kbit = 2 KB each). These figures are estimates for the parts not yet written, based on comparable open-source cores; they will be replaced by measurements as the parts are built.

Part LUT4 Block RAM (2 KB each)
Common: clock control, HDMI, debounce, LED boards 600 (measured) 0
6502 core, all opcodes 1,900 (measured) 0
Apple IIe
Memory management, soft switches, keyboard 800 0
Video: text, lores, hires, double hires, scaler 1,200 2 (character ROM) + line buffer
64 KB main RAM / 16 KB ROM – 32 + 8
Disk II and SD card 1,500 2 (track buffer)
Apple IIe total about 6,000 (25%) about 45 of 56; the 64 KB auxiliary RAM goes in SDRAM
Commodore 64
VIC-II 3,500 1 (colour RAM)
SID 3,000 0, plus DSP multipliers for the filter
2 × CIA, PLA, 6510 port 1,500 0
64 KB RAM, BASIC, KERNAL and character ROMs – 32 + 10
1541 drive: second 6502, 2 × VIA, GCR, SD card 3,800 1 (2 KB RAM) + 8 (16 KB ROM)
C64 + 1541 total about 14,300 (59%) about 52 of 56: tight

Logic is no problem for either machine. Block RAM is the real limit for the C64 with a 1541. The likely answer is to move the 64 KB of main RAM, or the ROMs, into the SDRAM, which is fast enough at 1 MHz CPU speed. The decision can wait until the C64 work starts.

Source layout

constraints/            pin constraints per board (.lpf for ECP5, .pcf for iCE40)
rtl/common/             clock_control, debounce, uart_rx, uart_tx
rtl/video/              video_timing, tmds_encoder, dvi_out, test_pattern, text_screen, font
rtl/cpu/                cpu_6502
rtl/machines/apple1/    the Apple-1 style machine (board independent)
rtl/board/colorlight_i5 pll_25, bringup_top, apple1_top
rtl/board/icesugar/     icesugar_bringup_top, icesugar_apple1_top
rtl/sim_models/         ECP5 primitive models, dvi_capture (simulation only)
firmware/monitor/       the monitor (ca65)
firmware/apple1_basic/  fetch script and link config for Apple-1 BASIC
sim/                    testbenches: tb_<name>.v, run with make sim_<name>
sim/vectors/            fetch.sh and converters for third-party CPU tests
scripts/                local_tools.sh (toolchain without root), apple1_terminal_test.py
doc/datasheets/         W65C02S, ECP5 family and sysIO datasheets
doc/wiki/               source of this wiki page

All identifiers are snake_case.

Roadmap

  1. 65C02 option for the enhanced IIe (Tom Harte's suite has 65C02 tests too).
  2. Keyboard on the Colorlight (PS/2 on P6), so the Apple-1 can run without a computer attached.
  3. Apple IIe. 14.318 MHz master timing, the memory map and soft switches, text / lores / hires video scaled to HDMI, and a keyboard (PS/2 or UART).
  4. Commodore 64. The 6510 I/O port, PLA banking, VIC-II (text, bitmap, sprites, badlines), 2 × CIA, and SID.
  5. SD card. SPI-mode SD on pmodk, FAT, and image selection. A Disk II controller for .dsk / .nib / .woz images, and 1541 emulation for .d64 images.
  6. SDRAM. IIe auxiliary memory and disk image buffers.

Miscellaneous links