You must be on the menu screen that looks like you are on the bridge of the Excelsior to enter the following codes.
When you do, a text response will appear in the top right corner of the menu to confirm correct code entry.
Level Select
Press Black, R, L, B, X, L, R, Y, White at the bridge screen.
All Ships
Press Black, L, X, L, X, R(2), B, White at the bridge screen.
Invincibility
Press Black, L, B, L, R, Y(2), B, White at the bridge screen.
All Medals And Ranks
Press Black, L, R, L, B, R, Y, L, White at the bridge screen.
Kobayashi Maru Difficulty Setting
Press Black, L, Y, L(2), X, Y, R, White at the bridge screen.
Destroying Starships
When you intercept a starship and are having trouble destroying it, fly up behind it. They all have phasers on the back, so pull up beside an engine. Concentrate your fire on that engine. If done correctly, you will not get hit while destroying the starship.
Attacking The Orions
When attacking the Orions, you do not have to destroy both Orion starships. Just disable the shields on each ship, and they should warp out of there.
Shoot Antenna
When you shoot the antenna array (blue sphere) on top of the space station they will no longer send in reinforcements. This is in level 3 renegade.