Thanks for the warm welcome guys, i wish my first post here was something more enjoyable but i'll get the Ghibli back on the road soon enough. May the guy that sold me the car have bad automotive karma for the next 5 years, as i'm sure he was aware of the problem, but anyway, the car is in very nice condition otherwise... caveat emptor as they say...
Yes I would imagine you would be looking at a figure of at least 4000 euros to have a second hand replacement engine sent to you, then it would be an idea to change the timing chains, timing belt plus waterpump and clutch etc before installing into your car.
I can't really answer the question about the gearbox, I have seen a 6 speed fitted to an early 2.8 so I would imagine that it may be possible to fit the 5 speed to the later engine but don't quote me on that. There were some clutch revisions to late Ghibli GTs and the Quattroporte which used an uprated Voith friction plate but I imagine the mounting points for the gearbox onto the rear of the engine will be the same.
Who provided you with the diagnosis and has this been done with the engine removed? What are the symptoms? It might be worth making further investigations before writing your existing engine off, it will have to come out whether you are fixing it or replacing it, so while its on the bench it might be worth taking the heads off and having a look. You never know the damage may be minor and you may save yourself a huge bill, or if it does turn out to be terminal, at least you will know that a minor additional outlay has led to you making the right decision.
When i get the engine out i will most likely take the heads off and have a look but for now i tend to agree with the diagnosis without opening the engine.
When the oil is fully up to temperature (this is why i didn't hear it on the test drive), there is a metallic tapping / knocking noise most evident with light throttle above 2500RPM, which gets louder the higher the RPM (still light throttle), also the noise is sometimes there when you let off the throttle, but if you stick your foot into it, or are engine braking under load the noise is virtually gone, as the connecting rod is loading up the pin. It really is classic symptoms of a worn gudgeon pin... at first i hoped it was a stuck lifter, but the noise is deeper in the engine, and after a few test drives i think it's gettign worse, it almost sounds like a diesel at certain points!!! No more driving it for now, not worth the risk, i don't want metallic shrapnel through the turbos if a rod lets go.
Anyway, i could never sell a car with a problem like this to someone else so i'm stuck with fixing it, but luckily it is a very nice car otherwise, so it will be worth fixing it and i'm looking forward to driving it again!