Add opt-in BizHawk-style Lua scripting over localhost TCP - #71
Merged
Conversation
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.
Adds opt-in Lua 5.4 scripting over a nonblocking localhost TCP server, with a documented BizHawk-style subset for memory, controller input, frame events, and coroutine stepping. Games can register explicit native commands; the SMW integration uses this to drive a separate 100-fireballs/second projectile pool.
The build option defaults OFF and enabled builds still require a runtime port. No Lua dependency or listener is introduced in ordinary builds. Includes a stdlib Python client, memory/instruction limits, paused servicing, and VM reset cleanup.
Validation: real TCP integration passed on Windows and Linux, covering framing, memory bounds, runaway scripts, callbacks, controller overrides, reset, and native game commands. Windows OFF build passed without fetching Lua. Added Windows/Linux/macOS CI coverage. The SMW prototype was exercised in a playable level and accepted visually by the owner.