pico6502

Overview

The pico6502 is the 6502-family counterpart to the picoZ80. It uses the identical board hardware โ€” an RP2350B microcontroller, 8MB PSRAM, 16MB Flash, and an ESP32 co-processor โ€” but targets the MOS 6502 DIP-40 socket rather than the Z80. When installed in any 6502-based computer, the pico6502 replaces the physical CPU and takes complete, cycle-accurate control of the 6502 address, data, and control buses through the RP2350's PIO state machines.
Like the picoZ80, the pico6502 is entirely JSON-configured. A config.json file on the SD card defines the memory map, ROM images, and driver bindings. No recompilation is required to adapt the board to a different 6502-based host or to change its memory layout. All management is performed through a browser-based interface served by the onboard ESP32.
  • Drop-in 6502 replacement
    - installs in any 6502 DIP-40 socket. Verified in a BBC Model B and an Apple I replica: the host sees vanilla 6502 bus behaviour โ€” one-cycle writes, address changes inside the real chip's 110โ€“225 ns envelope, reads sampled at the PHI2 fall, level-sensitive /IRQ, debounced /RES.
  • PIO bus engine with pipelined speculative fetch
    - eight RP2350 PIO state machines own every timing decision (PHI1/PHI2 generation, address ladder, write data slaved to R/W, a transparent read latch, IRQ/NMI/SO monitors). With a machine persona declaring its I/O window and paging register, the engine streams instruction bytes at one host cycle per byte, shadows and verifies every byte it serves, and runs the BBC Model B at 97% of a real 2 MHz 6502 (Elite, steady) while the bus stays byte-identical to a real 6502. In the BBC-B driver's VIRTUAL mode, where the CPU's RAM lives in the pico6502, it runs at more than three times the speed of a real 2 MHz BBC. A "vanilla" host with no declared map still runs, but conservatively.
  • NMOS and CMOS cores
    - all 151 official instructions plus every undocumented NMOS opcode (including the JAM group), with a cputype-selected 65C02/65C12 overlay: (zp) addressing, PHX/PHY/PLX/PLY, STZ, TSB/TRB, BRA, INC/DEC A, the fixed JMP (abs) and the CMOS NOP columns.
  • Large banked memory space
    - 8MB PSRAM as 64 banks ร— 64KB, configurable in 512-byte blocks as RAM, ROM, PHYSICAL, or FUNC types.
  • Virtual devices โ€” the picoZ80 chip catalogue on the 6502
    - the device framework and interlink netlist the picoZ80 uses are now built into every pico6502 firmware. Fourteen chips can be fitted to a board from the web GUI and decoded at any memory address: serial ports (68B50 ACIA, 8251 USART, Z80 DART), timers (Z80 CTC, 8253/8254), parallel ports (Z80 PIO, 8255), an MSM5832 real-time clock, a Centronics printer port, a general-purpose latch, a signal port, and three Acorn chips โ€” the 68B54 Econet ADLC and the WD1770 and Intel 8271 floppy controllers. Serial and printer output reaches the host PC over USB, and each chip's interrupt is wired to the 6502's /IRQ or /NMI through the netlist. Any memory region can also still be backed by a driver's own C handler.
  • Apple I persona
    - the AppleI driver (Apple6502 firmware) knows the Apple I and replica memory map and offers three terminal modes: the machine's own keyboard and display, a virtual PIA with the keyboard and display on a USB serial port for a bare board, or a mirror that joins a USB terminal to the real keyboard and display โ€” ideal for pasting programs into the Woz monitor. The CMT-ACI interface adds a virtual Apple Cassette Interface: tapes are WAV, AIFF or raw binary files on the SD card, and programs saved with the ACI's W command are written back as playable WAV recordings.
  • BBC Model B persona
    - a physical-passthrough persona carrying the Model B's machine knowledge (I/O window, shadow-write window, ROMSEL paging, burst depth). Adds 16 virtual sideways ROM/RAM sockets (PSRAM-backed, following ROMSEL โ€” load MMFS or a language ROM from SD without a physical socket), a virtual OS socket, a 16K RAM overlay for Model A hosts, a BBC Master memory model (LYNNE/HAZEL/ANDY, virtual ACCCON) and CMOS/sideways-RAM persistence to SD or flash.
  • UEF virtual cassette deck
    - the CMT-UEF interface virtualises the BBC's 6850 ACIA and Serial ULA and plays (gzipped) UEF tapes at real 1200/300-baud pacing through the virtual interrupt line; SAVE captures the transmit stream into a new UEF on the SD card. A six-slot tape carousel is managed from the web GUI or the bbc tape shell command.
  • Virtual floppy controller โ€” Intel 8271 or WD1770, DFS and ADFS
    - the BBC-FDC interface offers a choice of controller, each a host-independent chip model written from its datasheet: the Model B's native Intel 8271 at $FE80 (Acorn DFS 0.90/1.20, Watford and Solidisk 8271 ROMs), or a WD1770 behind a drive-control latch as fitted by the Acorn Model B 1770 upgrade board, the Watford Electronics 1770 board, or the BBC Master 128's on-board controller โ€” double density and ADFS capable (Acorn DFS 2.2x, DDFS, ADFS 1.3x/1.5x). Two two-sided drives are served from the SD card: .ssd/.dsd DFS images, double-density DDFS images, ADFS .adf (S/M/L, side after side) and .adl (L, interleaved) images, a disc inside an MMB bundle (mmb/BEEB.MMB:3), or two single-sided images paired as the two sides of one double-sided disc โ€” DFS drives 0/2 and 1/3, exactly as archives such as ACORN3_A / ACORN3_B ship them. The image kind is set per slot or deduced from extension and size. Writes go back through a write-back block cache; discs are changed live from the Dashboard's Floppy menu.
  • Virtual MMFS card
    - the BBC-MMC interface puts an SD card behind the User VIA for the unmodified MMFS and MMFS2 ROMs (user-port builds, including TurboMMC): point it at a folder on the pico6502's SD card and the folder's .ssd/.dsd images and sub-directories are presented to MMFS2 as a FAT32 card (*DCAT, *DDIR, *DIN), with any BEEB.MMB in it serving the original MMFS from the same folder; or point it at an .mmb file for the classic FAT16 card. Hundreds of discs are available without any hardware on the user port. Load the MMFS ROM itself from a virtual sideways socket and the whole filing system is self-contained.
  • Virtual Econet over IP
    - the BBC-NET interface is a virtual Econet module โ€” the 68B54 ADLC at $FEA0 and the station-number links at $FE18, exactly as the NFS 3.60 / ANFS 4.x ROMs program them โ€” carried over the ESP32's WiFi or USB network link as AUN (Acorn Universal Networking, Econet packets in UDP on port 32768), the protocol BeebEm and RISC OS use. The four-way Econet handshake is run frame by frame against the ROM and translated to AUN as a bridge would, so any AUN file server serves the BBC: two proven open-source daemons, aund and the PiEconetBridge file server, are bundled in tools/econet/ with a build script and a one-command file server. Verified with ANFS 4.25 on a Master-mode board and with NFS 3.60 and ANFS 4.18 in the simulator.
  • Virtual Winchester โ€” Acorn SCSI host adapter or 8-bit IDE / CompactFlash
    - the BBC-SCSI interface puts a hard disc on the 1 MHz bus: up to four images on the SD card become ADFS drives :0โ€“:3, with the full ADFS directory tree and up to 512 MB per drive. Choose the controller the filing-system ROM was written for: the Acorn SCSI host adapter at $FC40โ€“$FC43 (ADFS 1.30 on a 1770 Model B, ADFS 1.50 on a Master; the Acorn Winchester utilities โ€” SuperForm, HDINIT โ€” format and verify it as a real drive), or the 8-bit IDE / CompactFlash task file at $FC40โ€“$FC47 of J.G. Harston's BBC IDE board and the RetroClinic kits (ADFS 1.33/1.53 IDE and JGH's HDInit). The same images serve either: raw 256-byte sectors โ€” BeebEm's scsi0.dat/ide0.dat, RetroClinic CompactFlash .dat images and the archives' blank NNMbHDD.adl discs load as they are, sparse images included. Writes go through a PSRAM write-back cache; a fresh image grows as ADFS writes to it. The Dashboard's Hard Disc menu changes a drive's image while the machine runs, creates a formatted, empty ADFS disc of 4โ€“512 MB in one step, and switches the unit between the virtual drives and the machine's own hard disc hardware. Verified on a real Master 128 with both controllers, end to end: format, *CAT, SAVE, LOAD and CHAIN.
  • RAM discs and JIM paged RAM
    - type ram:400K instead of a file name in any floppy slot, or ram:2M in a Winchester slot, and that drive is a RAM disc in the pico6502's PSRAM: formatted empty at mount, served straight to the controller model with no cache or SD card in the path, and no ROM need know it is RAM. Add a persist path (ram:400K:dsk/BBC/scratch.dsd) and the disc is loaded from that file at boot and written back on request โ€” Save RAM discs to SD in the Floppy and Hard Disc menus, bbc ramdisc save in the shell, and automatically before a configuration apply โ€” a fast, battery-free floppy. The BBC-JIMRAM interface adds expansion RAM on the 1 MHz bus (64 KB to 2 MB) with Pi1MHz's page registers at $FCFD/$FCFE and the window at $FD00โ€“$FDFF, for software written for that convention.
  • Virtual parallel printer with a PC spooler
    - the BBC-PRN interface is a printer on the User VIA's port A, exactly as the MOS printer driver expects it (*FX 5,1, VDU 2): each byte is captured with its strobe and acknowledged 50 ยตs later, and everything the BBC prints lands raw in a job file on the SD card, one per print run. From there it reaches paper three ways: download it from the File Manager and print it raw; run tools/prnspool.py on your PC, which watches the pico6502 for new jobs and hands each to the system spooler (raw for a dot-matrix ESC/P printer, or --text for a laser, inkjet or PDF printer); or give a network printer's raw port and each job is streamed there as it ends. A Printer menu on every page shows the job count, ends the open job and switches the port between the virtual printer and a real one on the user port. The virtual MMFS card shares the same VIA untouched.
  • Virtual RS423 over USB or TCP
    - the BBC-RS423 interface is the BBC's serial port โ€” the 6850 ACIA and Serial ULA in their RS423 role, selected by *FX 2 / *FX 3 with the baud rates from *FX 7 / *FX 8 โ€” carried to the pico6502's third USB serial port (a terminal program on the PC sees a plain serial port) or over TCP through the ESP32: listen for a telnet or PuTTY session, or connect out to a telnet BBS or file-transfer server. Bytes move at the selected baud rate, so period transfer software that times on the line works; RTS is honoured. It is layered over the cassette deck's model of the same chip, so a tape still loads with both enabled, and *FX 5,2 serial printing works through it too.
  • Virtual Teletext adapter
    - the BBC-TTX interface is the Acorn Teletext adapter on the 1 MHz bus ($FC10โ€“$FC13) for the Acorn Teletext ROM (ATS / TFS) in a sideways socket: *TELETEXT page viewing and *TELESOFT downloads, driven by a 50 Hz field machine that delivers 16 packets per field and the field interrupt exactly as the ROM expects. The broadcast is yours to choose, per channel of the adapter's four: a recording on the SD card โ€” a .t42 packet stream as vhs-teletext and the Teletext Archive produce, or a BeebEm-style capture โ€” played in a loop, or a live teletext packet server over TCP (vbit2, raspi-teletext, the servers BeebEm connects to) through the ESP32's network link. Only the channel the ROM has selected is served; bbc ttx in the shell shows fields, packets, interrupts and the ROM's last register accesses. A Teletext menu in the web GUI lists the four channels, marks the one the ROM has tuned and swaps a channel's recording live from the SD card picker, and tools/ttxfetch.py downloads the Computer Legacy archive's off-air teletext recoveries โ€” VHS tapes decoded to the broadcast as it went out โ€” as the .t42 files the adapter plays.
  • Virtual keyboard and AMX mouse from the browser
    - the web GUI's new Keyboard & Mouse page types into a BBC Model B or Master and moves a mouse pointer, below the OS, so it works wherever the real keyboard and an AMX mouse do โ€” BASIC, games, a Tube co-processor, GEM on the Master 512. Live keys, pasted programs typed at a pace the MOS cannot miss, the BBC's own keys (COPY, SHIFT LOCK, f0โ€“f9), and a pointer-lock mouse with the AMX or Master 512 wiring; the machine's own keyboard keeps working alongside. Verified on a Model B with a PiCoPro Master 512 (more).
  • pico6510 โ€” the Commodore 64's CPU
    - the PICO6510 board variant replaces a MOS 6510, the 6502 with an on-chip I/O port used by the Commodore 64. It runs the pico6502 firmware unchanged, selected at run time by "cputype": "6510": one firmware image serves both boards. The bus engine is the same; the firmware adds a PHI2-follows-PHI0 clock program and the 6510's six-bit I/O port at $0000/$0001, driven directly from Core 1. Hardware in production but not yet tested on a C64; firmware tested in the simulator; see pico6510.
  • ROM image loading
    - ROM images for the host machine (BIOS, monitor, language ROMs) are stored on the SD card and loaded into PSRAM at boot; the configuration itself is minified and persisted in flash exactly as on the picoZ80, so the board boots with no dependency on the ESP32 link.
  • Integrated assembler and disassembler
    - a full 6502 disassembler and one-line assembler built into the debug shell, covering all 13 addressing modes and the undocumented opcodes (prefixed *), verified over 2048 round-trip cases.
  • BBC Master 128 persona
    - the pico6502 in a real BBC Master 128's 65SC12 socket, on the BBC-Master driver (BBC6502 firmware). The Master's CPU is a 6512-type part that is given its clock and slowed for 1 MHz devices through RDY, so the firmware makes a glitch-immune "flywheel" copy of the host's PHI2 and an RDY-gated clock for its bus state machines. The Master's own shadow RAM, ACCCON, CMOS clock and VIAs stay in use, tracked by the pico6502 so its speed engine stays correct. Sideways ROM/RAM sockets, a MOS served from the SD card, and the virtual interfaces โ€” the 1770 floppy controller, UEF tape, the MMFS2 card, Econet, the SCSI / IDE Winchester, RAM discs, the parallel printer and RS423 โ€” are verified on a real Master.
  • ICE debug shell
    - the CPU-neutral debug shell shared with the picoZ80: 88 commands on the 6502 (89 on the BBC6502 and Apple6502 builds), including the virtual-device commands (dev, sig, ctc, pio, ser, rtc, prn), bring-up diagnostics (busdiag, busprobe, busverify, bustest, busstate), live bus-engine knobs (buspipe, writestrobes, iopark, readsettle, readphase), a speed scoreboard (cpustat, cpuprof) and the bbc persona command.
  • Host simulator
    - pico6502sim runs the real firmware โ€” RP2350 and ESP32 halves โ€” natively on a PC, now with a synthetic BBC Model B host (system VIA, keyboard matrix, MODE 7 rendered to a terminal) alongside the Apple I. New drivers such as the UEF tape deck are exercised here before they touch hardware.
  • USB and/or WiFi networking, web management
    - networking over USB (the board appears to the PC as a network adapter, USB NCM, with the web interface at http://192.168.7.1) and/or WiFi (access point or client), with the Econet, printer and RS423 network transports using whichever link is up, and the same eight-page Bootstrap web interface as the picoZ80, served over either link โ€” dashboard, structured configuration GUI, raw config editor, file manager, persona selection, OTA firmware updates, WiFi manager. The interface is CPU-aware: with pico6502 firmware running it shows only 6502 personas and drivers, hides the Z80 I/O and media menus, and adds per-partition clock/voltage, a Bus Engine Tuning panel, the BBC machine options and the sideways-socket table.
  • Dual firmware partitions
    - two 5MB firmware slots with OTA update support and bootloader-managed partition switching.
  • USB firmware update
    - the bootloader exposes a USB bridge for initial flashing without a hardware debugger.
X (Twitter) project preview โ€” picoZ80/pico6502 in action

Hardware

The pico6502 PCB is a compact 52mm ร— 19mm board that shares the same fundamental design as the picoZ80 but carries a 6502-specific bus interface rather than a Z80 interface. Five schematic sheets cover the RP2350B processor, the ESP32 co-processor, the 6502 bus interface, the USB hub and the power supply. Revision v2.2 (seen below beside an original 6502 and installed in an Apple 1 replica) proved the mechanical format and brought up both processors, but got the bus and clock timing wrong; the v2.3 redesign answers this with a fully buffered interface โ€” 74AHCT244 address/control buffers, a 74AHCT245 data buffer and separate outward and return clock paths, so a dead buffer can be told apart from a dead clock. v2.3a is the board proven in the BBC Model B and Apple I, and the one photographed below. The current design revision is v2.3b, which changes only the socket connection: the board now plugs in through two 20-pin round-pin headers instead of a DIP-40 pin footprint, the arrangement shared with the pico6809 and pico6510. The circuit is otherwise identical to v2.3a, and the schematic sheets below are from v2.3b. The USB hub present in the picoZ80 v2.5 is not fitted on the pictured v2.2 revision. All logic operates at 3.3V, with the buffered interface driving the 6502's 5V signal levels.

Key Components
  • RP2350B (Cortex-M33 dual-core)
    - primary processor, overclocked per persona: the BBC Model B persona runs it at 340MHz (voltage is per-board โ€” 1.20V on the reference unit; 330MHz needed ~1.35V on another), the vanilla and Apple I personas at 150MHz. Core 1 runs the 6502 emulation hot loop; Core 0 handles file I/O, USB, and ESP32 relay. 512KB on-chip SRAM.
  • 16MB SPI Flash
    - same layout as the picoZ80: bootloader, two 5MB application slots, two configuration slots, general config, and partition table.
  • 8MB PSRAM (SPI)
    - 64 banks ร— 64KB of banked address space for the emulated 6502. Memory-block pointer arrays and I/O function-pointer arrays reside in PSRAM above the RAM/ROM area.
  • ESP32 co-processor
    - USB NCM networking and WiFi, SD card, web server. Communicates with the RP2350 via 60MHz FSPI (binary IPC frames with CRC32 and opcode/sequence validation) and a 460.8kbaud UART bridge.
  • SD card slot
    - FAT32, managed by the ESP32. Stores config.json, ROM images, and disk images.
  • USB hub
    - on-board USB hub for host connectivity and firmware update bridging.
  • 3.3V power supply
    - buck converter from the 5V present on the 6502 DIP-40 VCC pin.

Board Design (KiCad)
The pico6502 hardware is designed in KiCad. Schematic and PCB layout files for revisions v2.1 and v2.2 are in the project repository under kicad/PICO6502/. v2.3a (pico6502_v2_3a.pdf) added the buffered bus interface described above and is the board used for all hardware results on this page. The current revision, v2.3b, is shown here; its complete schematic can be downloaded as a PDF below.
The five schematic sheets are:
Sheet 1 โ€” RP2350B Processor
RP2350B QFN-80 GPIO assignments for the 6502 bus, 16MB Flash, 8MB PSRAM, and ESP32 communications. The 6502 bus requires A0โ€“A15, D0โ€“D7, PHI0/PHI1/PHI2, RNW, SYNC, IRQ, NMI, RDY, and RESET โ€” consuming the majority of the RP2350B's 48 GPIO pins.

pico6502 Schematic Sheet 1 โ€” RP2350B Processor

Sheet 2 โ€” ESP32 Co-processor
ESP32 module, SD card interface, antenna, and inter-processor communication (FSPI + UART). Identical in function to the picoZ80 design.

pico6502 Schematic Sheet 2 โ€” ESP32 Co-processor

Sheet 3 โ€” 6502 Bus Interface
The DIP-40 socket connections, made in v2.3b through two SIL-20 round-pin headers (U1, U14), and the bus interface. Unlike the Z80, the 6502 has no separate I/O space โ€” all peripherals are memory-mapped. From v2.3 the socket signals pass through a fully buffered interface: 74AHCT244 buffers drive the address and control lines out, a 74AHCT245 handles the bidirectional data bus, and the two clock phases have separate outward and return paths so the firmware can compare what it drives against what actually appears at the socket (the busdiag clk diagnostic โ€” exactly the distinction the unbuffered v2.2 board could not make). Buffer tri-state follows the socket's DBE pin, gated with a DBE_OVR override driven from the ESP32 (~EN = NOR(DBE, DBE_OVR)), so hosts that do not drive DBE work unmodified.

pico6502 Schematic Sheet 3 โ€” 6502 Bus Interface

Sheet 4 โ€” USB Hub
USB Hub - the RP2350 and ESP32 both have USB ports and in order to provide both to enable firmware flashing, debug output and advanced features such as networking, a hub integrates both into a single USB to PC connection.

pico6502 Schematic Sheet 4 โ€” USB Hub

Sheet 5 โ€” Power Supply
TLV62569DBVR 5V-to-3.3V synchronous buck converter with input/output filtering. Draws from the VCC pin of the 6502 DIP-40 socket.

pico6502 Schematic Sheet 5 โ€” Power Supply

📄 Complete schematic โ€” pico6502 v2.3b (PDF)
KiCad source files: kicad/PICO6502/PICO6502_Schematic.pdf (schematic PDF) and kicad/PICO6502/ (full KiCad project).

PCB
The pico6502 PCB is a 6-layer board kept within the footprint of the DIP-40 package, using 0402 passives and fine-pitch QFN and DHVQFN packages to fit the processor platform and the buffered bus interface into that space. The images below are of the current v2.3b design; the photographs further down are of the v2.3a board used for all the hardware results on this page.
PCB Overview
v2.3b: KiCad 3D renders, component side and underside. Parts without a 3D model show as their pads.
PCB 6 Layer Routing Overview
v2.3b: all six copper layers with silkscreen, viewed from the top side and (mirrored) from the underside.
PCB Assembled
PCB Component Placement and Bill of Materials
Click here to view the interactive PCB component placement diagram and Bill of Materials for the v2.3b board.

Architecture

Dual-Core Design
The RP2350B core assignment mirrors the picoZ80:
Core 0 โ€” USB bridge, firmware update coordination, file I/O relay to ESP32, ESP32 UART command dispatch, partition management.
Core 1 โ€” The 6502 emulation hot loop. Services the PIO FIFOs to process 6502 bus transactions, resolves each address against the memory map, and dispatches to PSRAM, PHYSICAL pass-through, or FUNC virtual-device handlers. The inner loop runs from RP2350 SRAM for minimum latency.
Inter-core communication uses the same queue_t message passing as the picoZ80, carrying messages for floppy/disk image changes, config reloads, file read/write, and firmware version queries.

PIO Bus Interface
The 6502 bus interface is implemented in M6502.pio and driven from M6502CPU.c. The design principle, arrived at during the BBC Model B bring-up, is that the PIO makes every timing decision โ€” no C-side timing is involved in a bus cycle. Eight state machines across the three PIO blocks are loaded:
PIO SM Program Function
PIO 0 0 m6502_addr The address engine (v3, โ€œladder + gated + burst unifiedโ€). Drives A0โ€“A15 and owns R/W and SYNC. Every FIFO word is {instr:16 | ~addr:16} โ€” the top half is executed with out exec so one word can mean โ€œread with a burst of Nโ€, โ€œwriteโ€ or โ€œgated single cycleโ€.
PIO 0 2 m6502_latch Transparent input latch (v4): samples D0โ€“D7 continuously while PHI2 is high and delivers the last pre-fall state โ€” the point at which the BBCโ€™s video system takes the RAM bus.
PIO 1 0 m6502_cycle Exec-driven cycle sequencer for the gated (serialised) path โ€” I/O accesses, slow blocks and RDY wait states.
PIO 1 1 m6502_so Monitors the SO pin (PIO IRQ 6).
PIO 1 2 m6502_irq Mirrors /IRQ into PIO IRQ 5; the core samples it per instruction with level semantics, like real silicon.
PIO 1 3 m6502_nmi Mirrors /NMI into PIO IRQ 4; Core 1 edge-detects it, seeding the previous state from the live line at reset so a pre-existing low level is not a spurious edge.
PIO 2 0 m6502_clock_6502 / m6502_clock_6512 6502 mode: generates PHI1/PHI2 from the hostโ€™s PHI0. 6512 mode: parked, the host supplies both phases.
PIO 2 1 m6502_data Write data driver, slaved purely to R/W: drives D0โ€“D7 while R/W is low and releases when it returns high, so a write is one cycle with one strobe, as on a real 6502.
Every bus state machine synchronises on CLK2_IN โ€” the PHI2 phase actually present at the socket, read back through the buffer return path โ€” so the same program serves the 6502 and the 6512. The m6502_fetch, m6502_read and m6502_write programs remain in the source as reference sequences; their instructions are what the cycle SM executes as exec words. Writes hold the data for the real chip's tHW (~44 ns at 340 MHz) and the address engine changes the address only after a genuine PHI2 fall followed by the tADS setup time, polling its FIFO on a "ladder" of four rungs so that the worst-case drive lands at ~206โ€“215 ns โ€” inside a real 6502's address-change envelope. See the Technical Guide for the full description.

Memory Model
The 6502 memory model is structurally identical to the Z80 model but without a separate I/O address space โ€” because the 6502 has no IORQ equivalent, all peripheral registers appear in the 64KB memory map. The same three-tier architecture applies:
Tier 1 โ€” RP2350 SRAM: 128-entry block-pointer array for O(1) dispatch per 512-byte block.
Tier 2 โ€” PSRAM (8MB): 64 banks ร— 64KB RAM/ROM images and function-pointer arrays.
Tier 3 โ€” Flash (16MB): firmware, ROM images, minified configuration JSON.
Memory block types available for the 6502 memory map:
Type Description
PHYSICAL Pass-through to real host hardware.
PHYSICAL_VRAM Host video RAM with wait states.
RAM Read/write โ€” backed by PSRAM bank.
ROM Read-only โ€” backed by PSRAM bank.
PHYSICALHW Pass-through region declared as host hardware (an I/O window). The bus engine never speculates into or across it, and the configurable address-parking target becomes config-driven when any such region is declared.
VRAM PSRAM-backed video RAM mirror with wait states.
FUNC Virtual device โ€” C handler called on every access. Used for all peripheral emulation, since the 6502 has no I/O space.
PTR Per-byte redirect.
Flash Memory Layout
Identical to the picoZ80 layout:
Partition Address Range Size Contents
Bootloader 0x10000000โ€“0x1001FFFF 128KB USB bridge, firmware update, partition selector
App Slot 1 0x10020000โ€“0x1051FFFF 5MB Main 6502 firmware (partition 1)
App Slot 2 0x10520000โ€“0x10A1FFFF 5MB Main 6502 firmware (partition 2)
App Config 1 0x10A20000โ€“0x10C9FFFF 2.5MB ROM images + minified config JSON (slot 1)
App Config 2 0x10CA0000โ€“0x10F1FFFF 2.5MB ROM images + minified config JSON (slot 2)
General Config 0x10F20000โ€“0x10FFEFFF 892KB Core settings, scratch space
Partition Table 0x10FFF000โ€“0x11000000 4KB Active slot, checksums, metadata
Since September 2026 the 6502 firmware stores its configuration in flash exactly as the Z80 models do: applying a configuration (web GUI Apply / reload) reads config.json from the SD card, minifies it, writes the blob plus the parsed machine definition and the core clock/voltage into the partition's App Config region, and reboots โ€” the next boot reads everything from flash with no ESP32 dependency. The BBC-B persona's "persist": "flash" option additionally carves a non-volatile region (one meta sector plus 16 ร— 16K sideways-RAM slots, ~260KB per partition) from the tail of the General Config area for its virtual CMOS and sideways RAM.

Bus Engine and Performance
The emulated 6502 is only as fast as the bus engine can fetch its instruction stream. The serialised design that first brought the BBC up โ€” one C-side round trip per bus operation โ€” was correct but slow, and a speed campaign in September 2026 (documented step by step in PIPELINE_REDESIGN.md) replaced it with a pipelined engine. The techniques, in the order they were proven:
  • Address ladder and 1-cycle regime
    - the address SM polls its FIFO at fixed rungs after each PHI2 fall, so a word queued in time is driven within the real chip's address-change window and an operation completes in a single host cycle with no C timing in the loop.
  • Burst engine
    - a read word can ask for up to 6 consecutive addresses; the SM steps the address itself (PIO has no adder, so it counts an inverted address down) and instruction bytes stream at one cycle per byte. Bytes rescued when a bus operation breaks the stream are kept in a harvest buffer and served to later fetches with zero bus operations.
  • Shadow and serve
    - a 64KB write-through shadow with a validity bitmap fills lazily from the bus stream (ROM included, the I/O window never). Every byte popped from the bus is verified against the shadow and the mismatch count must stay zero โ€” any 256-byte block that ever mismatches is quarantined to the slow gated path. Once proven (1.38 billion served bytes at zero mismatches), serve returns shadow-valid bytes to the core immediately while the real bus cycle still runs, so the bus stays byte-identical to a real 6502 while the core stops waiting for it.
  • Native writes and fused fetches
    - writes become fire-and-forget ladder words with a write-pending fence and FIFO back-pressure; opcode and operand fetches are direct inlined calls under partial link-time optimisation.
  • I/O chase
    - every access inside the declared I/O window is followed by a no-capture park read of the reset vector, so a side-effect register (the Tube ULA's FIFOs, in the PiCoPro case) is never re-decoded by an address held across idle cycles.
Everything above is gated on the persona declaring an I/O window โ€” without one the engine stays conservative. That is what the BBC Model B driver provides, and it is why selecting it transforms the machine's speed. After two rounds of hot-path micro-optimisation in October 2026, the Model B runs Elite at a steady 97% of a real 2 MHz 6502 and Galaxians at 97โ€“98%, measured with the shell's cpustat against the host's own clock. Aviator, MMFS and long soak sessions all run clean, pipetest runs tens of millions of mixed bus operations with no mismatch, and the shadow verifier stays at zero. The default burst depth is now 3, which board A/B testing showed gives the best balance. The knobs โ€” burst depth, I/O and shadow-write windows, paging register, serve, pipeline โ€” are also available per driver from the web GUI's Bus Engine Tuning panel and the buspipe shell command, so another machine can be tuned without a firmware change.

Machine Personas

As on the picoZ80, a persona is a named configuration selecting the memory map, ROMs and driver for a particular host machine, chosen per firmware partition from the web interface. The persona page is CPU-aware: with pico6502 firmware running it offers only the 6502 personas. The persona files pair one machine per partition (config_<Partition1>_<Partition2>.json) and cover every combination of the five 6502 machines below โ€” twenty-five files, generated by esp32/personas/generate_combos.sh. Each persona needs the firmware that carries its driver:
  • Base6502 โ€” "Vanilla 6502"
    - the Open6502 driver with nothing virtualised; every bus cycle passes through to the host machine at 150MHz. This is the persona to bring a new board up with. Runs on any 6502 firmware.
  • Open6502 โ€” "Open / experimenter board"
    - a board of your own design: a development board, a single-board computer, a breadboard build. No host machine is assumed โ€” describe the board in the persona (the memory map, the bus-tuning keys in the driver object, driver ROMs) and build the peripherals it lacks from virtual devices wired in the interlink netlist. Flash the Open6502 firmware for the largest device budget (twelve chips).
  • Apple-I โ€” "Apple I / replica"
    - the Apple I, Replica 1, PE6502 and RC6502 boards. The Woz monitor and BASIC run on the v2.3a board. On the Apple6502 firmware select the AppleI driver (src/drivers/Apple/AppleI.c): it declares the machine's map to the bus engine โ€” I/O window $C000โ€“$DFFF (the ACI cassette card and the PIA, never speculated into) and CPU-owned RAM $0000โ€“$7FFF shadowed (set the shadow window to 0x1000 for a 4K original) โ€” loads driver-level ROM images (Woz monitor, Integer BASIC, Krusader, ACI firmware) as virtual ROM, and provides the terminal option: physical (the machine's own keyboard and video, the default), virtual (a virtual 6821 PIA at $D010โ€“$D013, partially decoded across $Dxxx as on the real board, with the keyboard and display on a USB serial port โ€” for a bare board with no keyboard or video) or mirror (the real PIA keeps running the real keyboard and display, and a USB serial terminal is joined to both: typed characters are served ahead of the physical keyboard, displayed characters go to both, and the real display's busy line still paces output). Terminal translation is the Apple I's own: upper case, CR as newline, Backspace/Delete as _. The Apple-I persona selects the AppleI driver with "terminal": "physical" and "usb": 2, and needs the Apple6502 firmware. For tapes, bind the CMT-ACI interface (see Apple I Cassette); without it a physical ACI card works through the I/O window.
  • BBC-Master โ€” "BBC Master 128"
    - a real Master 128 host, on the BBC-Master driver with cputype "65C12" and dbeoverride false, at 330MHz / 1.20V. Needs the BBC6502 firmware. See BBC Master 128.
  • BBC-B โ€” "BBC Model B"
    - the BBC-B driver (src/drivers/Acorn/BBCModelB.c, in the BBC6502 firmware build): a physical-passthrough persona that contributes the Model B's machine knowledge โ€” I/O window $FC00โ€“$FEFF, shadow-write window $0000โ€“$7FFF, ROMSEL at $FE30 (mask $FFF0, partially decoded) paging $8000โ€“$BFFF, burst depth 3 โ€” as defaults that the JSON can override. Runs the RP2350 at 340MHz. The driver has two modes, selected by its type: PHYSICAL (default โ€” every cycle on the real bus, 97% of a real 6502) and VIRTUAL (the CPU's RAM inside the pico6502, more than three times a real BBC โ€” see BBC VIRTUAL Mode). On top of passthrough it offers 16 virtual sideways ROM/RAM sockets, a virtual OS socket, the Model A RAM overlay, BBC Master mode (which forces the CMOS core, as MOS 3.x is 65C12 code), CMOS/sideways-RAM persistence, and eight bindable interfaces: the CMT-UEF tape deck, the BBC-FDC virtual floppy controller (Intel 8271 or WD1770 โ€” DFS, DDFS and ADFS, with RAM discs), the BBC-MMC virtual MMFS card, the BBC-NET virtual Econet module (AUN over IP), the BBC-SCSI virtual Winchester (Acorn SCSI host adapter or 8-bit IDE / CompactFlash โ€” ADFS hard discs :0โ€“:3, see BBC Winchester), BBC-JIMRAM paged expansion RAM, the BBC-PRN virtual printer and the BBC-RS423 virtual serial port (see RAM Discs, JIM RAM, Printer and RS423).
The Open6502 driver is the persona of the Open6502 firmware target and of any machine without a driver of its own. It loads any configured ROM images into their bank:addr slices โ€” an image with no load address goes to the top of memory, ending at $FFFF where the vectors live (a 256-byte Woz monitor at $FF00, an 8K image at $E000, a 16K OS at $C000), and a slice of size 0 takes the whole file โ€” marks bank-0 ROM blocks read-only, and otherwise leaves the address space exactly as the persona's memory array defines it. The AppleI and BBC-B drivers share this ROM loader. On any persona, chips from the virtual device catalogue can be fitted alongside. Machine-specific drivers plug in through the same driver framework as the Z80 machines; the BBC Master's 65C12, shadow RAM and paging are handled as a mode of the BBC-B driver today, and would become a driver of their own as a sibling.

pico6510 (MOS 6510 / Commodore 64)

The pico6510 is a variant of the pico6502 board for the MOS 6510, the CPU of the Commodore 64. The 6510 is an NMOS 6502 with the same bus cycle, the same RDY behaviour and the same instruction set, undocumented opcodes included, which C64 software relies on. It adds a six-bit I/O port (P0โ€“P5) on chip, with its direction register at $0000 and its data register at $0001. On the C64, P0โ€“P2 (LORAM, HIRAM, CHAREN) select the memory map through the PLA, and P3โ€“P5 drive the cassette (write, sense, motor). The 6510 has no SYNC, no PHI1 output and no SO pin, and it takes AEC from the VIC-II to float its address bus.
Status (31 October 2026): the firmware support is written and tested in the simulator. The PICO6510 v2.3 board is in production but not yet tested on a C64. One bench check is still open: the TXS0108E level shifter on P0โ€“P5 has to be proven against the C64's pull-ups on P0โ€“P2 and the cassette motor transistor on P5, with a 74AHCT244 as the fallback.

PICO6510 Board Design (KiCad)
The PICO6510 v2.3 board is the pico6502 v2.3b design with a 6510 bus interface: the same RP2350B, ESP32, USB hub and power supply, and the same two SIL-20 round-pin headers into the CPU socket. On the interface sheet, two 74AHCT244s (U9, U10) drive the address bus, a 74AHCT245 (U8) the data bus, a 74AHCT125 (U11) the PHI2 output and R/W, and 74AHCT02 NOR gates (U12, U13) form the buffer enables, including ~EN = NOR(AEC, AEC_OVR), which floats the address bus and R/W when the VIC-II takes the bus. A TXS0108E level shifter (U15) carries the six I/O port lines P0โ€“P5 between the 3.3V RP2350 and the C64's 5V circuit.
The PICO6510 fits a 6510 socket only. Never fit it to a 6502 or 6512 socket. The 6510 moves Vcc to pin 6 and ฮฆ0 to pin 1, so in a 6502 socket the board would short +5V to A1, short the host's clock to ground, and drive 5V into an RP2350 pin. In the other direction, a pico6502 cannot be used in a C64.
KiCad 3D renders of the PICO6510 v2.3 design, component side and underside. Parts without a 3D model show as their pads.
PICO6510 Sheet 1 โ€” RP2350B Processor
As on the pico6502, but with PHI2 on GPIO29 and the port pins P0โ€“P5 on GPIO 25, 26, 28, 30, 31 and 32, where the pico6502 has SYNC, the PHI1 return, DBE, ~SO and the two clock outputs.

pico6510 Schematic Sheet 1 โ€” RP2350B Processor

PICO6510 Sheet 2 โ€” ESP32 Co-processor
The same ESP32 circuit as the pico6502; the bus-override output becomes AEC_OVR.

pico6510 Schematic Sheet 2 โ€” ESP32 Co-processor

PICO6510 Sheet 3 โ€” 6510 Bus Interface
The 6510 socket, the address, data and control buffers, the AEC enable logic and the TXS0108E port shifter, with the board's "6510 ONLY" warning.

pico6510 Schematic Sheet 3 โ€” 6510 Bus Interface

PICO6510 Sheet 4 โ€” Power Supply

pico6510 Schematic Sheet 4 โ€” Power Supply

PICO6510 Sheet 5 โ€” USB Hub

pico6510 Schematic Sheet 5 โ€” USB Hub

📄 Complete schematic โ€” pico6510 v2.3 (PDF)
👀 Interactive BOM โ€” pico6510 v2.3 (PCB component placement viewer)

One Firmware, Two Boards
There is no separate 6510 firmware model: every 6502 model (Base6502, Open6502, Apple6502, BBC6502) supports the 6510, selected by "cputype": "6510" in the partition's 6502 object. All the 6502 bus state machines carry over unchanged. On the PICO6510 board, PHI2 is moved to GPIO29, the pin every bus state machine already waits on, and the firmware sets up the pins that differ in C at boot:
  • a new seven-instruction PIO program, m6502_clock_6510, makes PHI2 follow the host's PHI0 on one pin, with the same edge placement as the 6502 clock program, in its place on PIO 2;
  • the address and cycle state machines' SET group shrinks to R/W alone, so code that would move SYNC can only move R/W, and the cycle machine's waits move to GPIO29;
  • the 6502-only programs (m6502_so and the 6512 set) are not loaded, the DBE sampler is skipped (that pin is P2 on this board), and the bus is always reported as ours: AEC reaches no GPIO. On the C64 that is safe, because the VIC-II lowers BA, wired to RDY, three cycles before it takes the bus with AEC, so the existing RDY handling halts the CPU first;
  • dbeoverride defaults to off, since the ESP32's override pin is AEC_OVR on this board and forcing it would drive the address bus under the VIC-II;
  • at power-on the shared pins are left as pulled-down inputs until the firmware knows which board it is on, so the cassette motor line is not clocked during boot.
The persona must say 6510. A 6502 persona on a PICO6510 board would drive the port pins as SYNC and the clocks, so it does not work.

The 6510 I/O Port
Core 1 implements the port directly, with no PIO: a write to $0000 or $0001 updates the register and drives the pins, values by gpio_put_masked and directions from the DDR by gpio_set_dir_masked. A read of $0001 returns the latch for output bits, the pin level for input bits P0โ€“P5, and the latch for the internal bits 6โ€“7. /RES clears the DDR and keeps the latch. The check is one address < 2 compare in the out-of-line physical and PSRAM access functions, not in the inlined hot path, and the read shadow never files $0000/$0001.
As on a real 6510, the bus cycle for $0000/$0001 still runs on the host. One difference remains: a real 6510 does not drive its data bus for these two addresses, so the C64 RAM underneath latches whatever the VIC-II left on the bus, while the pico writes the value written. Only software that reads that RAM back through the VIC-II (a "$00/$01 bleed" demo trick) can see the difference. Opcode fetches from $0000/$0001 are not redirected to the port, and virtual-mode RAM is not covered.

Configuration and Testing
There is no C64 persona yet; a minimal physical-mode partition entry is:
{ "cputype": "6510",
  "core": { "cpufreq": 150000000 },
  "memory": [],
  "drivers": [ { "name": "Open6502", "enable": 1 } ] }
The core settings are those of the Base6502 persona (the 150MHz vanilla clock). Leave dbeoverride absent or false. In the web GUI, 6510 is in the CPU Type list and DBE Override defaults off for it. In physical mode every access goes to the C64, whose PLA decides the memory map from P0โ€“P2 and the cartridge lines; a virtual C64 mode, serving RAM and ROM from PSRAM, is left for later, because the pico cannot see the cartridge lines /GAME and /EXROM. In the debug shell, busdiag adds a "6510 I/O port" line (DDR, latch, pin levels and what $01 reads). In the simulator, sim/run.sh apple1-6510 runs an Apple I host with cputype 6510: in the Woz monitor, 0.1 shows the DDR and port, and 0: 2F 37 programs them.

Build Instructions

The pico6502 uses the same build system and directory structure as the picoZ80. Please follow the picoZ80 build instructions for the full setup procedure โ€” creating the root directory, setting PICO_PATH, running get_and_build_sdk.sh, and configuring the Docker alias for ESP-IDF. The differences specific to the pico6502 are noted below.
The pico6502 firmware does not require the Zeta Z80 emulator library. No projects/Z80 clone is needed โ€” the 6502 CPU core (M6502.c) is part of the project itself, implementing all 151 official instructions and all undocumented opcodes.
Four 6502 models are built from the same source tree as the picoZ80's Z80 models. All share one core, the same defaults and the virtual device catalogue; they differ only in which machine drivers are compiled in:
Model Version Drivers Use it for
Base6502 2.343 Open6502 Universal vanilla 6502/6512 replacement; bring-up of a new board.
Open6502 1.128 Open6502 (TARGET_MODEL_OPEN) Your own board, or any machine without a driver, with virtual devices fitted from the web GUI.
Apple6502 1.129 Open6502, AppleI + CMT-ACI cassette Apple I, Replica 1, PE6502, RC6502.
BBC6502 1.187 Open6502, BBC-B, BBC-Master + Acorn interfaces BBC Model B (and Model A / Master mode) and a real BBC Master 128: tape, floppy and RAM discs, MMFS/MMFS2, Econet, SCSI / IDE Winchester, JIM paged RAM, printer, RS423 and Teletext interfaces.
Like each Z80 model, each produces four firmware variants: one per flash partition (Base6502_0x10020000, Base6502_0x10520000), each with and without the debug shell (_DBGSH). M6502.c and M6502CPU.c are compiled with partial link-time optimisation (-flto, raised inline limits) โ€” part of the speed campaign. Shipped binary names carry the model version, e.g. Apple6502_0x10020000_DBGSH_1.019.bin. The web GUI reads the firmware's family from its description and offers only that family's drivers.
Clone the Project
mkdir -p <root>/projects
cd <root>/projects
git clone <tzpuPico-repo-url> tzpuPico
Build the RP2350 Firmware
The same build_tzpuPico.sh script is used. Ensure PICO_PATH is set correctly at the top of the script, then run from the root:
cd <root>

# pico6502 vanilla firmware (Base6502 model) โ€” four variants
./build_tzpuPico.sh 6502

# Debug build (includes the debug shell)
./build_tzpuPico.sh 6502 DEBUG

# BBC6502, Apple6502 and Open6502 are built as part of the full
# all-models build; their binaries land in fw/bin/ beside the others
./build_tzpuPico.sh

Build the Econet File-Server Daemons
tools/econet/ bundles two Econet-over-IP (AUN) daemons for Linux hosts, kept verbatim from upstream so they can be built from this tree: aund (Ben Harris's AUN file server, BSD licence โ€” one directory served as a Level 3 style file server) and econet-hpbridge (the user-space bridge, file server and print server of Chris Royle's PiEconetBridge, GPLv3, built here without the Raspberry Pi Econet HAT so it runs as a pure AUN file server on any PC). build.sh checks for the tools it needs and names the package to install when one is missing; fileserver.sh starts a ready-configured server in one command. Setup and use are described in the User Manual โ€” Running an Econet File Server.
# Once (Debian/Ubuntu; Fedora: gcc make autoconf automake flex libxcrypt-devel openssl-devel)
sudo apt install build-essential autoconf automake flex libcrypt-dev libssl-dev

cd <root>/projects/tzpuPico
tools/econet/build.sh            # both daemons -> tools/econet/bin/aund, tools/econet/bin/econet-hpbridge
tools/econet/build.sh aund       # or just one: aund | hpbridge
tools/econet/build.sh clean

# One-command file server (builds econet-hpbridge first if needed)
tools/econet/fileserver.sh start            # station 254 on UDP 32768, serving tools/econet/fileserver/fsroot
tools/econet/fileserver.sh status | log | stop
Build ESP32 Firmware Separately
cd <root>/projects/tzpuPico/esp32
idf54 build
See the picoZ80 build instructions for the idf54 Docker alias definition.

Flashing
The flashing procedure is identical to the picoZ80 โ€” initial RP2350 flash via USB mass-storage, initial ESP32 flash via esptool, and subsequent updates via the OTA web pages. See the picoZ80 Flashing section for full details including the esptool command and board revision notes.

Debugging

Debugging the pico6502 follows the same procedure as the picoZ80 Debugging section โ€” refer there for the full description of hardware connections, OpenOCD setup, and global GDB initialisation. The only differences from the picoZ80 are the main firmware build directory (Base6502 instead of BaseZ80) and the add-auto-load-safe-path entry in ~/.gdbinit.

RP2350 โ€” SWD Debugging
Connect a CMSIS-DAP probe to SWCLK (Pin 1), SWDIO (Pin 2), and GND (Pin 5) of the 6-pin debug header. The pico6502 uses the same custom rp2350_tzpu.cfg OpenOCD target as the picoZ80 โ€” see the picoZ80 Debugging section for the full file contents. Install it once, then start OpenOCD:
sudo cp rp2350_tzpu.cfg /usr/local/share/openocd/scripts/target/
openocd -f interface/cmsis-dap.cfg -f target/rp2350_tzpu.cfg -c "adapter speed 5000"
Add the following to ~/.gdbinit (adjust paths to absolute if needed):
set history save on
set history filename ~/.gdb_history
set history size 65536
add-auto-load-safe-path build/bin/model/Base6502/.gdbinit:build/bin/model/Bootloader/.gdbinit
Bootloader Debugging
# Core 0
cd build/bin/model/Bootloader
cp ../../../../.gdbinit.bootloader.3333 .gdbinit
gdb-multiarch Bootloader.elf

# Core 1 (separate terminal)
cd build/bin/model/Bootloader
cp ../../../../.gdbinit.bootloader.3334 .gdbinit
gdb-multiarch Bootloader.elf
Main Firmware Debugging
# Core 0
cd build/bin/model/Base6502
cp ../../../../.gdbinit.3333 .gdbinit
gdb-multiarch Base6502_0x10020000.elf

# Core 1 (separate terminal)
cd build/bin/model/Base6502
cp ../../../../.gdbinit.3334 .gdbinit
gdb-multiarch Base6502_0x10020000.elf

ESP32 โ€” USB Debugging
Connect a USB cable to the ESP32 USB port on the pico6502 board. The ESP32-S3 built-in USB-JTAG interface requires no external probe. Start OpenOCD and then launch the Xtensa GDB:
openocd -f board/esp32s3-builtin.cfg
xtensa-esp32s3-elf-gdb esp32/build/main.elf
(gdb) target extended-remote :3333

Configuration (JSON)

The pico6502 uses the same JSON configuration mechanism as the picoZ80. The top-level key is "rp2350", with a "core" section for RP2350 operating parameters. The CPU-specific section uses the key "6502" (rather than "z80") and, exactly like "z80", is an array indexed by flash partition โ€” index 0 is the unused bootloader slot, indices 1 and 2 configure the two firmware partitions. Since the 6502 has no separate I/O space, there is no "io" array โ€” all peripheral mappings appear in the "memory" array as FUNC-type blocks. The configuration is read from the SD card when it is applied (web GUI Apply or reload), minified and stored in flash, and the board then boots from the flash copy exactly as the picoZ80 does.
{
  "esp32": {
    "core": {
      "device": "6502",
      "mode":   0
    },
    "wifi": {
      "override":  1,
      "wifimode":  "client",
      "ssid":      "MyNetwork",
      "password":  "MyPassword",
      "ip":        "192.168.1.192",
      "netmask":   "255.255.255.0",
      "gateway":   "192.168.1.1",
      "dhcp":      0,
      "webfs":     "webfs",
      "persist":   0
    }
  },
  "rp2350": {
    "core": {
      "cpufreq":   300000000,
      "psramfreq": 133000000,
      "voltage":   1.10
    },
    "6502": [
      { },
      {
        "cputype":     "6502",
        "dbeoverride": true,
        "core":        { "cpufreq": 340000000, "psramfreq": 133000000, "voltage": 1.20 },
        "memory":      [ ... ],
        "drivers":     [ ... ]
      }
    ]
  }
}
esp32 โ€” ESP32 Configuration
The esp32 top-level object configures the ESP32 co-processor. It contains two sub-objects: core and wifi.
esp32.core
Key Type Description
device string CPU device type โ€” tells the ESP32 which processor personality to use. Valid values: "Z80" (picoZ80), "6502" (pico6502), "6512" (pico6512).
mode integer Default boot mode: 0 = client (station) mode, 1 = Access Point mode. Persisted in NVS.
esp32.wifi
The wifi object injects WiFi credentials and network settings from config.json, overriding whatever is stored in NVS. Set override to 0 to ignore this block and rely on previously persisted NVS settings.
Key Type Description
override 0/1 Master switch. 1 = apply all settings below; 0 = ignore this block and use persisted NVS settings.
wifimode string "ap" for Access Point mode; "client" for client/station mode.
ssid string WiFi network name to create (AP) or join (client).
password string WiFi passphrase.
ip string Fixed IP address (e.g. "192.168.1.192").
netmask string Subnet mask (e.g. "255.255.255.0").
gateway string Default gateway address.
dhcp 0/1 Client mode only. 1 = DHCP; 0 = use fixed ip/netmask/gateway.
webfs string Override web filesystem root directory on SD card (default "webfs").
persist 0/1 1 = write resolved settings back to NVS; 0 = apply for this session only.

core โ€” RP2350 Operating Parameters
Key Type Description
cpufreq integer RP2350 system clock frequency in Hz (e.g. 340000000 for the BBC persona, 150000000 for the vanilla persona). A boot that hangs on the watchdog falls back to a 150 MHz safe mode.
psramfreq integer PSRAM SPI clock frequency in Hz (e.g. 133000000 for 133 MHz).
voltage float RP2350 core voltage (e.g. 1.20). Headroom is per board: 340 MHz runs at 1.20 V on the reference unit, 330 MHz needed ~1.35 V on another. Raise the voltage before blaming anything else.
The same three keys may be repeated in a "core" object inside each partition entry; the web GUI stores a partition's clock and voltage there, and the global block is only the fallback. Both are logged at boot (CFG: partition N core: ...).

6502 โ€” CPU Partition Entry
Each entry of the "6502" partition array carries the CPU selection alongside the memory map and drivers:
Key Type Description
cputype string "6502", "6512", "65C02" or "65C12". 6502 and 6512 are the same NMOS processor above the pins โ€” identical registers, instruction set (including the undocumented opcodes) and cycle timing โ€” differing only in clocking: the 6502 has the on-chip clock generator (PHI0 in, PHI1/PHI2 driven out by the firmware); the 6512 has none and takes host-supplied phases. The C variants select the same clocking with the CMOS instruction-set overlay.
dbeoverride boolean Controls the DBE_OVR buffer-enable override of the v2.3 buffered interface (~EN = NOR(DBE, DBE_OVR), with DBE_OVR driven from the ESP32). The supplied 6502 personas set true (a 6502 host has no DBE pin); the BBC Master persona and the GUIโ€™s 6512 default set false. The ESP32 drives DBE_OVR from the value the RP2350 resolves for the running partition โ€” see the Technical Guide.
core object Per-partition cpufreq / psramfreq / voltage override (see above).
phi2wired boolean 6512-type host whose socket has pin 37 linked to pin 39. Default false. Never fit that link in a 6502 machine, and never use it on a BBC Master.
clkfly boolean 6512 host: use the predictive โ€œflywheelโ€ PHI2 copy (default true) rather than a plain edge follower.
flylow ns, 100โ€“400 Flywheel copy: width of the low phase after each fall (default 254).
flywin ns, 12โ€“200 Flywheel copy: the window around the expected next fall in which the real clock is looked at (default 60).
flyfall ns, 0โ€“90 Flywheel copy: how far its fall trails the hostโ€™s (default 35), matching a real 65SC12โ€™s PHI2 OUT delay.
gclkfall ns, 0โ€“90 RDY-gated clock: its fall after the hostโ€™s (default 9).
phi2rise ns, 0โ€“240 Edge follower: its rise after the hostโ€™s fall (default 30); 0 = a plain level repeater.
clklock ns, 0โ€“230 Edge follower: how long pin 37 is ignored after each edge (default 190), rejecting ground bounce.
dbedrive boolean The RP2350 drives the socketโ€™s DBE node high (default false: sensed only).
ioparkaddr hex string Address the bus engine parks on after an I/O access when address parking is enabled. Defaults to 0xFFFC (the reset vector โ€” mapped ROM on any bootable 6502) once a PHYSICALHW region is declared.
memory array The memory map โ€” see below.
drivers array Driver entries, each optionally carrying ROM images, bus-engine tuning overrides and machine options โ€” see below.
device array Virtual chips fitted to this board โ€” see Virtual Devices.
interlink array The netlist wiring the chipsโ€™ pins to each other and to the CPUโ€™s cpu.IRQ, cpu.NMI and cpu.RESET.

memory โ€” Memory Map
Because the 6502 is a memory-mapped-I/O architecture, all peripherals appear in the memory array. Use FUNC type for any address range that maps to a virtual device handler.
Key Type Description
enable 0/1 Whether this entry is active.
addr hex string Start address in the 6502 address space.
size hex string Region size.
type string PHYSICAL, PHYSICALVRAM, PHYSICALHW, RAM, VRAM, ROM, FUNC.
bank integer PSRAM bank number for RAM/ROM types.
task string Optional task identifier: COPYTOPHYSICAL / COPYTORAM copy the region between host memory and PSRAM at init.
file string SD-card path to a ROM image to load at boot.
"memory": [
  {
    "enable": 1,
    "addr":   "0xE000",
    "size":   "0x2000",
    "type":   "ROM",
    "bank":   0,
    "task":   "",
    "file":   "/ROM/host_bios.rom"
  },
  {
    "enable": 1,
    "addr":   "0x0000",
    "size":   "0xE000",
    "type":   "RAM",
    "bank":   0,
    "task":   "",
    "file":   ""
  },
  {
    "enable": 1,
    "addr":   "0xC000",
    "size":   "0x0010",
    "type":   "FUNC",
    "bank":   0,
    "task":   "via6522",
    "file":   ""
  }
]

drivers โ€” Machine Drivers, ROM Loaders and Bus Tuning
Each driver entry selects a machine driver by name (Open6502 or BBC-B), optionally loads ROM images into PSRAM at startup, and may override the bus-engine tuning that the driver applies as its built-in defaults. There are no address-remap or I/O-remap sub-tables; all memory layout is defined in the memory array. Machine knowledge belongs to the driver: the BBC-B driver's defaults apply when it is selected, and any of the tuning keys below placed in the driver object overrides them (the web GUI's Bus Engine Tuning panel writes exactly these keys, and only the ones you set).
Key Type Description
enable 0/1 Whether this driver entry is active.
name string Driver name, matched case-insensitively against the firmwareโ€™s driver table: Open6502 (every 6502 model), BBC-B and BBC-Master (BBC6502), AppleI (Apple6502).
terminal string AppleI only: physical (default), virtual or mirror โ€” where the Apple Iโ€™s keyboard and display live (see Machine Personas).
usb integer AppleI only: the USB serial port the virtual or mirrored terminal uses โ€” 2 (serial A, default), 3 (serial B) or 4 (printer port). Avoid a port a catalogue device already uses.
rom array ROM images to load into PSRAM at boot.
ioregionlo / ioregionhi integer The hostโ€™s I/O window. Declaring it is what enables speculation โ€” the engine never bursts into or across it. (BBC-B default 0xFC00โ€“0xFF00.)
shadowwrlo / shadowwrhi integer Address range that this CPU is the sole writer of, kept as a write-through shadow; writes outside it only invalidate (sideways ROM ignores writes). (BBC-B default 0x0000โ€“0x8000.)
pageregaddr / pageregmask integer The paging register and its decode mask; a write to it invalidates the paged region. (BBC-B: ROMSEL 0xFE30, mask 0xFFF0.)
pageregionlo / pageregionhi integer The region the paging register banks. (BBC-B default 0x8000โ€“0xC000.)
burstspec 1โ€“6 Speculative opcode burst depth. (BBC-B default 3, the best measured balance on the board; MMFS-safe once ROMSEL is declared.)
busserve / buspipe / fastfetch boolean Tri-state overrides (absent = driver default) for shadow serve, the pipelined issue path and fast opcode fetch.
The BBC-B driver also accepts its machine options in the same object:
Key Type Description
modelaram boolean Model A host: overlay 16K of PSRAM-backed RAM at $4000โ€“$7FFF so the OS sees a 32K machine (program/data space; screen behaviour on a Model A is still to be verified).
mastermode boolean BBC Master 128 memory model โ€” LYNNE 20K shadow, HAZEL 8K, ANDY 4K, with ACCCON ($FE34) virtualised. Expects a MOS 3.x image in the OS socket and forces the CMOS core.
ossocket object { "enable", "file", "fileoffset" } โ€” a 16K OS ROM virtualised over $C000โ€“$FFFF; the I/O window always passes through to the bus and the $FF00โ€“$FFFF vectors come from the image. fileoffset picks the OS inside a larger (MegaROM) image.
sockets array { "socket" 0โ€“15, "enable", "ram", "file", "fileoffset", "persist" } โ€” virtual sideways ROM/RAM sockets. An enabled socket overrides the physical bank: ram: true is 16K sideways RAM, otherwise file is a 16K ROM image. The ROMSEL write still reaches the hardware latch.
presetdiscroms boolean Fill banks 9 (DFS) and 13 (ADFS) from a Master MegaROM.
persist string "sd" (default), "flash" or "off" โ€” where virtual CMOS and sideways RAM contents are saved.
if array Bindable interfaces. CMT-UEF: { "name": "CMT-UEF", "speed": ..., "param": [ { "file": "cmt/tape.uef" }, ... ] } โ€” the tape deck with up to six slots. BBC-FDC: { "name": "BBC-FDC", "chip": "8271|1770", "board": "acorn|master|watford", "speed": 0, "param": [ drive 0 side A, drive 0 side B, drive 1 side A, drive 1 side B ] } โ€” chip selects the Intel 8271 (default, $FE80) or a WD1770; board (1770 only) selects the latch and register decode: acorn (Model B upgrade board, latch $FE80, chip $FE84), master (Master 128, latch $FE24, chip $FE28 โ€” defaults on when mastermode is set, and lets the Master MOSโ€™s DFS/ADFS banks be preset) or watford. Each slot is { "file": "dsk/x.ssd", "type": "auto|ssd|dsd|mmb|adf|adl|dds|ddd" }; a two-sided image (dsd, adl, ddd, or an adf L image) in a side-A slot supplies both sides, a second single-sided image in the side-B slot pairs two files into one double-sided disc, mmb/BEEB.MMB:<n> picks a disc from a bundle, auto deduces the kind from extension and size; "speed": 1 adds mechanical spin-up, seek, settle and rotation timing. BBC-MMC: { "name": "BBC-MMC", "param": [ { "file": "mmfs" } ], "format": "dir|mmb" } โ€” the virtual MMFS card. A folder (the default mmfs) is presented to MMFS2 as a FAT32 card of .ssd/.dsd images and sub-directories, with any BEEB.MMB inside it also serving the original MMFS; an .mmb file is served alone as BEEB.MMB on a FAT16 card. format forces the choice. On a BBC Master, or with mastermode, an FDC entry without chip defaults to the 1770 on the Master board. BBC-NET: { "name": "BBC-NET", "station": 0, "net": 0, "aunport": 32768, "server": "192.168.1.210:32768", "serverstation": 254, "servernet": 0, "hosts": [ { "station": 10, "ip": "192.168.1.50", "port": 32768 } ] } โ€” the Econet module; station 0 takes the low byte of the pico6502โ€™s IP address (the AUN convention), server is the file serverโ€™s address (empty = <subnet>.254:32768), and hosts[] maps any station that does not follow the convention. BBC-SCSI: { "name": "BBC-SCSI", "chip": "scsi|ide", "cache": 128, "param": [ { "enable": 1, "file": "hd/BBC/scsi0.dat", "readonly": 0 }, { ... }, { ... }, { ... } ] } โ€” the virtual Winchester on the 1 MHz bus; param[n] is ADFS drive :n (an image of raw 256-byte sectors, with an optional 22-byte .dsc of geometry beside it), readonly refuses writes with disc error 17, chip selects the Acorn SCSI host adapter ($FC40โ€“$FC43, default) or the 8-bit IDE / CompactFlash task file ($FC40โ€“$FC47), and cache is the PSRAM write-back block cache in KB (64โ€“512, default 128, allocated from what the other interfaces leave). See BBC Winchester. RAM discs: in any BBC-FDC or BBC-SCSI slot, "file": "ram:<size>[K|M][:<persist path>]" makes that drive a disc in PSRAM โ€” formatted empty at mount (floppy geometry by kind or size class: 200K SSD, 400K DSD, 160K/320K/640K ADFS S/M/L, 360K/720K DDFS; a Winchester RAM disc has a fixed capacity), loaded from the persist file when one is named and it exists, written back by โ€œSave RAM discsโ€ and before a config apply. BBC-JIMRAM: { "name": "BBC-JIMRAM", "size": 512, "bytemode": 0, "param": [ { "enable": 1, "file": "" } ] } โ€” paged RAM on the 1 MHz bus, size 64โ€“2048 KB, param[0].file an optional image loaded into it at boot, bytemode 1 also decodes $FC00โ€“$FC03. BBC-PRN: { "name": "BBC-PRN", "idle": 3, "splitff": 0, "forward": "", "param": [ { "enable": 1, "file": "prn/BBC" } ] } โ€” the virtual printer; param[0].file is the spool folder (it must exist), idle the seconds without a byte that end a job, splitff 1 ends a job at a form feed, forward an optional raw://a.b.c.d:9100 network printer. BBC-RS423: { "name": "BBC-RS423", "pace": 1, "param": [ { "enable": 1, "file": "usb" } ] } โ€” the serial port; param[0].file is the transport (usb, tcp://:port to listen, tcp://a.b.c.d:port to connect out), pace 1 delivers at the selected baud, 0 as fast as the ACIA is read. BBC-TTX: { "name": "BBC-TTX", "param": [ { "enable": 1, "file": "ttx/BBC/ceefax.t42" }, { "enable": 1, "file": "tcp://192.168.1.20:19761" }, { "enable": 0, "file": "" }, { "enable": 0, "file": "" } ] } โ€” the Teletext adapter; param[n].file is the source of channel n of the control latch: a .t42 packet stream or an 860-byte-field capture on the SD card, played in a loop, or tcp://a.b.c.d:port, a teletext packet server; empty or disabled = no signal on that channel. The Teletext ROM goes in a sideways socket, not in rom[]. See RAM Discs, JIM RAM, Printer, RS423 and Teletext.

rom[] entry:

Key Type Description
enable 0/1 Whether this ROM image is loaded.
file string SD-card path to the ROM binary.
loadaddr array Load address descriptors.

loadaddr[] entry:

Key Type Description
enable 0/1 Whether this load address entry is active.
position integer Index within the file (for multi-ROM files).
addr hex string Destination address in the 6502 address space.
bank integer PSRAM bank to load into.
size hex string Number of bytes to load.
"drivers": [
  {
    "enable": 1,
    "name":   "BIOS",
    "rom": [
      {
        "enable":   1,
        "file":     "/ROM/host_bios.rom",
        "loadaddr": [
          {
            "enable":   1,
            "position": 0,
            "addr":     "0xE000",
            "bank":     0,
            "size":     "0x2000"
          }
        ]
      }
    ]
  },
  {
    "enable": 1,
    "name":   "CharROM",
    "rom": [
      {
        "enable":   1,
        "file":     "/ROM/charrom.bin",
        "loadaddr": [
          {
            "enable":   1,
            "position": 0,
            "addr":     "0xB800",
            "bank":     0,
            "size":     "0x0800"
          }
        ]
      }
    ]
  }
]

device / interlink โ€” Virtual Devices
The pico6502 shares the picoZ80's virtual device framework (src/devices.c): a catalogue of register-accurate chip models that can be fitted to a board, plus an interlink netlist that wires their pins to each other and to the CPU. On a 6502 a chip is always decoded in memory โ€” there is no I/O space โ€” at whatever address and size the device entry gives, over whatever the memory map has there. A chip's interrupt output reaches the 6502 through the netlist: cpu.IRQ is a level (wire-ORed with the physical /IRQ and sampled every instruction), cpu.NMI an edge. There is no interrupt-acknowledge cycle, so Z80-family parts (CTC, PIO, DART) run with their interrupts as plain lines rather than in vectored mode, and the Z80 DMA and WD1773 are not offered. The web GUI's Devices and Connections sections write these arrays and wire a new chip's interrupt to cpu.IRQ automatically. The catalogue on a 6502:
Device What it is 6502 notes
MC6850 Serial port (68B50 ACIA) Bytes travel over a USB serial port on the host PC.
I8251 Serial port (8251 USART) Asynchronous mode over a USB serial port.
Z80DART Dual serial port (Z80 DART) Two channels over USB serial; the interrupt joins cpu.IRQ (no vectored mode on a 6502).
Z80CTC Counter / timer (CTC) Periodic interrupts and baud rates; interrupt joins cpu.IRQ.
Z80PIO Parallel I/O (PIO) Two 8-bit handshaked ports; interrupt joins cpu.IRQ.
PIT8253 Interval timer (8253 / 8254) Three counters, six modes.
PPI8255 Parallel interface (8255) Three 8-bit ports, bit set/reset on port C.
MSM5832 Real-time clock Takes its time from the ESP32 once the network has set it.
Centronics Printer port Output appears on a dedicated USB serial channel.
Latch Latch / port A write drives eight wires, a read samples eight wires: banking and control glue.
SignalPort Signal port Maps eight netlist wires onto one address for test and bridging.
MC6854 Econet (68B54 ADLC over AUN/IP) The Econet engine in device mode; one per board, not alongside the BBC personaโ€™s BBC-NET interface.
WD1770 Floppy controller (WD1770) DFS/ADFS images from the SD card; drive, side, density and reset are pins. One per board.
I8271 Floppy controller (Intel 8271) DFS images from the SD card. One per board.
The JSON shape, the pin list of every chip and the netlist operators are the picoZ80's โ€” see the picoZ80 Technical Guide โ€” Virtual Device Framework and the 6502 specifics in the pico6502 Technical Guide. How many chips a board can carry depends on the firmware, because each model trades device instances against the RAM its own drivers need:
Firmware Device tier Chips Serial devices Printer ports
Open6502 open-6502 12 6 4
Base6502 full-6502 8 4 2
Apple6502, BBC6502 small 4 1 1
Devices work on every 6502 model and every persona; the MC6854, WD1770 and I8271 share one engine with the BBC persona's interfaces, so one of each per board and not alongside the matching interface.

Apple I Cassette โ€” the CMT-ACI Interface
The AppleI driver's if array binds CMT-ACI, a virtual Apple Cassette Interface card at $C000โ€“$C0FF. It decodes exactly as the real card does. Any access to $C000โ€“$C0FF toggles the tape output flip-flop, reads there return PROM bytes, and reads in $C080โ€“$C0FF also sample the tape input. The card's 256-byte PROM โ€” the Woz ACI firmware, which runs at $C100 โ€” comes from the interface's rom entry. With no enabled rom entry, whatever $C100โ€“$C1FF already holds is used: a real card's PROM, or a driver ROM.
"drivers": [ { "name": "AppleI", "enable": 1, "terminal": "virtual", "usb": 2,
               "if": [ { "name": "CMT-ACI", "type": "VIRTUAL", "enable": 1, "leader": 1.0,
                         "rom":   [ { "enable": 1, "file": "roms/apple1/wozaci.rom" } ],
                         "param": [ { "enable": 1, "file": "cmt/apple1/BASIC.wav" } ] } ] } ]
Key Type Description
rom array The cardโ€™s PROM: the 256-byte ACI firmware (a 512-byte $C000โ€“$C1FF dump also works), placed at $C100โ€“$C1FF and captured to flash with the configuration.
param array The tape carousel, up to six { "file" } slots. A .wav or .aif file is a recording: PCM 8 or 16-bit, mono or stereo, any rate and any length. Anything else is a raw binary forming one record.
leader number Minimum leader tone in seconds, default 1 (0.1โ€“30). The leader always runs until the firmwareโ€™s settle delay after R is over, so a short value is safe.
Tapes can also be managed live from the Dashboard's CMT menu. It lists the carousel and lets you select a tape, switch the deck between Virtual and Real (a real ACI card's cassette), or add a tape from the SD card.
Recordings are demodulated as the card reads them: zero crossings against a threshold that follows the signal level, with each cycle classified against the recording's own leader, so clicks and dropouts are absorbed. Every tape then plays as an ideal waveform synthesised at the card's exact cycle timing. Loading is therefore correct at any CPU speed, PHYSICAL or VIRTUAL. The tape moves only while the firmware polls the input, and each R plays the next record, so 004A.00FFR 0300.0FFFR reads an Integer BASIC program's two records. Programs saved with W are captured from the output flip-flop's edges. When the output goes quiet, the session is written to the SD card as cmt/apple1/ACI_nnn.wav (8-bit mono, with the card's 10-second leader per record, so it plays into a real Apple I) and ACI_nnn.bin (the raw bytes). The recording is also placed in the deck so R reads it straight back. Verified in the simulator with real recordings of Integer BASIC (byte-identical to the ROM image), Star Trek, Blackjack and Lunar Lander. Enable the interface only when no real ACI card's cassette is in use, because the virtual card answers $C000โ€“$C0FF.

BBC Master 128
The BBC-Master driver puts the pico6502 into a real BBC Master 128, in place of its 65SC12. It is the BBC-B driver in a Master-host mode: the Master memory model applies (ROMSEL with ANDY on bit 7, the 1770 at $FE24/$FE28, MOS 3.x), but LYNNE, HAZEL, ANDY, ACCCON, the CMOS clock and both VIAs are the machine's own hardware and are not emulated. This is different from the older mastermode option, which gives a Model B host a Master memory model in PSRAM. Set cputype to "65C12" (6512 clocking plus the CMOS instruction set MOS 3.x needs) and dbeoverride to false.
The 6512-type socket. A Model B's 6502 makes its own clock and the B slows it by stretching the clock. The Master's 65SC12 is given PHI2 on pin 37, never stretched, and slows for the 1 MHz bus through RDY. The pico6502 cannot see pin 37 from its bus state machines, so it drives a copy of PHI2 onto the pin-39 node. Because pin 37 chatters while the pico's own flash and PSRAM are busy, the copy is a flywheel: it predicts each edge and looks at the real clock only in a narrow window around the expected fall, so a glitch can shift an edge slightly but never add or lose a cycle. A second state machine samples RDY after each rise and produces a clock edge only for accepted cycles; the bus state machines run on this RDY-gated clock, so a held cycle simply does not happen for them โ€” exactly as on a real 65SC12, with no knowledge of where the I/O is. On a 6512 host the read is sampled just before the host's fall, because a 6522 VIA releases the bus 10 ns after it. The timing keys (clkfly, flylow, flywin, flyfall, gclkfall, phi2rise, clklock, dbedrive) default to the measured Master 128 values and appear in the GUI only for a 6512 or 65C12 partition.
Shadow RAM, steered. Two regions of a Master can switch between two RAMs behind the CPU's back: $3000โ€“$7FFF between main RAM and LYNNE, and $C000โ€“$DFFF between the MOS and HAZEL. The pico6502 watches every write to ACCCON ($FE34), which still reaches the hardware, and steers its speed engine's shadow of each window accordingly, parking and restoring its valid bits rather than copying data. After power-on and every BREAK, ACCCON is unknown, so both windows stay off the shadow until the first ACCCON write. When the MOS is served from the pico6502, opcode fetches in $C000โ€“$DFFF are echoed on the bus with SYNC so the Master's memory controller still sees them.
Sockets and interfaces. All sixteen banks are sockets: an enabled socket (ROM image or RAM) overrides the physical bank, and banks 4โ€“7 are the Master's own sideways RAM unless overridden. The OS socket can serve the MOS from the SD card; a 128K Master MegaROM image presets banks 9โ€“15 (DFS, ViewSheet, Edit, BASIC, ADFS, View, Terminal), an explicit socket always winning. The virtual 1770 hides the real one and masks its NMIs. The Winchester interface (BBC-SCSI) lives in FRED at $FC40, where the Master's ADFS 1.50 looks for the Acorn SCSI host adapter โ€” *CONFIGURE HARD or *DIR :0 selects it โ€” and as the IDE task file for an ADFS 1.53 IDE ROM in a socket (with the on-board ADFS unplugged). Econet uses ANFS 4.25 (DNFS 1.20 reports "Line jammed" on a Master); because ANFS takes the station number from the Master's real CMOS, the driver adopts the station the ROM transmits as and logs a hint (*FX 162,0,n then CTRL-BREAK, or set station) if it differs from the configuration.
{
  "cputype": "65C12",
  "dbeoverride": false,
  "core": { "voltage": 1.20, "cpufreq": 330000000, "psramfreq": 133000000 },
  "memory": [ ],
  "drivers": [ {
      "enable": 1, "name": "BBC-Master",
      "type": "PHYSICAL", "speed": "real", "timing": "locked",
      "ossocket": { "enable": 0, "file": "" },
      "sockets": [ { "socket": 8, "enable": 1, "ram": false, "file": "roms/bbc/MMFS2.rom" } ],
      "rom": [ ],
      "if": [
        { "name": "BBC-MMC", "enable": 1, "param": [ { "enable": 1, "file": "mmfs" } ] },
        { "name": "BBC-FDC", "enable": 0, "chip": "1770", "board": "master",
          "param": [ { "file": "" }, { "file": "" }, { "file": "" }, { "file": "" } ] },
        { "name": "CMT-UEF", "enable": 0, "speed": 1, "param": [ ] },
        { "name": "BBC-NET", "enable": 0, "station": 0, "net": 0, "server": "",
          "serverstation": 254, "aunport": 32768 },
        { "name": "BBC-SCSI", "enable": 0, "chip": "scsi", "cache": 128,
          "param": [ { "enable": 1, "file": "hd/BBC/scsi0.dat", "readonly": 0 },
                     { "enable": 0, "file": "" }, { "enable": 0, "file": "" }, { "enable": 0, "file": "" } ] },
        { "name": "BBC-JIMRAM", "enable": 0, "size": 512, "bytemode": 0, "param": [ { "enable": 1, "file": "" } ] },
        { "name": "BBC-PRN", "enable": 0, "idle": 3, "splitff": 0, "forward": "", "param": [ { "enable": 1, "file": "prn/BBC" } ] },
        { "name": "BBC-RS423", "enable": 0, "pace": 1, "param": [ { "enable": 1, "file": "usb" } ] },
        { "name": "BBC-TTX", "enable": 0, "param": [ { "enable": 1, "file": "ttx/BBC/ceefax.t42" }, { "enable": 0, "file": "" },
                                                     { "enable": 0, "file": "" }, { "enable": 0, "file": "" } ] } ]
  } ],
  "device": [ ], "interlink": [ ]
}
Verified on a real Master 128: MOS boot with both the machine's MOS and one served from the SD card, MODE 0, 7, 128 and 135, *ROMS showing all sixteen banks, BASIC, keyboard, sound, timer interrupts, BREAK and CTRL-BREAK, Elite, the 1770 floppy interface, UEF tape loading, the MMFS2 directory card (Elite loaded from a folder of 603 images), Econet (ANFS 4.25 to a PiEconetBridge file server, *I AM SYST, a BASIC program saved from a Model B loaded on the Master) and the Winchester on both controllers โ€” ADFS 1.50 on the SCSI host adapter (a RetroClinic image catalogued, SAVE and LOAD, SuperForm's Mode Sense / Mode Select / Format Unit / Verify) and ADFS 1.53 on the IDE task file (HDInit's Investigate, Scan, Format of a 40 MB image, *MOUNT, SAVE and LOAD). With the MOS served from the pico6502 the Master runs a BASIC loop at 165โ€“182% of a real Master's speed, and its command prompt at 225โ€“232%. VIRTUAL mode and tape saving on a real Master are not yet verified. The design records are docs/PICO6502_MASTER_PERSONA_PLAN.md, docs/PICO6502_6512_HOST_DESIGN.md and docs/PICO6502_BBC_MMFS2_DESIGN.md.

BBC Winchester โ€” SCSI and IDE Hard Discs
The BBC-SCSI interface (BBC6502 firmware, Model B and Master personas alike) is a virtual hard disc on the BBC's 1 MHz bus. ADFS treats a Winchester as drives :0 to :3 with its full directory tree and 256-byte sectors โ€” up to 512 MB per drive, the machine's native large-storage format โ€” and the pico6502 serves up to four image files from its SD card as those drives. Nothing else on the 1 MHz bus is touched: the interface overlays only its own registers in FRED, and the rest of $FC00โ€“$FDFF stays physical. Two register maps are offered, chosen by the chip key (the GUI's Controller selector), because the two families of ADFS ROM drive different hardware:
Controller Registers Filing systems and tools Notes
scsi (default) โ€” Acorn SCSI host adapter $FC40 data bus, $FC41 status (C/D, I/O, REQ, IRQ, BSY, MSG), $FC42 SEL, $FC43 IRQ enable ADFS 1.30 (Model B with a 1770), ADFS 1.50 (Master, the MOSโ€™s own); the Acorn Winchester utilities โ€” SuperForm, HDINIT, HDFORM, VERIFY Behaves as the Acorn adapter in front of an Adaptec ACB-4000: Test Unit Ready, Request Sense, Format Unit, Read/Write(6), Seek, Translate, Mode Select/Sense, Start/Stop and the ten-byte Verify. Drives :0โ€“:3 are LUNs 0โ€“3.
ide โ€” 8-bit IDE / CompactFlash ATA task file $FC40โ€“$FC47 (data, error/features, sector count, sector number, cylinder low/high, drive/head, status/command); $FC48โ€“$FC4F alias it ADFS 1.33 / 1.53 IDE (J.G. Harstonโ€™s patched ADFS) and JGHโ€™s HDInit; RetroClinic CompactFlash images The register map of JGHโ€™s BBC IDE board and the RetroClinic kits: CHS with the geometry the ROM programs (4 heads ร— 64 sectors), one 256-byte ADFS sector per IDE sector over the 8-bit path. Drives :0/:1 are IDE device 0, :2/:3 device 1. Identify reports a โ€œpico6502 virtual IDE driveโ€.
Images. The same files serve either controller: raw 256-byte sectors, LBA ร— 256 โ€” BeebEm's scsi0.dat / ide0.dat, RetroClinic's CompactFlash .dat images and the archives' blank, pre-initialised 20MbHDD.adl-style discs load unchanged. An optional 22-byte .dsc beside an image holds the Mode Select geometry HDINIT writes (cylinders, heads, step rate) and is synthesised from the file size when absent. ADFS takes the disc size from its own free-space map in sectors 0โ€“1, so sparse images โ€” a RetroClinic image holding only the sectors ADFS has used, 2.8 MB on the card declaring a 512 MB disc โ€” mount correctly: the drive's capacity is the larger of the file, the map and the .dsc geometry, a sector beyond the file reads as zeros, and a write beyond it grows the file. A fresh disc comes from the Dashboard's Hard Disc โ†’ Create Image: the ESP32 writes a formatted, empty ADFS disc โ€” free-space map and root directory, with a title, boot option and size from 4 MB to the 512 MB ADFS maximum, an optional .dsc, and optionally mounted in a drive at once โ€” so it works immediately with no HDINIT or SuperForm pass, and costs 2 KB on the card until it is used. An empty file of the wanted size (truncate -s 40M scsi1.dat) formatted on the BBC by HDINIT or SuperForm (SCSI) or HDInit (IDE) works too. A drive marked readonly refuses writes with ADFS "Disc error 17". A slot may also hold a RAM disc โ€” ram:2M, or ram:2M:hd/BBC/fast.dat to load and save it through that file โ€” see RAM Discs.
How it runs. The register model runs on Core 1 inside the I/O window; sectors move through a direct-mapped PSRAM block cache (512-byte blocks โ€” two ADFS sectors, one SD sector โ€” write-back with a 300 ms settle, cache KB in size) filled and flushed by Core 0 through the same inter-core sector messages the floppy controller uses. REQ is the only timing the ADFS driver watches, so a sector not yet cached simply holds REQ low (BSY on IDE) until Core 0 has fetched it โ€” the ROM waits as it would for a seek, and nothing blocks the CPU core. Format Unit, the .dsc store and the image sizing are Core 0 jobs, formatting in 128 KB chunks so the other interfaces keep being served. The cache is allocated last from the PSRAM arena โ€” the driver buffers above the persona's own slots, handed out in init order so a disabled interface leaves its room to the others (the cassette deck alone takes 2.6 MB); the console reports the arena at boot. Until at least one image has mounted the adapter is absent โ€” its registers read $FF โ€” so ADFS fails its presence test and falls back to the floppy instead of waiting for ever on a drive that is not there, as a real Master does with its Winchester switched off. Image sizing uses the ESP32's file-size command (IPCF_CMD_STAT, ESP32 firmware 3.86 or later); an older ESP32 is detected and the image sized by probe reads instead.
{ "name": "BBC-SCSI", "type": "VIRTUAL", "enable": 1, "chip": "scsi", "cache": 128, "rom": [ ],
  "param": [ { "enable": 1, "file": "hd/BBC/scsi0.dat", "readonly": 0 },
             { "enable": 1, "file": "hd/BBC/20MbHDD.adl", "readonly": 1 },
             { "enable": 0, "file": "" }, { "enable": 0, "file": "" } ] }
Using it. On a Master, ADFS defaults to the floppy (:4) unless *CONFIGURE HARD is set; *DIR :0 or *MOUNT 0 selects the Winchester explicitly, and *CONFIGURE BOOT boots from it. The web interface's Hard Disc menu โ€” present on every page whenever the firmware reports a Winchester card โ€” is the Floppy menu's twin: a row per drive :0โ€“:3 showing its image, with change (the shared image picker; the drive's dirty blocks are flushed to the old image, its cache dropped and the new file mounted, the 6502 held meanwhile) and empty; Create Imageโ€ฆ; and HD Unit: Virtual / Real, which hands the $FC40 window back to the machine's own 1 MHz-bus hard disc hardware (the images stay mounted and return untouched when switched back). The Dashboard also lists the four images. The IDE controller needs the IDE ADFS in a socket and the on-board SCSI ADFS unplugged (*UNPLUG 13 on a Master), exactly as on the real board; with the IDE board selected, the SCSI ADFS fails its presence test and keeps to the floppy, so the two ROMs do not fight. From the debug shell, bbc scsi reports the drives (file, sectors, declared capacity, read-only, probed), the bus phase, the command histogram, cache hits and fetches, zero-fills, dirty and flushed blocks and errors โ€” and the ATA task file when the IDE front end is selected; bbc scsi trace on logs every command, phase change and register access; bbc scsi dump <drive> <sector> shows a sector as the ROM would read it (from the cache, marked dirty if not yet on the card, or the file) and, for sectors 0 and 1, runs ADFS's own free-space-map checksum on it โ€” the tool that traced a "Bad FS map" to the formatter rather than the card.
Verified on a real Master 128: on the SCSI adapter with ADFS 1.50, a RetroClinic image catalogued, SAVE and LOAD, and SuperForm's Mode Sense, Mode Select, Format Unit and ten-byte Verify pass on a fresh image; on the IDE task file with ADFS 1.53, HDInit's Investigate, Scan for size and Format of a 40 MB image, *MOUNT, SAVE and LOAD; and the Hard Disc menu's live image change (a DOS Plus disc, booted on the Master's 80286 co-processor to a C: prompt) and Create Image. Also verified in the simulator on the Model B persona (MOS 1.20, ADFS 1.30 in a socket, virtual 1770) against the same image. Booting from the Winchester (*CONFIGURE HARD) is not yet exercised. The design record is docs/PICO6502_BBC_1MHZ_AND_PORTS_PLAN.md, which also covers the RAM discs, JIM RAM, printer and RS423 below and the Teletext adapter.

RAM Discs, JIM RAM, Printer, RS423 and Teletext
The remaining BBC interfaces share the Winchester's foundations โ€” the PSRAM arena, the Core 0 service and the 1 MHz-bus device slot โ€” and each is a few hundred lines in src/drivers/Acorn/. The User Manual walks through setting each up in the GUI, on the PC and on the BBC; this is the summary and the JSON.
RAM discs. Any drive slot of the floppy controller or the Winchester accepts ram:<size>[:<persist path>] in place of a file name. The drive is then a region of PSRAM served straight to the chip model โ€” no cache, never a pending sector โ€” formatted empty when mounted with the same blank-disc helper the GUI's Create Image uses, so it works at once. A floppy RAM disc takes its geometry from the slot's kind or from its size (200K is an SSD, 400K a DSD, 160K/320K/640K ADFS S/M/L, 360K/720K DDFS); a Winchester RAM disc is an ADFS drive of fixed capacity, as large as the arena can give it (about 2 MB on a Master with the usual interfaces on). With a persist path the file is loaded into the region at boot (or when the slot is set from the Floppy or Hard Disc menu) and written back โ€” only if it changed โ€” by Save RAM discs to SD in those menus (shown while a RAM disc is mounted), by bbc ramdisc save, and automatically before a configuration apply reboots the board; without one the contents last until power-off. A RAM disc swapped out from the menu returns its region to a small pool, so swapping back and forth does not exhaust the arena. Verified on a real Master: a 400K DSD RAM disc in floppy drive 1.
JIM paged RAM (BBC-JIMRAM). Expansion RAM on the 1 MHz bus after Pi1MHz's convention, for software written to it (its JIM_Init payloads, MMFS2's optional buffer): $FCFD holds address bits 16โ€“23, $FCFE bits 8โ€“15, and the selected 256-byte page is read and written at $FD00โ€“$FDFF; addresses wrap at the configured size (64 KB to 2 MB, default 512 KB). An optional byte mode decodes $FC00โ€“$FC02 as a 24-bit address and $FC03 as the byte there, stepping on after each access โ€” off by default because that block is the "test hardware" allocation other boards use. An image file can be loaded into the RAM at boot. A reset clears the page registers and keeps the contents. For a RAM-backed disc use ram: in a drive slot instead; nothing need page it.
Parallel printer (BBC-PRN). A handler for the User VIA's port A, layered over the virtual MMFS card's overlay of the same chip (and over the real chip when the card is off): a write to ORA with the CA2 strobe is the byte, the printer's ACK arrives on CA1 50 ยตs later with its interrupt, and every other register goes downstream, so MMFS and the rest of the user port are untouched. Core 0 spools the bytes into <folder>/<yyyymmdd-hhmmss>.prn (or printNNNN.prn until the ESP32's clock is set), raw with every control code, closing the job after idle seconds without a byte (default 3), at a form feed when splitff is set, or on demand. An optional forward of raw://host:9100 streams each finished job to a network printer's raw port as well. tools/prnspool.py on the PC polls the web server's file list for new jobs, downloads each and prints it โ€” lp -o raw on Linux and macOS, print /d: or a copy /b to a share on Windows โ€” with --text stripping ESC/P codes and normalising the BBC's line ends for a non-Epson or PDF printer. The Printer menu on every page shows the jobs this session, links to the spool folder, ends the open job and toggles Virtual / Real (real hands the port back to a printer physically on the user port). Verified on a real Master: *FX 5,1, VDU 2, LIST captured byte for byte and printed by the helper.
RS423 (BBC-RS423). The 6850 ACIA ($FE08) and Serial ULA ($FE10) in their RS423 role, layered over the cassette deck's model of the same two chips: while the ULA selects the cassette every access goes to the tape model (or the real chips), while it selects RS423 the ACIA is this port โ€” TDRE drops on a write and returns one byte-time later, received bytes arrive one per byte-time while RTS is asserted, CTS is held asserted, and the status register's interrupt bit follows only the enabled sources, as a real 6850's does. Baud comes from the ULA's rate fields (75 to 19200) and the ACIA divider, and with pace on both directions run at it. Transports: usb is the pico6502's third USB serial port (the one the picoZ80's serial card uses), tcp://:port listens through the ESP32 for one terminal session, tcp://a.b.c.d:port connects out and reconnects. The interrupt-enable bits are masked on the real ACIA while the virtual line is selected, so the physical chip cannot hold /IRQ. Confirmed working on a real Master over USB; *FX 2,1 routes typed characters to the prompt and *FX 3,1 sends output to the terminal.
Teletext adapter (BBC-TTX). The Acorn Teletext adapter on the 1 MHz bus at $FC10โ€“$FC13, with the register model BeebEm derived from the adapter's service manual: the status register (INT, DOR, DEW, FSYN and the option links), the control latch (channel 0โ€“3, teletext enable, interrupt enable, AFC), the row counter and the 16 ร— 64 row buffer that the Acorn Teletext ROM (ATS / TFS, in a sideways socket) reads after each field interrupt. A 50 Hz field machine in the fast tick reproduces the field: field sync, 300 ยตs later the data entry window with 16 packets written into the rows โ€” the $27 framing code then the 42 bytes of each packet, Hamming and parity coded as broadcast, which the ROM decodes itself โ€” and INT at its end, raised on the IRQ line when enabled. Each of the four channels has a source of its own: a file on the SD card โ€” a raw .t42 packet stream (42-byte packets, 16 to a field, the format vhs-teletext and the Teletext Archive produce) or a BeebEm-style capture of 860-byte fields โ€” played in a loop, or tcp://a.b.c.d:port, a teletext packet server of the kind BeebEm connects to (vbit2, raspi-teletext; frames of two fields of 16 ร— 42 bytes, port 19761 + channel by convention) through the ESP32's network link, reconnecting every 5 s and dropping fields rather than falling behind. Core 0 serves the channel the ROM has selected into a 32-field ring in the PSRAM arena and follows a channel change; with no source on the selected channel there are no field syncs, as with no aerial, which the ROM reports as No Unit. *TELETEXT, page selection and *TELESOFT then work as on the real adapter, with whatever pages, subtitles and Telesoftware the recording or the server carries. bbc ttx in the shell shows the registers, the field, packet and interrupt counts, the ring depth, the source state of each channel and the ROM's last register accesses with the 6502's program counter. A Teletext menu in the web GUI, on every page while the firmware reports the card, shows the four channels and marks the one the ROM has tuned; a click on a channel swaps its recording from the SD card picker while the machine runs โ€” the card closes the channel if it is on air and reopens it from the new file, no reboot โ€” and the eject icon takes the signal off it; the Dashboard shows the tuned channel and what is playing on it. tools/ttxfetch.py fetches recordings: it reads the Computer Legacy archive's feed of off-air teletext recoveries, filters by channel, service and year and unpacks the chosen ones to the raw .t42 the adapter plays. Added in BBC6502 1.162 and the menu in 1.163 (23 October 2026); not yet verified on hardware โ€” the register trace exists for that work.
Virtual keyboard and AMX mouse (driver options vkbd and mouse of BBC-B and BBC-Master). The web GUI's Keyboard & Mouse page, or the debug shell, types into the BBC and moves a pointer below the OS, so it works wherever the real keyboard and an AMX mouse do โ€” BASIC, games, a Tube co-processor, GEM on the Master 512. The keyboard rides the persona's System VIA tap ($FE40โ€“$FE4F): a virtual key is OR-ed into the port A key-scan read for the key the MOS has selected and into the CA2 flag whenever the hardware would raise it, with the interrupt on the virtual /IRQ line; every access still reaches the real VIA, so the machine's own keyboard keeps working alongside. A live key is held down for at least 40 ms and typed text is paced 30 ms a key, so every character is seen by two 100 Hz scans. It is on by default and costs nothing until a key is sent. The mouse sits on the User VIA's port B and CB1/CB2, layered over the printer and the MMFS card's overlays like the printer itself: quadrature steps, direction and three buttons, one step per axis each time the machine's driver acknowledges the last, as a real AMX mouse paces itself. "mouse": "amx" is the AMX cable (buttons PB5โ€“PB7, X/Y direction on PB0/PB2) for AMX software on the host; "512" is the Master 512 wiring that DOS Plus and GEM expect (buttons PB0โ€“PB2, X/Y on PB3/PB4), both as modelled by BeebEm. The mouse needs a free user port, so it is refused while the MMFS card (BBC-MMC) holds it. Added in BBC6502 1.177 (3 November 2026, ESP32 4.09 / filepack 4.26); typed and live keys and mouse steps verified in the simulator, and the keyboard and the GEM mouse verified on a Model B with a PiCoPro Master 512 co-processor.
"if": [
  { "name": "BBC-FDC", "enable": 1, "chip": "1770", "board": "master",
    "param": [ { "file": "dsk/BBC/Elite.ssd", "type": "ssd" }, { "file": "" },
               { "file": "ram:400K:dsk/BBC/scratch.dsd", "type": "auto" }, { "file": "" } ] },
  { "name": "BBC-SCSI", "enable": 1, "chip": "scsi", "cache": 128,
    "param": [ { "enable": 1, "file": "hd/BBC/scsi0.dat" }, { "enable": 1, "file": "ram:2M" },
               { "enable": 0, "file": "" }, { "enable": 0, "file": "" } ] },
  { "name": "BBC-JIMRAM", "enable": 0, "size": 512, "bytemode": 0,
    "param": [ { "enable": 1, "file": "" } ] },
  { "name": "BBC-PRN", "enable": 1, "idle": 3, "splitff": 0, "forward": "",
    "param": [ { "enable": 1, "file": "prn/BBC" } ] },
  { "name": "BBC-RS423", "enable": 1, "pace": 1,
    "param": [ { "enable": 1, "file": "usb" } ] },
  { "name": "BBC-TTX", "enable": 1,
    "param": [ { "enable": 1, "file": "ttx/BBC/ceefax.t42" }, { "enable": 1, "file": "tcp://192.168.1.20:19761" },
               { "enable": 0, "file": "" }, { "enable": 0, "file": "" } ] }
]
PSRAM budget. Every one of these lives in the 3.6 MB arena above the persona's own slots, allocated in init order and reported on the console at boot (psram in the shell prints the map). The fixed takers are the floppy cache (516 KB), the MMFS card (388 KB), the Winchester cache (its cache setting, shrinking to what is left, minimum 64 KB), the printer rings (20 KB), RS423 (12 KB), the Teletext adapter's field ring (32 KB) and JIM RAM (its size); the cassette deck takes only the size of the tape in the deck (read by Core 0 into a pool region, 2 MB cap) plus its record areas at the first motor-on. RAM discs come from what remains, so a Master with MMFS, the floppy with a 400K RAM disc, Econet, the Winchester and the printer has about 2 MB free: a 2M Winchester RAM disc fits, a 4M one is refused with a PSRAM arena: โ€ฆ REFUSED line in the log. On the debug-shell firmware the shell's own buffers come from the arena too.

BBC VIRTUAL Mode
The BBC-B driver's "type" selects how the Model B's RAM is reached:
Mode Where the CPUโ€™s RAM lives Speed Use it for
PHYSICAL (default) On the BBC, every cycle on the real bus 97% of a real 2ย MHz 6502 (Elite, steady; Galaxians 97โ€“98%) Maximum fidelity: the machine sees exactly what a 6502 would do.
VIRTUAL Inside the pico6502; only screen memory is written through to the BBC Paced to a real 2ย MHz BBC, or more than three times its speed unpaced (304โ€“344% on average, peaks above 350%) Speed, or authentic timing with the bus out of the way.
The BBC is an ideal host for VIRTUAL mode: it has no DMA and no second bus master, and the only thing that reads main RAM behind the CPU's back is the video system. So in VIRTUAL mode $0000โ€“$7FFF is served from the pico6502's on-chip RAM image with no bus cycle, and only writes into the region the screen is displaying are written through to the BBC's own RAM. The firmware tracks the screen through mode changes, hardware scrolling and CRTC start-address moves by watching writes to the CRTC, the video ULA and the System VIA's IC32 latch. At boot, the OS ROM and every physical sideways ROM bank are captured into virtual sockets, so ROM code runs bus-free too; sideways RAM and empty banks stay physical. Everything else โ€” SHEILA, FRED, JIM, the Tube and the 1 MHz bus โ€” is still read and written on the real bus. The keys:
Key Values Description
type PHYSICAL (default), VIRTUAL The driver mode.
speed real (default), max VIRTUAL pacing. real holds the CPU to the measured host clock, including the 1ย MHz clock-stretch that every FRED, JIM, CRTC, ACIA, VIA and ADC access gets on a real BBC, and places each I/O access at the moment it would happen on the machine, so sound, keyboard scans and cycle-counted code stay correct. max is unthrottled, with the VIA timers, vsync and the 100ย Hz clock still in real time. There are deliberately no intermediate settings: the RP2350 does not have the headroom to hold graded acceleration steady, so the choice is authentic speed or as fast as it goes.
timing locked (default), free PHYSICAL pacing. locked holds the CPU to the machineโ€™s clock, with waits taken internally so the bus never sees an extra cycle. free lets it run as fast as the engine goes.
romcapture boolean false keeps every ROM on the bus in VIRTUAL mode. A socket entry { "socket": n, "capture": false } keeps one bank on the bus, for ROM boards that page themselves with writes.
Some games are unplayable when they run too fast, which is why real is the default. The Master memory model and the Model A overlay both work in VIRTUAL mode: the image already holds 32K, so screen writes reach a Model A's own 16K through write-through. The design record is docs/BBC_VIRTUAL_MODE_DESIGN.md in the firmware repository.

Complete Configuration Examples
A minimal configuration for a generic 6502 host with a 2KB zero-page/stack RAM area, 48KB general RAM, an 8KB BIOS ROM, and a VIA peripheral handler at 0xC000:
{
  "rp2350": {
    "core": {
      "cpufreq":   150000000,
      "psramfreq": 133000000,
      "voltage":   1.15
    },
    "6502": [
      { },
      {
        "cputype":     "6502",
        "dbeoverride": true,
        "memory": [
          { "enable":1, "addr":"0x0000", "size":"0x0200",
            "type":"RAM", "bank":0, "task":"", "file":"" },
          { "enable":1, "addr":"0x0200", "size":"0xBE00",
            "type":"RAM", "bank":0, "task":"", "file":"" },
          { "enable":1, "addr":"0xC000", "size":"0x0010",
            "type":"FUNC", "bank":0, "task":"via6522", "file":"" },
          { "enable":1, "addr":"0xE000", "size":"0x2000",
            "type":"ROM", "bank":0, "task":"", "file":"/ROM/host_bios.rom" }
        ],
        "drivers": [
          {
            "enable":1, "name":"Open6502",
            "rom": [
              { "enable":1, "file":"/ROM/host_bios.rom",
                "loadaddr":[{ "enable":1, "position":0,
                              "addr":"0xE000", "bank":0, "size":"0x2000" }] }
            ]
          }
        ]
      }
    ]
  }
}
The supplied BBC Model B persona: full physical passthrough at 340MHz, the machine's knowledge carried by the driver, with MMFS supplied from a virtual sideways socket and a tape in the UEF deck:
{
  "rp2350": {
    "core": { "voltage": 1.20, "cpufreq": 340000000, "psramfreq": 133000000 },
    "6502": [
      { },
      {
        "cputype":     "6502",
        "dbeoverride": true,
        "core":    { "voltage": 1.20, "cpufreq": 340000000, "psramfreq": 133000000 },
        "memory":  [ ],
        "drivers": [ {
          "enable":     1,
          "name":       "BBC-B",
          "modelaram":  false,
          "mastermode": false,
          "ossocket":   { "enable": 0, "file": "" },
          "sockets":    [ { "socket": 12, "enable": 1, "ram": false,
                            "file": "roms/bbc/MMFS.rom" } ],
          "if":         [ { "name": "CMT-UEF", "enable": 1,
                            "param": [ { "file": "cmt/Elite.uef" } ] },
                          { "name": "BBC-FDC", "enable": 1, "speed": 0,
                            "chip": "1770", "board": "acorn",
                            "param": [ { "file": "dsk/ACORN3_A.ssd", "type": "ssd" },
                                       { "file": "dsk/ACORN3_B.ssd", "type": "ssd" },
                                       { "file": "adfs/Apps.adl",    "type": "adl" },
                                       { "file": "" } ] },
                          { "name": "BBC-MMC", "enable": 1,
                            "param": [ { "file": "mmfs" } ] },
                          { "name": "BBC-NET", "enable": 1,
                            "station": 0, "net": 0, "aunport": 32768,
                            "server": "192.168.1.210:32768", "serverstation": 254 },
                          { "name": "BBC-SCSI", "enable": 1, "chip": "scsi", "cache": 128,
                            "param": [ { "enable": 1, "file": "hd/BBC/scsi0.dat", "readonly": 0 },
                                       { "enable": 0, "file": "" }, { "enable": 0, "file": "" },
                                       { "enable": 0, "file": "" } ] } ],
          "rom":        [ ]
        } ],
        "device":    [ ],
        "interlink": [ ]
      }
    ]
  },
  "esp32": {
    "core": { "device": "6502", "mode": 0 },
    "wifi": { "ssid": "p6502", "password": "p6502p6502", "ip": "192.168.4.4",
              "netmask": "255.255.255.0", "gateway": "192.168.4.1",
              "wifimode": "ap", "dhcp": 1, "override": 1, "webfs": "webfs", "persist": 0 }
  }
}

Debug Shell (ICE)

The pico6502 carries the same integrated debug shell (ICE) as the picoZ80 โ€” one CPU-neutral shell, dispatching through a per-CPU operations table, so the command set and behaviour are shared across both boards. On the 6502 it presents 88 commands (89 on the BBC6502 build, which adds bbc, and on the Apple6502 build, which adds aci). ipcstat, the newest, times every RP2350โ€“ESP32 request by opcode โ€” the SPI mutex wait, the transfer, and the ESP32's service time, split between answers from its read cache and SD card accesses; psram prints the PSRAM arena map โ€” which driver holds which buffer and what is free. The sixteen added for the BBC Master bring-up are addrsetup, rungdelay, wrorder, latchbelt, latch6512 and latchage (bus-timing knobs), phi2rise, clkfly, flyfall, clklock, clkdrive and dbedrive (6512 host clocking), clkcap (pulse-width histograms of a clock pin), pin39probe (what the host does to the pin-39 node), bustrace (a two-channel logic-analyser view of one held write and read) and fetchecho (the BBC Master's SYNC echo of pico-served opcode fetches). cpustat and the pcprof Core 1 PC-sampling profiler are now shared with the picoZ80. Of the Z80's commands, only the Z80's I/O-space commands, its DMA command and its stall monitor do not apply. Since the device framework joined the 6502 build, the device commands are present too: dev (list the fitted chips, trace their register accesses), sig (show and drive netlist signals), ctc, pio, ser (serial devices, with transmit and receive), rtc and prn. It covers registers (A/X/Y/S/PC, flags NV-BDIZC), single-step and step-over, breakpoints (including break-before-execute with one-shot resume), memory display/edit, a full 6502 disassembler and one-line assembler โ€” the opcode table is generated from the emulator's own decode logic, so what you disassemble is exactly what executes; undocumented opcodes are shown with a * prefix, the CMOS overlay is disassembled when a C-type is selected, and disdesc appends a plain-English description to each mnemonic.
The 6502-specific commands fall into three groups:
  • Board bring-up
    - busdiag (snapshot of every socket signal; busdiag clk compares PHI0 against the returned PHI1_IN/PHI2_IN to tell a dead buffer from a dead clock; busdiag watch [n] for signals in motion), busprobe <addr> (repeat-reads one address to expose unstable data lines), busverify <addr> <len> (ROM-safe re-read of a range flagging flaky reads and fetch/read mismatches), memtest (including a decay mode for DRAM refresh), bustest and wrtest (drive marked patterns for a logic analyser), busstate (live PIO engine state for hang forensics) and piodbg.
  • Bus-engine knobs
    - writestrobes <1|2> (1 is vanilla), iopark on|off, readsettle <0-31>, readphase latch|hi|lo, and buspipe with sub-commands on|off, fetch, rungs, burst <1-6>, iochase, iorange <lo> <hi>, serve, natwr, wrregion, wrhold, wrverify, slowclr and stats โ€” the live A/B switches the speed campaign was run with. pipetest <iters> runs the mixed bus-operation verification harness on Core 1.
  • Performance and persona
    - cpustat (instructions/s and emulated cycles/s against the measured host clock โ€” call twice), cpuprof (per-instruction time histogram by bus class), and on the BBC6502 build bbc (mask, socket <n> <0|1>, cmosdef, oscheck, tape sel|next|rew|trace|on|off for the UEF deck, fdc <drive> <file|eject> [A|B] [auto|ssd|dsd|mmb|adf|adl|dds|ddd] / fdc trace on|off for the floppy controller, mmc / mmc trace on|off / mmc rescan / mmc dir [path] for the MMFS card, scsi / scsi trace on|off / scsi dump <drive> <sector> for the Winchester โ€” drives, bus phase, command histogram, cache statistics, the IDE task file, and a sector as the ROM reads it with the ADFS free-space-map check โ€” ramdisc / ramdisc save (RAM discs mounted; write those with a persist path to the card), jim (the paged RAM's page registers, pointer and access counts), prn / prn flush|real|virtual (the printer's VIA state, bytes captured, jobs and forward; end the job; switch the port) and rs423 / rs423 trace on|off (transport state, baud rates, ACIA registers, RTS, ring levels and byte counts; an access trace with the 6502 PC), and on the Apple6502 build aci / aci rew|next|sel <1-6> for the Apple I cassette, and net / net trace on|off for the Econet module โ€” frames, UDP in/out, acknowledgements, timeouts and reply latency).
See the User Manual โ€” ICE (Debug Shell) for usage.
The shell is on the pico6502's second USB serial port (/dev/ttyACM1 on Linux, 115200 8N1) in the firmware build whose description ends in dbgsh. The per-interface reports (bbc fdc, bbc scsi, bbc prn, bbc rs423, bbc jim, bbc mmc) and the psram map are printed on the RP2350 console, the first USB serial port, so keep a terminal open on both; the session below shows them side by side. Note that the firmware maps the RTS and DTR lines of every pico USB serial port to the ESP32's reset and boot-mode pins (so esptool can program it through the board): a terminal program that drops both lines when it exits holds the ESP32 in reset until a port is opened again (the WiFi and the ESP32's own USB port disappear). Check your terminal program's hang-up-on-exit setting, and in pyserial scripts clear HUPCL before closing the port.
Video — a session on the debug shell: information commands, the PSRAM map and interface reports on the console, memory dump, disassembly and search, the ICE (break, step, next, go, trace), SD card listing, bus diagnostics and the profiler.

Host Simulator (pico6502sim)

pico6502sim compiles the real pico6502 firmware โ€” the RP2350 sources and the ESP32 half with its web interface and virtual SD card โ€” natively for a PC and runs it headless. It is standalone (no external emulator framework; a C/C++ compiler, pthreads and zlib suffice) and is how the firmware was proven while the v2.3 board was being routed; it now serves as the regression bed and the place new drivers are written โ€” the UEF tape deck's LOAD and SAVE were exercised against the simulated BBC before hardware. The debug shell, personas, configuration parsing, the ESP32 link and the browser-served web GUI all run for real; the bus is either a floating socket (reads return 0xFF, which free-runs exactly like a real disconnected 6502) or a synthetic host machine.
The launcher (sim/run.sh) provides three machines, all of which can run simultaneously:
Machine CPU Host clock Web GUI port Host model
apple1 6502 1.023 MHz 8110 Synthetic Apple I: 32KB RAM, 6821 PIA at $D010-$D013 (mirrored across $D000-$DFFF), 8KB ROM window $E000-$FFFF; terminal on a virtual serial port.
bbcmodelb 6502 2 MHz 8111 Synthetic BBC Model B (sim/src/host_bbc.c): 32K RAM, 16 sideways banks via ROMSEL, MOS + BASIC + DFS from SD/default/roms/BBC/, system 6522 VIA with timers, IFR/IER, IC32 latch and keyboard matrix (ported from B-em), 50ย Hz vsync; keyboard on a virtual serial port and MODEย 7 teletext rendered live as ANSI to the same terminal. CRTC/video ULA registers are stored only, the user VIA, FDC, Econet and Tube read as absent. Built with the Acorn drivers, so the BBC-B persona and UEF deck run.
bbcmaster 65C12 2 MHz 8112 None (headless). Runs on the CMOS core.
No Apple ROM is shipped (the Woz monitor is Apple's); run.sh searches the SD card's roms/APPLE1/ and roms/BBC/ directories and --rom= overrides. Without an Apple ROM, a small built-in banner/echo program runs โ€” enough to prove fetch, execute, branch, call and the PIA in both directions. The host API lets a model assert /IRQ and /NMI, and the simulated 6502 persona is applied from the web GUI exactly as on hardware (apply writes the flash store and reboots).
The simulator proves logic, not timing โ€” it models no clock, no PHI1/PHI2 phases, no setup or hold times and no bus contention. A clean run validates the firmware, personas and web interface; everything about the bus itself was established on the v2.3a board with a logic analyser.

Networking

The pico6502 shares the picoZ80's ESP32 firmware and so its three networking modes, selectable at build time via pre-built ESP32 sdkconfig files. Each mode determines how the web interface and configuration pages are accessed.

Operating Modes
Mode sdkconfig File WiFi USB NCM Console Web Access
WiFi Only sdkconfig.mode_wifi_only Yes No USB Serial/JTAG Via WiFi AP or connected network
WiFi + NCM sdkconfig.mode_wifi_and_ncm Yes Yes TinyUSB CDC-ACM Via WiFi and http://192.168.7.1
NCM Only sdkconfig.mode_ncm_only No Yes TinyUSB CDC-ACM Via http://192.168.7.1 only
USB NCM (Network Control Model) presents a virtual Ethernet adapter over the ESP32's USB OTG port. When the pico6502 is connected to a host computer via USB, the host sees a standard network interface. A built-in DHCP server on the pico6502 automatically assigns the host an IP address โ€” no manual configuration is required. The web interface is then accessible at http://192.168.7.1. The virtual Econet module and the RS423 and printer network transports use whichever link is up.
NCM Only mode is the recommended default for boards shipped without WiFi certification. It provides full web interface functionality (configuration, firmware updates, file management, persona selection) without any radio frequency emission. The WiFi antenna matching network does not need to be populated on the PCB.
WiFi + NCM mode enables both interfaces simultaneously. The HTTP server binds to all interfaces, so the web pages are accessible from either WiFi or the USB network connection. WiFi connects asynchronously so the USB NCM interface is available immediately at power-on. Where several access points share one network name the ESP32 scans every channel and joins the strongest, retrying it before falling back to the next.
Every ESP32 build produces all three images. The main build (main.bin) is always NCM Only โ€” WiFi is off in sdkconfig, and the release scripts refuse to publish a main.bin with WiFi compiled in โ€” and make_variants.sh then builds each mode from its sdkconfig.mode_* overlay into release/ as tzpuPico_esp32_fw_<mode>_v<version>.bin. To change mode, flash the matching image; set TZPU_NO_VARIANTS=1 to skip the variants in a quick development build.

FCC / RED Regulatory Notice
Important: The pico6502 board has not been submitted for FCC (USA) or RED (EU) intentional radiator certification. As shipped, the board must have the WiFi antenna matching components unpopulated and the ESP32 firmware built with the NCM Only configuration (sdkconfig.mode_ncm_only). In this configuration no radio frequency energy is emitted and the board does not fall under intentional radiator regulations.
End users who wish to use WiFi may populate the antenna matching network on the PCB, build the ESP32 firmware with sdkconfig.mode_wifi_only or sdkconfig.mode_wifi_and_ncm, and operate the board under the hobbyist/experimental exemption applicable in their jurisdiction. Any party wishing to sell the board commercially with WiFi enabled must first obtain FCC and/or RED certification for the complete assembly.

Web Interface

The ESP32 co-processor hosts a web management interface built with Bootstrap 4 โ€” the same interface as the picoZ80, which adapts itself to the processor it is serving: with pico6502 firmware running it shows the 6502 personas, drivers and interfaces, hides the Z80-only concepts (the I/O port map, the QuickDisk menu) and adds the 6502's own panels. Connect to the pico6502's WiFi network (or configure client mode to join your existing network) and navigate to http://<device-ip>/ โ€” by default http://192.168.4.1/ in Access Point mode. In NCM mode, the web interface is accessed at http://192.168.7.1 via the USB network connection. See Networking above for mode details.
On first power-up in WiFi mode the board starts in AP mode. Use the WiFi Manager page to configure client mode and assign a fixed IP address on your network. All pages share a common left-hand navigation bar giving one-click access to Status, Config Editor, Config GUI, File Manager, Settings (Firmware โ†’ ESP32 / RP2350, WiFi Manager), and Persona. In NCM Only mode, the WiFi Manager page is not present and the navigation bar shows the same set of pages minus WiFi Manager.

Dashboard โ€” Status (index.htm)
The landing page shows the board's live state across three panels:
  • WiFi Configuration / Network Configuration
    - in WiFi modes this panel shows the current SSID, assigned IP address, netmask, and gateway. In NCM Only mode this panel is titled Network Configuration and shows the USB NCM network status (IP address, netmask) instead โ€” there is no SSID or WiFi-related information. The board name (tzpuPico) and copyright string are served as template variables by the ESP32 web server.
  • Version Information
    - ESP32 partition table showing all OTA slots with type, sub-type, flash address, size, firmware version, build timestamp, and which slot is currently running. This makes it straightforward to confirm which firmware is active after an OTA update.
  • RP2350 Partitions
    - the RP2350 flash partition table with partition number, address, size, checksum, active/running flag, license, author, description, version, build date, and copyright โ€” giving a complete snapshot of the RP2350 firmware state alongside the ESP32 information. Below it the running state: the Personality and Processor (6502), the Active Partition, the measured Host Clock and Emulation Speed, the Drivers loaded, and โ€” on a BBC persona โ€” the images in Floppy 1โ€“4 (drive 0 and 1, sides A and B), Hard Disc :0โ€“:3, and the Printer mode and Print jobs count.
The header bar of every page shows which RP2350 firmware is running after the page title, e.g. (v1.177 p2 Acorn,dbgsh): its version, the active partition and the driver set of that build, refreshed by the status poll (filepack 4.26). The dropdown menus in the top-right navbar are available on every page:
  • Actions menu
    - Reload RP2350 Config โ€” send a reload command to the RP2350 over the ESP32โ€“RP2350 link; the RP2350 re-reads config.json, minifies it into the flash store and reboots into it (any RAM disc with a persist path is saved to the card first).
    - Activate Partition 1 / 2 โ€” switch the active RP2350 firmware partition and reboot into it.
  • CMT menu
    - the tape carousel of the virtual cassette deck โ€” the BBC's CMT-UEF or the Apple I's CMT-ACI: select a tape from the queue, Add Tapeโ€ฆ from the SD card, and the CMT Deck: Virtual / Real toggle, which hands the cassette port back to a physically connected recorder.
  • Floppy menu
    - Change Floppy Disk 1 / 2 with their Side B entries โ€” the virtual controller's two drives, each with a Side A and a Side B slot, so two single-sided images can be loaded as the two sides of one disc. Each entry opens the SD card picker with the image kind selector (Auto / SSD / DSD / MMB / ADF / ADL / DDS / DDD) and shows the image mounted (or "none"); an eject icon empties a slot. A ram: specification typed in place of a file name mounts a RAM disc.
    - Save RAM discs to SD โ€” shown while a RAM disc is mounted: writes every RAM disc with a persist path back to the card.
    - FDD Unit: Virtual / Real โ€” toggle the floppy controller between the virtual SD-image drives and the machine's own disc hardware, live.
  • Hard Disc menu
    - shown while the firmware reports the Winchester interface, with the controller named in its header (Acorn SCSI or 8-bit IDE / CF): Drive :0โ€“:3 change and empty, Create Imageโ€ฆ (a formatted, empty ADFS disc of 4โ€“512 MB with title, boot option and optional .dsc, mounted at once if you choose), Save RAM discs to SD, and the HD Unit: Virtual / Real toggle that hands the $FC40 window back to a hard disc interface physically on the 1 MHz bus.
  • Printer menu
    - shown while the firmware reports the virtual printer: the jobs spooled this session, a link to the spool folder in the File Manager, End the open job now, and the Printer: Virtual / Real toggle that hands the user port back to a printer physically connected to it.
  • Reboot menu
    - ESP32 โ€” soft-reboot the ESP32 co-processor (restarts the web server and WiFi stack, RP2350 is unaffected).
    - RP2350B โ€” reset the RP2350 processor (re-runs the bootloader and reloads the active firmware slot, host CPU is paused during reset).
    - Host โ€” assert the host computer's reset line, rebooting the BBC or Apple I in the 6502 socket without affecting the pico6502 board itself.
    - IPL Reset โ€” the Sharp MZ IPL reset of the picoZ80; it has no equivalent on a 6502 host and does nothing there.
    - RP2350 UF2 Boot โ€” force the RP2350 into ROM UF2 USB boot mode via the custom bootloader. The ESP32 resets the RP2350 with the BOOT pin held, then sends a magic ID over UART that causes the bootloader to call reset_usb_boot(). The RP2350 presents as a USB mass-storage device for UF2 drag-and-drop flashing. This is the primary recovery method when the main application is broken (e.g. bad clock/voltage settings) โ€” the custom bootloader runs at safe defaults and remains responsive.
    - RP2350 UF2 Boot (App) โ€” request the running RP2350 application to enter UF2 USB boot mode via SPI command. This is a fallback for situations where the bootloader itself needs replacing โ€” the running application calls reset_usb_boot() directly. Only works when the application is running and responsive to SPI commands.
pico6502 Web Interface โ€” Status Dashboard
Video — Dashboard walkthrough: the status panels, then the Actions and Reboot menus.
Video — The Floppy, Hard Disc and Printer menus, the Create Image dialog and the hard disc image picker.

Config Editor (config.htm)
The Configuration Editor page gives full editing control over the JSON configuration file. Change the configuration using the syntax-highlighting editor, save as needed and click Apply to reprocess the configuration.
The SD card keeps automatic numbered backups of every saved configuration (config.json;1, config.json;2, โ€ฆ with the highest number being the most recent), so it is always possible to roll back to a previous working configuration. Edited configurations are saved back to the SD card; clicking Apply or the "Reload" menu action then has the RP2350 read config.json from the card, minify it and store it in flash together with the core clock and voltage, and reboot into it โ€” subsequent boots run from the flash copy, with no dependency on the ESP32 link โ€” while the ESP32 re-reads its own settings. On the pico6502 there is no io array: every peripheral, physical or virtual, is a block in the memory array.
pico6502 Web Interface โ€” Config Editor
Video — Config Editor: navigating the raw config.json and the Save / Apply / Quit / Text buttons.

GUI Configuration (configgui.htm)
The GUI Configuration page provides a graphical form-based editor for the pico6502 configuration, complementing the raw JSON Config Editor. Instead of editing JSON directly, all settings are presented as labelled input fields, dropdown menus, and editable tables. Changes are saved to config.json on the SD card (the existing file is backed up automatically before saving). For advanced editing, the Config Editor remains available for direct JSON manipulation. The page reads the running firmware's processor and family, so it offers only the 6502 drivers of that firmware (Open6502 everywhere; AppleI on Apple6502; BBC-B and BBC-Master on BBC6502) and only the interfaces each driver supports.
The page is organised into four tabs:
RP2350 Global โ€” global core settings that apply to both firmware partitions unless overridden at the partition level:
  • Core Voltage โ€” RP2350 core voltage in volts (0.85โ€“1.50 V; the BBC personas ship at 1.20 V).
  • CPU Frequency (MHz) โ€” RP2350 clock speed, 100โ€“400 MHz; the page warns above 330. Voltage headroom is per board โ€” raise the voltage before suspecting anything else if a clock fails to boot.
  • PSRAM Frequency (MHz) โ€” PSRAM SPI clock frequency. Higher values improve emulation speed but may reduce stability on some boards.
  • Pad drive strength โ€” per bus group (address, data, control), for boards or hosts whose socket needs a stronger or gentler drive.
pico6502 Web Interface โ€” GUI Configuration: RP2350 Global
Video — GUI Configuration walkthrough: all four tabs, the driver panel and each BBC interface panel (BBC-FDC, BBC-SCSI, BBC-PRN, BBC-RS423, BBC-JIMRAM and the rest), ending at Save Configuration.
Partition 1 / Partition 2 โ€” per-partition configuration. Each partition tab has the same layout:
  • Core Settings โ€” partition-specific overrides for Core Voltage, CPU Frequency, and PSRAM Frequency. If set, these take precedence over the global values for this partition (the supplied personas set them here: 340 MHz for the Model B, 330 MHz for the Master).
  • CPU โ€” the CPU type (6502, 6512, 65C02 or 65C12: the NMOS or CMOS instruction set, and whether the chip generates its own PHI1/PHI2 or takes them from the host) and the DBE override of the buffered interface. For a 6512 or 65C12 partition a 6512 host timing group appears (clkfly, flylow, flywin, flyfall, gclkfall, phi2rise, clklock, dbedrive), defaulting to the values measured on a BBC Master 128.
  • Memory Regions โ€” an editable table defining the 6502 memory map. Each row specifies a memory block with: hex Address, Size, Type (ROM, RAM, PHYSICAL, or FUNC), Function (the handler name when the type is FUNC), Bank (PSRAM bank number), Task, File (ROM image filename on the SD card), File Offset, and a Load checkbox. Rows can be added or removed with the Add Memory Region and delete buttons. There is no I/O Regions table: the 6502 has no I/O address space, so a peripheral's registers are simply a block here.
  • Drivers โ€” lists the active machine drivers with enable/disable toggles. The Add Driver button offers only the drivers of the running firmware. Each driver lists its ROM images (with a per-image Load at address โ€” empty means the image ends at $FFFF), a Bus Engine Tuning panel (I/O window, shadow-write window, paging register and region, burst depth, serve / pipeline / fast-fetch โ€” empty fields mean the driver's own defaults) and its machine options: for AppleI the Terminal (physical / virtual / mirror) and USB port selectors; for BBC-B and BBC-Master the mode (PHYSICAL / VIRTUAL, with speed and timing), Model A RAM, Master mode, preset disc ROMs, persistence, and the Sideways ROM / RAM Sockets table (the OS socket plus sockets 0โ€“15, each with a RAM flag, ROM image browser, MegaROM offset and save target). Below them the driver's Interfaces, added with Add Interface, which lists only those the driver supports โ€” the six-slot CMT-UEF tape carousel or the CMT-ACI tapes, the BBC-FDC floppy controller with its chip (8271 / WD1770) and board (Acorn / Master 128 / Watford) selectors and four fixed slots (Drive 0 ยท Side A/B, Drive 1 ยท Side A/B, each with a kind selector), the BBC-MMC MMFS card with its image folder or MMB, the BBC-NET Econet module (station, fileserver address and station, AUN port), the BBC-SCSI Winchester (Controller: Acorn SCSI or 8-bit IDE / CF, cache size, Drive :0โ€“:3 with read-only ticks), BBC-JIMRAM (size, byte mode, init image), the BBC-PRN printer (spool folder, job idle time, split at form feed, network forward) and BBC-RS423 (transport, pace to baud) โ€” each card with a short explanation of what it virtualises.
  • Devices and Connections โ€” the virtual device catalogue: fit a chip (serial, timer, parallel, real-time clock, printer, latch, signal port, ADLC, FDC) at a memory address, and wire its pins in the netlist; a new chip's interrupt is wired to cpu.IRQ automatically.
pico6502 Web Interface โ€” GUI Configuration: Partition 1
pico6502 Web Interface โ€” GUI Configuration: Partition 1
pico6502 Web Interface โ€” GUI Configuration: Partition 2
pico6502 Web Interface โ€” GUI Configuration: Partition 2
ESP32 โ€” ESP32 co-processor settings:
  • Core โ€” ESP32 device type (e.g. S3S) and the processor the board serves (6502).
  • Network Interfaces โ€” enable/disable controls for both WiFi and USB NCM networking:
    • WiFi Enable โ€” checkbox to enable or disable WiFi (requires reboot; ignored if WiFi is not compiled into the firmware).
    • NCM Enable โ€” checkbox to enable or disable USB NCM networking (requires reboot).
    • NCM Retries โ€” maximum connection retry cycles (0 = retry forever, 5โ€“1000 = max attempts).
    • NCM Retry Period โ€” delay between retries in seconds (0 = increasing backoff from 1s up to 60s, 1โ€“120 = fixed interval).
    • NCM IP Address โ€” the USB NCM gateway IP address (default: 192.168.7.1). When connecting two boards to the same host, each must use a different subnet (e.g. 192.168.7.1 and 192.168.8.1). Changes take effect after reboot and are persisted in NVS.
    • NCM Netmask โ€” the USB NCM subnet mask (default: 255.255.255.0). Changes take effect after reboot.
    • USB Product Name โ€” the USB device product string reported to the host operating system. macOS uses this as the NCM network interface label. Each board auto-generates a unique name from its MAC address; override here to set a custom name (e.g. "pico6502-BBC"). Leave blank for auto-generation. Changes take effect after reboot.
  • WiFi Configuration โ€” SSID, password, IP address, netmask, WiFi mode (Access Point or Client), DHCP (Enabled or Disabled), WebFS directory path, polling period, and TX power. These settings mirror the WiFi Manager page but are editable here as part of the full configuration.
pico6502 Web Interface โ€” GUI Configuration: ESP32
pico6502 Web Interface โ€” GUI Configuration: ESP32
Click Save Configuration to write the changes to config.json on the SD card (the previous version is backed up automatically) and automatically send a reload command to the RP2350, which stores the new configuration in flash and reboots into it. Click Reload to re-read the current config.json from the SD card โ€” useful if you have made a mistake and want to discard your changes and start again from the last saved state.

File Manager (filemanager.htm)
The File Manager provides a full web-based file browser for the SD card, providing a directory listing layout to view files on the SD card.
It is intended for general SD card maintenance: uploading ROM images, floppy disc images (SSD/DSD/ADF/ADL, MMB bundles), hard disc images, UEF or WAV tapes, and web filesystem updates without needing to remove the card, and for collecting what the board writes โ€” spooled print jobs, saved RAM discs, tape recordings. A Refresh button re-reads the current folder for exactly that.
Each entry has action buttons to copy, delete, download, or edit text files, and a Select File upload button at the top allows new files to be transferred from the PC. Directory navigation allows descending into subdirectories such as roms/, dsk/, mmfs/, cmt/, hd/ and prn/; create the folders an interface needs (the printer's spool folder, for instance) here.
Uploading tar or gzip files will automatically have the tar or gzip (or tar.gz) file unpacked and extracted in the current SD directory.
Multiple files can be selected using the checkboxes in the leftmost column (or the "Select All" checkbox in the header). When one or more items are selected, Download N Items and Delete Selected buttons appear in the panel header. The download function fetches each file sequentially with a progress modal โ€” directories are automatically downloaded as tar archives. A Backup SD button downloads the entire SD card contents as a single archive to the local computer. These features are particularly useful when the pico6502 is installed inside a host machine and physically removing the SD card is impractical.
pico6502 Web Interface โ€” File Manager
Video — File Manager: opening folders, the row actions, Refresh and Backup SD.

Persona Selection (personality.htm)
The Persona page configures the active machine personality independently for each of the two RP2350 firmware partitions. The page is CPU-aware: with pico6502 firmware running, each partition has its own column of radio buttons covering the 6502 machines:
  • Base6502 โ€” a vanilla 6502 with nothing virtualised, every bus cycle passing through to the host at 150 MHz; the persona to bring a new board up with. Runs on any 6502 firmware.
  • Open6502 โ€” your own board or any machine without a driver: describe the memory map and fit virtual devices from the catalogue. Open6502 firmware.
  • Apple-I โ€” the Apple I and its replicas, on the AppleI driver with the physical, virtual or mirrored terminal and the ACI cassette. Apple6502 firmware.
  • BBC-B โ€” the BBC Model B (Model A and Master memory model optional) with the tape, floppy, MMFS, Econet, Winchester, RAM disc, JIM RAM, printer, RS423 and Teletext interfaces. BBC6502 firmware.
  • BBC-Master โ€” a real BBC Master 128, 65C12 clocking, the same interfaces. BBC6502 firmware.
Selecting a persona for each partition and clicking Select Personae writes the corresponding pre-built configuration (config_<Partition1>_<Partition2>.json, one of the twenty-five generated combinations) to the SD card as config.json (backing up the current file first) and triggers a configuration reload. Because each firmware partition can hold a different persona, the board can be switched between, for example, a BBC-B personality on partition 1 and an Apple-I personality on partition 2 without any SD card editing โ€” provided the firmware in each partition carries that persona's driver. Each persona lists its interfaces disabled; enable and configure them on the GUI Configuration page.
pico6502 Web Interface โ€” Persona Selection
Video — Persona Selection: choosing a persona for each partition.

Firmware Updates โ€” ESP32 (ota-esp32.htm)
The ESP32 OTA page reports the full software inventory of the ESP32 before accepting a firmware upload:
  • Modules panel
    - shows the version of each ESP32 software component: the main ESP32 application, the NVS (non-volatile storage) library, the WiFi stack, the FilePack (web filesystem packager), and the WebFS (in-flash web file system). This makes it easy to confirm all components are consistent after an update.
  • ESP32 Partitions panel
    - shows the full ESP32 OTA partition table (otadata, nvs, phy_init, ota_0, ota_1) with addresses, sizes, firmware versions, build timestamps, and which OTA slot is currently active (marked "Yes").
  • ESP32 Firmware Upload panel
    - accepts the ESP32 binary (.bin) produced by the ESP-IDF build. After upload the ESP32 reboots into the new firmware and the old slot is retained as a fallback. The ESP32 firmware is the same binary for the picoZ80 and the pico6502.
  • FilePack Upload panel
    - uploads a versioned FilePack archive to the SD card. A FilePack bundles all ESP32 static web assets (HTML, CSS, JavaScript templates, and ancillary files) into a single distributable archive. On upload the ESP32 unpacks the archive to the SD card web filesystem directory; any file being replaced is automatically renamed to include its previous version number (e.g. webfs โ†’ webfs.4.05), preserving the old version for rollback. This matches the VAX/VMS style versioning used elsewhere on the SD card, where each successive revision of an editable file is preserved with a numeric suffix: config.json;1, config.json;2, and so on โ€” ensuring no edit is ever silently overwritten.
pico6502 Web Interface โ€” ESP32 Firmware Update
Firmware Updates โ€” RP2350 (ota-rp2350.htm)
The RP2350 OTA page manages the two RP2350 firmware partitions:
  • RP2350 Partitions panel
    - lists all three partitions: partition 0 (Bootloader), partition 1 (first application slot, e.g. "6502 CPU Emulator โ€” BBC6502"), and partition 2 (second slot). Each row shows the flash address, size, checksum, active/running flag, license, author, description, version, and build date. The currently running partition is marked "Yes" in the Active column.
  • RP2350 Firmware Upload panel
    - accepts a pure binary .bin firmware file from fw/bin/ (e.g. BBC6502_0x10020000_DBGSH_1.160.bin โ€” the address in the name is the partition it was linked for). UF2 is not used here โ€” application partitions are located at non-standard flash addresses that UF2 cannot express, so the OTA transfer uses raw binary. Use the Partition 1 / Partition 2 radio buttons to select the target slot. Two additional checkboxes are available: Clear App Config erases the ROM images and minified JSON configuration partition associated with the target slot (useful when upgrading to a firmware version with an incompatible config schema), and Clear Flash Header resets the flash partition header to factory defaults, rebuilding the partition table from scratch while preserving the bootloader configuration. The upload is verified by checksum before the new partition is activated.
  • RP2350 Active Partition panel
    - independently switches the active partition without uploading new firmware. Selecting a partition here triggers an automatic reboot into the chosen slot โ€” useful for switching between two pre-loaded firmware variants (e.g. the BBC6502 and Apple6502 models) without any file transfer.
pico6502 Web Interface โ€” RP2350 Firmware Update
Video — Firmware pages: the ESP32 firmware and File Pack uploads, then the RP2350 partition upload.

WiFi Manager (wifimanager.htm)
Note: The WiFi Manager page is only available when the ESP32 firmware is built with WiFi enabled (sdkconfig.mode_wifi_only or sdkconfig.mode_wifi_and_ncm). In NCM Only mode this page is not present in the navigation โ€” network connectivity is provided automatically via USB NCM with no user configuration required.
The WiFi Manager configures how the pico6502 connects to a wireless network. The top panel shows the currently active WiFi configuration (SSID, assigned IP, netmask, and gateway). The Configure WiFi form below it exposes all settings:
  • WiFi Mode
    - Access Point: the pico6502 broadcasts its own SSID and you connect directly to it (useful during initial setup or when no infrastructure network is available). Client: the pico6502 joins an existing WiFi network as a station.
  • SSID and Password
    - the name and passphrase of the network to join (client mode) or to broadcast (AP mode).
  • DHCP Mode
    - Enabled: the board requests an address from the network's DHCP server. Disabled: use a static IP, netmask, and gateway as entered in the fields below. A fixed IP is recommended so that the web interface address is always predictable โ€” and so the Econet file server and the printer spooler on your PC always find the board.
Settings are saved to the ESP32's NVS (non-volatile storage) by clicking Save and take effect on the next reboot.
pico6502 Web Interface โ€” WiFi Manager
Video — WiFi Manager: Access Point or Client mode, DHCP or static addressing and TX power (credentials masked).

Action Menu and Reboot Menu
The dropdown menus in the top-right navigation bar are available on every page of the web interface, providing quick access to runtime operations and system reset functions without navigating away from the current page.
The Action Menu (cog icon) provides the configuration reload and the partition switch; the media menus beside it โ€” CMT, Floppy, Hard Disc and Printer, the last two appearing only when the running persona has those interfaces โ€” swap tapes, disc images and hard disc images on the fly, create a hard disc image, save RAM discs, end a print job, and switch each unit between its virtual and real hardware, live. The currently loaded image filenames are displayed next to each entry so the operator can see at a glance what is mounted.
The Reboot Menu (rotate icon) provides targeted reset options for each subsystem โ€” ESP32, RP2350 and the host computer โ€” plus two UF2 recovery options for reflashing the RP2350 via USB mass-storage when the board is physically inaccessible inside a host machine. The two UF2 entries provide complementary recovery paths: the bootloader route works even when the main application is broken, while the app route works even when the bootloader needs replacing.
pico6502 Web Interface โ€” Action Menu
pico6502 Web Interface โ€” Reboot Menu

Keyboard & Mouse (input.htm)
On a BBC persona with the virtual keyboard on (the default) a Keyboard & Mouse entry appears in the menus of every page, and this page types and points into the machine from the browser. Events travel browser โ†’ ESP32 โ†’ RP2350, so allow a few tens of milliseconds between a key and its effect; while input is arriving the RP2350 polls the ESP32 every 20 ms.
  • Live keyboard
    - click the box and type: each key goes to the BBC as the key that produces that character, with SHIFT added or dropped as needed. Enter is RETURN, Backspace DELETE, Insert or End COPY; Esc, Tab, the arrows, Caps Lock, Shift and Ctrl map directly; F1โ€“F9 are f1โ€“f9 and F10 is f0, and the numeric keypad reaches the Master's keypad. Letter case follows the machine's CAPS LOCK, as on the real keyboard. Buttons send ESCAPE, TAB, CAPS LOCK, SHIFT LOCK, RETURN, DELETE, COPY, the cursor keys and f0โ€“f9, with optional +SHIFT and +CTRL.
  • Type text
    - paste a program or a line of commands and press Type; it is typed at a pace the MOS cannot miss, with RETURN after the last line if ticked, and Stop abandons the rest. Tell the page whether CAPS LOCK is on so lower-case text arrives in the right case.
  • Mouse
    - click the area to capture the pointer (Esc releases it); movement is sent as AMX quadrature steps and the buttons as the mouse's three, with a sensitivity of 0.1โ€“2.0 and Invert Y remembered by the browser. While the pointer is captured, keys go to the machine too, so GEM can be driven entirely from the page. Shown when the driver's Mouse option is set to the AMX or Master 512 wiring.
The two driver options are in the Configuration GUI's BBC-B / BBC-Master panel: Virtual keyboard (on by default) and Mouse (None, AMX wiring, Master 512 wiring). See the User Manual โ€” Virtual Keyboard and Mouse.

Complete Web GUI Tour
One continuous walkthrough of the whole interface, for a first look or to find where a setting lives: the Status dashboard and its panels, the left-hand menu groups (Config, Settings, Firmware), every top-bar menu (Actions, Reboot, Floppy, Hard Disc with its Create Image dialog and image picker, Printer), then each page in turn — GUI Configuration with all four tabs and the BBC interface panels, the Config Editor, the File Manager, Persona selection, the ESP32 and RP2350 firmware pages and the WiFi Manager. Nothing is saved or applied during the tour; the WiFi credentials are masked.
Video — the complete Web GUI tour: dashboard, menus and every page.

Reference Sites

The table below contains all the sites referenced in the design and programming of the pico6502.
Site Language Description
RP2350 Datasheet English Official Raspberry Pi RP2350 technical reference and datasheet.
Pico SDK English Raspberry Pi Pico C/C++ SDK โ€” build system and hardware abstraction used by the pico6502 firmware.
MOS 6502 Datasheet English Original MOS Technology 6502 MPU datasheet โ€” bus timing, pin descriptions and electrical characteristics.
ESP-IDF English Espressif IoT Development Framework used for the ESP32 co-processor firmware.
6502 Software Repository English Community 6502 software and ROM image repository.

Manuals and Datasheets

The table below contains all the datasheets and manuals referenced in the design and programming of the pico6502.
Datasheet Language Description
RP2350 English Raspberry Pi RP2350 microcontroller datasheet.
ESP32-S3 English Espressif ESP32-S3 SoC datasheet โ€” WiFi/BT co-processor on the pico6502 board.
APS6404L PSRAM English 8MB SPI PSRAM datasheet โ€” the main extended RAM used for memory banking.
W25Q128 Flash English Winbond 16MB SPI NOR Flash datasheet โ€” stores firmware and ROM images.
TLV62569 English Texas Instruments 5Vโ†’3.3V synchronous buck converter powering the pico6502 from the 6502 DIP-40 VCC pin.
CH334F English CH334F 4-port USB 2.0 hub controller โ€” provides USB hub functionality for firmware updates.

Project Preview

The picoZ80 and pico6502 projects were first previewed on X (formerly Twitter):
https://x.com/engineerswork1/status/1953171627065188841

Demonstration Videos
Demonstration videos for the pico6502 will be added as the project matures. See the picoZ80 Demonstration Videos for examples of the shared platform in action.

Commercial Use Restriction

No commercial use permitted without express written permission.
The pico6502 hardware design (schematics, PCB layout, KiCad files), firmware, and all associated software are made available for personal, educational, and non-commercial use only. No part of this design โ€” including but not limited to the PCB artwork, bill of materials, firmware binaries, source code, or documentation โ€” may be used, reproduced, manufactured, sold, or incorporated into any commercial product or service without the express written permission of the author (Philip D. Smart).
To request a commercial licence or discuss permitted uses, please contact the author via the eaw.app website.

Credits

The pico6502 project builds on the work of several individuals and open-source projects. Their contributions are gratefully acknowledged.
  • Manuel Sainz de Baranda y Goรฑi
    Author of the Z80 C-language Z80 CPU emulator library (github.com/redcode/Z80), which is used by the companion picoZ80 project. The same high-accuracy emulation philosophy and shared firmware infrastructure informs the pico6502 design, and Manuel's work is gratefully acknowledged as part of the broader project family.
  • Raspberry Pi Ltd
    Authors of the Pico SDK and RP2350 hardware. The PIO assembler, C SDK, CMake toolchain integration, and RP2350B silicon make the cycle-accurate 6502 bus interface possible.
  • Espressif Systems
    Authors of the ESP-IDF framework and ESP32 hardware. The ESP32 co-processor, WiFi stack, OTA library, and NVS storage framework underpin the web management interface.
  • Philip Smart
    Hardware design (KiCad schematics and PCB layout), RP2350 PIO firmware, ESP32 web application, JSON configuration system, and all project documentation.
  • Grok (xAI)
    AI assistant that provided valuable help during PIO state machine debugging โ€” particularly in diagnosing timing edge cases and cycle-accurate bus interaction issues in the RP2350 PIO programs.
  • Claude (Anthropic)
    AI assistant contributing to this project across multiple areas: authoring and structuring the project documentation, analysing the FSPI/UART interface between the RP2350 and ESP32 and providing firmware improvement recommendations, and ongoing firmware development assistance.

Licenses

The pico6502 project is composed of several components, each covered by its own licence:
Component Licence
pico6502 RP2350 firmware (PIO, C sources)GNU General Public License v3
pico6502 ESP32 firmware and web interfaceGNU General Public License v3
KiCad hardware design files (schematics, PCB, Gerbers)Creative Commons BY-NC-SA 4.0
Documentation and user guidesCreative Commons BY-NC-SA 4.0
Raspberry Pi Pico SDKBSD 3-Clause
ESP-IDF frameworkApache License 2.0
Bootstrap 4 (web interface)MIT License
In short: the firmware and software you build from this project's source code are open-source under the GPL v3; the hardware designs and documentation are licensed under CC BY-NC-SA 4.0 (non-commercial use only โ€” commercial licensing available on request); third-party libraries retain their own licences as listed above. See the LICENSE and NOTICE files in the repository for full details.

Licence Terms

Copyright © 2019–2026 Philip Smart. All rights reserved.
Hardware Designs — CC BY-NC-SA 4.0
All hardware designs (KiCad schematics, PCB layouts, Gerber fabrication files, bills of materials) are licensed under the Creative Commons Attribution-NonCommercial-ShareAlike 4.0 International License. You are free to share and adapt the designs for non-commercial purposes only, provided you give appropriate credit and distribute any modifications under the same licence. Commercial manufacture or sale requires a separate licence — please contact info@eaw.app.
Firmware & Software — GNU GPL v3
The firmware and software source code are free software under the GNU General Public License v3. You may redistribute and modify the code under the GPL v3 terms. Any distributed modifications must also be licensed under GPL v3 with source code made available.
Trademark & Attribution
The names picoZ80, pico6502, and engineers@work are trademarks of Philip Smart. You may not use these names to promote derivative products without written permission. You may not remove or alter copyright notices, author attribution, or boot/splash screen credits. Re-branding this project and presenting it as your own work is expressly prohibited. See the NOTICE file in the repository for full details.
Commercial Licensing
If you are a manufacturer or distributor interested in producing picoZ80 or pico6502 boards for commercial sale, please contact: info@eaw.app. Personal, educational, and hobbyist/club use is always permitted under the open-source licences above.
The full licence texts are included in the repository as LICENSE, LICENSE-HARDWARE.txt, and LICENSE-SOFTWARE.txt.

Wireless Regulatory Notice

This device incorporates an ESP32-S3-PICO-1 wireless module that transmits in the 2.4 GHz ISM band, making it an intentional radiator under radio-frequency regulations worldwide (including FCC Part 15 Subpart C in the United States, and the Radio Equipment Directive 2014/53/EU in the European Union).
Although the ESP32-S3-PICO-1 module itself carries pre-existing regulatory certifications (FCC, CE, and others), those module-level certifications do not automatically extend to a finished product that incorporates the module. The pre-certified module exemption permits individual hobbyists to build a limited number of devices for personal, experimental, or educational use without obtaining separate equipment authorisation.
Important Limitations
  • Assembled devices must not be sold, offered for sale, gifted, or otherwise distributed to third parties unless the finished product has been independently tested and granted its own equipment authorisation (e.g. FCC ID, CE marking with a Notified Body assessment) in the relevant jurisdiction.
  • Building this project for personal use in limited quantities is generally permitted under hobbyist and experimental-use provisions (e.g. FCC § 15.23), provided the device does not cause harmful interference.
  • Regulatory requirements vary by country. Builders outside the United States should consult their national radio-frequency authority for applicable rules.
Builder’s Responsibility
It is the builder’s sole responsibility to ensure that any device constructed from these designs complies with all applicable radio-frequency regulations in their jurisdiction. The author provides these designs for personal, educational, and hobbyist use and makes no representation that a device built from them satisfies the regulatory requirements for commercial distribution.