The last time David Zicarelli wrote about this, [random] was simply using the linear congruence RNG from Numerical Recipes (the book is available online if you want full details).
The Linear Congruence algorithm gives a pretty flat distribution. It has several problems that make in unsuitable for hardcore statistical Monte Carlo simulations. For what you're doing it's probably more than good enough. Try the enclosed modification of your patch to get an idea of how many of each value you'll get after 1,000,000 bangs. Working out if that is "close enough" to equi-probable is up to you.