Okay, there are a few possibilities.
First off, ensure that you are getting correct movement of the mechanics. Normally, if you use X+, as you are facing the machine, the print head should move to your right. If you use Y+ the print head should move away from you (Or the bed should move towards you.)
What you are describing seems to be opposite motion for the X axis, which will indeed flip your model.
Assuming that drive 0 is X, drive 1 is Y, drive 2 is Z, and that Y and Z are moving as expected...
Change that line to:M569 P0 S1 ; Drive 0 goes forwards
Then you need to change your homex.g and homeall.g files:
The following are mine, based on a printer that has the home switches at X=245mm, and Y axis=280mm
Note that this opposite for your Y axis, so you would change the homeall.g from this to send the head in the negative Y direction. You'll also want to change the size of the move to endstop according to the motion limits of your printer.
homex.g; homex.g ; called to home the X axis ; G91 ; relative positioning G1 Z5 F6000 S2 ; lift Z relative to current position G1 S1 X235 F1800 ; move quickly to X axis endstop and stop there (first pass) G1 X-5 F6000 ; go back a few mm G1 S1 X10 F360 ; move slowly to X axis endstop once more (second pass) G1 Z-5 F6000 S2 ; lower Z again G90 ; absolute positioning
homeall.g:; homeall.g ; called to home all axes ; G91 ; relative positioning G1 Z5 F6000 S2 ; lift Z relative to current position G1 S1 X245 Y280 F3000 ; move quickly to X and Y axis endstops and stop there (first pass) G1 X-5 Y-5 F6000 ; go back a few mm G1 S1 X10 Y10 F300 ; move slowly to X and Y axis endstops once more (second pass) G90 ; absolute positioning G1 X110 Y137.5 F3000 ; center print head G30 ; Use Z probe to home Z G1 X220 Y275 F3000 ; Go to axis maximums
edit: Mucked up the homeall.g. Oops, and @dc42 ninja'd it in,