At the stage select screen, Hold Z and press + to start inputing the codes. If you want to clear the codes Hold Z and press -.
You will hear a confirmation when you do the combination to enter the codes, when you enter said codes, and when you clear them.
Enter the following code at the title screen: