Your Hard drive should be connected to IDE1 and your CD to IDE2. Both of these connectors have 40 pins. The floppy drive connects to the smaller connector which has 36 pins. Since your Hard drive and CD are the only devices on each of IDE1 and IDE2 then they should both be set to Master. If your IDE ribbon cables have more than 1 connector then a master device connects to the one at the end of the cable.