- Introduced several new commands to the emulator, including: - `emulator-set-breakpoint`: Set breakpoints for debugging. - `emulator-clear-breakpoint`: Remove breakpoints by ID. - `emulator-list-breakpoints`: List all active breakpoints. - `emulator-step`: Step through CPU instructions. - `emulator-run`: Run the emulator until a breakpoint or for a specified number of frames. - `emulator-pause`: Pause execution for inspection. - `emulator-reset`: Reset the emulator to its initial state. - `emulator-get-registers`: Retrieve current CPU register values. - `emulator-get-metrics`: Get performance metrics of the emulator. Benefits: - Enhances debugging capabilities and provides more control over emulator execution, improving the development experience.
552 lines
16 KiB
JSON
552 lines
16 KiB
JSON
{
|
|
"function_declarations": [
|
|
{
|
|
"name": "resource-list",
|
|
"description": "List all resources of a specific type from the ROM (rooms, sprites, dungeons, entrances, items, overlords)",
|
|
"parameters": {
|
|
"type": "object",
|
|
"properties": {
|
|
"type": {
|
|
"type": "string",
|
|
"enum": ["room", "sprite", "dungeon", "entrance", "item", "overlord"],
|
|
"description": "Type of resource to list"
|
|
}
|
|
},
|
|
"required": ["type"]
|
|
}
|
|
},
|
|
{
|
|
"name": "resource-search",
|
|
"description": "Search for resources by name or pattern",
|
|
"parameters": {
|
|
"type": "object",
|
|
"properties": {
|
|
"type": {
|
|
"type": "string",
|
|
"enum": ["room", "sprite", "dungeon", "entrance", "item"],
|
|
"description": "Type of resource to search"
|
|
},
|
|
"query": {
|
|
"type": "string",
|
|
"description": "Search query or pattern to match"
|
|
}
|
|
},
|
|
"required": ["type", "query"]
|
|
}
|
|
},
|
|
{
|
|
"name": "emulator-press-buttons",
|
|
"description": "Presses and immediately releases one or more buttons on the SNES controller.",
|
|
"parameters": {
|
|
"type": "object",
|
|
"properties": {
|
|
"buttons": {
|
|
"type": "string",
|
|
"description": "A comma-separated list of buttons to press (e.g., 'A,Right,Start')."
|
|
}
|
|
},
|
|
"required": ["buttons"]
|
|
}
|
|
},
|
|
{
|
|
"name": "emulator-hold-buttons",
|
|
"description": "Holds down one or more buttons for a specified duration.",
|
|
"parameters": {
|
|
"type": "object",
|
|
"properties": {
|
|
"buttons": {
|
|
"type": "string",
|
|
"description": "A comma-separated list of buttons to hold."
|
|
},
|
|
"duration": {
|
|
"type": "integer",
|
|
"description": "The duration in milliseconds to hold the buttons."
|
|
}
|
|
},
|
|
"required": ["buttons", "duration"]
|
|
}
|
|
},
|
|
{
|
|
"name": "emulator-get-state",
|
|
"description": "Retrieves the current state of the game from the emulator.",
|
|
"parameters": {
|
|
"type": "object",
|
|
"properties": {
|
|
"screenshot": {
|
|
"type": "boolean",
|
|
"description": "Whether to include a screenshot of the current frame."
|
|
}
|
|
}
|
|
}
|
|
},
|
|
{
|
|
"name": "emulator-read-memory",
|
|
"description": "Reads a block of memory from the SNES WRAM.",
|
|
"parameters": {
|
|
"type": "object",
|
|
"properties": {
|
|
"address": {
|
|
"type": "string",
|
|
"description": "The memory address to read from (e.g., '0x7E0010')."
|
|
},
|
|
"length": {
|
|
"type": "integer",
|
|
"description": "The number of bytes to read."
|
|
}
|
|
},
|
|
"required": ["address"]
|
|
}
|
|
},
|
|
{
|
|
"name": "emulator-write-memory",
|
|
"description": "Writes a block of data to the SNES WRAM.",
|
|
"parameters": {
|
|
"type": "object",
|
|
"properties": {
|
|
"address": {
|
|
"type": "string",
|
|
"description": "The memory address to write to."
|
|
},
|
|
"data": {
|
|
"type": "string",
|
|
"description": "The data to write, as a hex string (e.g., 'AABBCCDD')."
|
|
}
|
|
},
|
|
"required": ["address", "data"]
|
|
}
|
|
},
|
|
{
|
|
"name": "emulator-set-breakpoint",
|
|
"description": "Set a breakpoint in the emulator to pause execution at a specific address or when specific memory is accessed. Essential for debugging game logic, input handling, and timing issues.",
|
|
"parameters": {
|
|
"type": "object",
|
|
"properties": {
|
|
"address": {
|
|
"type": "string",
|
|
"description": "Memory address in hex format (e.g., '0x0083D7' for ALTTP's NMI_ReadJoypads routine)"
|
|
},
|
|
"type": {
|
|
"type": "string",
|
|
"enum": ["execute", "read", "write", "access"],
|
|
"description": "Breakpoint type: 'execute' breaks when PC reaches address, 'read'/'write'/'access' break on memory access"
|
|
},
|
|
"description": {
|
|
"type": "string",
|
|
"description": "Human-readable label for this breakpoint (e.g., 'NMI handler entry')"
|
|
}
|
|
},
|
|
"required": ["address"]
|
|
}
|
|
},
|
|
{
|
|
"name": "emulator-clear-breakpoint",
|
|
"description": "Remove a breakpoint by ID",
|
|
"parameters": {
|
|
"type": "object",
|
|
"properties": {
|
|
"id": {
|
|
"type": "integer",
|
|
"description": "Breakpoint ID to remove (from list-breakpoints output)"
|
|
}
|
|
},
|
|
"required": ["id"]
|
|
}
|
|
},
|
|
{
|
|
"name": "emulator-list-breakpoints",
|
|
"description": "List all active breakpoints with their addresses, types, hit counts, and states",
|
|
"parameters": {
|
|
"type": "object",
|
|
"properties": {}
|
|
}
|
|
},
|
|
{
|
|
"name": "emulator-step",
|
|
"description": "Step the emulator forward by one or more CPU instructions and return the new CPU state",
|
|
"parameters": {
|
|
"type": "object",
|
|
"properties": {
|
|
"count": {
|
|
"type": "integer",
|
|
"description": "Number of instructions to execute (default: 1)"
|
|
}
|
|
}
|
|
}
|
|
},
|
|
{
|
|
"name": "emulator-run",
|
|
"description": "Run the emulator until a breakpoint is hit or for a specified number of frames",
|
|
"parameters": {
|
|
"type": "object",
|
|
"properties": {
|
|
"until_break": {
|
|
"type": "boolean",
|
|
"description": "Run until breakpoint is hit (default: false)"
|
|
},
|
|
"frames": {
|
|
"type": "integer",
|
|
"description": "Number of frames to run (if not until_break)"
|
|
}
|
|
}
|
|
}
|
|
},
|
|
{
|
|
"name": "emulator-pause",
|
|
"description": "Pause emulator execution for inspection",
|
|
"parameters": {
|
|
"type": "object",
|
|
"properties": {}
|
|
}
|
|
},
|
|
{
|
|
"name": "emulator-reset",
|
|
"description": "Reset the emulator to initial state (hard reset)",
|
|
"parameters": {
|
|
"type": "object",
|
|
"properties": {}
|
|
}
|
|
},
|
|
{
|
|
"name": "emulator-get-registers",
|
|
"description": "Get current CPU register values (A, X, Y, PC, PB, DB, SP, flags) for debugging",
|
|
"parameters": {
|
|
"type": "object",
|
|
"properties": {}
|
|
}
|
|
},
|
|
{
|
|
"name": "emulator-get-metrics",
|
|
"description": "Get emulator performance metrics including FPS, cycle count, audio queue status",
|
|
"parameters": {
|
|
"type": "object",
|
|
"properties": {}
|
|
}
|
|
},
|
|
{
|
|
"name": "dungeon-list-sprites",
|
|
"description": "List all sprites in a specific dungeon or room",
|
|
"parameters": {
|
|
"type": "object",
|
|
"properties": {
|
|
"dungeon": {
|
|
"type": "string",
|
|
"description": "Dungeon name (e.g., 'hyrule_castle', 'eastern_palace') or leave empty for all"
|
|
},
|
|
"room_id": {
|
|
"type": "string",
|
|
"description": "Specific room ID to query (optional)"
|
|
}
|
|
}
|
|
}
|
|
},
|
|
{
|
|
"name": "dungeon-describe-room",
|
|
"description": "Get detailed information about a specific dungeon room including sprites, chests, layout, and connections",
|
|
"parameters": {
|
|
"type": "object",
|
|
"properties": {
|
|
"room_id": {
|
|
"type": "string",
|
|
"description": "Room ID to describe (0-296)"
|
|
},
|
|
"include_sprites": {
|
|
"type": "string",
|
|
"enum": ["true", "false"],
|
|
"description": "Include sprite information (default: true)"
|
|
}
|
|
},
|
|
"required": ["room_id"]
|
|
}
|
|
},
|
|
{
|
|
"name": "overworld-find-tile",
|
|
"description": "Find all locations where a specific tile16 ID appears in the overworld",
|
|
"parameters": {
|
|
"type": "object",
|
|
"properties": {
|
|
"tile_id": {
|
|
"type": "string",
|
|
"description": "Tile16 ID to search for (hex format like '0x42' or decimal)"
|
|
},
|
|
"map_id": {
|
|
"type": "string",
|
|
"description": "Specific overworld map to search (0-63, optional)"
|
|
}
|
|
},
|
|
"required": ["tile_id"]
|
|
}
|
|
},
|
|
{
|
|
"name": "overworld-describe-map",
|
|
"description": "Get detailed information about a specific overworld map including tile composition, warps, and sprites",
|
|
"parameters": {
|
|
"type": "object",
|
|
"properties": {
|
|
"map_id": {
|
|
"type": "string",
|
|
"description": "Overworld map ID (0-63 for light/dark world)"
|
|
},
|
|
"include_tiles": {
|
|
"type": "string",
|
|
"enum": ["true", "false"],
|
|
"description": "Include tile distribution statistics"
|
|
}
|
|
},
|
|
"required": ["map_id"]
|
|
}
|
|
},
|
|
{
|
|
"name": "overworld-list-warps",
|
|
"description": "List all warp/entrance points for a specific overworld map",
|
|
"parameters": {
|
|
"type": "object",
|
|
"properties": {
|
|
"map_id": {
|
|
"type": "string",
|
|
"description": "Overworld map ID (0-63)"
|
|
}
|
|
},
|
|
"required": ["map_id"]
|
|
}
|
|
},
|
|
{
|
|
"name": "overworld-list-sprites",
|
|
"description": "List all sprites placed on a specific overworld map",
|
|
"parameters": {
|
|
"type": "object",
|
|
"properties": {
|
|
"map_id": {
|
|
"type": "string",
|
|
"description": "Overworld map ID (0-63)"
|
|
}
|
|
},
|
|
"required": ["map_id"]
|
|
}
|
|
},
|
|
{
|
|
"name": "overworld-get-entrance",
|
|
"description": "Get detailed information about a specific entrance/exit including destination and properties",
|
|
"parameters": {
|
|
"type": "object",
|
|
"properties": {
|
|
"entrance_id": {
|
|
"type": "string",
|
|
"description": "Entrance ID to query"
|
|
}
|
|
},
|
|
"required": ["entrance_id"]
|
|
}
|
|
},
|
|
{
|
|
"name": "overworld-tile-stats",
|
|
"description": "Get statistical analysis of tile usage across overworld maps",
|
|
"parameters": {
|
|
"type": "object",
|
|
"properties": {
|
|
"map_id": {
|
|
"type": "string",
|
|
"description": "Specific map ID or 'all' for global statistics"
|
|
}
|
|
}
|
|
}
|
|
},
|
|
{
|
|
"name": "hex-read",
|
|
"description": "Read bytes from ROM at a specific address in hexadecimal",
|
|
"parameters": {
|
|
"type": "object",
|
|
"properties": {
|
|
"address": {
|
|
"type": "string",
|
|
"description": "ROM address in hex format (e.g., '0x1C800')"
|
|
},
|
|
"length": {
|
|
"type": "integer",
|
|
"description": "Number of bytes to read (default: 16)"
|
|
},
|
|
"format": {
|
|
"type": "string",
|
|
"enum": ["hex", "ascii", "both"],
|
|
"description": "Output format (default: both)"
|
|
}
|
|
},
|
|
"required": ["address"]
|
|
}
|
|
},
|
|
{
|
|
"name": "hex-write",
|
|
"description": "Write bytes to ROM at a specific address (creates a proposal)",
|
|
"parameters": {
|
|
"type": "object",
|
|
"properties": {
|
|
"address": {
|
|
"type": "string",
|
|
"description": "ROM address in hex format (e.g., '0x1C800')"
|
|
},
|
|
"data": {
|
|
"type": "string",
|
|
"description": "Hex data to write (space-separated bytes like 'FF 00 12 34')"
|
|
}
|
|
},
|
|
"required": ["address", "data"]
|
|
}
|
|
},
|
|
{
|
|
"name": "hex-search",
|
|
"description": "Search for a byte pattern in ROM",
|
|
"parameters": {
|
|
"type": "object",
|
|
"properties": {
|
|
"pattern": {
|
|
"type": "string",
|
|
"description": "Hex pattern to search (e.g., 'FF 00 ?? 12' where ?? is wildcard)"
|
|
},
|
|
"start_address": {
|
|
"type": "string",
|
|
"description": "Start address (default: 0x00000)"
|
|
},
|
|
"end_address": {
|
|
"type": "string",
|
|
"description": "End address (default: ROM size)"
|
|
}
|
|
},
|
|
"required": ["pattern"]
|
|
}
|
|
},
|
|
{
|
|
"name": "palette-get-colors",
|
|
"description": "Get all colors from a specific palette",
|
|
"parameters": {
|
|
"type": "object",
|
|
"properties": {
|
|
"group": {
|
|
"type": "integer",
|
|
"description": "Palette group index (0-based)"
|
|
},
|
|
"palette": {
|
|
"type": "integer",
|
|
"description": "Palette index within group (0-7)"
|
|
},
|
|
"format": {
|
|
"type": "string",
|
|
"enum": ["snes", "rgb", "hex"],
|
|
"description": "Color format (default: hex)"
|
|
}
|
|
},
|
|
"required": ["group", "palette"]
|
|
}
|
|
},
|
|
{
|
|
"name": "palette-set-color",
|
|
"description": "Set a specific color in a palette (creates a proposal)",
|
|
"parameters": {
|
|
"type": "object",
|
|
"properties": {
|
|
"group": {
|
|
"type": "integer",
|
|
"description": "Palette group index"
|
|
},
|
|
"palette": {
|
|
"type": "integer",
|
|
"description": "Palette index within group"
|
|
},
|
|
"color_index": {
|
|
"type": "integer",
|
|
"description": "Color index in palette (0-15)"
|
|
},
|
|
"color": {
|
|
"type": "string",
|
|
"description": "Color value in hex format (e.g., '#FF0000' or 'FF0000')"
|
|
}
|
|
},
|
|
"required": ["group", "palette", "color_index", "color"]
|
|
}
|
|
},
|
|
{
|
|
"name": "palette-analyze",
|
|
"description": "Analyze color usage and statistics for a palette or bitmap",
|
|
"parameters": {
|
|
"type": "object",
|
|
"properties": {
|
|
"target_type": {
|
|
"type": "string",
|
|
"enum": ["palette", "bitmap", "graphics_sheet"],
|
|
"description": "What to analyze"
|
|
},
|
|
"target_id": {
|
|
"type": "string",
|
|
"description": "ID or index of target"
|
|
}
|
|
},
|
|
"required": ["target_type", "target_id"]
|
|
}
|
|
},
|
|
{
|
|
"name": "todo-create",
|
|
"description": "Create a new TODO task for complex operations",
|
|
"parameters": {
|
|
"type": "object",
|
|
"properties": {
|
|
"description": {
|
|
"type": "string",
|
|
"description": "Task description"
|
|
},
|
|
"category": {
|
|
"type": "string",
|
|
"description": "Task category (e.g., 'rom_edit', 'ai_task', 'build')"
|
|
},
|
|
"priority": {
|
|
"type": "integer",
|
|
"description": "Priority level (0-10, higher = more important)"
|
|
}
|
|
},
|
|
"required": ["description"]
|
|
}
|
|
},
|
|
{
|
|
"name": "todo-list",
|
|
"description": "List all TODO tasks or filter by status/category",
|
|
"parameters": {
|
|
"type": "object",
|
|
"properties": {
|
|
"status": {
|
|
"type": "string",
|
|
"enum": ["pending", "in_progress", "completed", "blocked", "cancelled"],
|
|
"description": "Filter by status"
|
|
},
|
|
"category": {
|
|
"type": "string",
|
|
"description": "Filter by category"
|
|
}
|
|
}
|
|
}
|
|
},
|
|
{
|
|
"name": "todo-update-status",
|
|
"description": "Update the status of a TODO task",
|
|
"parameters": {
|
|
"type": "object",
|
|
"properties": {
|
|
"id": {
|
|
"type": "string",
|
|
"description": "TODO ID"
|
|
},
|
|
"status": {
|
|
"type": "string",
|
|
"enum": ["pending", "in_progress", "completed", "blocked", "cancelled"],
|
|
"description": "New status"
|
|
}
|
|
},
|
|
"required": ["id", "status"]
|
|
}
|
|
},
|
|
{
|
|
"name": "todo-next",
|
|
"description": "Get the next actionable TODO task (respecting dependencies and priority)",
|
|
"parameters": {
|
|
"type": "object",
|
|
"properties": {}
|
|
}
|
|
}
|
|
]
|
|
} |