Fix command codes per official VICE manual

Our KB had wrong command codes. Fixed per VICE docs:
- RegistersGet = 0x31 (was 0x22)
- RegistersSet = 0x32 (was 0x23)
- Continue = 0x82 (was 0x31)
- Step = 0x81 (was 0x32)
- Exit = 0xaa (was 0x71)
- Reset = 0xcc (was 0x43)

Also reordered checkpoint commands (Get=0x11, Set=0x12).

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

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
This commit is contained in:
Simen Svale 2025-12-30 03:18:25 +01:00
parent 148ade15b9
commit c00cd9e3da

View file

@ -4,27 +4,25 @@
export const STX = 0x02; export const STX = 0x02;
export const API_VERSION = 0x01; // VICE 3.x uses API v1 export const API_VERSION = 0x01; // VICE 3.x uses API v1
// Command codes (per KB docs) // Command codes (per official VICE manual)
export enum Command { export enum Command {
// Memory operations // Memory operations
MemoryGet = 0x01, MemoryGet = 0x01,
MemorySet = 0x02, MemorySet = 0x02,
// Checkpoint (breakpoint/watchpoint) operations // Checkpoint (breakpoint/watchpoint) operations
CheckpointSet = 0x11, CheckpointGet = 0x11,
CheckpointGet = 0x12, CheckpointSet = 0x12,
CheckpointDelete = 0x13, CheckpointDelete = 0x13,
CheckpointList = 0x14, CheckpointList = 0x14,
CheckpointToggle = 0x15, CheckpointToggle = 0x15,
// Register operations // Condition operations
RegistersGet = 0x22, ConditionSet = 0x22,
RegistersSet = 0x23,
// Execution control // Register operations
Continue = 0x31, RegistersGet = 0x31,
Step = 0x32, RegistersSet = 0x32,
Reset = 0x43,
// Dump/Undump (snapshots) // Dump/Undump (snapshots)
Dump = 0x41, Dump = 0x41,
@ -34,16 +32,27 @@ export enum Command {
ResourceGet = 0x51, ResourceGet = 0x51,
ResourceSet = 0x52, ResourceSet = 0x52,
// Exit // Advance instructions
Exit = 0x71, AdvanceInstructions = 0x71,
// Advanced execution
KeyboardFeed = 0x72, KeyboardFeed = 0x72,
AdvanceInstructions = 0x73,
// Execution control
Step = 0x81,
Continue = 0x82, // Also called "Exit" - resumes execution
Ping = 0x81, // Same as step with count=0
// Display // Display
DisplayGet = 0x84, DisplayGet = 0x84,
PaletteGet = 0x91,
// Banks
BanksAvailable = 0x83,
// Exit/Quit
Exit = 0xaa,
Quit = 0xbb,
// Reset
Reset = 0xcc,
// Autostart // Autostart
AutoStart = 0xdd, AutoStart = 0xdd,