https://github.com/highbyte/dotnet-6502
6502 CPU emulator in .NET
https://github.com/highbyte/dotnet-6502
6502 c64-emulator cpu-emulator cross-platform csharp dotnet emulator library
Last synced: about 1 month ago
JSON representation
6502 CPU emulator in .NET
- Host: GitHub
- URL: https://github.com/highbyte/dotnet-6502
- Owner: highbyte
- License: mit
- Created: 2021-02-08T17:47:42.000Z (over 5 years ago)
- Default Branch: master
- Last Pushed: 2026-01-11T11:50:51.000Z (5 months ago)
- Last Synced: 2026-01-11T14:57:35.669Z (5 months ago)
- Topics: 6502, c64-emulator, cpu-emulator, cross-platform, csharp, dotnet, emulator, library
- Language: C#
- Homepage:
- Size: 1.34 GB
- Stars: 15
- Watchers: 1
- Forks: 5
- Open Issues: 5
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
A 6502 CPU emulator for .NET
[](https://highbyte.github.io/dotnet-6502/docs/home/development/)
[](https://highbyte.github.io/dotnet-6502/docs/home/development/)
[](https://highbyte.github.io/dotnet-6502/docs/desktop-apps/installation/)
[](https://highbyte.github.io/dotnet-6502/docs/web-apps/overview/)
[](https://sonarcloud.io/dashboard?id=highbyte_dotnet-6502)
[](https://sonarcloud.io/dashboard?id=highbyte_dotnet-6502)
[](https://sonarcloud.io/project/issues?id=highbyte_dotnet-6502&resolved=false&types=VULNERABILITY)
[](https://sonarcloud.io/dashboard?id=highbyte_dotnet-6502)
[](https://sonarcloud.io/project/issues?id=highbyte_dotnet-6502&resolved=false&types=BUG)
[](https://sonarcloud.io/component_measures?id=highbyte_dotnet-6502&metric=coverage&view=list)
[](https://github.com/highbyte/dotnet-6502/actions/workflows/dotnet.yml)
[](https://github.com/highbyte/dotnet-6502/actions/workflows/codeql-analysis.yml)
[](https://www.nuget.org/packages/Highbyte.DotNet6502/)
[](#)
[](#)
[](#)
[](LICENSE)
# Overview
.NET cross-platform libraries and applications for executing 6502 CPU machine code, and emulating specific computer systems (such as Commodore 64) in different UI contexts — browser, desktop, and headless.
> [!IMPORTANT]
> This is mainly a programming exercise that may or may not turn into something more. See [Limitations](#limitations) below.
## 📖 Documentation
Full documentation lives at **** — apps, libraries, tools, systems, and development guides.
## Try it in your browser
| [Avalonia WebAssembly](https://highbyte.se/dotnet-6502/app2) | [Blazor WebAssembly](https://highbyte.se/dotnet-6502/app) |
| ------------------------------------------------------------ | --------------------------------------------------------- |
|
|
|
## Other apps and features
- **Desktop apps** for Windows, Linux, and macOS — Avalonia, SadConsole, and SilkNet variants. See [Desktop apps](https://highbyte.github.io/dotnet-6502/docs/desktop-apps/installation/).
- **Headless app** for automation, scripting, and CI workflows — no UI, controlled via CLI and Lua. See [Headless](https://highbyte.github.io/dotnet-6502/docs/desktop-apps/headless/).
- **VS Code debugger extension** for source and disassembly debugging of 6502 code. See [VSCode debugger](https://highbyte.github.io/dotnet-6502/docs/tools/vscode-debugger/debugging/).
- **Lua scripting** for driving the emulator — selecting systems, controlling emulation, reading/writing memory, injecting input. See [Scripting](https://highbyte.github.io/dotnet-6502/docs/tools/scripting/overview/).
- **TCP remote control** lets external processes inspect and drive a running emulator over a newline-delimited JSON protocol. See [Remote control](https://highbyte.github.io/dotnet-6502/docs/tools/remote-control/overview/).
- **C64 Basic AI code completion** in the Blazor browser app. See [AI code completion](https://highbyte.github.io/dotnet-6502/docs/systems/c64/code-completion/).
## Libraries
Published as NuGet packages under `Highbyte.DotNet6502.*` — a core CPU library, system emulation libraries (Commodore 64, Generic), and per-host I/O implementations (Avalonia, Blazor, SadConsole, SilkNet, etc.). See [Libraries](https://highbyte.github.io/dotnet-6502/docs/libraries/) for the full catalog and architecture.
# Limitations
> [!IMPORTANT]
> - Correct emulation of all aspects of computers such as the Commodore 64 is not likely.
> - Not the fastest emulator.
> - A real Commodore 64 uses the *6510* CPU; for the purpose of this emulator the 6502 is treated as equivalent (same instruction set).
> - Code coverage is currently limited to the core `Highbyte.DotNet6502` library.
For the full list of missing features and constraints, see [Limitations](https://highbyte.github.io/dotnet-6502/docs/home/limitations/).
# Development & references
- [Development guide](https://highbyte.github.io/dotnet-6502/docs/home/development/)
- [References & inspiration](https://highbyte.github.io/dotnet-6502/docs/home/references/)
# Credits
- [Kristoffer Strube](https://github.com/KristofferStrube) for the original Blazor WASM async interop code for [WebAudio](https://github.com/KristofferStrube/Blazor.WebAudio), [DOM](https://github.com/KristofferStrube/Blazor.DOM), and [IDL](https://github.com/KristofferStrube/Blazor.WebIDL) that was the basis for a synchronous implementation in this repo. Copyright notice [here](src/libraries/Highbyte.DotNet6502.Impl.AspNet/JSInterop/JSInterop_OriginalLicense.MD).