pico6809 User Manual
pico6809 User Manual
The pico6809 is a drop-in replacement for a Motorola 6809 or Hitachi 6309 CPU in a DIP-40 socket. It plugs into the CPU socket of the host computer and, without modifications to the host board, provides virtual RAM and ROM, virtual disc and tape drives and a browser-based management interface over WiFi. Its first host is the Dragon 32 and Dragon 64.
The pico6809 shares its processor platform with the pico6502 and picoZ80: the same RP2350B, PSRAM, Flash, ESP32 co-processor, SD card and web interface. Where a procedure is the same on every board (flashing, WiFi set-up, the web pages), this manual gives the 6809 specifics and links to the pico6502 manual for the screenshots and full detail.
This manual is a first edition, written while the first boards are in production and before they have been tested on a Dragon 32. The firmware is complete for the Dragon and verified in simulation. Board details here are taken from the v2.3 KiCad design and will be confirmed when the first boards are made. For architecture, the configuration reference and the firmware internals see the Technical Guide; for the project overview see the pico6809 project page.
Board Overview
The 6809 comes in two clocking styles, and the board must be set for the one the host expects:
Connectors
- JP1 at 1–2, 6809E (the default): the host supplies the E and Q clocks (MC6809E, HD6309E). Use this on a Dragon 32 or 64, where the SAM generates E and Q, and on any other 6809E host (CoCo 1/2/3, Thomson).
- JP1 at 2–3, 6809: the board generates E and Q itself (MC6809, HD6309 with a crystal or TTL clock), for example in a Vectrex or SWTPC.
cputype disagree ("check JP1!").
- USB: firmware flashing, the debug shell, and serial ports to the PC, as on the pico6502.
- SD card: FAT32, holds
config.json, ROM images, disc images and tapes. - Debug header: SWD for the RP2350; see the pico6502 manual's Debug Header.
Getting Started
Flash the Firmware
Two RP2350 firmware models exist for the 6809: Base6809 (a generic 6809 for any host) and Dragon6809 (everything in Base6809 plus the Dragon 32/64 personas, the virtual DragonDOS and the cassette). For a Dragon, flash Dragon6809. Flashing the RP2350 and the ESP32, and loading the ESP32 filepack, follow the same steps as the pico6502: see Flash RP2350 and Flash ESP32. Use the
Prepare the SD Card
_DBGSH image if you want the debug shell.
Format a card as FAT32 and copy the filepack's SD content to it. For a Dragon you also need the ROM images, which are not distributed with the project: copy your own dumps to the card. The generated personas expect these names:
| File | Contents |
|---|---|
roms/dragon/d32.rom |
Dragon 32 BASIC (16 KB) |
roms/dragon/d64rom1.rom |
Dragon 64 BASIC, 32K mode |
roms/dragon/d64rom2.rom |
Dragon 64 BASIC, 64K mode |
roms/dragon/ddos12a.rom |
DragonDOS 1.2a (8 KB), for the virtual DOS |
The BASIC ROMs are only read in virtual mode; in physical mode the Dragon's own ROMs are used. Put disc images (
Install in the Host
.vdk or JVC .dsk) and tapes (.cas) in any folder and name them in the configuration.
- Switch off and unplug the Dragon, and open the case.
- Remove the 6809E from its socket, levering gently from both ends. If the CPU is soldered in, fit a good-quality DIP-40 socket first.
- Check JP1 is in the 6809E position.
- Fit the pico6809 with pin 1 matching pin 1 of the socket (the notch end), and check that every pin is seated.
- Remove any DragonDOS cartridge if you are going to use the virtual DOS.
At power-on the bus stays floated (a pull-up holds the board's BUSFLOAT line) until the firmware has loaded the configuration and the persona's ROMs and disc images, and then the 6809 core is released from reset. On a Dragon you should see the normal BASIC sign-on. If you enabled the virtual DOS, DragonDOS also signs on.
WiFi Setup
On first boot the ESP32 starts an access point. With pico6809 firmware the defaults are SSID
p6809, password p6809p6809, and the web interface at http://192.168.4.4. Joining your own network (client mode) and the WiFi manager work exactly as on the pico6502; see WiFi Setup.
Web Interface
The dashboard, raw configuration editor, file manager, OTA update and WiFi manager pages are the family's, documented with screenshots in the pico6502 User Manual. The pages that differ on a pico6809:
- Persona Selection offers Basic CPU, Dragon 32 and Dragon 64 for each partition, and only 6809 personas while 6809 firmware is running.
- Config GUI shows a 6809 CPU Settings panel (CPU type, bus mode, read shadow), the core clock and voltage, the memory map, the driver panels (Open6809, Dragon 32, Dragon 64, each with its ROMs and the video option) and the DragonDOS and CMT-CAS cards. Only the fields you change are written back to
config.json. - Floppy, Cartridge and CMT menus change the virtual media while the Dragon runs. Each appears only while its interface is fitted; see Virtual DragonDOS, Changing the Cartridge and Virtual Cassette.
Basic Configuration
The 6809 settings live in the
rp2350."6809" array of config.json, one entry per firmware partition. The partition-level keys:
| Key | Values | Meaning |
|---|---|---|
cputype |
6809e (default), 6309e, 6809, 6309 |
The part being replaced; the E variants take E/Q from the host (JP1 in the 6809E position) |
shadow |
off (default), on, verify |
The read shadow: on for full speed in physical mode, verify to check every shadow-served byte against the bus |
busmode |
virtual |
Run memory from PSRAM; normally set by a VIRTUAL driver instead |
core |
voltage, cpufreq, psramfreq |
RP2350 core voltage and clock, PSRAM clock (the Dragon personas use 1.30V, 300 MHz, 133 MHz) |
memory |
array | Extra memory blocks: addr, size, type, func, bank, task, file |
drivers |
array | The persona driver and its interfaces (below) |
A driver entry has
name (Open6809, Dragon32 or Dragon64), enable, type (PHYSICAL or VIRTUAL), rom (the ROM files), video (Dragon, virtual mode: track, all or none) and if, the list of virtual interface cards. The full reference is in the Technical Guide.
Using a Dragon 32 / 64
Physical Mode
Choose the Dragon 32 or Dragon 64 persona with driver type PHYSICAL. The Dragon runs on its own RAM, ROM and hardware, and the pico6809 runs the CPU at the Dragon's speed. Set
Virtual Mode
shadow to on (or leave the persona's verify while you are proving a new board): without the read shadow the CPU runs at about 70% of a real Dragon. Machine code that uses the SAM's address-dependent or fast rates works as on a real Dragon.
With driver type VIRTUAL, the 64 KB of RAM and the BASIC ROMs come from the pico6809's PSRAM and the SD card, and only the I/O page and the display reach the Dragon. A Dragon 32 then behaves as a 64K machine internally, and on a Dragon 64 the 32K/64K-mode ROM switch works as normal (
Dragon with an HD6309E
EXEC 48000). Leave video at track; use all only if a program's display looks wrong, and none to run with no display.
Set
Virtual DragonDOS
cputype to 6309e and the pico6809 becomes an HD6309E. It starts in 6809 emulation mode, so all Dragon software runs as normal; software that switches the 6309 into native mode (writing the MD register) gets the 6309's faster instruction timings and extra registers and instructions.
Enable the DRAGONDOS interface card, point its ROM at
Changing the Cartridge
ddos12a.rom and give up to four disc images, one per drive. Remove any real DOS cartridge first. DragonDOS then signs on at boot and DIR, LOAD, SAVE, RUN and DSKINIT work on the images:
- Images are
.vdkor JVC.dsk. Changes are written back to the SD card sector by sector. - To make a new disc, give the drive a blank VDK or JVC image and run
DSKINIT; the image grows as it is formatted, to two sides forDSKINIT n,2. - Set
"readonly": 1on a drive to protect an image. "speed": 1runs the controller at real-drive timing;"trace": 1logs the controller's commands for troubleshooting.- Discs are double density only; single-density discs are not served.
- To change a disc while the Dragon runs, open the Floppy menu, pick the drive and choose an image from the SD card, or eject it. There is one row per drive, as a Dragon image holds both sides. Any sectors not yet written back are saved before the swap. The menu's FDD Unit switch selects Virtual (the pico6809's drives) or Real (the Dragon's own WD2797 floppy controller and drives).
The Cartridge menu swaps the virtual DOS cartridge while the Dragon runs. Pick any DOS ROM image on the SD card (for example DragonDOS 1.0 in place of 1.2a), or remove the cartridge so that the Dragon's own cartridge port, and any real cartridge fitted to it, answers again. The Dragon cold-starts after a change (BASIC restarts as it does at power-on, and the new DOS signs on), so save your work first. The Floppy and CMT menus stay available with the cartridge removed, and fitting a DOS again restores its virtual drives.
Virtual Cassette
Enable the CMT-CAS card and list one or more
.cas files as its tape queue, or build the queue while the Dragon runs from the CMT menu, which adds, selects and removes tapes; a selected tape is loaded at once. CLOAD and CLOADM read the tapes in order; when a tape ends at a motor stop, the next one in the queue is loaded, so multi-part programs load without intervention. To save, set record to a file name: each CSAVE is written to that file when the motor stops, as a standard .cas image (verified to load in XRoar). pad sets the leader played at each motor start (default 500 ms). The cassette is timed for the SAM's normal slow rate; a program that runs the SAM fast while loading would see the tape too fast.
Debug Shell
With a
_DBGSH firmware image, the debug shell is reached over USB serial (and over TCP in the simulators). Useful first commands:
| Command | Purpose |
|---|---|
regs |
Registers (with E, F, W, Q, V and MD on a 6309), run state, lines, CPU type, bus mode, shadow counters |
break / go |
Stop and resume the CPU |
step / next |
Single-step, or step over a call |
bp <addr> |
Set a breakpoint |
dis <addr> |
Disassemble (dis p physical, dis v virtual memory) |
asm <addr> |
Assemble one line at a time |
set <reg> <value> |
Change a register |
cpustat |
Speed and cycle statistics |
reset |
Reset the CPU |
The shell is shared with the pico6502; its general use is described in the pico6502 User Manual.
Troubleshooting
- No picture or a dead machine on a Dragon: check JP1 first (6809E position). Then check the boot log over USB: it reports whether E was detected at boot and whether it agrees with
cputype. - DragonDOS does not sign on: check the DRAGONDOS card is enabled, its ROM file exists on the SD card, and no real DOS cartridge is fitted.
- A disc reads as unformatted: check the image is a VDK or JVC double-density image. Single-density discs are not supported.
- A tape will not load: check the file is a
.casimage and the CMT-CAS card is enabled; try a longerpad. - Slow in physical mode: set
shadowtoon. - WiFi, SD card or OTA problems: as for the pico6502, see its Troubleshooting section.