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
Board Overview
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
| 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
- Flash the RP2350 bootloader via USB mass-storage mode (BOOTSEL).
- Flash the ESP32 firmware via
esptool. - Prepare an SD card with
config.jsonand any required ROM images. - Install the pico6502 in the 6502 socket of your host computer.
- Power on and wait for the pico6502 to start its WiFi access point.
- Connect to the web interface and complete initial configuration.
Step 1 — Flash the RP2350 Bootloader
- Do not insert the pico6502 into a host computer yet — connect it to a PC by USB cable only.
- Hold the BOOTSEL signal low (refer to your board's schematic for the test point location).
- Apply power to the USB port — the RP2350 starts booting.
- Release BOOTSEL promptly after the board enumerates as a USB mass-storage device.
- The PC will mount a drive labelled RPI-RP2 (or similar).
- Copy
Bootloader_<version>.uf2to the mounted drive. The RP2350 self-flashes and reboots automatically.
Step 2 — Flash the ESP32 Firmware
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
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
- FAT32 file system.
- Any capacity supported by FAT32 (up to 32GB is recommended for reliable formatting).
config.jsonin 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 thewebfs/directory from the project repository to the SD card root.
| Directory | Contents |
|---|---|
ROM/ |
ROM images referenced by config.json (e.g. BBC Model B OS, BASIC) |
DSK/ |
Disk images for future drive emulation drivers |
config.json, and create directories from the browser without physically removing the card.
Step 4 — Install in the Host Computer
- Power off the host computer and discharge any static.
- Remove the existing 6502 CPU chip from its DIP-40 socket. A chip extractor tool is recommended to avoid bending pins.
- Insert the SD card into the pico6502 SD card slot.
- 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.
- 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.
- Power on the host computer.
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
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
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
Connecting in Access Point Mode
- On your phone, tablet, or laptop, open the WiFi settings and look for a network named pico6502 (or as configured in the
esp32.wifi.ssidfield of yourconfig.jsonwhen in AP mode). - Connect to the pico6502 network. The default AP password is pico6502AP (check your firmware release notes if this has changed).
- 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.
- Navigate to the WiFi Manager page to enter your home network SSID and password.
- Click Save & Connect. The ESP32 will reboot and connect to your home network as a client.
Client (Station) Mode
config.json (recommended for ease of access), navigate directly to:
http://192.168.1.192
Web Interface
webfs/ directory on the SD card.
Dashboard (index.htm)
- 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.
Config Editor (config.htm)
config.json file stored on the SD card. The editor features syntax highlighting and basic JSON validation.
To edit the configuration:
- Navigate to the Config Editor page.
- The current
config.jsonis loaded into the editor automatically. - Make your changes. The editor will highlight syntax errors in red.
- Click Save to write the updated file back to the SD card.
- 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.
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)
- 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.jsonto save a copy to your PC. - Update web assets — navigate to
webfs/and upload replacement HTML/CSS/JS files to update the web interface.
Persona Selection (personality.htm)
- BBC Model B — BBC Micro Model B persona (in development). Provides basic memory map with OS and BASIC ROMs. The
ModelB.cdriver is referenced inM6502CPU.cvia#ifdef INCLUDE_BBC_DRIVERS.
Firmware Updates (OTA)
BaseM6502_<version>.bin rather than BaseZ80_<version>.bin.
WiFi Manager (wifimanager.htm)
- WiFi Mode — Access 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.
Basic Configuration
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": []
}
]
}
}
0x0000 – 0x7FFF— 32KB RAM in PSRAM bank 0 (zero page, stack, and general RAM).0x8000 – 0x8FFF— 4KB FUNC block bound to theVIAvirtual device handler — a memory-mapped 6522 VIA peripheral emulation.0xC000 – 0xFFFF— 8KB BASIC ROM loaded from/ROM/basic.romon the SD card into PSRAM bank 1.0xE000 – 0xFFFF— 8KB OS ROM loaded from/ROM/os.romon the SD card into PSRAM bank 2. The 6502 reset vector at0xFFFC/0xFFFDmust be within this ROM region.
"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.jsonis 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
pico6502WiFi network first, then navigate tohttp://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.jsonexactly 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
0xFFFCand0xFFFDon 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
fileofsvalue — an incorrect offset will load garbage data into the ROM bank. - Verify the
sizefield in the memory map entry is not larger than the ROM image file.
OTA update fails
- Ensure you are uploading a
.binfile (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
esptoolusing 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
- 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.
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.