Table of Contents
If you want to run disks on a Plus/4 the proper way, you need a 1551. That means a drive box, a TCBM paddle hanging out of the expansion port, and the hope that the 40 year old drive still works. And if you also want to run cartridges, you are swapping hardware in and out of the one expansion port.
TEDDY puts all of that in one cartridge: a 255-game flash multicart, a cycle-exact 1551 and, in the top version, a network drive. No external box, no paddle.
This post describes the specification as it stands today (rev A.3). No hardware yet, but the architecture is settled.
Three versions
TEDDY is one PCB with three population options, so it can be built in stages and you only pay for what you want.
TEDDY-F
Adds FPGA, NOR flash, buffers, config memory and you get 255 16k Images with a browser/manager application.
TEDDY-FD
In addition to above, this adds a cycle exact 1551 emulator. µSD Card for storage as well as internal NOR FLASH for those must-have programs.
TEDDY-FDM
The maximum version. IN addition to above, this also add Metaloaf to the story.
This also give me a chance to partition development and get to know the hardware/software of the Plus/4. After all I have only had a Plus/4 for a week. The VIC 20 I have almost 50 years of experience with.
Architecture
I split the design into clean blocks, so the only hard real-time path on the Plus/4 side is FPGA logic plus flash access time.
- FPGA (Lattice MachXO2). Everything that faces the Plus/4 bus: address decode, the control registers, flash addressing and the paddle side of the TCBM interface. Instant-on from internal flash, so no waiting for a microcontroller to boot.
- Parallel NOR flash. 128 Mbit, holding the cartridge images. The Plus/4 reads it directly at bus speed through the data buffer.
- RP2350. The 1551 drive itself, running on its own timebase exactly like a real drive. It is not on the Plus/4 bus at all; it talks to the FPGA over an emulated TCBM link, just as a real 1551 talks to its paddle.
- ESP32-S3 (FDM only). Runs Meatloaf as a high level network drive.
The multicart
- 255 cartridge images plus the manager in 8 MB of NOR. Every image gets a fixed 32 KB slot, so both 16 KB and 32 KB cartridges fit.
- The manager lives in image 0 on C1LO, and starts through the normal Plus/4 cartridge cold-start path. No extra chip select, no special tricks.
- A second manager slot so the manager can be updated in the field without bricking the cartridge.
- An image catalogue in flash with name, size, flags, autostart behaviour and shortcut key.
- Programmable from the Plus/4 itself through the manager, with an unlock sequence so a stray write can never erase anything.
Boot behaviour
The manager is always the first thing that runs. At cold start it scans the keyboard matrix directly, before the Kernal keyscan is even running:
- No key: boot the default image, or stay in the manager if none is set.
- One key: manager.
- Another key: file browser.
- A set of user-assignable shortcut keys, each jumping straight to a chosen image.
Starting an image uses a small trampoline in RAM. It selects the image, sets a boot-once flag in the FPGA and resets through the Kernal, so the game gets a completely normal cold start. The flag is consumed on that reset. Press reset again and you are back in the manager. No boot loops, and the reset button on the side of the Plus/4 is always your way out.
The 1551 (FD and FDM)
This is the part that justifies the RP2350.
- Cycle-exact 1551 as device 8. A 6510T core at the 1551 clock rate, drive side TIA, gate array and GCR handling.
- Runs the original 1551 ROM, supplied by the user. No Commodore ROMs are shipped with the product.
- GCR level track handling, so fast loaders that upload their own drive code and read raw disk data work. That is the whole point of doing it cycle exact instead of high level.
- Write support with write-back to the disk image.
- Disk images on an SD card, with track data held in PSRAM on the RP2350.
- Drive LED, and optionally a piezo head click for the nostalgia.
Meatloaf does not do cycle-exact emulation and has no 1551 loader support, which is why the fast-loader-compatible drive is the RP2350's job and Meatloaf sits on a separate device number.
Network drive (FDM)
The FDM version adds an ESP32-S3 running Meatloaf as device 9: WiFi, URL style paths, nested containers, and network time. The RP2350 and ESP32 share one SD card, with ownership decided by the build version, and talk to each other over a UART link with flow control.
The display, and FATTED
The FD and FDM versions get a small display driven by the RP2350. It shows the drive state, and it will also show the modes of FATTED, my FPGA replacement for the TED chip.
TEDDY and FATTED are designed as a pair. TEDDY's manager is the configuration tool for FATTED too: one application for both. Since the cartridge FPGA sees the whole bus on the expansion port, it can also follow bank and mode switches made by a running program, not just what the manager last set, and pass them on to the display.
Staying out of the way
The register block sits at $FDA0, clear of the ACIA, the user port and keyboard chips, the SID card addresses, the expansion user port and the ROM bank latch. In the -F version the 1551 decoding is disabled, so a real serial bus drive works exactly as normal.
What is still open
A few things I want to pin down on a real machine before the FPGA code is written:
- Whether the cartridge select lines assert on write cycles. The design is safe either way, since the flash write strobe, output enable and buffer enable are all generated locally with R/W qualification, but I want to know.
- The exact 1551 TIA base addresses. The published memory maps disagree, so I will read the Kernal routines rather than trust either.
- How the Kernal arbitrates when more than one bank carries a cartridge signature.
- Final FPGA device, once the pin count comes out of the schematic.
- Logic analyser captures from a real 1551 and paddle, to build a replay test set for the fast loaders before hardware exists.
- Flash package height versus the cartridge shell. As always, Onshape.
More when there is copper.
