pico6502 User Manual

Note: The pico6502 project is in early development. Hardware is functional and the bus interface is operational, but driver support is limited. This manual reflects the current state of the project and will be updated as development progresses.

pico6502 User Manual

The pico6502 is a drop-in replacement for a 6502 CPU in any DIP-40 socketed computer. It plugs directly into the 6502 socket of your vintage computer and — without any modifications to the host board — provides expanded memory, virtual peripherals, and a browser-based management interface over WiFi.
The pico6502 shares identical hardware with the picoZ80 — the same RP2350B dual-core microcontroller, 8MB PSRAM, 16MB Flash, ESP32 co-processor, SD card slot, and USB hub. The key difference is the bus interface firmware: the pico6502 targets the 6502's dual-phase PHI1/PHI2 clocking scheme and its all memory-mapped peripheral model. Unlike the Z80, the 6502 has no separate I/O address space — all peripherals (VIA, ACIA, etc.) are accessed through the memory map using FUNC blocks.
This manual covers the physical board, initial setup, connecting to a host machine, and using the web interface. For architecture details, configuration reference, and firmware internals see the pico6502 Technical Guide. For the project overview see the pico6502 project page.

Board Overview

The pico6502 PCB (revision 2.2) is designed to fit within the footprint of a standard 40-pin DIP package, measuring 52mm × 19mm. All 40 DIP pins emerge from the underside of the board, exactly matching the pin-out of a real 6502, so it drops straight into any 6502 socket without bending or adapting.
The top surface carries all active components. The board height above the socket is within the envelope of a standard IC with a DIP-40 socket fitted underneath, making it compatible with the clearances of most vintage 6502 computers.

Connectors and Indicators

The pico6502 board exposes the following connectors and indicators:
Item Description
6-pin Debug Header Located on the board edge. Provides SWD (Serial Wire Debug) access to the RP2350, plus SWO and Reset lines. See Debug Header Pinout below.
USB Port USB connectivity for firmware flashing via USB mass-storage (BOOTSEL mode) and for USB-UART bridging to the ESP32.
SD Card Slot Full-size SD card slot managed by the ESP32. Holds config.json, ROM images, and any filing system assets.

Debug Header Pinout

The 6-pin header is the primary hardware interface for initial programming and source-level debugging. The pins are numbered from Pin 1 at the end closest to the board edge marker.
Pin Signal Function
1 SWCLK Serial Wire Debug clock (ARM SWD)
2 SWDIO Serial Wire Debug data (ARM SWD)
3 SWO Serial Wire Output — optional trace output from RP2350
4 RESET Active-low reset for the RP2350. Pull low to reset.
5 GND Ground reference
6 3V3 3.3V supply output (do not use as an input)

NB. Pins 1, 2, and 5 are used for SWD debugging (SWCLK, SWDIO, GND). For initial RP2350 flashing, use BOOTSEL mode by asserting the BOOTSEL signal during power-on — refer to Step 1 in Getting Started. Pin 3 (SWO) is optional and used only when trace output is enabled in the firmware build.


Getting Started

Follow these steps in order the first time you set up a pico6502 board:
  1. Flash the RP2350 bootloader via USB mass-storage mode (BOOTSEL).
  2. Flash the ESP32 firmware via esptool.
  3. Prepare an SD card with config.json and any required ROM images.
  4. Install the pico6502 in the 6502 socket of your host computer.
  5. Power on and wait for the pico6502 to start its WiFi access point.
  6. Connect to the web interface and complete initial configuration.

Step 1 — Flash the RP2350 Bootloader

The RP2350 does not have physical BOOTSEL or Reset buttons on the pico6502 board — these signals are accessible programmatically or via the debug header. To enter the USB mass-storage bootloader:
  1. Do not insert the pico6502 into a host computer yet — connect it to a PC by USB cable only.
  2. Hold the BOOTSEL signal low (refer to your board's schematic for the test point location).
  3. Apply power to the USB port — the RP2350 starts booting.
  4. Release BOOTSEL promptly after the board enumerates as a USB mass-storage device.
  5. The PC will mount a drive labelled RPI-RP2 (or similar).
  6. Copy Bootloader_<version>.uf2 to the mounted drive. The RP2350 self-flashes and reboots automatically.
After flashing the bootloader, all subsequent RP2350 firmware updates can be performed wirelessly via the web OTA page — you do not need to access the BOOTSEL signal again for normal firmware updates.

Step 2 — Flash the ESP32 Firmware

The ESP32 firmware is flashed using esptool. The procedure is identical to the picoZ80 — see the picoZ80 User Manual — Step 2 for full details. The ESP32 firmware binary is the same for both boards.
Set up the Python environment (once only):
python3 -m venv ./venv/
source ./venv/bin/activate
cd $HOME/esptool
Then flash all four ESP32 firmware components. Adjust PORT to the device node assigned by your OS:
PORT=/dev/ttyUSB0       # Linux — adjust as required
# PORT=/dev/tty.usbmodem141403  # macOS

BINPATH=/path/to/esp32/build

python3 ./esptool.py \
  -p ${PORT} -b 115200 \
  --before default_reset --after hard_reset \
  --chip esp32s3 \
  write_flash \
  --flash_mode dio --flash_size 4MB --flash_freq 80m \
  0x0     ${BINPATH}/bootloader.bin \
  0x8000  ${BINPATH}/partition-table.bin \
  0x9000  ${BINPATH}/ota_data_initial.bin \
  0x10000 ${BINPATH}/sd_card.bin

NB. All subsequent ESP32 firmware updates can be performed via the OTA web page (ota-esp32.htm) once the initial flash is complete.

Step 3 — Prepare the SD Card

The SD card holds the configuration file, ROM images, and web interface assets.
Format requirements:
  • FAT32 file system.
  • Any capacity supported by FAT32 (up to 32GB is recommended for reliable formatting).
Minimum required files:
  • config.json in the SD card root — the main configuration file. See Basic Configuration for a minimal 6502 example.
  • webfs/ directory — the ESP32 web interface assets. Copy the contents of the webfs/ directory from the project repository to the SD card root.
Optional directories:
Directory Contents
ROM/ ROM images referenced by config.json (e.g. BBC Model B OS, BASIC)
DSK/ Disk images for future drive emulation drivers
The SD card can be managed through the web File Manager once the pico6502 is running — you can upload ROM images, edit config.json, and create directories from the browser without physically removing the card.

Step 4 — Install in the Host Computer

Safety first: Always power off and unplug the host computer before installing or removing the pico6502. The board operates at 3.3V internally; the DIP-40 pins connect to the 5V host bus through appropriate interface circuitry, but the board must never be inserted or removed while powered.
Installation procedure:
  1. Power off the host computer and discharge any static.
  2. Remove the existing 6502 CPU chip from its DIP-40 socket. A chip extractor tool is recommended to avoid bending pins.
  3. Insert the SD card into the pico6502 SD card slot.
  4. Align the pico6502 with the 6502 socket, ensuring that Pin 1 of the pico6502 (marked with a dot or notch) aligns with Pin 1 of the socket.
  5. Press the pico6502 gently and evenly into the socket. Ensure all 40 pins are seated. Do not force — if resistance is felt, remove and check pin alignment.
  6. Power on the host computer.
On first power-on after a fresh firmware install, the ESP32 will start in Access Point mode, broadcasting a WiFi network named pico6502. Connect to this network to access the web interface and complete initial WiFi configuration.

NB. The pico6502 draws power from the 5V supply on the 6502 socket VCC pin. The on-board buck converter delivers 3.3V to all board components. Ensure your host computer's 5V supply can deliver at least 500mA — the pico6502 can draw up to 400mA under peak load (RP2350 at 300MHz with WiFi active).

Step 5 — Power On

Power on the host computer. The pico6502 will boot from the RP2350 bootloader, load the application firmware from Flash, read config.json from the SD card (or the cached Flash copy), initialise the memory map, and begin servicing 6502 bus cycles.
The ESP32 boots in parallel and starts the WiFi subsystem. If no saved network credentials are found, the ESP32 will enter Access Point mode automatically.

Step 6 — Connect to the Web Interface

On first boot, connect to the pico6502 WiFi access point and navigate to http://192.168.4.1. From the WiFi Manager page, enter your home network credentials. After saving and rebooting the ESP32, the pico6502 will join your network and be accessible at the configured IP address (default http://192.168.1.192).

WiFi Setup

The pico6502 WiFi setup procedure is identical to the picoZ80. The ESP32 co-processor provides WiFi connectivity. On first boot (or when no WiFi credentials have been saved) the ESP32 starts in Access Point (AP) mode.

Connecting in Access Point Mode

  1. On your phone, tablet, or laptop, open the WiFi settings and look for a network named pico6502 (or as configured in the esp32.wifi.ssid field of your config.json when in AP mode).
  2. Connect to the pico6502 network. The default AP password is pico6502AP (check your firmware release notes if this has changed).
  3. Open a browser and navigate to http://192.168.4.1 — this is the default AP mode IP address. The pico6502 web interface will appear.
  4. Navigate to the WiFi Manager page to enter your home network SSID and password.
  5. Click Save & Connect. The ESP32 will reboot and connect to your home network as a client.

Client (Station) Mode

Once configured for client mode, the ESP32 joins your home WiFi network and is reachable at the IP address shown on the Dashboard page. If you set a fixed IP in config.json (recommended for ease of access), navigate directly to:
http://192.168.1.192
Substitute the IP address you configured. If you are using DHCP, find the assigned address from your router's DHCP client list.
The web interface runs entirely in your browser. No additional software is required. The pico6502 web server runs on port 80.

Web Interface

The pico6502 web interface is identical to the picoZ80's — a seven-page Bootstrap 4 application served by the ESP32. All pages are accessible from the navigation bar at the top of each page. The web assets are stored in the webfs/ directory on the SD card.

Dashboard (index.htm)

The Dashboard is the home page of the web interface. It displays real-time system information and provides a quick overview of the pico6502 state.
Information shown on the Dashboard includes:
  • Firmware Version — the currently running RP2350 firmware version and build date.
  • ESP32 Version — the ESP32 co-processor firmware version.
  • Active Partition — which of the two firmware slots (1 or 2) is currently active.
  • Active Persona — the machine personality currently loaded.
  • RP2350 Clock — current CPU frequency in MHz.
  • PSRAM Clock — current PSRAM SPI clock frequency.
  • WiFi Status — mode (AP or client), SSID, and assigned IP address.
  • SD Card — whether an SD card is present and the filesystem mount status.
  • Uptime — time since last reboot.
The Dashboard also provides buttons to reboot the RP2350 and to trigger a configuration reload from the SD card without a full reboot.

Config Editor (config.htm)

The Config Editor page provides an in-browser editor for the config.json file stored on the SD card. The editor features syntax highlighting and basic JSON validation.
To edit the configuration:
  1. Navigate to the Config Editor page.
  2. The current config.json is loaded into the editor automatically.
  3. Make your changes. The editor will highlight syntax errors in red.
  4. Click Save to write the updated file back to the SD card.
  5. Click Apply (or reboot) to apply the new configuration. The RP2350 reads the config at boot, minifies it, and stores it in Flash — subsequent boots use the Flash copy if no SD card is present.
Changes to the memory map and ROM images take effect on the next RP2350 reset. Note that the pico6502 has no separate I/O map — all peripheral bindings are in the memory array as FUNC blocks. Changes to WiFi settings in the esp32.wifi block take effect on the next ESP32 reboot.

NB. The Config Editor operates directly on the SD card file. It is good practice to keep a backup copy of a working config.json on your PC before making significant changes.

File Manager (filemanager.htm)

The File Manager provides a browser-based view of the SD card contents. You can navigate directories, upload new files (ROM images, disk images), download existing files to your PC, create new directories, and delete files and directories.
Common tasks in the File Manager:
  • Upload a ROM image — navigate to the ROM/ directory and use the Upload button to transfer the ROM file from your PC.
  • Backup config.json — click the download icon next to config.json to save a copy to your PC.
  • Update web assets — navigate to webfs/ and upload replacement HTML/CSS/JS files to update the web interface.
File operations are performed directly on the SD card via the ESP32. Large file uploads may take a few seconds depending on file size and WiFi signal quality.

Persona Selection (personality.htm)

The Persona Selection page allows you to choose which machine personality (persona) the pico6502 presents to the host computer. Different personas load different memory maps and ROM images from the configuration.
Currently supported 6502 personas (early development):
  • BBC Model B — BBC Micro Model B persona (in development). Provides basic memory map with OS and BASIC ROMs. The ModelB.c driver is referenced in M6502CPU.c via #ifdef INCLUDE_BBC_DRIVERS.
Additional 6502 host personas will be added as the project develops. Because the 6502 has no separate I/O space, all persona-specific peripheral emulation is handled through FUNC blocks in the memory map — virtual VIA, ACIA, and other peripherals are all memory-mapped.

Firmware Updates (OTA)

Firmware for both the RP2350 and the ESP32 can be updated over-the-air (OTA) from the web interface. The procedure is identical to the picoZ80 — see the picoZ80 User Manual — Firmware Updates for full details.
The only difference is the RP2350 firmware binary filename: for the pico6502, the application binary is named BaseM6502_<version>.bin rather than BaseZ80_<version>.bin.

WiFi Manager (wifimanager.htm)

The WiFi Manager page configures the ESP32 network settings. Changes made here are persisted in the ESP32 NVS (non-volatile storage) and take effect on the next reboot.
Available settings:
  • WiFi ModeAccess Point (the pico6502 creates its own network) or Client (the pico6502 joins an existing network).
  • SSID — the network name to create (AP mode) or join (client mode).
  • Password — the WiFi passphrase.
  • IP Address / Netmask / Gateway — fixed IP settings for client mode (recommended for consistent access).
  • DHCP — enable to obtain an address from your router automatically; disable to use the fixed IP settings above.
After saving, click Reboot ESP32 to apply the new settings. The ESP32 will restart and connect using the new configuration. If client mode connection fails (wrong SSID or password), the ESP32 will fall back to Access Point mode after a timeout, allowing you to reconnect and correct the settings.

Basic Configuration

All pico6502 behaviour is controlled by config.json on the SD card. The following is a minimal working configuration for a generic 6502 host with RAM, ROM, and a memory-mapped VIA peripheral. Refer to the Technical Guide — Configuration Reference for a full description of all options.
Key difference from picoZ80: the top-level CPU key is "6502" (not "z80"), and there is no "io" array — all peripherals including the VIA, ACIA, etc. are mapped using FUNC blocks in the "memory" array.
{
  "esp32": {
    "core": {
      "device": "6502",
      "mode":   0
    },
    "wifi": {
      "override":  1,
      "wifimode":  "client",
      "ssid":      "YourNetwork",
      "password":  "YourPassword",
      "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": [
      {
        "memory": [
          {
            "enable":   1,
            "addr":     "0x0000",
            "size":     "0x8000",
            "type":     "RAM",
            "bank":     0,
            "tcycwait": 0,
            "tcycsync": 0,
            "task":     "",
            "file":     "",
            "fileofs":  0
          },
          {
            "enable":   1,
            "addr":     "0x8000",
            "size":     "0x1000",
            "type":     "FUNC",
            "bank":     0,
            "tcycwait": 0,
            "tcycsync": 0,
            "task":     "VIA",
            "file":     "",
            "fileofs":  0
          },
          {
            "enable":   1,
            "addr":     "0xC000",
            "size":     "0x4000",
            "type":     "ROM",
            "bank":     1,
            "tcycwait": 0,
            "tcycsync": 0,
            "task":     "",
            "file":     "/ROM/basic.rom",
            "fileofs":  0
          },
          {
            "enable":   1,
            "addr":     "0xE000",
            "size":     "0x2000",
            "type":     "ROM",
            "bank":     2,
            "tcycwait": 0,
            "tcycsync": 0,
            "task":     "",
            "file":     "/ROM/os.rom",
            "fileofs":  0
          }
        ],
        "drivers": []
      }
    ]
  }
}
This example maps:
  • 0x0000 – 0x7FFF — 32KB RAM in PSRAM bank 0 (zero page, stack, and general RAM).
  • 0x8000 – 0x8FFF — 4KB FUNC block bound to the VIA virtual device handler — a memory-mapped 6522 VIA peripheral emulation.
  • 0xC000 – 0xFFFF — 8KB BASIC ROM loaded from /ROM/basic.rom on the SD card into PSRAM bank 1.
  • 0xE000 – 0xFFFF — 8KB OS ROM loaded from /ROM/os.rom on the SD card into PSRAM bank 2. The 6502 reset vector at 0xFFFC/0xFFFD must be within this ROM region.
Note that there is no "io" array — the 6502 has no separate I/O address space. All peripheral emulation uses FUNC blocks within the memory map.

Troubleshooting

Host computer does not boot

  • Check orientation — ensure Pin 1 of the pico6502 aligns with Pin 1 of the socket. Inserting the board backwards will damage both the pico6502 and the host computer.
  • Check seating — remove the pico6502 and reinsert, ensuring all 40 pins are fully seated and none are bent under the board.
  • Check the SD card — if config.json is missing or malformed the firmware will attempt to use the previously cached Flash configuration. If no valid config exists the RP2350 will not initialise the memory map and the host will see an open bus. The 6502 reset vector must be in a valid ROM region.
  • Confirm firmware is flashed — try connecting the pico6502 via USB (without inserting in the host) and verify the board enumerates on the PC.
  • Check host power supply — the pico6502 can draw up to 400mA from the 5V rail. Some vintage computers have marginal power supplies; check the 5V rail voltage under load with a multimeter.

Cannot connect to the web interface

  • Check WiFi mode — on first boot or after a factory reset the ESP32 starts in AP mode. Connect to the pico6502 WiFi network first, then navigate to http://192.168.4.1.
  • Check configured IP address — if client mode is configured with a fixed IP, verify the IP matches your network subnet.
  • Check the SD card is present — the web assets in webfs/ on the SD card are required. Without the SD card the web server cannot serve any pages.
  • Check the webfs directory — confirm the webfs/ directory exists on the SD card and contains the HTML/CSS/JS files from the project repository.
  • Factory reset WiFi — if credentials are lost, re-flash the ESP32 firmware to clear NVS settings and start fresh.

SD card not recognised

  • Ensure the SD card is formatted as FAT32. NTFS, exFAT, and FAT16 are not supported.
  • Try a different SD card — some high-capacity or high-speed cards can have compatibility issues with the ESP32 SPI SD interface.
  • Cards up to 32GB are well supported. Very large cards (>32GB) may require special formatting.
  • Re-seat the SD card — remove and reinsert to ensure good contact.

ROM images not loading / 6502 crashes at reset

  • Verify the file path in config.json exactly matches the file location on the SD card (paths are case-sensitive).
  • Confirm the ROM image file is present on the SD card — use the File Manager to browse to the expected location.
  • Check the reset vector — the 6502 reads the reset vector from addresses 0xFFFC and 0xFFFD on power-up. Both addresses must fall within a ROM or RAM block in your memory map. If they fall in an unmapped or PHYSICAL region the 6502 will jump to a random address and crash.
  • Check the fileofs value — an incorrect offset will load garbage data into the ROM bank.
  • Verify the size field in the memory map entry is not larger than the ROM image file.

OTA update fails

  • Ensure you are uploading a .bin file (not a .uf2) for RP2350 OTA updates.
  • Ensure the binary was built for the pico6502 target (BaseM6502) — do not upload a picoZ80 binary to the pico6502.
  • Ensure you are uploading to the inactive slot to preserve the working firmware.
  • If the OTA update fails or results in a non-booting partition, the bootloader will keep the previous active slot running — repeat the upload process.
  • For ESP32 OTA failures, re-flash via esptool using the USB connection.

Reference Sites

Resource Link
pico6502 project page /pico6502/
pico6502 Technical Guide /pico6502-technicalguide/
picoZ80 project page /picoz80/
picoZ80 User Manual /picoz80-usermanual/
RP2350 Datasheet datasheets.raspberrypi.com
Pico SDK Documentation raspberrypi.github.io/pico-sdk-doxygen
ESP32-S3 Technical Reference docs.espressif.com
MOS 6502 Datasheet westerndesigncenter.com
X (Twitter) project preview engineerswork1

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.