refactor generic machinery into its own module
simplify pattern replacement
add instruction table for Gameboy CPU (Sharp LR35902)