The Secret Under the Moat

Vanish Cap Under the Moat (called the Vanish Cap Switch Course in the message that appears upon the player first entering the course) is a secret course in Super Mario 64 that contains the Vanish Cap Switch. In order to access the course, Mario must drain the water in the moat of the Mushroom Castle by ground-pounding two certain pillars in the basement, then go outside through the newly exposed door. After he does so, there will be a hole in the drained moat by the waterfall that will warp him to the course.

In Super Mario 64 DS, the course was retitled The Secret Under the Moat, and the Cap Switch was removed. However, a second Power Star was added. Also, a Black Brick (in a rectangular shape, containing three coins) covers the entrance to the course, requiring only Wario's strength to enter. This is one of the three secret levels in the remake that only one certain character can access, the others being Chief Chilly Challenge for Luigi and Bowser in the Sky for Mario. There is a known glitch that, when performed, allows any character to enter the moat by going out of bounds at high speeds.

Layout
When Mario first enters the course, he is atop a large slide, with several ledges located scattered throughout. Upon entering, Mario is also Vanish Mario, though nothing happens to Wario in the DS remake. At the bottom of the slide is a path consisting of various moving and teetering platforms that lead to the Cap Switch. There are several Amps and Keronpa Balls on the path. Once Mario pushes the Vanish Cap Switch, all the blue blocks in the game become solid, making the Vanish Cap usable. If Mario falls, he will not lose a life, but he will come out of a gaping hole near the waterfall. In the DS version, if the player falls off, the same thing will happen, but the Black Brick will respawn.

Missions
There are two Power Stars to collect in this course, with one being exclusive to the DS remake.

8 Red Coins
There are eight Red Coins in the course. The first four are located on the slide's ledges at the start, while the other four can be found along the path to the Cap Switch. The Star Marker is inside a cage next to the Cap Switch, so after collecting the final Red Coin and pushing the switch, Mario has to don a Vanish Cap to pass through the cage and get the Power Star.

In the DS version, by collecting the Luigi Cap, Wario can use the Power Flower at the end of the course in lieu of a Vanish Cap and go through the cage to collect the Power Star.

Switch Star (DS only)
In the DS version, there is a new area across the chasm at the bottom of the slide. By turning into Mario, Wario can use a Power Flower to float over to the new area. By activating the Star Switch on the platform, the Power Star appears in the Star Sphere above. Wario can reach it either by floating upwards to it or by using Wall Kicks.