The old draft was dictated by David Stern and it involved putting an envolope in the freezer....
To answer your question, from 1966-84 the draft was determined by a coin-flip. A coin flip occurred between the last-place finishers in each of its two divisions to determine which team would win the first pick. The remaining teams picked in inverse order of their won-lost records.
In 1985 the NBA went to the lottery. The lottery determined the order of selection for the non-playoff teams for the first round only. Teams picked in inverse order of their records in the second round in all succeeding rounds.
In 1987 the NBA changed the lottery to only impact the first three picks. This change meant that teams could only slide down 3 picks (worst case).
In 1989, the NBA changed to the 2 round system. In the 1960's the draft was 21 rounds, 1974-85 it was 10 rounds.
In 1990 they went to the current 'weighted' system where the number of ping pong balls/chances was determined by the teams record.