refactor: add Cpu6502Helper; extract Common