I woke up this morning with a strange thought - where did Matthew Flinders cat, Trim, do his business?
On a small boat, and remember that before the mid nineteenth century a lot of ships were small, a ship's cat must have had to have somewhere to go.
Googling doesn't help - all one gets is articles about cute cats, and pictures of happy naval cats in little cat hammocks, nothing about nineteenth century litter boxes.
My guess is that the cats must have been provided with an enclosed wooden box filled with wood shavings or something similar - enclosed as one does not really want cat poo being flung about when the ship was rolling in a storm, and wood shavings, or perhaps straw from the packing around bottles and jars because it would have been disposable. But I'm guessing...