Expand description
The rom_analyzer crate provides functionality to analyze various ROM file formats from
classic video game consoles. It aims to extract metadata such as region, game title, publisher,
and other console-specific details from ROM headers and file names.
This library supports a range of console ROMs, including but not limited to NES, SNES, N64, Sega Master System, Game Gear, Game Boy, Game Boy Advance, Sega Genesis, and Sega CD. It can also handle ROMs packaged as ZIP or CHD (Compressed Hunks of Data) archives.
The primary entry point for analysis is the analyze_rom_data function, which takes a file
path and returns a RomAnalysisResult enum containing console-specific analysis data.
Modules§
- archive
- This module handles the processing and extraction of ROM data from various archive formats.
- console
- This module contains console-specific analysis logic for various retro gaming systems.
- error
- Defines custom error types for ROM-Analyzer, providing a centralized way to handle and propagate errors throughout the application.
- region
- Provides utilities for inferring and normalizing geographical regions from ROM filenames and header information.
Enums§
- RomAnalysis
Result - Represents the analysis result for a ROM file.
- RomFile
Type - Represents the type of ROM file based on its extension. This enum is used internally to dispatch to the correct analysis logic.
Constants§
- SUPPORTED_
ROM_ EXTENSIONS - A list of file extensions that the ROM analyzer supports. These extensions are used to determine the type of ROM file being processed.
Functions§
- analyze_
rom_ data - Analyze the header data of a ROM file.
- get_
rom_ file_ type - Maps a file’s extension to the corresponding RomFileType for supported consoles.