Skip to content

Conversation

@Russell-S-Harper
Copy link

Adds optional -via2-socket support to allow external processes to communicate with the emulator via a UNIX domain socket.

The feature is disabled by default and enabled with -via2 -via2-socket <socket>.

Included:

  • Minimal, non-blocking socket integration
  • Example client/server implementation
  • Documentation in README

This enables experimentation with external tools, automation, and research workflows without affecting core emulation behavior.

@Russell-S-Harper Russell-S-Harper force-pushed the feature/via2-socket branch 3 times, most recently from d3d41c9 to 2891b28 Compare December 28, 2025 14:50
@irmen
Copy link
Contributor

irmen commented Dec 29, 2025

I've built and tested it successfully. (Linux).
I kinda like the feature, because it allows for bidirectional communication, whereas the existing Emulator debug registers only allow for writing to the console from the emulator.
Maybe the documentation can be more specific about what VIA register is used to read/write data.

@Russell-S-Harper
Copy link
Author

Russell-S-Harper commented Dec 29, 2025

I've built and tested it successfully. (Linux). I kinda like the feature, because it allows for bidirectional communication, whereas the existing Emulator debug registers only allow for writing to the console from the emulator. Maybe the documentation can be more specific about what VIA register is used to read/write data.

I'm glad you like it. In the first draft if -via2 -via2-socket <socket> was specified, then reads or writes to any VIA2 register would read or write to the socket. I revised it so that socket actions are associated only the with first two bytes of the block, VIA ports A and B, with both ports bi-directional. The other registers were left as-is, should the user want to emulate a VIA connection. The README has been revised.

@Russell-S-Harper Russell-S-Harper force-pushed the feature/via2-socket branch 2 times, most recently from 6ddf810 to 1ca28a0 Compare December 31, 2025 10:47
Adds optional -via2-socket support to allow external processes to
communicate with the emulator via a UNIX domain socket.
Includes documentation and example usage.
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.

2 participants