Super Mario 64/Bowser in the Dark World

To enter Bowser In the Dark World, you must have 8 stars (12 in the DS version). In the main room of the castle, go up the stairs and to the left. Go through the Star Door and run down the long hallway until you drop through a trap door, which leads to the Dark World. Upon it's completion Mario will earn the key to the basement.

Reaching Bowser
Mario will drop into the Dark World, and a message will appear from Bowser. (There is a space for the Metal Cap box, but at this point the box should not appear.) Begin by running or jumping over the narrow walkway, and then avoid the flames being shot over the purple switch. Avoid the switch for now, and jump onto one of the moving platforms ahead (or long jump across the whole gap), which will take you to the other side. Run up the incline ahead (on the right), avoid the flames, and run up the next ramp going the other way, collecting the coins as you go up. Wait until one of the moving platforms to become just below the level Mario is at, and then jump onto it. Ride it to the other side and jump off. Avoiding the Goombas, run up the small bridge to the green walkway. Stay clear of the Amps spinning around the crystals.

When you reach the end of the walkway, wait until the orange platform sticks out enough to be able to jump on it. Jump onto it and then jump onto the center platform and collect the coins in the item box. Wait until the orange platform sticks out enough to reach the next gray platform, then jump onto it and then jump onto the grey platform. (An easier way is to just long jump from the center platform to the next gray one.) Jump onto a moving platform, then when it connect with the next pair of platforms, jump onto one of them. Ride the platform to the next gray platform with a Goomba on it. Jump onto the blue platform in front, and, making sure it doesn't tilt too far, do a double jump onto the next one. Run to the end of the next one and single jump onto the gray platform with the Goombas below. Run up to the pieces of wood on the right and single jump onto each of them to get up to the platform with the purple switch. Press the switch to make the checkered floor turn into stairs, then jump up the stairs and jump into the pipe on the top to get to Bowser.

Red Coins

 * 1) The first red coin is located in midair on the right of the platform you start out on. To get it, press the purple switch under the flames that you avoided in the normal route to make a couple of boxes appear under it. Run back to the platform you started on and grab the coin before the boxes disappear.
 * 2) The second red coin is right where the purple switch is. To get it, press the switch, and a box will appear under that coin. Run over and get it before the box disappears, avoiding the fire as you do so.
 * 3) The third red coin is located on the green walkway with the spinning electric spheres. Simply walk over to it and pick it up.
 * 4) The fourth red coin is where the moving orange platform at the end of the green walkway is. After you get to the center gray platform, drop down to the orange platform when it is behind it to get the coin.
 * 5) The fifth red coin is where the moving platforms are after the orange platform. At the first pair of platforms, jump on one and ride on it until you touch the red coin.
 * 6) The sixth red coin is located at at place not on the normal route. When you get up to the gray platform before the tilting blue platforms, turn around to find a small, narrow blue walkway leading to a circular platform. Walk on the blue walkway until you get to the platform, where the red coin is.
 * 7) The seventh red coin is on one of the pink platforms hanging above the blue tilting ones. Get to the side with the purple switch, then turn around. Jump onto the first blue tilting platform and double jump at the very end of it to grab onto one of the pink platforms. Then do a single jump to get to the one with the red coin.
 * 8) The eight red coin is a bit tricky. It is in a crack on the side where all the pink platforms are connected to. To get it, get to the gray platform on the side of the switch with the two goombas. Turn around and face the beginning of the level. Walk to the extreme right and inch your way towards the small space that leads to the gap where the red coin is. Walk along the pink wall until you get to the gap, and collect the coin.

Switch Star (Nintendo DS)
The Star Switch is located at the very end of the level, next to the pipe. Press it down, and the star will appear next to where the seventh red coin was. Run quickly, long jump over the platforms, break the Star Sphere and collect the star.

100 Coins Star? Nope.
It is not possible to get 100 coins in this level; by my latest count there are only 80 coins to be found here.

Defeating Bowser
After Bowser gives his little speech, run around him in circles until he stops. Walk up to his tail and press to grab on. Rotate the control stick to swing him around. When you think he's aimed at a bomb, press to let go. If Bowser hits a bomb, you win, and you get the key to the basement! If not, repeat until he hits a bomb.