First, you need to expose the ground wire from the hacked VGA cable. Use a multimeter to check if the vga cable's Hor and Vert wires are + or - relative to that ground wire. Then hook up the r,g,b,gnd as you'd expect, and the Hor and Vert to either the + set of inputs, or - set of inputs.