A mirrored print usually means that you have one axis moving in the wrong direction.
X- should move left. X+ should move right.
Y- should move to the front, Y+ should move to the back.
With that set, you define your endstops based on their physical position at the high or low end of the axis in M574.
Then you must change your homing moves to move towards the endstop.
This should place 0,0 at the front left corner which matches what slicers use. Now what you see in the slicer should match what you see on the printer.