The best way to set this up is:
Primary Master: Hard Drive 1
Primary slave: CDROM
Secondary Master: Hard Drive 2
Secondary slave: CDRW
The reason for this is that with this config you can do CDROM --> CDRW copies on the fly & HD1 to CDRW at full speed.
As the IDE bus is only 1/2 duplex you can only either read or write to a each port at the same time, but not to the same port. So reading from primary CD or HD --> writing to secondary CDR will work at full speed, whereas if you have the CDROM & CDRW on the same port it will not be very reliable at high speeds because it has to read a bit of data then write a bit & so on.