Spoiler'd just in case someone wants to find out for themselves.
Jump to the right wall as you fall down the corridor just before you get the bad ending and complete the rest from there
Collect all secret items and go up the roof just before you get the confused ending. Then continue for the rest of the game
Decided i'd word this a bit better.
Confused Ending
Collect all the secret items and hit all the switches, in the room where geezerbot tells you to ignore the hole in the ceiling, climb up there and begin stage 10. Please note you can tell where the secret items are when the text glitches out.
Good Ending
After stage 10 shoot the crates on the left and pick up a screw driver, go into the elevator and unscrew the elevator panel and remove the panel to find a "?" button, press the button and there you go, straight forward from there.