EDIT: I later discovered that plugging the 8pin decoder plug the other way around would have solved both the direction and lighting problems, and saved me a lot of programming. Flipping the plug around reverses the polarity to both the track and the motor, and swaps the front and rear lights. Oh well at least now I know that for next time.
Digitrax CV calculator: https://www.digitrax.com/support/cv/c...
Exploded diagram:
https://www.bachmanntrains.com/homeu...
Replacement motor blocks with 5pole motors (while supplies last):
Low boiler version: https://estore.bachmanntrains.com/ind...
High boiler version: https://estore.bachmanntrains.com/ind...