Skip to content

Feature/lua scripting#167

Draft
highbyte wants to merge 44 commits intomasterfrom
feature/lua-scripting
Draft

Feature/lua scripting#167
highbyte wants to merge 44 commits intomasterfrom
feature/lua-scripting

Conversation

@highbyte
Copy link
Owner

@highbyte highbyte commented Mar 6, 2026

This pull request introduces Lua scripting support to the Avalonia-based emulator by integrating a scripting engine and wiring it into the emulator lifecycle.

Lua Scripting Integration

  • Added references to the MoonSharp Lua interpreter package and new scripting projects (Highbyte.DotNet6502.Scripting and Highbyte.DotNet6502.Scripting.MoonSharp) in solution and project files, enabling Lua scripting capabilities.
  • Modified AvaloniaHostApp to implement IEmulatorControl and integrate an IScriptingEngine, allowing Lua scripts to control emulator state and respond to emulator events. This includes support for deferred script actions, frame hooks, and coroutine management.

These changes collectively enable Lua scripting for the emulator, allowing scripts to interact with and control emulator behavior.

highbyte added 30 commits March 5, 2026 23:28
Make script engine lifecycle start before emulator is started.
New  coroutine wait option "yield" not tied to emulator is generating frames.
…in a reasonable number of instructions, and will then log error and disable them.
…engine than MoonSharp will be used in the future.
… not tied to any specific Lua engine to Highbyte.DotNet6502.Systems library.
@sonarqubecloud
Copy link

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