A numerical scheme is developed to solve the unsteady, two-dimensional Navier-Stokes equations using the exact free surface boundary conditions for determining viscous wavefields generated by a piston-type wavemaker. The SUMMAC method for treating the free surface has been further modified to extrapolate the velocity components at free surface more accurately. For a piston wavemaker, both small- and large-amplitude waves can be simulated by the present numerical scheme. The process of the wave formation is shown in detail. For verifying the accuracy of the numerical results, the numerical wave profiles are compared with both analytical and experimental results. For small wave steepness, our numerical results coincide with theoretical and experimental results. For large wave steepness, the numerical wave heights are a little lower than the experimental ones. In the worst case, the deviation is about 6%.