Mainframe is perhaps one of the hardest levels in the entire 00 column, thanks to the homing turret commanding the entire level, various patrolling zap drones, gauss turrets, and that accursed doorswitch chamber designed to lead you around the entire level dodging all those threats. This level is so named because it resembles a giant brain, specifically, Mother Brain, from the Metroid series. Planet Zebes's "mainframe"
Method 1 (Easy)
Drop down, get the gold, and hit the left switch. Then jump above the homing turret and the bounceblock to hit the switch behind the door you just opened. Wait for any zap drone to pass, then get out and climb to the top.
At the top, enter the door you just opened. Here comes the difficult part. Enter the section, hitting the switch, and as you drop down to that 45 degree slope, jump and hit the terminal. However, you need to time that jump to also avoid any newly fired rocket. If you dodged the rocket, simply fall out and run out the left and to the bottom, completing the level.
You could return to the top to snatch more gold, but the last level is stocked with gold, so it is not worth the risk.
Method 2 (Speed)
This walkthrough is the express version, allowing you to finish the level while only opening the doorswitch and ONE switch. Beats the hell out of opening 6 switches and running around this hell of the level with missiles and Drones chasing you, if you ask me.
There is one not-so-simple move involved, but it still isn't difficult and anyone should be able to do it. The first step is to reach the RED CROSS marked on the map: the neon green path shows 2 possible ways of doing it. Once you reach the red cross, ensure that no rockets are already fired (shake off any that are following you) and the area is clear of Seeker Drones before proceeding to the critical step.
Now, follow the olive green path, using the slope as a booster to boost you straight into the doorswitch chamber. At the green cross on the next slope, jump on it again to boost you straight into the right switch and into the locked door "ceiling". The rocket should be a very pending threat now. Here's the move: as you hit the "ceiling", where I marked with a pink cross, press jump. If you timed it correctly, you would get boosted downwards. Hug the right wall, but don't get stuck on the wall/wallhug (so, just stay as close to the right wall as possible while falling, but don't stick to the wall). The rocket should pass right above your head and explode harmlessly. The map doesn't show it clearly, but you should follow the pink path back down, use the green cross slope to grab the doorswitch (not shown on map, but should be obvious enough), and drop outside the accursed chamber into (relative) open space and (relative) freedom. From that, it's a simple move of following the pink path to the exit.