After you have gotten the 120 stars, shoot yourself to the top of the castle. Now, get the winged hat and jump back down, as close to the cannon as you can. Be sure not to get hurt, or to get healed really quickly, because this glitch takes about half of your life. Now, jump into the cannon and shoot yourself as high as you can go. Now, fly over to the castle, to the high small red area close to the peak of the castle. Land on this area and try running or jumping through the wall. Be careful not to fall backwards. You will quickly go through the wall and fall down to inside the walls of the castle, to where you can use the door, but you are not actually in the castle or the outdoors. To exit, walk through the wall on the castle side, or backflip out of it on the castle side.