-
some 166-190 million years ago, early mammals and marsupials evolved based upon a new sex determination system - the XY system which has been retained in all eutherian mammals since then (although some rodents have lost the Y chromosome as the Y chromosome tends to degrade over time)
the SOX9 and most of the other genes required for gonadogenesis are autosomal - the SOX9 gene has been highly conserved in all vertebrates and in some is the sex determining factor
the gene DMRT1 is used by birds as their sex determination locus
the immediate ancestors of mammals had a SOX3 gene which eventually evolved 166-190mya to be located on the X chromosome while the Y chromosome was just a degraded copy of this X chromosome and the SOX3 then evolved to become SRY - this created the XY sex chromosomes that created the evolutionary divergence of the therian mammals
SOX3 is normally expressed in the central nervous system and in germ cells, but not in the somatic cells of the testis, so it has no normal role in sex determination but it is thought that SRY arose by a simple rearrangement that truncated SOX3 on the Y chromosome and substituted a promotor that drove its expression into the genital ridge.
while marsupials only had the ancient X and Y genes, the next step in evolution which created the eutherian mammals was the addition of a number of autosomal genes onto the X chromosome (and thus also the degraded Y chromosome)
NB. eutherian mammals are ALL mammals except for metatheurians (eg. marsupials) and monotremes (eg. platypus and echidna) and along with this new chromosomal structure came additional features:
a corpus callosum
a higher metabolic rate with a body temperature of 37degC (cw 35degC in marsupials and 31degC in monotremes)
nipples for lactation (present in marsupials but only as skin ducts in monotremes)
no longer egg laying as with monotremes or their predecessors which had reptilian/bird like sex determination genes