At the level selection screen, hold down both the left and right shoulder buttons. You will get a screen with CODES top-right and space for upto eight characters. Use UP/DOWN to cycle the letters (A-Z, 0-9) and LEFT/RIGHT to select which letter. Press X when done.
LVLANY0 Turn access to any level off
LVLANY1 Turn access to any level on
INVINC0 Turn invincibility off
INVINC1 Turn invincibility on