1#ifndef YAZE_CLI_HANDLERS_MESEN_HANDLERS_H_
2#define YAZE_CLI_HANDLERS_MESEN_HANDLERS_H_
17 std::string
GetName()
const override {
return "mesen-gamestate"; }
19 return "Get ALTTP game state from running Mesen2";
22 return "mesen-gamestate [--format <json|text>]";
32 std::string
GetName()
const override {
return "mesen-sprites"; }
34 return "Get active sprites from running Mesen2";
37 return "mesen-sprites [--all] [--format <json|text>]";
47 std::string
GetName()
const override {
return "mesen-cpu"; }
49 return "Get CPU register state from Mesen2";
52 return "mesen-cpu [--format <json|text>]";
62 std::string
GetName()
const override {
return "mesen-memory-read"; }
64 return "Read memory from Mesen2 emulator";
67 return "mesen-memory-read --address <hex> [--length <n>] [--format "
78 std::string
GetName()
const override {
return "mesen-memory-write"; }
80 return "Write memory in Mesen2 emulator";
83 return "mesen-memory-write --address <hex> --data <hexbytes> [--format "
94 std::string
GetName()
const override {
return "mesen-disasm"; }
96 return "Disassemble code at address in Mesen2";
99 return "mesen-disasm --address <hex> [--count <n>] [--format <json|text>]";
109 std::string
GetName()
const override {
return "mesen-trace"; }
111 return "Get execution trace from Mesen2";
114 return "mesen-trace [--count <n>] [--format <json|text>]";
124 std::string
GetName()
const override {
return "mesen-breakpoint"; }
127 return "mesen-breakpoint --action <add|remove|clear|list> [--address "
128 "<hex>] [--id <n>] [--type <exec|read|write|rw>]";
138 std::string
GetName()
const override {
return "mesen-control"; }
140 return "Control Mesen2 emulation state";
143 return "mesen-control --action <pause|resume|step|frame|reset>";
153 std::string
GetName()
const override {
return "mesen-session"; }
155 return "Get tracked autonomous control session state";
158 return "mesen-session [--action <show|reset|export|import>] [--file "
169 std::string
GetName()
const override {
return "mesen-await"; }
171 return "Block until frame/pc/breakpoint condition is met";
174 return "mesen-await --type <frame|pc|breakpoint> [--count <n>] [--address "
175 "<hex>] [--id <n>] [--timeout-ms <n>] [--poll-ms <n>]";
185 std::string
GetName()
const override {
return "mesen-goal"; }
187 return "Execute atomic goal macros for deterministic debugging";
190 return "mesen-goal --goal <break-at|run-frames|capture-state-at-pc> "
191 "[--address <hex>] [--count <n>] [--timeout-ms <n>] [--poll-ms <n>]";
201 std::string
GetName()
const override {
return "mesen-state-verify"; }
203 return "Verify a savestate matches current ROM hash and metadata";
206 return "mesen-state-verify --state <path> --rom-file <path> [--meta "
218 std::string
GetName()
const override {
return "mesen-state-regen"; }
220 return "Regenerate savestate freshness metadata for current ROM";
223 return "mesen-state-regen --state <path> --rom-file <path> [--meta <path>] "
234 std::string
GetName()
const override {
return "mesen-state-capture"; }
236 return "Capture/refresh savestate metadata in one command";
239 return "mesen-state-capture --state <path> --rom-file <path> [--meta "
240 "<path>] [--scenario <id>] [--slot <n>] [--states-dir <path>] "
251 std::string
GetName()
const override {
return "mesen-state-hook"; }
253 return "Preflight hook summary for agent automation";
256 return "mesen-state-hook --state <path> --rom-file <path> [--meta "
257 "<path>] [--scenario <id>]";
268std::vector<std::unique_ptr<resources::CommandHandler>>
The Rom class is used to load, save, and modify Rom data. This is a generic SNES ROM container and do...
absl::Status ValidateArgs(const resources::ArgumentParser &parser) override
Validate command arguments.
std::string GetUsage() const override
Get the command usage string.
std::string GetName() const override
Get the command name.
std::string GetDescription() const
absl::Status Execute(Rom *rom, const resources::ArgumentParser &parser, resources::OutputFormatter &formatter) override
Execute the command business logic.
bool RequiresRom() const override
Check if the command requires a loaded ROM.
absl::Status ValidateArgs(const resources::ArgumentParser &parser) override
Validate command arguments.
std::string GetName() const override
Get the command name.
bool RequiresRom() const override
Check if the command requires a loaded ROM.
std::string GetUsage() const override
Get the command usage string.
absl::Status Execute(Rom *rom, const resources::ArgumentParser &parser, resources::OutputFormatter &formatter) override
Execute the command business logic.
std::string GetDescription() const
std::string GetUsage() const override
Get the command usage string.
std::string GetName() const override
Get the command name.
std::string GetDescription() const
absl::Status Execute(Rom *rom, const resources::ArgumentParser &parser, resources::OutputFormatter &formatter) override
Execute the command business logic.
bool RequiresRom() const override
Check if the command requires a loaded ROM.
absl::Status ValidateArgs(const resources::ArgumentParser &parser) override
Validate command arguments.
std::string GetDescription() const
absl::Status ValidateArgs(const resources::ArgumentParser &parser) override
Validate command arguments.
bool RequiresRom() const override
Check if the command requires a loaded ROM.
absl::Status Execute(Rom *rom, const resources::ArgumentParser &parser, resources::OutputFormatter &formatter) override
Execute the command business logic.
std::string GetName() const override
Get the command name.
std::string GetUsage() const override
Get the command usage string.
std::string GetUsage() const override
Get the command usage string.
bool RequiresRom() const override
Check if the command requires a loaded ROM.
std::string GetDescription() const
absl::Status Execute(Rom *rom, const resources::ArgumentParser &parser, resources::OutputFormatter &formatter) override
Execute the command business logic.
std::string GetName() const override
Get the command name.
absl::Status ValidateArgs(const resources::ArgumentParser &parser) override
Validate command arguments.
std::string GetName() const override
Get the command name.
absl::Status ValidateArgs(const resources::ArgumentParser &parser) override
Validate command arguments.
std::string GetDescription() const
absl::Status Execute(Rom *rom, const resources::ArgumentParser &parser, resources::OutputFormatter &formatter) override
Execute the command business logic.
bool RequiresRom() const override
Check if the command requires a loaded ROM.
std::string GetUsage() const override
Get the command usage string.
std::string GetUsage() const override
Get the command usage string.
std::string GetName() const override
Get the command name.
std::string GetDescription() const
absl::Status Execute(Rom *rom, const resources::ArgumentParser &parser, resources::OutputFormatter &formatter) override
Execute the command business logic.
absl::Status ValidateArgs(const resources::ArgumentParser &parser) override
Validate command arguments.
bool RequiresRom() const override
Check if the command requires a loaded ROM.
std::string GetDescription() const
absl::Status ValidateArgs(const resources::ArgumentParser &parser) override
Validate command arguments.
absl::Status Execute(Rom *rom, const resources::ArgumentParser &parser, resources::OutputFormatter &formatter) override
Execute the command business logic.
std::string GetUsage() const override
Get the command usage string.
bool RequiresRom() const override
Check if the command requires a loaded ROM.
std::string GetName() const override
Get the command name.
std::string GetDescription() const
absl::Status ValidateArgs(const resources::ArgumentParser &parser) override
Validate command arguments.
std::string GetName() const override
Get the command name.
std::string GetUsage() const override
Get the command usage string.
bool RequiresRom() const override
Check if the command requires a loaded ROM.
absl::Status Execute(Rom *rom, const resources::ArgumentParser &parser, resources::OutputFormatter &formatter) override
Execute the command business logic.
bool RequiresRom() const override
Check if the command requires a loaded ROM.
std::string GetDescription() const
absl::Status Execute(Rom *rom, const resources::ArgumentParser &parser, resources::OutputFormatter &formatter) override
Execute the command business logic.
std::string GetUsage() const override
Get the command usage string.
std::string GetName() const override
Get the command name.
absl::Status ValidateArgs(const resources::ArgumentParser &parser) override
Validate command arguments.
std::string GetName() const override
Get the command name.
bool RequiresRom() const override
Check if the command requires a loaded ROM.
absl::Status Execute(Rom *rom, const resources::ArgumentParser &parser, resources::OutputFormatter &formatter) override
Execute the command business logic.
std::string GetDescription() const
absl::Status ValidateArgs(const resources::ArgumentParser &parser) override
Validate command arguments.
std::string GetUsage() const override
Get the command usage string.
std::string GetUsage() const override
Get the command usage string.
std::string GetDescription() const
absl::Status ValidateArgs(const resources::ArgumentParser &parser) override
Validate command arguments.
bool RequiresRom() const override
Check if the command requires a loaded ROM.
absl::Status Execute(Rom *rom, const resources::ArgumentParser &parser, resources::OutputFormatter &formatter) override
Execute the command business logic.
std::string GetName() const override
Get the command name.
absl::Status ValidateArgs(const resources::ArgumentParser &parser) override
Validate command arguments.
absl::Status Execute(Rom *rom, const resources::ArgumentParser &parser, resources::OutputFormatter &formatter) override
Execute the command business logic.
bool RequiresRom() const override
Check if the command requires a loaded ROM.
std::string GetName() const override
Get the command name.
std::string GetUsage() const override
Get the command usage string.
std::string GetDescription() const
bool RequiresRom() const override
Check if the command requires a loaded ROM.
std::string GetUsage() const override
Get the command usage string.
std::string GetName() const override
Get the command name.
absl::Status ValidateArgs(const resources::ArgumentParser &parser) override
Validate command arguments.
absl::Status Execute(Rom *rom, const resources::ArgumentParser &parser, resources::OutputFormatter &formatter) override
Execute the command business logic.
std::string GetDescription() const
absl::Status ValidateArgs(const resources::ArgumentParser &parser) override
Validate command arguments.
absl::Status Execute(Rom *rom, const resources::ArgumentParser &parser, resources::OutputFormatter &formatter) override
Execute the command business logic.
std::string GetName() const override
Get the command name.
std::string GetUsage() const override
Get the command usage string.
bool RequiresRom() const override
Check if the command requires a loaded ROM.
std::string GetDescription() const
std::string GetDescription() const
bool RequiresRom() const override
Check if the command requires a loaded ROM.
std::string GetName() const override
Get the command name.
absl::Status ValidateArgs(const resources::ArgumentParser &parser) override
Validate command arguments.
absl::Status Execute(Rom *rom, const resources::ArgumentParser &parser, resources::OutputFormatter &formatter) override
Execute the command business logic.
std::string GetUsage() const override
Get the command usage string.
Utility for parsing common CLI argument patterns.
Base class for CLI command handlers.
std::vector< std::unique_ptr< resources::CommandHandler > > CreateMesenCommandHandlers()
Factory function to create Mesen2 command handlers.