Pete.....just relate back to your real life version.......
1) think of the turret as a box on deck level with the ordinace [barrel] protruding or sticking out
2) imagine the magazine as a cylinderical device attached to & on axis with the turret, but lower down in the bowels of the vessel
3) it is a simple task to motorise the magazine as offered by other members
One point of consideration..........

...you only intend to have a 180 degree of arc of fire

......most A, B, X or Y turrets would have approx 225 degrees A of F ....after all.... the limitation is simply to ensure some

sailor dosn't shoot the bridge or aft smoke stack

This subject has a previous thread.....try a search..........Derek