It sounds like your co-founder is extremely strong willed. This can make for a good trait if used well. On the flip side these people are not fun to work with.
Who do you think would be more successful with the code?
How can you generate value from your work?
Can you opensource the code?
And then both of you can use it, and fork it? Most likely if you are a coder, having a well developed opensource project will do wonders for you being able to find your next role. And if you decide to start a company from the code via a fork, you could actually sell it because you are the original author, and you could dual license it. Since the code was not work for hire and there were no legal contracts as to the nature of the code you could probably do this. Get a lawyers advice.Also since you are the developer behind the code base you can probably fork the code faster than your friend.
If your friend wants to buy the code from you, maybe you can do a rev share deal with your code and his business. There would be terms to transfer the IP, but I am sure you can figure that out if you need. In this case the code would stay private, and you would still have authorship rights to it, but he would have a rev share license to use and to derive from it.
I strongly thing that anyone that has asked you to throw out 6 months worth of work is giving bad advice, but this is a difficult situation and you can't expect maximum value out of this.
Your goal should be
- get something for your time
- part ways with this founder
- leverage this experience and code base to find a new oppertunity
http://books.google.com/books?id=l3GD2EgazCkC&q=retreat+...page 48 Sun Tzu - Without a way to retreat, an army fights with double or triple the spirit it would have on open terrain, because death is viscerally present.
If you offer your enemy a retreat they may take it.