I think the file 4fold you mentioned collects columns of the alignment which are decided to be four fold degenerate. You can make up a small dataset and test. You can then analyze this file using baseml to estimate the distances etc. codeml also has an ML method for estimating d4 between two sequences. It is perhaps turned on only if runmode = -2 and the output may be on the monitor and not in the output file.
The details are described on pages 63-64 of my book (yang 2006).
I did not distinguish transitions and transversions at the 4-fold sites, so perhaps it is not what you want after all.
Ziheng