Xbox 360 port
Moderator: ScummVM Team
- Vinterstum
- ScummVM Developer
- Posts: 580
- Joined: Sun Oct 16, 2005 6:59 am
Some option in the project files seems to be completely overriding /clr:pure (hence why you can actually successfully compile ScummVM with varargs still present, which is also forcing a native compilation with just /clr).
Why VC++ retardedly does -not- warn about this, I've no idea. I'll try to narrow it down to the precise one.
Why VC++ retardedly does -not- warn about this, I've no idea. I'll try to narrow it down to the precise one.
- Vinterstum
- ScummVM Developer
- Posts: 580
- Joined: Sun Oct 16, 2005 6:59 am
For example, normally when setting /clr in the regular ScummVM project file, you get warnings like these:
14>..\..\base\commandLine.cpp(160) : warning C4793: 'vararg' : causes native code generation for function 'void Base::usage(const char *,...)'
14> ..\..\base\commandLine.cpp(146) : see declaration of 'Base::usage'
14>..\..\base\commandLine.cpp(160) : warning C4793: 'vararg' : causes native code generation for function 'void Base::usage(const char *,...)'
14> ..\..\base\commandLine.cpp(146) : see declaration of 'Base::usage'
Hey Vinsterstum... I've been taking a closer look too. It would seem that the only way to guarantee all code is compile to MSIL is to set the option /clr:safe.
This will make sure all code is verifiable and therefore pure with no native code. Unfortunately compiling with this option is impossible... you get thousands of errors for code that is not verifiable... still looking though.
This will make sure all code is verifiable and therefore pure with no native code. Unfortunately compiling with this option is impossible... you get thousands of errors for code that is not verifiable... still looking though.
I take it back... /clr:pure works on the 360. I have just confirmed that the following mangled c/c++/clr code works:
This proves that some form of mangled C++ will work. It doesn't have to be safe(verifiable) to execute. This is really excellent
Code: Select all
static int ScummVM::Run()
{
int numbers[] = { 1, 2, 3, 4, 5, 6, 7, 8, 9, 0 };
int * numPtr = numbers;
while(*numPtr)
{
Console::WriteLine("Number is {0}", *numPtr);
*numPtr = *numPtr - (*numPtr * 2);
numPtr++;
}
return numbers[4];
}
- eriktorbjorn
- ScummVM Developer
- Posts: 3558
- Joined: Mon Oct 31, 2005 7:39 am
Judging by the SVN statistics on their SourceForge project page, nothing much has happened for the past five months. If so, they do have a bit of catching up to do.PsYcO wrote:update anyone?
We don't know. It's a 3rd party project. Go and ask *them* to find out . But as Torbjörn pointed out, it seems that in the past 5 months they were not active, so unless they already had a working version back then, it's highly unlikely that they have one now.
Last edited by fingolfin on Wed Nov 25, 2009 10:37 pm, edited 1 time in total.
- eriktorbjorn
- ScummVM Developer
- Posts: 3558
- Joined: Mon Oct 31, 2005 7:39 am
Judging by their version.txt file, they have unfinished ports of the engines for Beneath a Steel Sky and Flight of the Amazon Queen. And, of course, some (much?) of the infrastructure. But, as Fingolfin said, it's a third-party project so all we can make are educated guesses.PsYcO wrote:so, it is possible then? i meen to play scummvm on the 360?
For the official ScummVM ports, the only parts that need to be rewritten are the ones that deal with sound, graphics, etc. This one, on the other hand, involves porting the entire ScummVM from C/C++ into C#. This, of course, makes it a lot more work for them. Some might even consider it doomed to certain failure, but they're certainly free to try it.
- Vinterstum
- ScummVM Developer
- Posts: 580
- Joined: Sun Oct 16, 2005 6:59 am
In all likelihood, a 360 port isn't going to happen.
Basically, there's two ways it COULD happen:
1) Rewrite the whole of ScummVM in C#. This is a colossal job, and hard to maintain. This is what the above guys tried, and seems to have given up on.
2) Somehow compile ScummVM to managed code (.NET stuff). I looked into this option some more today, and... it's not gonna happen. Due to the limitations of the .NET runtime environment on the 360, C++ programs have to be compiled with the /clr:safe option. Which means you can't use any libc stuff, no malloc, no pointers. Which means no ScummVM.
So unless someone figures out (or Microsoft opens up) a way to run native code on the 360 (legally), it won't happen.
Basically, there's two ways it COULD happen:
1) Rewrite the whole of ScummVM in C#. This is a colossal job, and hard to maintain. This is what the above guys tried, and seems to have given up on.
2) Somehow compile ScummVM to managed code (.NET stuff). I looked into this option some more today, and... it's not gonna happen. Due to the limitations of the .NET runtime environment on the 360, C++ programs have to be compiled with the /clr:safe option. Which means you can't use any libc stuff, no malloc, no pointers. Which means no ScummVM.
So unless someone figures out (or Microsoft opens up) a way to run native code on the 360 (legally), it won't happen.
shit, i don't care if i have to do it illegally... its easily my favourite console so farVinterstum wrote:In all likelihood, a 360 port isn't going to happen.
Basically, there's two ways it COULD happen:
1) Rewrite the whole of ScummVM in C#. This is a colossal job, and hard to maintain. This is what the above guys tried, and seems to have given up on.
2) Somehow compile ScummVM to managed code (.NET stuff). I looked into this option some more today, and... it's not gonna happen. Due to the limitations of the .NET runtime environment on the 360, C++ programs have to be compiled with the /clr:safe option. Which means you can't use any libc stuff, no malloc, no pointers. Which means no ScummVM.
So unless someone figures out (or Microsoft opens up) a way to run native code on the 360 (legally), it won't happen.
-
- Posts: 13
- Joined: Sun Sep 02, 2007 10:27 pm
You can probably compile ScummVM as a static lib and then compile that static lib into a C++/CLI project which acts as a bridge between C# and C++.
However, I don't think that'd run on the X360 XNA framework.
The only way to get ScummVM working on the 360 is as an official microsoft licensee. From there on, it can be done. (although I don't know how heavily ScummVM relies on SDL).
The only other way is unlikely as well, the X360 has been 'cracked' two or three times so far and people have ran native code, yet the homebrew scene hasn't gotten anywhere because Microsoft can easilly plug the holes now and one-'sploit-to-rule-them-all's are really rare nowadays.
So don't count on a X360-ScummVM any time soon.
However, I don't think that'd run on the X360 XNA framework.
The only way to get ScummVM working on the 360 is as an official microsoft licensee. From there on, it can be done. (although I don't know how heavily ScummVM relies on SDL).
The only other way is unlikely as well, the X360 has been 'cracked' two or three times so far and people have ran native code, yet the homebrew scene hasn't gotten anywhere because Microsoft can easilly plug the holes now and one-'sploit-to-rule-them-all's are really rare nowadays.
So don't count on a X360-ScummVM any time soon.