RAMPS 1.4, 1.5, 1.6 (but not 1.6+)
OnStep can use different pinmap designs and support for these Arduino Mega2560 + Ramps1.4 compatible models is in Config.h file as PINMAP Ramps14.
Please read the RAMPS 1.4 WiKi for more information, especially about safety and limitations, and schematics that detail how the various pins are wired.
The graphic shown below is based on a RAMPS 1.6 design but I see no case where connections shown differ from the RAMPS 1.4 or 1.5, so it applies to all of these. If the image below seems small right-click on it and open just the image (in a new tab for instance.)