Skip to main content

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.

Test

Metadata

Release files for vidua 0.4.5

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for vidua 0.4.5
File Size Uploaded
vidua-0.4.5.tar.gz 27.5 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for vidua 0.4.5
File Interpreter ABI Platform
vidua-0.4.5-py3-none-any.whl Python 3 none any Details

Total release size: 47.0 kB

Release files / vidua-0.4.5.tar.gz

Download URL vidua-0.4.5.tar.gz
Size 27.5 kB
Tags Source
SHA-256 checksum
How to use checksums
cdfc73223bea60c26741143b91387d26b4793d0c0fe67f5c61a706a91feccfb8
BLAKE2b-256 checksum
How to use checksums
f9dda9abf56877143e518bdb3aa780ce1e7835264358ef49031c38342771a71a
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/4.0.2 CPython/3.10.6

Release files / vidua-0.4.5-py3-none-any.whl

Download URL vidua-0.4.5-py3-none-any.whl
Size 19.5 kB
Tags Python 3
SHA-256 checksum
How to use checksums
f1598ee444b8dfd8d52a52e736c42f4a00a3537d2f77ba056989cd45feb944c0
BLAKE2b-256 checksum
How to use checksums
cf6fbf23add7d9d69756d581c933c45f2ba7c5b58293cb55add5b1d22fb90cf4
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/4.0.2 CPython/3.10.6

Release history Release notifications | RSS feed

This release

0.4.5 This release

2 release files

0.4.4

2 release files

0.4.1

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page