To unlock all levels, at the game start screen, enter:
Up, Down, Up, Down, Left, Right, Right, Y, X, X