C64 in the Avalonia apps¶
C64-specific features in the Avalonia Browser and Avalonia Desktop apps. The two runtimes share almost all of this; differences are called out inline as Browser / Desktop tabs or Browser only notes.
For automated startup (loading programs / pasting BASIC from a URL or the command line), see the app pages' startup-parameter reference: Browser URL query parameters / Desktop CLI arguments.
ROMs¶
The C64 needs the Kernal, Basic and Chargen ROMs. An auto-download option exists (a license acknowledgement is required). See Systems / C64 / ROMs for details.
Upload the ROM binaries via the C64 config UI, or use the auto-download option.
Point the app at a directory containing the ROM files. When no directory override is set, the default is ~/Documents/Highbyte/DotNet6502/roms/C64 (or the Windows Documents equivalent). Desktop user changes are saved to the host-specific appsettings.user.json overlay and can be changed in the UI, or use the auto-download option.
Display / renderers¶
-
Renderer provider
Rasterizer→ targetAvalonia 2-layer bitmap- Character mode (normal and multi-color).
- Bitmap mode (normal and bitmap mode).
- Sprites (normal and multi-color).
- Rendering of raster lines for border and background colors.
-
Renderer provider
Video commands→ targetSkia commands- Character mode (normal).
Input¶
Keyboard uses Avalonia.Input.PhysicalKey (W3C code), so both US and Swedish C64 keyboard
layouts work. The layout can be overridden in the C64 config dialog. See
Systems / C64 / Keyboard mapping for the full host-agnostic mapping.
Keyboard via Avalonia; gamepad via
Highbyte.DotNet6502.Impl.Browser. In Chromium
browsers the keyboard layout is auto-detected via navigator.keyboard.getLayoutMap(); other
browsers fall through to OS culture, then US.
Keyboard via Avalonia; joystick via
Highbyte.DotNet6502.Impl.SilkNet.SDL. The
keyboard layout is auto-detected from the host (Win32 KLID / macOS TIS*).
Audio¶
Audio via NAudio. Two C64 audio providers are available: a
sample-based one (good but not perfect accuracy — the default) and a command-stream synthesizer one
(low CPU but inaccurate); switch in the C64 config dialog if you need lower CPU. The SID emulation
mode (Auto / Fast) is selectable in the same dialog. See
C64 audio.
Playback via a WebAudio JS interop wave player.
Playback via OpenAL.
SwiftLink¶
SwiftLink supports both direct raw-byte bridging and a fixed-target Hayes modem workflow for software such as Compunet Reborn. See Systems / C64 / SwiftLink support.
Available through a WebSocket bridge endpoint. The browser C64 defaults target the deployed
Cloudflare bridge: wss://ws-tcp-bridge.highbyte.workers.dev/bridge, target id
compunet-reborn, transport mode HayesModem, interrupt line NMI. When developing the
bridge locally with wrangler dev, temporarily change the bridge URL to
ws://127.0.0.1:8787/bridge.
Optional native SwiftLink cartridge support with RawTcp and HayesModem transport modes.
This is the native host currently recommended for SwiftLink-based software such as Compunet
Reborn.
C64 menu¶
The C64-specific menu (shared by both runtimes) exposes:
- Copy / Paste — copy the running machine's current BASIC listing to the clipboard, or paste clipboard text into the running C64 via the keyboard.
- Disk Drive & .D64 images — attach/detach a
.d64disk image, and Download & Run a curated list of programs (auto-downloads the.d64/.prgand starts it). See Compatible programs. - Load / Save — load and save BASIC
.prgfiles, load & start a binary, and load bundled assembly / BASIC example programs. - Configuration — active joystick, keyboard-joystick on/off and port, and the full C64 config dialog (ROMs, renderer, audio, SwiftLink, and the Basic AI coding assistant — enable it there; F9 toggles it live while running). See Basic code completion.
Share link¶
Browser only
The browser app can generate a shareable URL that reproduces the current state when opened — the inverse of the URL query parameters.
The Share link… button (below the Copy/Paste buttons) opens a dialog that builds a link for one of:
- Current BASIC program — shares the live BASIC listing (optionally auto-RUN).
- Selected "Download & Run" program — shares the remote
.prg/.d64of the program selected in the Disk Drive section.
Options: Auto-RUN after start and Include current settings (audio + keyboard-joystick;
on by default). The generated URL always carries the system variant (e.g. C64PAL) so the
recipient gets the same machine. The link contains the clean target URL — any CORS proxy is
applied by the running emulator at fetch time, never baked into the link.
Inline-BASIC links are length-checked (the binding limit is the host/CDN serving the app, not the
browser): a warning past ~8,000 characters, and the dialog refuses to share past ~16,000. For a
large BASIC program, host it and share a basicUrl= link instead.