Not 100% sure but all the later DT1's through to DT3 and RT1 - RT3 had the same gearbox but the DT250-360 are different but some gears interchange. The DT1 MX had close ratio version of the same box and probably the DT2MX had the close ratio box but these would be near impossible to find. The YZ250-360 A and B shared the same crankcase as the DT so would probably fit and I've been told some of the MX250 gears will fit on the shafts but not the entire box. The early DT1's up to late 1969 had a different selector and may not fit the later cases.
Hopefully the is a Yamaha tragic out there with more knowledge than me but I would think you have more chance of getting a used DT1-3, RT1-3 box than any of the YZ or MX models as there was a lot more sold but then a lot more have gone to land fill.