Move this routine to emulator
A lot of changes

Still looking for an easy way
the opcode builder is now here