bizhawk_reset
Reset emulated console to boot state, clearing RAM, CPU, framecount, and joypad. Use to start fresh from boot without reloading the ROM.
Instructions
PURPOSE: Reset the loaded core — equivalent to a hard reset (power cycle) of the emulated console. USAGE: Use to start fresh from boot. To return to a specific known-good point instead of boot, use bizhawk_load_state with a previously saved state file. BEHAVIOR: DESTRUCTIVE: RAM contents become indeterminate (typically zeroed), CPU returns to the reset vector, framecount resets to 0, joypad state clears, and any in-progress audio/video state is discarded. The loaded ROM stays loaded — only volatile state is cleared. Unsaved game progress is lost. Returns an error if the loaded core doesn't expose client.reboot_core — check capabilities.reboot_core in bizhawk_get_info first. RETURNS: Single line 'Core reset'.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
No arguments | |||
Implementation Reference
- src/tools.ts:413-421 (registration)Tool definition/registration for 'bizhawk_reset', including its name, description, and empty inputSchema.
{ name: "bizhawk_reset", description: "PURPOSE: Reset the loaded core — equivalent to a hard reset (power cycle) of the emulated console. " + "USAGE: Use to start fresh from boot. To return to a specific known-good point instead of boot, use bizhawk_load_state with a previously saved state file. " + "BEHAVIOR: DESTRUCTIVE: RAM contents become indeterminate (typically zeroed), CPU returns to the reset vector, framecount resets to 0, joypad state clears, and any in-progress audio/video state is discarded. The loaded ROM stays loaded — only volatile state is cleared. Unsaved game progress is lost. Returns an error if the loaded core doesn't expose client.reboot_core — check `capabilities.reboot_core` in bizhawk_get_info first. " + "RETURNS: Single line 'Core reset'.", inputSchema: { type: "object", properties: {} }, }, - src/tools.ts:636-636 (handler)Handler case for 'bizhawk_reset' — calls bh.call('reset') and returns 'Core reset' on success.
case "bizhawk_reset": await bh.call("reset"); return ok("Core reset"); - src/bizhawk.ts:235-264 (helper)The BizhawkServer.call() method that enqueues an RPC command and returns a promise. The handler's bh.call('reset') delegates to this, which sends a JSON-RPC command over TCP to the BizHawk Lua bridge.
async call<T = unknown>(method: string, params: Record<string, unknown> = {}): Promise<T> { return new Promise<T>((resolve, reject) => { const id = this.nextId++; const pending: PendingCmd = { id, method, params, resolve: (r) => resolve(r as T), reject, }; const timer = setTimeout(() => { // Drop from queue if still waiting; from inflight if already sent. this.queue = this.queue.filter((p) => p.id !== id); this.inflight.delete(id); if (this.inflight.size === 0) this.awaitingResult = false; reject(new Error( `BizHawk call "${method}" timed out (${this.timeoutMs}ms) — ` + `is the bridge.lua script still polling?`, )); }, this.timeoutMs); // Wrap so the timer always clears const origResolve = pending.resolve, origReject = pending.reject; pending.resolve = (r) => { clearTimeout(timer); origResolve(r); }; pending.reject = (e) => { clearTimeout(timer); origReject(e); }; this.queue.push(pending); }); }