I haven't done it yet, but you're supposed to collect all 120 stars. After that, the Canon should be open. Also, you're talking about Super Mario 64 right, because that's the only "canon outside the castle" I know of. Anyway, there you go.
it is not stars it is a world
Get 63 shine sprites, there are actually 64 shine sprites but that last one, you can only get it if you've had the cannon open, because it leads you to the shine sprite if you use it.
By getting a cannon or by winning the fifth castle and then the sixth castle.
Get all 150 stars
You open the cannon by getting 120 stars. After you've gotten 120 stars, you can go outside and fire the cannon. You do not need to find a Bob-omb buddy.
it is not stars it is a world
Collect all 120 stars.
Im not sure but I think you have to get all 150 power stars.
You go to the midway castle
Get 63 shine sprites, there are actually 64 shine sprites but that last one, you can only get it if you've had the cannon open, because it leads you to the shine sprite if you use it.
get all the stars to unlock the cannon
you need all the stars,in this case a 150 stars then you go outside the castle the cannon will open and you can shoot yourself onto the castle roof were a wing cap,3 1ups,and yoshi.
By getting a cannon or by winning the fifth castle and then the sixth castle.
Get all 150 stars
After collecting all 120 stars, a cannon will appear outside of the castle. Use this cannon to blast yourself to the top of the castle. At the top of the castle, you'll find Yoshi, who will give you 100 extra lives.
You open the cannon by getting 120 stars. After you've gotten 120 stars, you can go outside and fire the cannon. You do not need to find a Bob-omb buddy.
You need to get 242.