pub fn analyze_rom_data(
file_path: &str,
) -> Result<RomAnalysisResult, RomAnalyzerError>Expand description
Analyze the header data of a ROM file.
This is the primary public function for analyzing ROM files. It handles different
file types (including archives like ZIP and CHD) by first processing them to
extract the ROM data, and then dispatches the data to process_rom_data for
console-specific analysis.
§Arguments
file_path- The path to the ROM file or archive.
§Returns
A Result containing either a RomAnalysisResult with the analysis data
or a RomAnalyzerError.
§Examples
use rom_analyzer::analyze_rom_data;
let result = analyze_rom_data("path/to/your/rom.nes");
match result {
Ok(analysis) => println!("Analysis successful!"),
Err(e) => eprintln!("Error analyzing ROM: {}", e),
}