Skip to content

v1.2.8

Choose a tag to compare

@nataliapc nataliapc released this 11 Apr 15:19
· 15 commits to main since this release

What's New

Windows: TCP + SSPI Authentication (Breaking Protocol Change)

  • TCP socket with SSPI authentication — The Windows communication has been completely rewritten. The previous named-pipe approach (-control pipe:<name>) is replaced by TCP socket connection with SSPI (Negotiate/NTLM) authentication, matching the protocol used by the openMSX debugger. This fixes emulator control reliability on Windows. The optional node-expose-sspi npm package is required for Windows (already listed in optionalDependencies).
  • GUI-compatible process spawning — On Windows, openMSX is now spawned with stdio: ['ignore', 'ignore', 'pipe'] instead of full pipe mode, which previously broke the renderer on GUI subsystem executables.

Bug Fixes

  • Screenshot/screendump fixed on Windows — Paths embedded in TCL commands now use forward slashes via the new tclPath() utility. Backslashes were being interpreted as TCL escape sequences, corrupting file paths.
  • Screenshot works across all openMSX versions — Some openMSX versions return an empty string instead of the file path on successful screenshot. The handler now generates a unique prefix (mcp_<timestamp>_) and scans the screenshot directory as fallback, so screen_shot works regardless of version behavior (Issue #1 thanks to @sndpl).
  • Response desync after timeout fixed — Both platforms now use a persistent ioBuffer with the notify pattern. If a readData() timeout fires, the buffer is cleared, preventing a late response from being consumed by the next command (silent data corruption).
  • emu_close race condition fixed — Multiple code paths could call resolve() simultaneously (exit handler, error handler, timeout). Now uses safeResolve pattern, matching emu_launch.
  • sendCommand('exit') unhandled rejection fixed — The async sendCommand promise was not awaited and the synchronous try/catch was unreachable. Now uses .catch() with fallback to process.kill().
  • Replay save/load .omr extensionsaveReplay and loadReplay now automatically append .omr if not provided, and paths are normalized with tclPath() for Windows compatibility.
  • 10-second timeout on readData() — Both platforms now have a response timeout. Previously, if openMSX stopped responding, readData() would hang indefinitely, blocking the entire command queue.

Improvements

  • Unified I/O buffertcpBuffer/tcpNotify (Windows) and stdoutBuffer/stdoutNotify (Linux) have been merged into a single ioBuffer/ioNotify pair, since both platforms never coexist. This eliminated duplicated readData() logic.
  • emu_launch decomposed — The 265-line monolithic function has been split into launchConnectWindows() and launchConnectLinux() private methods, sharing context via a LaunchCallbacks interface.
  • Serialized command queuesendCommand() now uses a promise-chain queue, ensuring concurrent callers never overlap on any platform.
  • sharp marked as optional — The sharp native image library (unused transitive dependency from @xenova/transformers) is now in optionalDependencies. On Windows without C++ build tools, npm install no longer fails.
  • Improved Windows directory auto-detectiondetectOpenMSXShareDir() now checks %APPDATA%, %LOCALAPPDATA%, %PROGRAMFILES(X86)%, and ~/openMSX/share in addition to the existing paths.
  • Production-clean logging — Per-chunk diagnostic logging removed from session-lifetime handlers (TCP data, stdout data, stderr). Launch-phase diagnostics retained for troubleshooting connection failures.