I just noticed that it's possible to have cannon towers (wall defences of a Huge city) before the discovery of gunpowder.

I wonder how those worked?