All perfect praise be to Allah, The Lord of the Worlds. I testify that there is none worthy of worship except Allah, and that Muhammad is His slave and Messenger.
We would like to thank you for your trust and for sending your question to us, acting upon the Divine command (which means): {So ask the people of the message if you do not know.} [Quran 16:43] We ask Allah, The Exalted, to bless you and us with beneficial knowledge and guide us to performing righteous deeds.
In general, if the parents need someone to take care of them, then it is obligatory on their children (sons and daughters) to do so, each according to his or her ability.
You referred to the fact that an illegitimate child does not inherit his father. This is the opinion of the majority of scholars. There is another opinion suggesting that if the adulterer acknowledged the paternity of the illegitimate child, the relevant Sharee‘ah provisions of filiation like inheritance are established. The child would be attributed to him and the mutual right to inheritance would be established. This scholarly view is strong and considerable (carries authoritative weight). If your father did not acknowledge paternity and you are not attributed to him, it is not obligatory on you to take care of him. If you choose to take care of him, while observing the Sharee‘ah provisions governing your interactions because he would not be among your Mahrams, it counts as a righteous deed that brings you close to Allah and you would get great reward for it.
As for your mother, you are obliged to take care of her in all cases.
Allah knows best.