High-level API for ROM manipulation and automation. More...
#include <rom_automation_api.h>

Classes | |
| struct | BatchOperation |
| Batch operation for multiple ROM modifications. More... | |
| struct | RomSnapshot |
| Snapshot of ROM state at a point in time. More... | |
| struct | ValidationResult |
| Validation result for ROM integrity checks. More... | |
Public Member Functions | |
| RomAutomationAPI (Rom *rom) | |
| absl::StatusOr< std::vector< uint8_t > > | ReadBytes (uint32_t address, size_t length) const |
| Read bytes from ROM at specified address. | |
| absl::Status | WriteBytes (uint32_t address, const std::vector< uint8_t > &data, bool verify=true) |
| Write bytes to ROM at specified address. | |
| absl::StatusOr< std::vector< uint32_t > > | FindPattern (const std::vector< uint8_t > &pattern, uint32_t start_address=0, size_t max_results=100) const |
| Find pattern in ROM. | |
| absl::StatusOr< RomSnapshot > | CreateSnapshot (const std::string &name, bool compress=true) |
| Create a snapshot of current ROM state. | |
| absl::Status | RestoreSnapshot (const RomSnapshot &snapshot, bool verify=true) |
| Restore ROM to a previous snapshot. | |
| std::vector< nlohmann::json > | ListSnapshots () const |
| List all available snapshots. | |
| absl::StatusOr< nlohmann::json > | CompareWithSnapshot (const RomSnapshot &snapshot) const |
| Compare current ROM with snapshot. | |
| ValidationResult | ValidateHeaders () const |
| Validate ROM headers. | |
| ValidationResult | ValidateChecksums () const |
| Validate ROM checksums. | |
| ValidationResult | ValidateRegions (const std::vector< std::string > ®ions) const |
| Validate specific ROM regions. | |
| ValidationResult | ValidateFull () const |
| Comprehensive ROM validation. | |
| absl::Status | ApplyPatch (const std::vector< uint8_t > &patch_data, const std::string &patch_format) |
| Apply IPS/BPS patch to ROM. | |
| absl::StatusOr< std::vector< uint8_t > > | GeneratePatch (const Rom &target_rom, const std::string &patch_format) const |
| Generate patch between current ROM and target. | |
| absl::StatusOr< std::vector< uint8_t > > | ExportRegion (const std::string ®ion_name, uint32_t start_address=0, uint32_t end_address=0) const |
| Export a region of ROM to file. | |
| absl::Status | ImportRegion (const std::string ®ion_name, const std::vector< uint8_t > &data, uint32_t address) |
| Import data to a ROM region. | |
| absl::StatusOr< std::vector< nlohmann::json > > | ExecuteBatch (const std::vector< BatchOperation > &operations, bool stop_on_error=true) |
| Execute multiple ROM operations atomically. | |
| std::string | BeginTransaction () |
| Begin a ROM modification transaction. | |
| absl::Status | CommitTransaction (const std::string &transaction_id) |
| Commit a ROM modification transaction. | |
| absl::Status | RollbackTransaction (const std::string &transaction_id) |
| Rollback a ROM modification transaction. | |
| nlohmann::json | GetStatistics () const |
| Get ROM statistics. | |
| nlohmann::json | AnalyzePatterns () const |
| Analyze ROM for common patterns. | |
| std::vector< std::pair< uint32_t, size_t > > | FindFreeSpace (size_t min_size=16) const |
| Find unused space in ROM. | |
Private Member Functions | |
| std::vector< uint8_t > | CompressData (const std::vector< uint8_t > &data) const |
| std::vector< uint8_t > | DecompressData (const std::vector< uint8_t > &data) const |
| bool | VerifyWrite (uint32_t address, const std::vector< uint8_t > &expected) const |
Private Attributes | |
| Rom * | rom_ |
| std::map< std::string, RomSnapshot > | snapshots_ |
| std::map< std::string, std::unique_ptr< class Transaction > > | transactions_ |
High-level API for ROM manipulation and automation.
Provides a clean interface for AI agents and automation scripts to interact with ROM data without direct memory manipulation.
Definition at line 23 of file rom_automation_api.h.
|
inlineexplicit |
Definition at line 25 of file rom_automation_api.h.
| absl::StatusOr< std::vector< uint8_t > > yaze::cli::automation::RomAutomationAPI::ReadBytes | ( | uint32_t | address, |
| size_t | length ) const |
Read bytes from ROM at specified address.
| address | Starting address |
| length | Number of bytes to read |
| absl::Status yaze::cli::automation::RomAutomationAPI::WriteBytes | ( | uint32_t | address, |
| const std::vector< uint8_t > & | data, | ||
| bool | verify = true ) |
Write bytes to ROM at specified address.
| address | Starting address |
| data | Bytes to write |
| verify | If true, read back and verify write succeeded |
| absl::StatusOr< std::vector< uint32_t > > yaze::cli::automation::RomAutomationAPI::FindPattern | ( | const std::vector< uint8_t > & | pattern, |
| uint32_t | start_address = 0, | ||
| size_t | max_results = 100 ) const |
Find pattern in ROM.
| pattern | Bytes to search for |
| start_address | Optional starting address |
| max_results | Maximum number of results to return |
| absl::StatusOr< RomSnapshot > yaze::cli::automation::RomAutomationAPI::CreateSnapshot | ( | const std::string & | name, |
| bool | compress = true ) |
Create a snapshot of current ROM state.
| name | Snapshot identifier |
| compress | If true, compress the snapshot data |
| absl::Status yaze::cli::automation::RomAutomationAPI::RestoreSnapshot | ( | const RomSnapshot & | snapshot, |
| bool | verify = true ) |
Restore ROM to a previous snapshot.
| snapshot | Snapshot to restore |
| verify | If true, verify restoration succeeded |
| std::vector< nlohmann::json > yaze::cli::automation::RomAutomationAPI::ListSnapshots | ( | ) | const |
List all available snapshots.
| absl::StatusOr< nlohmann::json > yaze::cli::automation::RomAutomationAPI::CompareWithSnapshot | ( | const RomSnapshot & | snapshot | ) | const |
Compare current ROM with snapshot.
| snapshot | Snapshot to compare against |
| ValidationResult yaze::cli::automation::RomAutomationAPI::ValidateHeaders | ( | ) | const |
Validate ROM headers.
| ValidationResult yaze::cli::automation::RomAutomationAPI::ValidateChecksums | ( | ) | const |
Validate ROM checksums.
| ValidationResult yaze::cli::automation::RomAutomationAPI::ValidateRegions | ( | const std::vector< std::string > & | regions | ) | const |
Validate specific ROM regions.
| regions | List of region names to validate |
| ValidationResult yaze::cli::automation::RomAutomationAPI::ValidateFull | ( | ) | const |
Comprehensive ROM validation.
| absl::Status yaze::cli::automation::RomAutomationAPI::ApplyPatch | ( | const std::vector< uint8_t > & | patch_data, |
| const std::string & | patch_format ) |
Apply IPS/BPS patch to ROM.
| patch_data | Patch file contents |
| patch_format | Format of patch (IPS, BPS, etc.) |
| absl::StatusOr< std::vector< uint8_t > > yaze::cli::automation::RomAutomationAPI::GeneratePatch | ( | const Rom & | target_rom, |
| const std::string & | patch_format ) const |
Generate patch between current ROM and target.
| target_rom | Target ROM to diff against |
| patch_format | Format to generate (IPS, BPS) |
| absl::StatusOr< std::vector< uint8_t > > yaze::cli::automation::RomAutomationAPI::ExportRegion | ( | const std::string & | region_name, |
| uint32_t | start_address = 0, | ||
| uint32_t | end_address = 0 ) const |
Export a region of ROM to file.
| region_name | Named region or custom range |
| start_address | Start of region (if custom) |
| end_address | End of region (if custom) |
| absl::Status yaze::cli::automation::RomAutomationAPI::ImportRegion | ( | const std::string & | region_name, |
| const std::vector< uint8_t > & | data, | ||
| uint32_t | address ) |
Import data to a ROM region.
| region_name | Named region or custom range |
| data | Data to import |
| address | Starting address for import |
| absl::StatusOr< std::vector< nlohmann::json > > yaze::cli::automation::RomAutomationAPI::ExecuteBatch | ( | const std::vector< BatchOperation > & | operations, |
| bool | stop_on_error = true ) |
Execute multiple ROM operations atomically.
| operations | List of operations to execute |
| stop_on_error | If true, abort on first error |
| std::string yaze::cli::automation::RomAutomationAPI::BeginTransaction | ( | ) |
Begin a ROM modification transaction.
| absl::Status yaze::cli::automation::RomAutomationAPI::CommitTransaction | ( | const std::string & | transaction_id | ) |
Commit a ROM modification transaction.
| transaction_id | Transaction to commit |
| absl::Status yaze::cli::automation::RomAutomationAPI::RollbackTransaction | ( | const std::string & | transaction_id | ) |
Rollback a ROM modification transaction.
| transaction_id | Transaction to rollback |
| nlohmann::json yaze::cli::automation::RomAutomationAPI::GetStatistics | ( | ) | const |
Get ROM statistics.
| nlohmann::json yaze::cli::automation::RomAutomationAPI::AnalyzePatterns | ( | ) | const |
Analyze ROM for common patterns.
| std::vector< std::pair< uint32_t, size_t > > yaze::cli::automation::RomAutomationAPI::FindFreeSpace | ( | size_t | min_size = 16 | ) | const |
Find unused space in ROM.
| min_size | Minimum size of free space to report |
|
private |
|
private |
|
private |
|
private |
Definition at line 273 of file rom_automation_api.h.
|
private |
Definition at line 274 of file rom_automation_api.h.
|
private |
Definition at line 275 of file rom_automation_api.h.