Use bsnes core internal IPS and BPS patchers
[lsnes.git] / include / core / patchrom.hpp
blobfddfc9722069c0895941c60b0f9211e3f6d76a62
1 #ifndef _patchrom__hpp__included__
2 #define _patchrom__hpp__included__
4 #include <vector>
5 #include <stdexcept>
7 /**
8 * Patch a ROM. Autodetects type of patch.
10 * Parameter original: The orignal file to patch.
11 * Parameter patch: The patch to apply.
12 * Parameter offset: Offset to apply.
13 * Returns The patched file.
14 * Throws std::bad_alloc: Not enough memory.
15 * Throws std::runtime_error: Invalid patch file.
17 std::vector<char> do_patch_file(const std::vector<char>& original, const std::vector<char>& patch,
18 int32_t offset) throw(std::bad_alloc, std::runtime_error);
20 #endif