1 #ifndef _patchrom__hpp__included__
2 #define _patchrom__hpp__included__
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
);