Xbox 360 port

Discussion about other and unofficial ports of ScummVM

Moderator: ScummVM Team

TommyBear
Posts: 13
Joined: Thu Dec 21, 2006 1:08 pm

Post by TommyBear »

No problem... if we find a suitable direction to take the XNA project in, then we'll use the HEAD of the ScummVM repository. At the moment, we are not sure which will be the path of least resistance.

Tommy.
User avatar
Vinterstum
ScummVM Developer
Posts: 580
Joined: Sun Oct 16, 2005 6:59 am

Post by Vinterstum »

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.
User avatar
Vinterstum
ScummVM Developer
Posts: 580
Joined: Sun Oct 16, 2005 6:59 am

Post by Vinterstum »

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'
TommyBear
Posts: 13
Joined: Thu Dec 21, 2006 1:08 pm

Post by TommyBear »

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.
TommyBear
Posts: 13
Joined: Thu Dec 21, 2006 1:08 pm

Post by TommyBear »

I take it back... /clr:pure works on the 360. I have just confirmed that the following mangled c/c++/clr code works:

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];
}
This proves that some form of mangled C++ will work. It doesn't have to be safe(verifiable) to execute. This is really excellent
RJT
Posts: 2
Joined: Fri Jun 09, 2006 4:57 pm

Post by RJT »

I downloaded the ScummVM-XNA rar. Just wondering how to install it on the 360? I'm kind of new with this...
Jonas76
Posts: 3
Joined: Thu May 24, 2007 5:53 pm

Post by Jonas76 »

Could we please have an update on whats being developed for the 360 port? Does the XNA version for download work? And if so, can someone lead us through it? Is there currently a working version of SCUMMVM for the 360 or is it still in works(or abandoned)? It would be greatly appreciated!
User avatar
PsYcO
Got 2 warnings
Posts: 511
Joined: Sun Dec 24, 2006 9:27 pm
Location: UK, Enfield
Contact:

Post by PsYcO »

update anyone?
User avatar
eriktorbjorn
ScummVM Developer
Posts: 3561
Joined: Mon Oct 31, 2005 7:39 am

Post by eriktorbjorn »

PsYcO wrote:update anyone?
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.
User avatar
PsYcO
Got 2 warnings
Posts: 511
Joined: Sun Dec 24, 2006 9:27 pm
Location: UK, Enfield
Contact:

Post by PsYcO »

so, it is possible then? i meen to play scummvm on the 360?
fingolfin
Retired
Posts: 1452
Joined: Wed Sep 21, 2005 4:12 pm

Post by fingolfin »

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.
User avatar
eriktorbjorn
ScummVM Developer
Posts: 3561
Joined: Mon Oct 31, 2005 7:39 am

Post by eriktorbjorn »

PsYcO wrote:so, it is possible then? i meen to play scummvm on the 360?
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.

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.
User avatar
Vinterstum
ScummVM Developer
Posts: 580
Joined: Sun Oct 16, 2005 6:59 am

Post by Vinterstum »

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.
User avatar
PsYcO
Got 2 warnings
Posts: 511
Joined: Sun Dec 24, 2006 9:27 pm
Location: UK, Enfield
Contact:

Post by PsYcO »

Vinterstum 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.
shit, i don't care if i have to do it illegally... its easily my favourite console so far
shadowcode
Posts: 13
Joined: Sun Sep 02, 2007 10:27 pm

Post by shadowcode »

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.
Post Reply