Cid2Mizard released a random maze generator, the source code is included.

http://nintendomax.com/viewtopic.php?t=11061&f=19