Apply patches to ROMs and other files
Project description
vidua
Vidua can be used to apply (BPS or IPS) patches. It is intended particularly for use with ROM hacks.
Installation
pip install vidua
Usage
A simple script is included to validate or apply patches from the command line:
vidua patch.bps original.rom patched_output.rom
Full usage instructions:
$ vidua --help
usage: vidua [-h] [-v] [-q] PATCH [ORIGINAL] [OUTPUT]
Apply or validate patches.
positional arguments:
PATCH the patch file
ORIGINAL the file to be patched
OUTPUT filename to write patched file
optional arguments:
-h, --help show this help message and exit
-v, --validate validate the patch only; do not apply it
-q, --quiet suppress output except errors
Vidua may also be used as a library, to validate or apply patches from within another program:
from vidua import bps
patch = open('patch.bps', 'rb')
original = open('original.rom', 'rb')
with open('patched.rom', 'wb') as patched:
patched.write(bps.patch(original, patch).read())
If the file is very large, you may prefer to use shutil.copyfileobj
when
writing to disk.
Credits
Alcaro's Floating IPS was very useful in working out how to handle BPS files when byuu's documentation was unclear.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
File details
Details for the file vidua-0.4.5.tar.gz
.
File metadata
- Download URL: vidua-0.4.5.tar.gz
- Upload date:
- Size: 27.5 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.2 CPython/3.10.6
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | cdfc73223bea60c26741143b91387d26b4793d0c0fe67f5c61a706a91feccfb8 |
|
MD5 | 2abdafa69294a97105b57392b8291ced |
|
BLAKE2b-256 | f9dda9abf56877143e518bdb3aa780ce1e7835264358ef49031c38342771a71a |
File details
Details for the file vidua-0.4.5-py3-none-any.whl
.
File metadata
- Download URL: vidua-0.4.5-py3-none-any.whl
- Upload date:
- Size: 19.5 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.2 CPython/3.10.6
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | f1598ee444b8dfd8d52a52e736c42f4a00a3537d2f77ba056989cd45feb944c0 |
|
MD5 | 8c0ed98b381b541800df3a2b52cd081d |
|
BLAKE2b-256 | cf6fbf23add7d9d69756d581c933c45f2ba7c5b58293cb55add5b1d22fb90cf4 |