Genesis of magmatic sulfide deposits