Hyperelliptic curves for supersymmetric Yang-Mills