reset
Restart the Commodore 64 emulator with options for soft reset (preserves memory) or hard reset (clears everything).
Instructions
Reset the C64 machine.
Options:
hard: If true, performs hard reset (like power cycle). If false, soft reset (like reset button).
A soft reset preserves some memory contents, hard reset clears everything.
Related tools: connect, status
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
| hard | No | Hard reset (true) vs soft reset (false, default) |
Implementation Reference
- src/index.ts:534-546 (handler)MCP 'reset' tool handler: calls underlying client.reset() with optional hard flag, returns formatted success response with emulation state or error.async (args) => { try { await client.reset(args.hard || false); return formatResponse({ reset: true, type: args.hard ? "hard" : "soft", message: `${args.hard ? "Hard" : "Soft"} reset performed`, hint: "C64 is now at startup. Use status() to check state.", }); } catch (error) { return formatError(error as ViceError); } }
- src/index.ts:530-532 (schema)Zod input schema for 'reset' tool defining optional 'hard' boolean parameter.inputSchema: z.object({ hard: z.boolean().optional().describe("Hard reset (true) vs soft reset (false, default)"), }),
- src/index.ts:519-547 (registration)Full registration of the 'reset' MCP tool using server.registerTool with name, schema/description, and inline handler function.server.registerTool( "reset", { description: `Reset the C64 machine. Options: - hard: If true, performs hard reset (like power cycle). If false, soft reset (like reset button). A soft reset preserves some memory contents, hard reset clears everything. Related tools: connect, status`, inputSchema: z.object({ hard: z.boolean().optional().describe("Hard reset (true) vs soft reset (false, default)"), }), }, async (args) => { try { await client.reset(args.hard || false); return formatResponse({ reset: true, type: args.hard ? "hard" : "soft", message: `${args.hard ? "Hard" : "Soft"} reset performed`, hint: "C64 is now at startup. Use status() to check state.", }); } catch (error) { return formatError(error as ViceError); } } );
- src/protocol/client.ts:496-500 (helper)ViceClient.reset() helper: sends binary protocol Reset command to VICE with 1-byte hard flag (0=soft, 1=hard).async reset(hard = false): Promise<void> { const body = Buffer.alloc(1); body[0] = hard ? 1 : 0; await this.sendCommand(Command.Reset, body); }
- src/protocol/types.ts:27-27 (helper)Command.Reset enum value defining the binary protocol command code for reset (0x43).Reset = 0x43,