Systems¶
Library: Highbyte.DotNet6502.Systems
UI-agnostic, system-agnostic abstractions and base classes that every emulated system and host app
builds on. It sits one tier above the Highbyte.DotNet6502 CPU library and is
referenced by the Tier-2 system cores, the Tier-3 implementation libraries, and the host apps.
Emulated-system abstractions¶
| Type | Role |
|---|---|
ISystem |
An emulated computer — exposes CPU, Mem, screen, ExecuteOneFrame / ExecuteOneInstruction, and the render/input/audio members below. Implemented by C64, Vic20, Apple2, Oric, and GenericComputer. |
ISystemConfig |
A system's configuration. Carries IsDirty / ClearDirty(), validation, and render-provider selection. |
ISystemConfigurer |
Builds a system and its SystemRunner from config — BuildSystem, BuildSystemRunner, GetConfigurationVariants, host-config create/persist. |
IHostSystemConfig / HostSystemConfigBase<TSystemConfig> |
Per-host wrapper around an ISystemConfig. The generic base supplies the shared boilerplate (SystemConfig, AudioSupported, IsDirty, Clone, validation). |
SystemRunner |
Drives one frame of a system and dispatches its render/input/audio. |
SystemList |
Registry of available ISystemConfigurers; host apps populate it from discovered plugins. |
Host app¶
HostApp is the base class for every front-end (AvaloniaHostApp, SilkNetHostApp,
HeadlessHostApp, …). It owns system selection, the start/stop lifecycle, the input/audio context
wiring, scripting integration, and the automated-startup flow. A host app subclasses HostApp and
otherwise stays system-agnostic — the systems it can run come from runtime plugin discovery (see
Systems.Plugins).
Render / input / audio pipelines¶
All three subsystems share one shape: the system declares a provider, the host registers a target, a coordinator matches them. This keeps the system core free of host-technology types.
- Render —
ISystem.RenderProvider/RenderProviders; hosts register render targets. - Input (
Input/) —IInputConsumer(withInit(IHostInputState)) is anISystemmember.HostKeyis the host-agnostic key abstraction; each host's input context implementsIHostInputStateand maps native keys toHostKey. - Audio (
Audio/) — the system declares anIAudioProvider; hosts register a matchingIAudioTarget; anIAudioCoordinatormatches them. Audio output comes in two styles: the command stream style (IAudioCommandStreamprovider +IAudioCommandTarget, routed through a host synth oscillator graph) and the PCM sample style (IAudioSampleProvider+IAudioSampleTarget, with a coordinator-owned SPSC ring buffer bridging emulator-time bursts to wall-time DAC drain). A system can declare both styles and let the host pick which to register, e.g. the C64 ships with bothC64SidCommandStreamandC64SidSampleProvider.
Automated startup¶
IAutomatedStartupParticipant + AutomatedStartupRequest, with a pre-start gate in
AutomatedStartupHandler, let a system contribute its own command-line / URL-driven startup steps
(e.g. the C64 ROM-download and BASIC-paste actions) without the host app knowing about that
system.
Also in this library¶
- Scripting hook interfaces (implemented by
Scripting.MoonSharp). - Debug / instrumentation interfaces and frame-timing helpers.
See also¶
Highbyte.DotNet6502.Systems.Plugins— plugin contracts + discovery.- Systems overview — all current system implementations.