Alunar m508 Firmware I have a Alunar M508 machine that I am trying to get new firmware on. The firmware that was loaded on the machine wasn't very good. The x axis was mirrored and the home point was way off. I was looking into Marlin to put on the machine, but don't have any experience on what to edit in the code to make it work for this machine. 

Does anyone have any experience with this machine? Uploading new firmware that works or editing the code to make it work for this machine. I appreciate any help!

Here is a link to the firmware I am currently using. I'm on MacOS Sierra 10.12.5 using the 1.6.8 Arduino IDE.
The Alunar firmware you linked is a fork from the main Marlin firmware. If the bed Y direction is reversed, usually the stepper is incorrectly placed (mirrored) this is seen frequently for the Anet A8 printer which is very similar to your printer. In your case the X direction is wrong, this is usually related to the wiring of the stepper, reversing the connector by 180 degrees should do the trick (hardware solution). As a software solution, changing direction is not difficult in Marlin based firmware; you just want to invert the stepper direction; the following section in the configuration.h file does that for you:

// Invert the stepper direction. Change (or reverse the motor connector) if an axis goes the wrong way.
#define INVERT_X_DIR false
#define INVERT_Y_DIR false
#define INVERT_Z_DIR true


Just change INVERT_X_DIR to true.

If your home position is still not working for you, you should look into this section of the same configuration file:

// Travel limits (mm) after homing, corresponding to endstop positions.
#define X_MIN_POS -33
#define Y_MIN_POS -10
#define Z_MIN_POS 0
#define X_MAX_POS X_BED_SIZE
#define Y_MAX_POS Y_BED_SIZE
#define Z_MAX_POS 240


Change the MIN_POS positions as such that it starts at the corner of the bed. A more in depth bed center calibration tutorial can be found here.



P.S. Please do not print anti-wobble caps for the Z-axis rods (as mentioned in another answer), these are not reducing the wobble, in fact they cause problems. What happens if you constrain the top is that you get a statically indeterminate construction; forces and displacements are not predictable! Better solutions to eliminate Z-wobble are lifting devices that decouple X/Y movement from the threaded rod (eccentricity of the threaded rod) from the Z movement. Also fixate the threaded rod above the springy stepper-to-threaded-rod coupler.