Slap ROM Patcher
Meet 'slap', a new free and open-source ROM patcher crafted in Haskell and Rust, engineered to be fast, multiplatform, and adept at handling the many quirks of existing patch formats. It offers a comprehensive CLI with structured errors and a web version, addressing the author's need for a robust scripting tool. The project meticulously details its correctness considerations, text encoding solutions, and presents extensive benchmarks demonstrating its competitive performance against other tools.
The Lowdown
The author introduces 'slap', a new ROM patcher developed out of a personal need for a robust CLI tool on Linux that could gracefully handle various patch formats for devices like the FXPak. Designed to be free, open-source, and multiplatform, 'slap' aims to offer a superior experience for ROM modding enthusiasts and developers.
- Core Functionality: 'slap' supports twenty patch formats and provides six key operations:
apply(patching a ROM),create(generating a patch from two ROMs),undo(reverting a patched ROM),convert(changing a patch's format),explain(describing a patch's actions), andinfo(displaying patch metadata). - Robustness and Error Handling: A significant focus of 'slap' is its ability to handle the subtle and often ambiguous specifications of different patch formats. The author details the extensive work done to ensure 'slap' can apply the full 'expressive range' of formats while being conservative on creation, and provides 'chatty', structured error messages for malformed patches.
- Text Encoding: The tool carefully manages text encoding for metadata, defaulting to UTF-8 and offering alternative decoding options, alongside sanitizing arbitrary data fields to prevent issues with control characters.
- Performance Benchmarks: The project includes detailed benchmarks comparing 'slap' against various reference CLI tools for patch creation and application across different ROM sizes, often showing competitive or superior performance. A dedicated browser benchmark section highlights 'web slap's' speed advantage over 'RomPatcher.js'.
Overall, 'slap' stands out as a technically rigorous and performant ROM patching solution, designed with an eye for scripting, robust error reporting, and comprehensive support for the myriad complexities of existing patch formats, making it a powerful addition to the ROM modding toolkit.