King James II, the husband of his niece, in 1457. The gun rests on a reconstructed carriage, the details of which were copied from an old stone relief that can be seen inside the tunnel of the Gatehouse at the castle entrance. Some of Meg's large gun stones, weighing around each, are displayed alongside it. On 3 July 1558, it was fired in salute to celebrate the marriage of Mary, Queen of Scots, to the French dauphin, François II. The royal Treasurer's Accounts of the time record a payment to soldiers for retrieving one of her stones from Wardie Muir near the Firth of Forth, fully from the castle. The gun has been defunct since its barrel burst while firing a salute to greet the Duke of Albany, the future King James VII and II, on his arrival in Edinburgh on 30 October 1681. Half Moon Battery and David's Tower The Half Moon Battery, which remains a prominent feature on the east side of the castle, was built as part of the reconstruction works supervised by the Regent Morton, and was erected between 1573 and 1588. The Forewall to the north was built between 1689 and 1695 to link the Half Moon to the Portcullis Tower, although part of the original wall of 1540 was incorporated into it. The Half Moon Battery was built around and over the ruins of David's Tower, two storeys of which survive beneath, with windows facing out onto the interior wall of the battery. David's Tower was built on an L-plan, the main block being , with a wing measuring to the west. The entrance was via a pointed-arched doorway in the inner angle, although in the 16th century this was filled in to make the tower a solid rectangle. Prior to the Lang Siege, the tower was recorded as being high, and the remaining portions stand up to from the rock. The tower was rediscovered during routine maintenance work in 1912, and excavations below the Half Moon Battery revealed the extent of the surviving buildings. Several rooms are accessible to the public, although the lower parts are generally closed. Outside the tower, but within the battery, is a three-storey room, where large portions of the exterior wall of the tower are still visible, showing shattered masonry caused by the bombardment of 1573. Beside the tower, a section of the former curtain wall was discovered,