i have an afinia H479 that died. so, i replaced the motherboard with a Mega/RAMPS 1.4 setup. i have the same problem that one of the other posters had. when you home everything, the bed is at the bottom with Z=0, and the nozzle is up at around Z=125. the z-endstop is working perfectly, but it is at the bottom of the Z-axis, not the top, so the home position is at the bottom.
i see that someone solved the problem, but only inverting the Z-direction is mentioned here. it says there were 3 other settings changed to make this work. it would really help if those 3 settings were posted, otherwise i am going to have to duplicate the work and find them myself.