Pause the game with Start, hold L, then press A, X, B, B, Y in that order.
Enter it cleanly and it works — genuinely one of the more satisfying cheats on the DS.