As pictured its two coils
One coil goes on pins 1 and 2 (2b and 2a) and the second coil to pins 3 and 4 (1a 1b)
With 4 wire steppers it doesnt matter wich end of the coil goes to what pin, so long as both coil ends are togeather on the left or the right two pins.
The motor direction is just reversed, wich you can fix in firmware, or just flip the entire plug around 180 degrees.
So in your case swap black and red wil fix it.
Edited 3 time(s). Last edit at 05/02/2015 04:31AM by Dust.