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
* New headless app
* Add screenshot functionality exposed to Lua scripts (including from headless app).
* Remove unnecessary command line option for headless app.
* Implement emulator quit support
* Add publish of Headless app to GitHub release
* Update desktop app release workflow for package managers to also include the headless app.
* New doc for installing desktop headless app.
Rename existing install instruction for desktop apps.
* Fix some reliability and security issues in bash scripts
* Enforce script/lifecycle CLI exclusivity and add emu.host() API
- --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
See [Desktop Apps](doc/DESKTOP_APPS.md) for download links for pre-built executables and instructions for Windows, Linux, and macOS.
46
+
See [Desktop Apps](doc/INSTALL_DESKTOP_APPS.md) for download links for pre-built executables and instructions for Windows, Linux, and macOS.
47
+
48
+
## Headless app
49
+
50
+
[Headless app](doc/APPS_HEADLESS.md) — runs the emulator without any UI, rendering, audio, or user input. Controlled entirely via CLI arguments and Lua scripts. Useful for automation, scripting, and CI workflows.
51
+
52
+
See [Install Headless App](doc/INSTALL_HEADLESS.md) for download links and installation instructions for Windows, Linux, and macOS.
Copy file name to clipboardExpand all lines: doc/APPS_AVALONIA.md
+53-1Lines changed: 53 additions & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -24,7 +24,7 @@ Technologies
24
24
- Input: `Highbyte.DotNet6502.Impl.Avalonia`.
25
25
- Audio: `Highbyte.DotNet6502.Impl.NAudio`. Synthesizer via `NAudio` and playback via `WebAudio JS interop`.
26
26
27
-
See [here](DESKTOP_APPS.md) how to download and run pre-built executables.
27
+
See [here](INSTALL_DESKTOP_APPS.md) how to download and run pre-built executables.
28
28
29
29
# Features
30
30
@@ -53,6 +53,58 @@ See [here](../tools/vscode-extension/README.md).
53
53
## Scripting: Lua scripting via MoonSharp
54
54
See [here](SCRIPTING.md).
55
55
56
+
## CLI arguments
57
+
58
+
The desktop app can be launched from the command line with arguments to control logging, scripting, and automated startup. There are two mutually exclusive modes:
59
+
60
+
### Scripting mode (`--script` / `--scriptDir`)
61
+
62
+
When a Lua script is supplied the script owns all emulator setup and lifecycle — system selection, start, load, and quit.
63
+
64
+
| Argument | Description |
65
+
|---|---|
66
+
|`--script <path>`| Load and run a Lua script (can be specified multiple times) |
67
+
|`--scriptDir <path>`| Override the script directory from `appsettings.json`|
|`--enableExternalDebug`| Enable VS Code debug adapter (DAP) over TCP |
71
+
|`--debug-port <port>`| TCP port for the debug adapter (default: 6502) |
72
+
|`--debug-wait`| Wait for a debug client to connect before starting |
73
+
74
+
> [!IMPORTANT]
75
+
> `--script` and `--scriptDir` are **mutually exclusive** with `--system`, `--systemVariant`, `--start`, `--waitForSystemReady`, `--loadPrg`, and `--runLoadedProgram`. The script is responsible for all emulator setup and lifecycle. Combining them is an error.
76
+
77
+
### Automated startup mode (`--start`)
78
+
79
+
Used when driving the emulator from the command line without a script — primarily by the VS Code debugger extension.
80
+
81
+
| Argument | Description |
82
+
|---|---|
83
+
|`--system <name>`| Select a system (e.g. `C64`, `Generic`) |
84
+
|`--systemVariant <name>`| Select a system variant. Requires `--system`. |
85
+
|`--start`| Auto-start the emulator after selection |
86
+
|`--waitForSystemReady`| Wait until the system reports ready before continuing. Requires `--start`. |
87
+
|`--loadPrg <path>`| Load a `.prg` file into memory. Requires `--start`. |
88
+
|`--runLoadedProgram`| Run the loaded `.prg` file after loading. Requires `--start` and `--loadPrg`. |
0 commit comments