[Mono-dev] Guestimates for effort to port Mono to game console?
aras at unity3d.com
Tue Oct 16 12:47:37 EDT 2007
> Can anyone give me a guestimate on the effort to port the mono runtime
> to an embedded PowerPC system (Wii and maybe even 360 if MS's 360 CLR
> doesn't stack up) and/or any hints as to what that would entail?
The biggest hurdles are the usual when porting anything to a console...
1) some posix/libc stuff that Mono uses, most notably pthreads. We
ended up just wrapping up Wii specific threading functionality under a
phread-like interface. Things like file I/O are not used by mono that
much, and most if not all places are under a glib interface. So
implementing memory mapping or file reading under a glib-like
interface takes care of that. It's probably a good idea to port eglib
from current mono svn, no reason to start wrapping whole glib with all
2) memory. In "standard computers", there's basically one type of
memory, and that is not true for some consoles. Care has to be taken
of which code allocates from which memory (and even seemingly trivial
things like g_strdup are not that trivial...). Getting GC to actually
work is some work as well, but not that much IIRC.
3) some changes to JIT might be required. Mono's PPC JIT code assumes
some things that don't hold on the Wii; we had to use different
registers in some places.
> I realize that this is a absurdly open-ended question, but it's the
> question I need to come up with an answer to. Even responses along the
> lines of "that's phycho -- it would take man-years" or "a smart dude w/
> compiler and language runtime experience could pull it off in a
> couple-three months" would be helpful.
It's definitely the latter, i.e. doable in a couple of months by a
smart programmer. You just have to give him/her a job title "Wii Hero"
More information about the Mono-devel-list