Skip to content

RunCPM: upgrade engine to 6.9 on the shared cpmDevice base - #1402

Open
peterkaczorowski wants to merge 2 commits into
FujiNetWIFI:masterfrom
peterkaczorowski:runcpm-6.9-on-cpmbase
Open

RunCPM: upgrade engine to 6.9 on the shared cpmDevice base#1402
peterkaczorowski wants to merge 2 commits into
FujiNetWIFI:masterfrom
peterkaczorowski:runcpm-6.9-on-cpmbase

Conversation

@peterkaczorowski

Copy link
Copy Markdown
Contributor

Summary

Bumps the vendored RunCPM engine 5.8 → 6.9 while keeping the
cpmDevice base-class architecture. This is the engine-version step of the
CP/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

  • Engine matched-set from upstream RunCPM 6.9: 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, and abstraction_fujinet_core.h replacing
    abstraction_fujinet.h).
  • getche primitive: 6.9's console interface adds getche (blocking read
    • echo) and widens getch/getche/kbhit to int. Instead of a per-bus
      override, cpmDevice synthesises getche generically (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. The
      N:CPM:// adapter (not a cpmDevice) gets the same small shim.

Build / test

  • Desktop ATARI and APPLE (exercises the cpmQueueDevice byte-queue path) link
    clean.
  • ESP32 fujinet-atari-v1: builds clean, RAM 36.6%, Flash 24.2%.
  • Verified on real FujiNet ESP32 (Atari): RunCPM over SIO G/R: and N: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.

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%).
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant