Commit graph

8 commits

Author SHA1 Message Date
Simen Svale
8c74fb3484 Clarify deleteBreakpoint works for watchpoints too
Minor AX fix from owl's final review.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2025-12-30 02:07:22 +01:00
Simen Svale
76a1069436 Add visual feedback tools
Protocol layer:
- Add DisplayGet command (0x84) for screen capture
- Add PaletteGet command (0x91) for color palette
- Implement getDisplay() and getPalette() client methods

New tools:
- screenshot: Capture display as indexed pixel data with palette
  - Returns base64-encoded pixel buffer for efficient transfer
  - Includes display dimensions and visible area bounds
  - Optionally includes RGB palette values
- renderScreen: ASCII art representation of current display
  - Converts pixel luminance to ASCII shading characters
  - Configurable output dimensions and character set
  - Useful for quick visual debugging in text-only contexts

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2025-12-30 02:05:52 +01:00
Simen Svale
cebe6f4a14 Add advanced debugging tools
Protocol layer:
- Add watchpoint support (setWatchpoint, toggleCheckpoint, listWatchpoints)
- Add snapshot methods (saveSnapshot, loadSnapshot)
- Add autostart support
- Update command codes to match VICE binary monitor protocol
- Refactor BreakpointInfo to CheckpointInfo for unified handling

New tools:
- toggleBreakpoint: Enable/disable breakpoints without deleting
- setWatchpoint: Memory read/write watchpoints
- listWatchpoints: Show active watchpoints
- runTo: Run until specific address (temporary breakpoint)
- disassemble: 6502 disassembler with KERNAL/BASIC labels
- saveSnapshot/loadSnapshot: Machine state persistence
- loadProgram: Autostart PRG/D64/T64 files

Utilities:
- Add full 6502 disassembler with all addressing modes
- Include KERNAL/BASIC entry point labels

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2025-12-30 02:04:23 +01:00
Simen Svale
56ea0984bb Add readScreen summary format and readVicState sprite visibility
- readScreen now supports format: "summary" | "full" option
  - summary: non-empty lines with trimming (agent-friendly)
  - full: all 25 lines (debugging use)
- readVicState now tracks sprite visibility:
  - visibleSprites array with sprite numbers
  - visibleCount for quick checking
  - Updated hint when sprites enabled but not visible

AX feedback from owl review.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2025-12-30 01:59:13 +01:00
Simen Svale
37f53616ff Add semantic layer tools for interpreted C64 debugging
New tools:
- readScreen: Screen RAM as ASCII text with non-empty line summary
- readColorRam: Color RAM with color names and usage statistics
- readVicState: Full VIC-II state with interpreted values
  - Graphics mode detection
  - Memory bank/address calculation
  - Sprite enable summary
- readSprites: All 8 sprites with position, visibility, colors
  - Visibility checks with explanations
  - Data pointer address resolution
  - enabledOnly filtering option

Utilities (src/utils/c64.ts):
- PETSCII screen code to ASCII conversion
- C64 color palette names
- VIC bank and memory address calculation
- Graphics mode detection
- Sprite visibility range checks

AX patterns applied:
- Summary modes (readColorRam summary option)
- Filtering (readSprites enabledOnly option)
- Rich hints explaining issues (sprite visibility)
- Proactive issue detection

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2025-12-30 01:56:03 +01:00
Simen Svale
84b10689d0 Address AX review feedback
- Fix status hint: clarify step() vs setBreakpoint+continue for pausing
- Add flag string to getRegisters: "NV-BDIZC" format (uppercase=set)
- Add listBreakpoints tool with local breakpoint tracking
- Track breakpoints in client for listing support

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2025-12-30 01:53:16 +01:00
Simen Svale
32eb8f3c17 Add VICE binary protocol layer and core debugging tools
Protocol layer (src/protocol/):
- TCP socket client with connection management
- Binary packet encoding/decoding per VICE monitor protocol
- Async response handling and request ID tracking
- Proper error handling with actionable suggestions

MCP tools implemented:
- status: Connection and emulation state
- connect/disconnect: VICE session management
- readMemory/writeMemory: Memory access with hex dump formatting
- getRegisters: CPU state with decoded flags
- step/continue: Execution control
- reset: Machine reset (soft/hard)
- setBreakpoint/deleteBreakpoint: Breakpoint management

AX patterns integrated:
- _meta block in all responses (connection state context)
- Structured output (value + hex + hint where relevant)
- Rich tool descriptions with cross-references
- Actionable error messages with suggestions
- Memory region hints for common addresses

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2025-12-30 01:50:27 +01:00
Simen Svale
db47d8ed10 Initial project setup with MCP SDK skeleton
- TypeScript project with tsup build
- MCP server with status, connect, disconnect tools (stubs)
- Uses zod for schema validation
- Builds and starts successfully

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2025-12-30 01:47:16 +01:00