Patching Sega Genesis/Mega Drive ROMS on Linux/BSD
This post was inspired by the release of Sonic 3D Blast - Director’s cut, by the game’s original developer, Jon Burton.
Almost all of the documentation about applying patches to ROM images is Windows focussed, and usually involves directions to a GUI utility someone has put together. These programs are simply wrappers around a delta patching utility.
On unix systems, we can simply use ‘xdelta3’, which performs VCDIFF (RFC 3284) binary diff. ROM patches are usually very simple, so the bare essential options can be used.
Here is the usage of xdelta3:
xdelta3 [options] -s <original_ROM_file> <patch_file> <output_ROM_file>
ROM patches are usually very simple, so the bare essential options can be used. Decompress [-d] is all that is necessary.
In the case of Sonic 3D Blast:
xdelta3 -d -s Sonic_3d_Blast.bin SONICDX.xdelta Sonic_3d_Blast-DC.bin
Now fire up Sonic_3d_Blast-DC.bin in your flash-cart or emulator of choice and enjoy the patched ROM!