BRING the milk to the boil in a heavy pan and sprinkle in the semolina, stirring all the time to prevent lumps from forming. Season to taste with salt, and continue cooking, stirring constantly, for about 20 minutes, or until the mixture is very thick. Take the pan from the heat; beat in the egg yolks, 4 tablespoons (2 ounces) butter, and half the cheese.
MIX until well blended, then turn the mixture out on to a wet plate - or better still a marble slab and smooth out with a wet knife to a thickness of about 1/4 inch. Leave to cool completely - the longer it is left (within reason, naturally) the better.
PUT the meat into a small heavy pan with 4 tablespoons (2 ounces) butter and fry it slowly over a low heat, crumbling it with a fork When well browned, add the wine and continue cooking until reduced. Season to taste with salt and pepper, moisten with a little water, cover the pan and continue cooking slowly for about 30 minutes.
CUT the cold semolina into rounds about 2 inches in diameter - this is most easily done - with a lightly floured cutter or juice glass. Grease a round ovenproof dish with butter and cover the bottom with a layer of semolina rounds. Spread with a layer of the warm meat sauce, then cover with 2 or 3 slices of ham, and sprinkle with tomato sauce and grated cheese. Continue in this manner until all the ingredients are used up, leaving aside 2 or 3 tablespoons of grated cheese, and finishing with a layer of semolina rounds. Dot with butter and sprinkle with the remaining cheese. Bake in a slow oven (325 degrees F.) for 30 minutes, or until the top is a golden brown color, and serve with plenty of additional grated Parmesan or Pecorino.