(from trains.com)
"If you put it in the wrng way, it won't smoke the decoder . The wiring for the 8 pin plug is designed so that if you put it in backwards, the only thing that will happen is the loco will run in reverse - ie, you hit forward on the DCC controller, and the loco runs backwards, and vice-versa.
There should be a mark near Pin 1, a dot, a different shape of the pad, etc. Pin 1 is the orange wire."
(also from trains.com)
The wiring code is:
Pin#1-Orange-+ motor lead
Pin#2-Yellow-Rear light
Pin#3-not used
Pin#4-Black-left rail pickup
Pin#5-Grey-- motor lead
Pin#6-White-Front light
Pin#7-Blue-light common
Pin#8-Red-right rail pickup