Iggeros Ha-Rambam, Rav Sheilat Press, Volume I p. 311, quoted by Shalom (here):
והרעה הגדולה שבאה עליי באחרונה, ...והיא פטירת הצדיק, שטבע בים הודו ובידו ממון רב לי ולו ולאחרים והניח בת קטנה ואלמנתו אצלי..והוא היה האח. והוא היה התלמיד והוא היה הנושא ונותן בשוק ומרוויח, ואני הייתי יושב לבטח...והלך לחיי העולם, והניחני נבהל בארץ נוכרי
As translated by Shalom (here):
And the greatest tragedy that recently befell me was the death of the righteous one who drowned in the Indian Ocean while holding a great deal of property of mine, his, and others', leaving me with his young daughter and widow, namely my brother. He was a student, he would do business in the markets and make profits while I dwelled securely ... he has gone to Eternal Life, leaving me confounded in a strange land.
R. Yitzchak Sheilat, Iggeros Ha-Rambam, vol. 1 p. 229n (as translated on the Hirhurim blog):
It seems from here that the Rambam was an actual partner in his [brother's] merchandise... And through this [R. David his brother] enabled him to "sit in peace" and study Torah. Perhaps it is specifically in this fashion, and not as a gift, that the Rambam understood the idea of Yissachar-Zevulun and Shimon the brother of Azariah, that are mentioned in the Midrashim of the Sages (see Bereishis Rabbah 72:5, 99:9; Vayikra Rabbah 25:2)... However, from the base law it is permissible [to support someone studying] even entirely for free [without a partnership], since the initiative to this arrangement comes from the brother who supports. However, as a pious practice the Rambam was a partner in his [brother's] property.
Seemingly though, the Rambam did not write the majority of the Mishne Torah while being supported by his brother, for the Mishneh Torah was compiled between 1170 and 1180 and his brother drowned in 1171. (Although, this is difficult to know as it is possible that the majority was written in 1170 and because of the difficulties of his physician job in Egypt and the pressure of supporting his family as well as his brothers that he didn't finish until 1180.)