RunCPM: upgrade to 6.9 and consolidate transports onto one shared core - #1391
RunCPM: upgrade to 6.9 and consolidate transports onto one shared core#1391peterkaczorowski wants to merge 2 commits into
Conversation
Drop in the stock RunCPM 6.9 sources verbatim from upstream MockbaTheBorg/RunCPM @ 8f1f8e9 for every file that exists 1:1 upstream: cpm.h, ccp.h, disk.h, ram.h, globals.h, console.h, host.h, debug.h, cpu_mhz.h, resource.h. These are unmodified upstream files (each diffs to zero against the upstream tree), so this commit is purely the library version bump and can be reviewed in isolation. All FujiNet-specific fork patches, the single cpu.h Z80 core, and the integration onto the shared stateless core are applied separately in the following commit. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Re-apply the FujiNet fork patches on top of the verbatim 6.9 drop and consolidate all five bus transports (SIO, IWM/Apple, DriveWire/CoCo, RC2014, RS232) onto one shared, stateless RunCPM engine. 6.9's larger static state replicated across five transport TUs overflows the ESP32 .dram0.bss segment, so the per-transport copies are collapsed into a single header-only core instance (runcpm_core.cpp + runcpm_session.h). RUNCPM_DECL gives the vendored definitions internal linkage so the core TU owns the one instance. Fork deltas vs upstream 6.9: - name-collision renames (Command->CcpCommand, CPM->CPM_VERSTR, DISK_H->CPM_DISK_H) so the headers can be pulled into a FujiNet TU - DRAM trims (single 64K bank, RUNCPMDEBUG/RUNCPM_TRACE gating) - printer routing for BDOS L_WRITE and ^L screen-clear translation - abstraction_fujinet_core.h: the live host abstraction for the core Remove the now-dead per-transport abstraction headers (abstraction_fujinet.h, abstraction_fujinet_apple2.h, abstraction_network_protocol.h) superseded by the shared core.
dd46f62 to
dd87aa6
Compare
|
Thanks for the review @FozzTexx — both points addressed. "Touching a lot more than just upgrading runcpm" It unfortunately can't be a pure version bump. 6.9's larger static state, replicated across all five transport TUs (SIO, IWM, DriveWire, RC2014, RS232), overflows the ESP32 To make that reviewable I split the PR into two commits:
"Walls of comments" Stripped them throughout — the integration commit is now net -1137 lines. I also deleted three abstraction headers that the shared-core refactor made dead code. Build stays green at 36.8% RAM ( |
Summary
Updates the vendored RunCPM engine to 6.9 and refactors all CP/M transports onto one shared stateless core.
The 6.9 bump and the core refactor are in the same PR by necessity: 6.9 has substantially more
staticglobal state than 6.5, and each CP/M transport TU (siocpm,drivewire,iwm,rc2014,rs232) carries its own private copy via internal linkage. Five copies of 6.9's larger state overflow the ESP32 DRAM.dram0.bsssegment by ~58 KB and the firmware will not link. Consolidating to a single engine instance is the prerequisite that makes 6.9 fit.What changed
runcpm_core.cppis now the only TU that compiles the Z80/CP/M chain (external linkage).runcpm_session.hexposesruncpm_console_ops;abstraction_fujinet_core.hholds the shared disk/SD section.siocpm,drivewire/cpm,iwm/cpm,rc2014cpm,rs232cpm,network-protocol/CPM) become thin console back-ends that plug into the shared core throughruncpm_console_ops, guarded by a single-instance interlock._sys_readseq/_sys_readrand.Commandstruct →CcpCommand(collides with FujiNetclass Command);CPMmacro → handled inglobals.hbanner.Test plan
fujinet-atari-v1:./build.sh -blinks clean — RAM 36.8%, nodram0_0_segoverflow (vs. overflow-by-58 KB without the consolidation).'G'CP/M andN:CPM://regression on hardware.This is PR 1 of 3 of a dependency stack that replaces #1371. Merge first; PRs 2 and 3 build on it.
🤖 Generated with Claude Code