Skip to main content

A Python library and utilities for parsing iNES format NES ROM files

Project description

iNES Parser

Lightweight Python library and CLI tools for working with NES ROMs in iNES/NES 2.0 format.

Supported versions: Python 3.10-3.14.

Quick Start

pip install ines-parser

Optional extra for archive formats (.7z/.zip/.rar): pip install "ines-parser[archive]". Otherwise the library has no extra dependencies.

What It Does

  • parses ROM headers (mapper, PRG/CHR sizes, mirroring, and more)
  • scans ROM directories with filters
  • splits ROM files into PRG and CHR binaries

CLI

Tools live in ines_parser/cli/ as ines_scan_roms.py and ines_split_rom.py. The names match pip install entry points on your PATH: ines_scan_roms.py and ines_split_rom.py.

Without installing, from the repository root you can use either -m or the path to the same files:

python -m ines_parser.cli.ines_scan_roms /path/to/roms
python ines_parser/cli/ines_scan_roms.py /path/to/roms

python -m ines_parser.cli.ines_split_rom game.nes
python ines_parser/cli/ines_split_rom.py game.nes

After pip install, run the same logical names as commands (they are small wrappers, not copies of the sources):

ines_scan_roms.py /path/to/roms
ines_split_rom.py game.nes

Scan ROMs

ines_scan_roms.py /path/to/roms
ines_scan_roms.py /path/to/roms --mapper 4
ines_scan_roms.py /path/to/roms --show-all

Useful filters:

  • --mapper N
  • --mirroring H|V|F
  • --has-trainer
  • --min-prg KiB, --max-prg KiB
  • --min-chr KiB, --max-chr KiB

Split ROM (PRG / CHR)

ines_split_rom.py game.nes
ines_split_rom.py roms.7z
ines_split_rom.py game.nes --force

By default, existing output files are not overwritten without confirmation.

Library Usage

from ines_parser import parse_ines_header

with open("game.nes", "rb") as f:
    header = parse_ines_header(f.read(16))

if header and header.is_valid():
    print(header)  # compact output
    print(header.detailed_str())  # full output

Format Docs

License

MIT, see LICENSE.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

ines_parser-1.2.0.tar.gz (17.2 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

ines_parser-1.2.0-py3-none-any.whl (18.2 kB view details)

Uploaded Python 3

File details

Details for the file ines_parser-1.2.0.tar.gz.

File metadata

  • Download URL: ines_parser-1.2.0.tar.gz
  • Upload date:
  • Size: 17.2 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.13.12

File hashes

Hashes for ines_parser-1.2.0.tar.gz
Algorithm Hash digest
SHA256 e0794a758e82c5a87a5721527d9f738a268d55b9d18d067e81cb6fe2878079c9
MD5 daac9ad0a73e32d2e06724f744bf039e
BLAKE2b-256 b94d2554106f2a12093664f6c9d9d42a45460ae85c87ff1f8616040043487d72

See more details on using hashes here.

File details

Details for the file ines_parser-1.2.0-py3-none-any.whl.

File metadata

  • Download URL: ines_parser-1.2.0-py3-none-any.whl
  • Upload date:
  • Size: 18.2 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.13.12

File hashes

Hashes for ines_parser-1.2.0-py3-none-any.whl
Algorithm Hash digest
SHA256 70b56637e8b59e6c83742a0bd3a9b13c48abdbfab066ebbd571ef8c67df3ee97
MD5 06f947013ba8675dc580c6fa4ed6e8da
BLAKE2b-256 c1cd1387efc80bc0f4813dca332e149225fb87cdbd5b414d86a1c6f61ee057cf

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page