Making a mds file

Can anyone point me to where i can learn to write my own mds files …or how to extract the mds data from the protected cd.
any help is appreciated…tinware:confused: