Summary
Add support for the Microsoft Z-80 SoftCard (Apple II/II+/IIe slot card) and the Applied Engineering Z-RAM Ultra (//c snap-on coprocessor + RAM expansion), enabling Casso to run CP/M-80 software on Apple II profiles.
Background
The SoftCard (Microsoft, 1980) was the best-selling Apple II peripheral of its era. It dropped a Zilog Z80 on a slot card and let the Apple II run CP/M alongside the existing 6502. Bank-switched ROM held the CP/M BIOS, and the Z80 shared the Apple II's memory bus through a clever address-line-swap trick (CP/M expects RAM at $0000; the Apple II has its zero page there).
The Z-RAM Ultra (Applied Engineering, ~1985) was the //c equivalent: a single board that combined a Z80, up to 1 MB of RAM, and a memory expansion controller. Famously beloved by //c owners who wanted CP/M without losing their lap-portable form factor.
Scope (v1)
- Z80 CPU core: from-scratch implementation of the Zilog Z80 instruction set. Reuse the project's CPU-emulator patterns (microcode-driven Step, cycle accounting). All standard opcodes; prefix tables (CB, DD, ED, FD); flag arithmetic (including the documented but quirky half-carry / parity behavior).
- Coprocessor handoff: a Z80SoftCard
IDevice that owns a Z80Cpu instance, claims a slot ROM space, and gates which CPU is currently active on the bus. Switching between 6502 and Z80 happens via the SoftCard's $C0Nx soft switch; the inactive CPU is paused.
- Address-line swap: Z80 sees Apple II RAM with the top three address bits XOR'd by �01, putting CP/M's zero page at Apple II $1000-. Implemented as a bus-translation shim on the Z80 side; 6502 side unchanged.
- CP/M BIOS ROM: detect missing SoftCard ROM at slot-mount time and offer the standard bootstrap-consent download flow (similar to Disk II audio).
- Machine config: new
Devices/Z80SoftCard/ and Devices/ZRamUltra/ device dirs; new machine profile JSONs that wire the card into Apple ][+ / //e / //c.
Out of scope (v1)
- Full Z-RAM RAM expansion controller (just the Z80 portion in v1)
- BBC Micro / TRS-80 / other Z80 hosts (Casso's CPU-platform shape doesn't preclude them, but they need their own machine profiles)
- CP/M boot-disk acquisition flow (user provides their own CP/M-80 disk image)
Reference
- Microsoft SoftCard documentation — original spec sheet, BIOS source code archived on archive.org
- Z-RAM Ultra — Applied Engineering manual; CP/M BIOS adapter for //c
- Zilog Z80 user manual (instruction set reference)
- AppleWin Z80 SoftCard support (GPL-2 reference)
Acceptance Criteria
Summary
Add support for the Microsoft Z-80 SoftCard (Apple II/II+/IIe slot card) and the Applied Engineering Z-RAM Ultra (//c snap-on coprocessor + RAM expansion), enabling Casso to run CP/M-80 software on Apple II profiles.
Background
The SoftCard (Microsoft, 1980) was the best-selling Apple II peripheral of its era. It dropped a Zilog Z80 on a slot card and let the Apple II run CP/M alongside the existing 6502. Bank-switched ROM held the CP/M BIOS, and the Z80 shared the Apple II's memory bus through a clever address-line-swap trick (CP/M expects RAM at $0000; the Apple II has its zero page there).
The Z-RAM Ultra (Applied Engineering, ~1985) was the //c equivalent: a single board that combined a Z80, up to 1 MB of RAM, and a memory expansion controller. Famously beloved by //c owners who wanted CP/M without losing their lap-portable form factor.
Scope (v1)
IDevicethat owns a Z80Cpu instance, claims a slot ROM space, and gates which CPU is currently active on the bus. Switching between 6502 and Z80 happens via the SoftCard's $C0Nx soft switch; the inactive CPU is paused.Devices/Z80SoftCard/andDevices/ZRamUltra/device dirs; new machine profile JSONs that wire the card into Apple ][+ / //e / //c.Out of scope (v1)
Reference
Acceptance Criteria