Pause the game and press Select 16 times. If done correctly a flashing box should appear around the coin icon. Hold A + B and press Left or Right to edit the numbers for lives, coins, hearts, or time by pushing Up or Down. If you put the flashing box over Wario's head icon and press Up or Start your helmet will upgrade. Press Start to go back to the game.
Thanks to Revolution readers Matthew S., Peter van Elburg Boddendijk, Jonathan Dennis, Sebastian Keimel, Nobody, Devil, and Ruud Volkers!