You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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).
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 extension — saveReplay 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 buffer — tcpBuffer/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 queue — sendCommand() 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-detection — detectOpenMSXShareDir() now checks %APPDATA%, %LOCALAPPDATA%, %PROGRAMFILES(X86)%, and ~/openMSX/share in addition to the existing paths.