BitMagic.X16M 0.1.45-gd7a6d1df39

This is a prerelease version of BitMagic.X16M.
There is a newer prerelease version of this package available.
See the version list below for details.
dotnet tool install --global BitMagic.X16M --version 0.1.45-gd7a6d1df39
                    
This package contains a .NET tool you can call from the shell/command line.
dotnet new tool-manifest
                    
if you are setting up this repo
dotnet tool install --local BitMagic.X16M --version 0.1.45-gd7a6d1df39
                    
This package contains a .NET tool you can call from the shell/command line.
#tool dotnet:?package=BitMagic.X16M&version=0.1.45-gd7a6d1df39&prerelease
                    
nuke :add-package BitMagic.X16M --version 0.1.45-gd7a6d1df39
                    

X16M

Lets an AI agent, Claude Code or any other MCP client, drive a BitMagic debug session itself: launching a project, setting breakpoints, stepping, and inspecting memory, the same way VSCode does via BitMagic.X16Debugger.

Claude Code driving a BitMagic debug session through X16M

What it's for

Normally you run the debugger and describe what you see to an agent. X16M lets the agent drive the session directly instead. Ask it in plain English to launch a project, set a breakpoint on a line, and report back what a variable holds once it's hit; it picks the right calls itself.

X16M doesn't modify or depend on the debugger's internals. It speaks the Debug Adapter Protocol (DAP) to X16D, either spawning it as a child process or connecting over TCP to one already running with --dapport, and re-exposes a subset of DAP as MCP tools.

Install

dotnet tool install -g BitMagic.X16M

This bundles a matching build of X16D for your platform, Windows or Linux, so there's nothing else to configure beyond a ROM. For an early build, add --prerelease.

A .NET tool doesn't auto-update. To pick up a newer version later, run:

dotnet tool update -g BitMagic.X16M

A ROM

Place it as rom.bin next to the bundled X16D, or point the BITMAGIC_ROM environment variable at the file (or the folder containing it). Without one, launch_project returns a clear warning rather than failing silently.

Registering it with an MCP client

dotnet tool install -g puts x16m on your PATH, so there's no executable to hunt down.

For Claude Code, register it with the CLI rather than a project's .mcp.json, so it isn't tied to any one repo:

claude mcp add x16m --scope user -- x16m

--scope user makes it available from every project, in every session, on this machine; that's the one to reach for unless you have a specific reason not to. --scope local only takes effect in sessions launched from the exact directory you were standing in when you ran the command, so a session started anywhere else, even after a full restart, won't see it.

Either way the registration lives in your own ~/.claude.json, never in a project file.

Other MCP clients typically want the equivalent of a .mcp.json entry:

{
  "mcpServers": {
    "x16m": {
      "command": "x16m"
    }
  }
}

If a previous registration shows a stale path, a "Conflicting scopes" warning, or the tools don't show up after a full restart, remove it and re-add: claude mcp remove x16m --scope <scope>, then the command above.

Available tools

Standard DAP is covered, plus X16-specific tools for VERA layers, sprites and CPU history.

Tool Description
launch_project(projectPath, breakpoints?, stopOnEntry?, muteAudio?) Launches a project's .json file, or a .bmasm file directly, and waits for its initial stop before returning. Pass breakpoints here rather than a follow-up set_breakpoints call: some targets finish in well under a second, faster than a separate tool call can land. Audio is muted by default (muteAudio: true); this only silences the output, emulation is unaffected.
set_breakpoints(file, lines[]) Sets the full set of breakpoints for a file, replacing any previously set there.
get_breakpoints() Reports the current verification state of every breakpoint set so far. X16D verifies a breakpoint once its file actually loads, which can happen after set_breakpoints or launch_project already returned.
continue_execution() Resumes a paused session.
step_over() Steps over the current line.
step_into() Steps into a call on the current line.
step_out() Steps out of the current function.
get_stack_trace() Returns the current call stack.
evaluate(expression) Evaluates an expression in the current scope.
disassemble(memoryReference, instructionCount) Disassembles instructions from a memory location.
read_memory(memoryReference, count) Reads a block of memory.
get_layers() Returns the current VERA display as six images, one per compositing layer (background, layer 0, layer 1, and sprites at each of their three depth slots). While paused mid-frame this can be a partial image rather than a complete one, since the beam only advances alongside executed CPU cycles.
get_sprites() Returns each sprite VERA currently has enabled (depth != 0), with its attributes and its own cropped image. VERA has a fixed table of 128 sprite slots; disabled ones are omitted rather than returned as 128 mostly-empty entries.
get_cpu_history(count?) Returns the most recently executed CPU instructions, most recent first, with register state, flags and source file/line where known. Useful for seeing how execution actually reached the current stop, not just where it is now.
disconnect() Ends the debug session.

Example

Once X16M is registered, you don't call its tools directly. You ask your agent in plain English, and it picks the right tools for you.

You: Launch the project at project.json with a breakpoint on the line that increments counter.

Agent: Launched it with that breakpoint in place; inc counter is on line 11 of main.bmasm. It's already verified, and the target's paused at the start.

You: Continue, and tell me what counter is.

Agent: Hit the breakpoint. counter is 0x01.

The BitMagic.X16MCP repository has a worked example with a minimal project and a full walkthrough, a good first thing to try after registering X16M.

Full source and build-from-source instructions: https://github.com/Yazwh0/BitMagic.X16MCP. More at https://bitmagic.org/mcpagent.

There are no supported framework assets in this package.

Learn more about Target Frameworks and .NET Standard.

This package has no dependencies.

Version Downloads Last Updated
0.1.69-gae2ccbf3c6 4 10/19/2026
0.1.68-ge05dc1da49 40 10/18/2026
0.1.67-g274a4ad213 36 10/18/2026
0.1.66-g23be51f1ef 46 10/18/2026
0.1.65-g95c4d504d9 35 10/18/2026
0.1.64-gde3845de1e 34 10/18/2026
0.1.63-g37e8dca1b1 43 10/18/2026
0.1.62-g63effb6a9e 40 10/18/2026
0.1.60-gcb81359005 54 10/17/2026
0.1.58-g897980ba7f 63 10/15/2026
0.1.57-gfb86e48382 53 10/15/2026
0.1.56-gef8a387727 48 10/15/2026
0.1.55-g0aac7b6eb8 88 10/11/2026
0.1.54-gf4e39b3b95 86 10/11/2026
0.1.52-g3e91033aca 78 10/11/2026
0.1.51-g62619aa871 83 10/11/2026
0.1.50-g98ff60eb0d 87 10/10/2026
0.1.47-gd1c479583c 81 10/8/2026
0.1.45-gd7a6d1df39 78 10/7/2026
0.1.44 96 10/4/2026
Loading failed