Your roommate is the one who cannot possess or control a firearm; there is no legal prohibition against you having one just because of his felony. However, your roommate should be concerned as possession of a firearm is tricky when it is in the same residence but not owned by the felon as the immediate ability to obtain control might be considered possession. The safest bet is for the roommate not to live there, but short of that, if the roommate has no access to the firearm, for example if it is locked up somewhere and the roommate does not have the key, that should be sufficient. There may be many legal defenses that could be argued if your roommate gets charged with possession of a weapon by a previous offender due to being in a residence with your firearm, but I am sure he would prefer not to be in that position as it is a felony charge.
Notice: The information contained herein is intended as general legal information and does not create an attorney-client relationship and is not governed by confidentiality rules. This general legal information is not a substitute for seeking the direct advice of legal counsel.
You may legally own and possess a firearm. However, your roommate cannot and is at risk if there is a firearm in the residence.
If you want to exercise your rights with the least chance of your roommate getting in trouble, you should make sure that the weapon is not kept in the common areas of the residence. If you have separate bedrooms, it is probably best to keep the weapon in your bedroom. Even better if it is locked away and he cannot get to it (though that makes it less useful for personal defense).
The best solution would be not to live together - but if that isn't practical, the next best is to be careful so that it is harder for anyone to argue that he ever had access and control over the firearm.