Hydrodynamical simulations of galaxy formation: effects of supernova feedback