What do Lord of the Rings and Game of Thrones have in common?
[Twenty Hours Later...]
OK, yes, I agree, but I'm specifically thinking about counter-battery positions located on medieval-era castle towers/walls. This is a fantasy convention i have seen and read in many places, but oddly I have never found a real-world reference for, written or otherwise. I also can't seem to find anything to say it never happened.
Obviously it's more dramatic to show the defenders working from the walls to beat back a siege rather than firing from inside the city/fortress over them, but is there any historical basis for this idea? I am specifically thinking of the European defensive structures, but relevant information from any nation or time period would be welcome!
Both were used: artillery on walls and towers, and artillery placed on the ground behind the wall. Usual practice appears to have been to only place light artillery in/on towers and walls, and heavy artillery was always(?) on the ground behind the walls. In this case, "light artillery" would range from siege crossbows and springalds (which could be place inside towers to shoot through windows) through ballistae up to traction trebuchets.
Heavy artillery would include counter-weight trebuchets and large traction trebuchets.
There were multiple reasons to keep heavy artillery on the ground:
The machines are big and heavy, and they would need a very thick and strong wall or tower to support them.
Heavy artillery combines a slow rate of fire with being a large and attractive target for enemy artillery (and given the large crews, also for archers and crossbowmen). It is safer to hide heavy artillery behind the walls where it cannot be seen.
Heavy artillery, with a long range, on gains a modest benefit from being elevated. Given a counterweight trebuchet with a maximum range of about 250m, the difference in range between being on the walls or being the walls is about 20m if the wall is about 10m high (i.e., about twice the height of the wall, because the wall adds about its height to the range, and being behind the wall means the trebuchet has to be about the wall's height further back). For a smaller traction trebuchet with a range of about 70m, 20m is a very large difference in range, but for the longer-ranged one, it can be less than a 10% difference in range.
While defensive artillery on the ground behind a wall has the benefit of being hidden from sight, the attackers artillery usually lacks concealment and is more vulnerable. Of course, the ground-placed defensive artillery uses observers on the walls for correcting aim.
Finally, some fortresses provide the advantage of elevation even when defending artillery is ground-placed, through being located on a hilltop.
This general practice appears to have been the case in Europe, in the Near East, and in China.
The Near Eastern case, with some discussion of Europe as well, is presented by Michael S. Fulton, Artillery in the Era of the Crusades: Siege Warfare and the Development of Trebuchet Technology, Brill, 2018.
The Chinese case is briefly discussed in Needham's Science and Civilisation in China, in Volume 5 Part 6, Military Technology: Missiles and Sieges, 1994.
The ancient Greek case is discussed in Josiah Ober, "Early Artillery Towers: Messenia, Boiotia, Attica, Megarid", American Journal of Archaeology 91(4), 569-604 (1987): http://www.jstor.com/stable/505291 (no heavy artillery here!)
According to Fulton, there are multiple examples in Medieval art showing traction trebuchets on towers, and very few example of counterweight trebuchets so placed. Alas, at first search, I didn't find any examples of either type, and if anybody knows of some, they would be a nice addition.