PatchVideoBios implementation (taken from Clover)