rom_patcher library
A Dart library for applying ROM patch files in IPS, BPS, and UPS formats.
This library provides functionality similar to the Floating IPS (FLIPS) program and the Rom Patcher JS library, allowing you to apply patches to ROM files in memory without requiring file system access.
Supported formats:
- IPS (International Patching System)
- BPS (Binary Patch System)
- UPS (Unified Patch System)
Example usage:
import 'package:rom_patcher/rom_patcher.dart';
// Apply a patch with auto-detection
final patchedRom = applyPatch(originalRom, patchData);
// Apply a specific format
final patchedRom = applyIps(originalRom, ipsPatchData);
Classes
- PatchUtils
- Utility functions for working with patch files.
Enums
- PatchErrorCode
- Error codes for different types of patch operation failures.
- PatchFormat
- Supported patch formats.
Extensions
- PatchFormatExtension on PatchFormat
- Extension methods for PatchFormat enum.
Functions
-
applyBps(
Uint8List rom, Uint8List patch) → Uint8List - Applies a BPS patch to a ROM.
-
applyIps(
Uint8List rom, Uint8List patch) → Uint8List - Applies an IPS patch to a ROM.
-
applyPatch(
Uint8List rom, Uint8List patch, {PatchFormat? format}) → Uint8List - Applies a patch to a ROM with automatic format detection.
-
applyUps(
Uint8List rom, Uint8List patch) → Uint8List - Applies a UPS patch to a ROM.
Exceptions / Errors
- PatchException
- Exception thrown when patch operations fail.