Thomas,
the datasheet for the MKS Gen L is here:
https://github.com/makerbase-mks/Datasheet/blob/master/English%20datasheet/MKS%20Gen_L%20DataSheet.pdfthis is the pinmap used by another TC project:
// Pins to Axis1 RA/Azm on RAMPS X
#define Axis1DirPin 55 // Pin A1 (Dir)
#define Axis1DirBit 1 //
#define Axis1DirPORT PORTF //
#define Axis1StepPin 54 // Pin A0 (Step)
#define Axis1StepBit 0 //
#define Axis1StepPORT PORTF //
#define Axis1_HOME 20 // Pin 20 (Home sw)
#define Axis1_Aux Aux1 // Pin 29 (ESP8266 GPIO0 or SPI MISO)
#define Axis1_M2 27 // Pin 27 (Microstep Mode 2 or SPI CS)
#define Axis1_M1 25 // Pin 25 (Microstep Mode 1 or SPI SCK)
#define Axis1_M0 23 // Pin 23 (Microstep Mode 0 or SPI MOSI)
#define Axis1_EN 38 // Pin 38 (Enable)
// Pins to Axis2 Dec/Alt on RAMPS Y
#define Axis2DirPin 61 // Pin A7 (Dir)
#define Axis2DirBit 7 //
#define Axis2DirPORT PORTF //
#define Axis2StepPin 60 // Pin A6 (Step)
#define Axis2StepBit 6 //
#define Axis2StepPORT PORTF //
#define Axis2_HOME 21 // Pin 21 (Home sw)
#define Axis2_Aux Aux2 // Pin 37 (ESP8266 RST or SPI MISO)
#define Axis2_M2 35 // Pin 35 (Microstep Mode 2 or SPI CS)
#define Axis2_M1 33 // Pin 33 (Microstep Mode 1 or SPI SCK)
#define Axis2_M0 31 // Pin 31 (Microstep Mode 0 or SPI MOSI)
#define Axis2_EN 56 // Pin A2 (Enable)
I can help betatest this if you are doing the change.
Markus