Basically in [1363 a toilet is] a hole through the floor of the castle going into a deep shaft to a cave. Step by step it got less gross than that--though most of those ideas were developed elsewhere and eventually spread to Ireland rather than developing there. At one point the idea was to have rooms with holes hanging over the moat. Eventually this led to open sewers--basically storm drains, and then with running water and pressurized pipes, actual honest to goodness closed sewers with flush toilets.
If you would like more information please check out these links!