convert parts to P5, "#~" means "not yet ported"