Coder Social home page Coder Social logo

christopherjmiller / flips.rs Goto Github PK

View Code? Open in Web Editor NEW

This project forked from althonos/flips.rs

0.0 0.0 0.0 337 KB

Rust bindings to Flips, the Floating IPS patcher.

Home Page: https://crates.io/crates/flips

License: GNU General Public License v3.0

Shell 4.04% C 0.46% Rust 95.50%

flips.rs's Introduction

flips.rs Star me

Rust bindings to Flips, the Floating IPS patcher.

TravisCI Codecov License Source Crate Documentation Changelog GitHub issues

πŸ—ΊοΈ Overview

Flips is a popular patcher for the IPS, BPS and UPS formats, typically used to patch ROMs of video game cartridges. It is known to create the smallest BPS and IPS files among all widely used patchers. This library provides a safe API to create and apply patches to arbitrary sources.

Format Apply Create Metadata Study
UPS βœ”οΈ
IPS βœ”οΈ βœ”οΈ βœ”οΈ
BPS βœ”οΈ βœ”οΈ βœ”οΈ

πŸ”Œ Usage

Load a ROM and a patch from two files, apply the patch to the ROM, and then write it back to a file:

extern crate flips;

// get the input ROM and patch
let patch = std::fs::read("FE_LonelyMirror_v3_3.ups").unwrap();
let rom = std::fs::read("Fire Emblem 8.rom").unwrap();

// apply the patch and write the output
let output = flips::UpsPatch::new(patch).apply(rom)
  .expect("could not apply patch");
std::fs::write("FE_LonelyMirror.rom", output).unwrap();

Check the online documentation for more examples about how to use this library.

πŸ“ Features

πŸ“¦ no_std support

no_std support for this crate can be opted-in by disabling the std feature. It will disable support of std::error::Error and Vec<u8>. It will also disable dynamic dispatch of hardware-accelerated CRC32 implementation.

🧩 CRC32

Flips is patched to use the crc32fast crate instead of the naive algorithm it used, which greatly improves performances when creating or applying BPS and UPS patches, since both of this formats will compute the checksum for their inputs and outputs every time.

πŸ“‹ Changelog

This project adheres to Semantic Versioning and provides a changelog in the Keep a Changelog format.

πŸ“œ License

This library is provided under the GNU General Public License v3.0, since Flips itself is GPLv3 software.

flips.rs's People

Contributors

althonos avatar christopherjmiller avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    πŸ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. πŸ“ŠπŸ“ˆπŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❀️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.