Isn't that just a function on the load the computer requires and the rating of the power brick?It shouldn't be software...If you're asking, you're not qualified. I do a lot DIY stuff and I don't go onto some random forum asking people if it's possible; even I'm not very qualified. I've fried a lot of stuff, including myself.
In answering your question, the MagSafe charger is self sensing. Assuming you have the 85W adapter, it can provide 45W, 60W, or 85W based on if you have a MacBook Air, 13" MacBook [Pro], or a 15" and 17" MacBook Pro, respectively.
I have made many power adapters in the past and it really is just knowing the wires. It's not hard