reset
Restart the Commodore 64 emulator with options for soft reset (preserves memory) or hard reset (clears everything completely).
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:546-558 (handler)Handler function that executes the reset tool logic: calls underlying client.reset() with hard flag from args, formats MCP response with state metadata or errorasync (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:542-544 (schema)Zod input schema defining optional 'hard' boolean parameter for hard/soft resetinputSchema: z.object({ hard: z.boolean().optional().describe("Hard reset (true) vs soft reset (false, default)"), }),
- src/index.ts:531-559 (registration)Registration of the 'reset' MCP tool on the McpServer instanceserver.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:537-541 (helper)Low-level ViceClient.reset method: constructs 1-byte body (1 for hard reset, 0 for soft) and sends to VICE via sendCommand(Command.Reset)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:59-59 (helper)Protocol constant defining Command.Reset as 0xcc (VICE binary monitor command code)Reset = 0xcc,