Involved in the biosynthesis of the yellow-orange carotenoid staphyloxanthin, which plays a role in the virulence via its protective function against oxidative stress. Catalyzes the head-to-head condensation of two molecules of farnesyl diphosphate (FPP) into the colorless C(30) carotenoid 4,4'-diapophytoene (dehydrosqualene). 2 (2E,6E)-farnesyl diphosphate = 15-cis-4,4'-diapophytoene + 2 diphosphate Binds 2 Mg(2+) ions per subunit. Carotenoid biosynthesis; staphyloxanthin biosynthesis; staphyloxanthin from farnesyl diphosphate: step 1/5. CrtM is not functional in a C(40) pathway, however independent mutations on Phe-26, Trp-38 or Glu-180 are sufficient to permit the synthesis of C(40) carotenoids, such as lycopene and 3,4,3',4'-tetrahydrolycopene, although there is a decrease in the synthesis of C(30) compounds. The combination of mutations at Phe-26 and Trp-38 appears to be harmful for the general performance of the enzyme. Upon coexpression with Erwinia geranylgeranyldiphosphate (GGDP) synthase, CrtM produces novel carotenoids with the asymmetrical C(35) backbone, such as 4-apophytoene, and the production of the natural product 4,4'-diapophytoene drops dramatically. Belongs to the phytoene/squalene synthase family. CrtM subfamily.