cge_nes 0.1.0

Cycle-accurate NES (Nintendo Entertainment System) emulator library: CPU, PPU, cartridge, input, and iNES ROM loading.
Documentation
//! iNES ROM format parser and loader implementation.
//!
//! This module provides the core functionality for parsing and handling NES ROMs in the iNES format.
//! The format consists of:
//!
//! - A 16-byte header containing ROM configuration and mapper information
//! - Optional 512-byte trainer area
//! - PRG ROM banks (16KB each)
//! - CHR ROM banks (8KB each)
//!
//! # Header Structure
//!
//! The iNES header (16 bytes) contains:
//! - Magic constant: "NES" followed by MS-DOS EOF ($1A)
//! - PRG ROM size in 16KB units
//! - CHR ROM size in 8KB units
//! - Flags for mapper number, mirroring type, battery presence
//! - Additional mapper and format flags
//!
//! # Submodules
//!
//! - `header`: Handles parsing and validation of the iNES header
//! - `mappers`: Implements different Memory Management Controller (MMC) mappers
//!
//! # Key Types
//!
//! - [`HeaderData`]: Parsed header information including ROM sizes and mapper configuration
//! - [`Mirroring`]: Enumeration of supported name table mirroring modes

pub mod header;
pub mod mappers;

pub use header::{HeaderData, Mirroring};