There is a cannon just outside of the castle in Super Mario Word 64 but it's locked ! It is near the water, on the beach. Can I get access to it ? If so, how ?
I believe you're talking about the cannon outside the castle in Super Mario 64 - this cannon will launch you up to a secret area, but only if you've got all 120 stars.
For getting all the stars and accessing this secret cannon: