Skip to content

Feature/headless app#176

Merged
highbyte merged 11 commits into
masterfrom
feature/headless-app
Apr 17, 2026
Merged

Feature/headless app#176
highbyte merged 11 commits into
masterfrom
feature/headless-app

Conversation

@highbyte

@highbyte highbyte commented Apr 13, 2026

Copy link
Copy Markdown
Owner

Introduces a new headless (no GUI) emulator application that runs the 6502 emulator from the command line, suitable for automation and scripting scenarios.

Changes:

  • New Highbyte.DotNet6502.App.Headless project with host app, config, and system setup for C64 and Generic Computer
  • Screenshot functionality exposed to Lua scripts via LuaScreenshotProxy
  • Emulator quit support from headless context
  • GitHub release workflow updated to publish headless app binaries
  • Package manager release workflow updated to include headless app
  • VS Code launch/task configs for headless app
  • New docs: APPS_HEADLESS.md, INSTALL_HEADLESS.md, INSTALL_DESKTOP_APPS.md; existing desktop app docs reorganized

Command line parameter changes (headless and Avalonia desktop apps):

  • --script / --scriptDir are now mutually exclusive with --system, --systemVariant, --start, --waitForSystemReady, --loadPrg, and --runLoadedProgram — when a Lua script is used it owns all emulator setup and lifecycle; combining with CLI lifecycle flags is an error
  • When automated startup flags (--start etc.) are used without a script, scripts configured via appsettings.json are automatically suppressed to avoid conflicts
  • Lua example scripts updated to call emu.select("C64") and emu.start() themselves, removing reliance on --system/--start CLI args
  • CLI argument documentation added to APPS_AVALONIA.md; APPS_HEADLESS.md updated with two-mode structure (scripting mode vs automated startup mode)

Lua scripting API additions:

  • emu.host() — returns the host application type ("headless", "desktop", or "browser"), allowing scripts to conditionally call emu.quit() or adapt behavior per host; documented in SCRIPTING.md
  • Example scripts updated to use if emu.host() == "headless" then emu.quit() end instead of an unconditional quit

Comment thread .github/workflows/release-desktop-apps.yml Fixed
  - --script/--scriptDir are now mutually exclusive with --system,
    --systemVariant, --start, --waitForSystemReady, --loadPrg, and
    --runLoadedProgram; scripts own all emulator setup and lifecycle
  - Automated startup mode (--start etc.) suppresses scripts configured
    via appsettings.json to avoid conflicts
  - Add emu.host() Lua API returning "headless", "desktop", or "browser"
    so scripts can adapt behavior per host (e.g. conditional emu.quit())
  - Update example Lua scripts to call emu.select/emu.start themselves
    and use emu.host()-gated quit instead of unconditional emu.quit()
  - Add CLI args section to APPS_AVALONIA.md; restructure APPS_HEADLESS.md
    into scripting mode vs automated startup mode
@highbyte highbyte marked this pull request as ready for review April 17, 2026 11:23
@sonarqubecloud

Copy link
Copy Markdown

@highbyte highbyte merged commit c803c17 into master Apr 17, 2026
5 checks passed
@highbyte highbyte deleted the feature/headless-app branch April 17, 2026 11:29
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