Direct simulation of diatomic gases using the generalized hard sphere model