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