M818's have a short wheel base which limits the amount of space you have. Be sure to look at the width and length of the transmission, and how close the forward drive shaft is to the transmission. The M939's have the wider automatic transmission which use an offset carrier bearing to locate the drive shaft clear of the transmission. You would also have to relocate the transfercase rearward to accommodate the length of the 9 or 10 speed eaton. That runs into the issue of shortening the drive shaft. The rear drive shaft and u-joints can reach some extreme angles when the rear axles are at their max articulations. A shorter drive shaft, might not be able to accommodate the same angles as the longer drive shaft can. There are some old threads about this for m818's, and the eaton medium duty 6 speed transmissions have been brought up.