Ok marlin is fine on ramps 1.2. You have to define motherboard as #define MOTHERBOARD BOARD_RAMPS_OLD. I commented out #define PREVENT_DANGEROUS_EXTRUDE and #define PREVENT_LENGTHY_EXTRUDE. Finally I se t#define TEMP_SENSOR_0 0 to 0 instead of -1. This disables the thermal sensors.
After I did all that it works as expected.
I am using a delta configuration and that automatically disables endstops.