Ramps board overshooting

Hello, I’ve got a ramps1.4 board paired with a mega 2560.
I got them from a 3d printer kit a bought a few years back.

it used to work fine until I tried installing Marlin 1.1.9 on it, I don’t know what happened but now when I try printing it tries to print everything out of the build volume, the x axis tries to move way more than it can often smashing into the edges of the x carriege I tried re installing the old Marlin version listed in the website and it does the same thing.

I have looked everywhere for information about this but I can’t find a thing.

Images here: https://drive.google.com/file/d/1jcJH1xpL0d_7E08Ovxbkznw5kcIAiDiY/view?usp=drivesdk

Do you have your steps/mm and directions set right in the firmware Configuration.h? If you send a 1mm X command, does it move close to 1mm and in the right direction?

Do you have all the jumpers under the stepper drivers?