Hi willist, see:
http://www.dcc.info/standards_rps/rp922.html#_ftnref1 :thumb:
"Configuration Variable 29 Configurations Supported
Bit 0 = Locomotive Direction: "0" = normal, "1" = reversed. This bit
controls the locomotive's forward and backward direction in digital mode
only. Directional sensitive functions, such as headlights (FL and FR),
will also be reversed so that they line up with the locomotive’s new
forward direction. See RP-9.1.1 for more information."
Don't understand all I know about this, but note that the direction
is controlled by bit 0 only, don't mess with the other bits without
reading some more