roomie
Version:
ROM metadata helper
55 lines (54 loc) • 1.28 kB
TypeScript
import { EventEmitter } from "node:events";
import type { SupportedSystem } from "./types.js";
export interface RomInfo {
path: string;
system: SupportedSystem;
size: number;
hash: {
sha1: string;
};
gameCode?: string;
region?: string;
sfc?: {
romSpeed?: string;
rom?: {
size?: number;
type?: string;
speed?: string;
};
ram?: number;
hardware?: Record<string, unknown>;
};
n64?: {
name?: string;
country?: string;
version?: string;
};
}
export declare class Roomie extends EventEmitter {
private _path;
private _rom;
private _system;
private _info;
name?: string;
gameid?: string;
region?: string;
gamecode?: string;
cartridge?: Record<string, unknown>;
constructor(path: string);
private detectSystemFromPath;
private readGameCode;
private computeRegion;
private computeSfcInfo;
private _name;
private _gameid;
private _gamecode;
private _cartridge;
private _region;
load(pathOrBuffer: string | Buffer): Promise<void>;
get info(): RomInfo;
get system(): SupportedSystem;
get path(): string;
get rom(): Buffer;
}
export default Roomie;