I have to disappoint, but the short answer is you cannot.
The only way you can start the business on H1b visa is to invest money in someone else's company. You will not be able to provide any services to that business (even unpaid ones) as it would be a direct violation of your H1b status.
Our immigration legislation is ultimately retarded in that way. The entire premise of the H1b visa is that you are a guest worker, typically here for couple years and therefore you are not allowed to be involved in anything else, but working on your prospective employer. It allows however the for the concept of "dual purpose", meaning that you are technically allowed to also seek an employer-based permanent residence (aka "green card") status. This however requires you to find some other employer (or the same one that petitioned for your H1b) to petition for your green card and hire you on "permanent" basis. You are also explicitly prohibited of starting you own company and filing the green card petition on your behalf. You cannot even own any significant share in that employer. After your green card petition is granted you still have to work for the employer who files it for you for some substantial amount of time to indicate you that you indeed intended for a "permanent" employment there (usually a year is considered safe).
So, my recommendation would be to get your green card first, stay at your job for at least a year and than start the software business of your own.
This is obviously a total nonsense from the policy perspective and there are some pieces of legislation in the Congress at the moment attempting to address this issue by creating s special class of "Founders" visas, but given the current climate in said congress I wouldn't hold my breath for it to pass any time soon unfortunately :(
So the only good option you would have at this point is to try to get your green card as quickly as possible...