RunCPM: upgrade engine to 6.9 on the shared cpmDevice base - #1402
Open
peterkaczorowski wants to merge 2 commits into
Open
RunCPM: upgrade engine to 6.9 on the shared cpmDevice base#1402peterkaczorowski wants to merge 2 commits into
peterkaczorowski wants to merge 2 commits into
Conversation
All lib/device/*/cpm devices were near-identical and each embedded its own copy of the RunCPM engine. Introduce a single lib/device/cpm base class (cpmDevice, plus cpmQueueDevice for buses whose engine runs on its own task) and a single shared engine TU (runcpm_core.cpp via runcpm_session.h). Per-bus devices now override only four console-endpoint primitives. Buses without a working CP/M console (rc2014, rs232) inherit a default clean-exit endpoint instead of returning hardcoded values, so CP/M cold-boots and exits cleanly everywhere. Fold N:CPM:// onto the same shared engine. Built against the current RunCPM 5.8 (no engine version change).
Bumps the vendored RunCPM engine from 5.8 to 6.9 while keeping the cpmDevice base-class architecture introduced in the previous commit. The engine-side files are a matched set taken from upstream RunCPM 6.9: ccp.h, cpm.h, cpu.h (+cpu_mhz.h, +debug.h), disk.h, console.h, host.h, ram.h, resource.h and globals.h, plus the 6.9 single-core glue (runcpm_core.cpp, runcpm_session.h, abstraction_fujinet_core.h, which replaces abstraction_fujinet.h). 6.9's console interface adds a getche primitive (blocking read + echo) and widens getch/getche/kbhit to int. Rather than add a per-bus override, cpmDevice synthesises getche generically (read endpoint byte, mask to 7 bits, echo via putch) so no transport had to change: the SIO, IWM, DriveWire, RS232 and RC2014 devices keep their existing ep_* overrides untouched. The N:CPM:// adapter (network-protocol/CPM.cpp), which is not a cpmDevice, gets the same small getche shim. Builds clean on desktop ATARI and APPLE (cpmQueueDevice path) and on the ESP32 fujinet-atari-v1 target (RAM 36.6%, Flash 24.2%).
This was referenced Jun 29, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Bumps the vendored RunCPM engine 5.8 → 6.9 while keeping the
cpmDevicebase-class architecture. This is the engine-version step of theCP/M consolidation stack.
Stacks on #1401 (the cpmDevice consolidation). Review/merge #1401 first;
once it lands, this PR's diff reduces to the pure engine bump.
What changed
ccp.h,cpm.h,cpu.h(+ new
cpu_mhz.h,debug.h),disk.h,console.h,host.h,ram.h,resource.h,globals.h, plus the 6.9 single-core glue (runcpm_core.cpp,runcpm_session.h, andabstraction_fujinet_core.hreplacingabstraction_fujinet.h).getcheprimitive: 6.9's console interface addsgetche(blocking readgetch/getche/kbhittoint. Instead of a per-busoverride,
cpmDevicesynthesisesgetchegenerically (read endpoint byte,mask to 7 bits, echo via
putch). No transport file changed — SIO, IWM,DriveWire, RS232 and RC2014 keep their existing
ep_*overrides. TheN:CPM://adapter (not acpmDevice) gets the same small shim.Build / test
cpmQueueDevicebyte-queue path) linkclean.
fujinet-atari-v1: builds clean, RAM 36.6%, Flash 24.2%.G/R: andN:CPM://run; sessions start/exit cleanly.
Why this ordering
Splitting the original "upgrade to 6.9 + consolidate transports" change into
(1) consolidation on the current engine (#1401) and (2) this engine bump keeps
each PR small and independently reviewable. TELNET console and the RSX
bar-command gate rebase on top of this in follow-ups.