General guidelines about copyright are you can pretty much do whatever you want for your own use. It's when you try to market it that you get in trouble. You can (and several have) retrieve all the DCS codes and do some programming yourself. You could even publish a paper with the codes and discuss how they are used. But when you try to sell "Bob's Train House DCS Controller" you are probably going to have an issue.
So far the only person known to have legal rights to market a DCS third party product is Hikel O Gauge, however even the status of that project is unknown at this time.