converted z80 to c++ [smf]