PocketMatrix forums

A read-only archive of the PocketMatrix forums (2001–2014). Posting and accounts are closed.

Trying to compile and run ScummVM

Hi,

Maybe someone can help me out: I can compile ScummVM 0.7.1 under Embedded Visual C++ 3.0 but when I try to run it, it says "The Intel 80486 CPU does not support configuration Win32 (WCE ARM)! Executable will not run on devivce."

What am I doing wrong? If I ignore the error the virtual PPC will start up, but it says that scummvm.exe is not a valid executable.


ADD ON: The whole thing shouldn't be executed in the emulator at all, right? Because the emulator and the real PPC are incompatible it won't run. I switched to "Default device" and hoped that it will be started on my iPAQ directly but this fails completely...

René
The evc++3 emulator isn't a "real" emulator. You need to build for the "Win32 (WCE x86em)" Debug/Release target to run on the emulator. If that choice isn't there, reinstall evc++ and make sure you choose it in the target list.
Attachments:
evc.PNG
Thanks for this hint. The x86 option has already been installed but it's not shown in the target combo. I added it under Build->Configurations but now I get hundreds of errors "fatal error C1083: Cannot open include file: 'stdafx.h': No such file or directory".

I copied the x86 debug target from PPC2002 debug.

René
You need to check the project settings...

Precompiled Headers= Not using precompiled headers.
I still get this error 74 times in different files:

"Command line warning D4002 : ignoring unknown option '/MC'
chunk.cpp
D:\WinCE\scummvm-0.7.1\scumm\smush\chunk.cpp(22) : fatal error C1083: Cannot open include file: 'stdafx.h': No such file or directory"

Can you give advice?

René
Can anyone assist a bit?
What do I have to do to get it running on the emulator under eMVC4?
I downloaded all the precompiled libs from Arisme's site. Still I'm missing "vorbisfile.h" etc. and cannot compile.
I don't know if I have to set my include path to "PPC\ARM" or to "PPC2003" - my os is PW2003 though...so I guess it's "PPC2003".

To run it in the emulator I will need precompiled libs for the emulator. Are there any sources? I have tried to compile them myself but one tough thing about C++ are the weird includes. :-(
I admit, I'm out of practice (last C++ project was years ago and I switched to Java), but I'd really like to get into coding and finish those paths setup thing...or at least: I'd like to understand what to do. :-)

Thanks.

Regards,
René
Well, I never worked with the emulator, sorry, cannot help much here
But maybe you might be able to help if I compile it for the PPC...
I've set the target to "Win32 (WCE ARMV4) Debug" and get the problems described above.

René
TazDevil76 wrote:I've set the target to "Win32 (WCE ARMV4) Debug" and get the problems described above.


That's why it doesn't work. Pick the x86 target for the emulator.
I wouldn't mind running it on the PPC directly! I got all the WinCE libs from Arisme. I'd really be happy to get it running directly on my iPAQ and debug it there. If I can compile a version fro the iPAQ I'll go for the emulator.
If the emulator version works and PPC doesn't then I'm happy too - just one target should work for the beginning. :-(

Maybe someone can just ZIP his scummVM dir with all needed libs and eVSC4 project files and mail it over so I can analyze what I'm doing wrong. I don't need the support for Simon, Queen, etc - just Scumm games.


I removed USE_MPEG2, USE_MAD, USE_FLAC ans USE_VORBIS - right now, that's what I get when compiling...my project settings are "POCKETPC2003 - Win32(WCE ARMV4) Debug - POCKETPC2003 Device" - I don't know what to do against the fatal error:

hq2x.obj : warning LNK1166: cannot adjust code at offset=0x00001000, rva=0x00002E38
hq3x.obj : warning LNK1166: cannot adjust code at offset=0x00001000, rva=0x00026348
scumm.lib(simon.obj) : warning LNK1166: cannot adjust code at offset=0x00001000, rva=0x00109A38
scumm.lib(script_v5.obj) : warning LNK1166: cannot adjust code at offset=0x00001000, rva=0x001BC2DC
scumm.lib(control.obj) : warning LNK1166: cannot adjust code at offset=0x00001000, rva=0x00253AE8
scumm.lib(compact.obj) : warning LNK1166: cannot adjust code at offset=0x00001000, rva=0x002631C4
scumm.lib(router.obj) : fatal error LNK1172: more than one object with the same name found in the library; rename object(s)


Regards,

René
well, I've never seen this error, but try with adding DISABLE_SWORD1 and DISABLE_SWORD2
You're not trying to mix the obj files are you? The <a href="http://msdn.microsoft.com/library/default.asp?url=/library/en-us/vccore/html/LNK1166.asp">LNK1166</a> makes absolutely no sense whatsoever for ARM (all instructions are 32-bits and thus cannot span a page boundary).
refractor , I've gotten those warnings in my projects:
rotblit2.obj : warning LNK1166: cannot adjust code at offset=0x00001000, rva=0x0003601C

I had thought that it was something to do with my asm files, but who knows - the program runs fine...
I got these warnings too, without link problems
Ok, weird. :)
I got it running on my iPAQ. But without any sound...but that's not to important. Anyway I get a first chance exception as soon as ScummVM starts - but then the engine runs without any problems...weird...

Now I'm going to search the place in the code where graphics are loaded to adjust gamma/brightness directly after they have been loaded. This seems more effiecient to me than manipulating them each time they are drawn.

René
I don't think it'll be a good idea because they'll be paletted then - the conversion between paletted graphics and "true color" graphics only happens when they're copied into the rendering buffer if I remember well. Or you'll probably have to modify the game palette. Anyway it's better to make that kind of change in the backend, not in the game engine, in my opinion.
I'll have a look...the whole code isn't easy to understand in the beginning but it's lot of fun to do some research.

René
yeah sure. But the biggest fun was tracking down all EVC bugs :D
I just tried something...I added this function to palette.cpp:

byte ScummEngine::adjustBrightness(byte data, float factor)
{
int newValue = data*factor;
return newValue > 255 ? 255 : (byte)newValue;
}

And then I changed the else-part of ScummEnginge::updatePalette():

...
} else {
*p++ = adjustBrightness(data[0], 1.5f);
*p++ = adjustBrightness(data[1], 1.5f);
*p++ = adjustBrightness(data[2], 1.5f);
*p++ = 0;
}
...

The factor 1.5 gives very good results on my 3870 - I can play DOTT without guessing where to click. I think this feature should really be included and able to be adjusted in the options menu.
I would do it myself for "my own" PocketScummVM version but I'm still havin loads of problems when running my compiled version: no sound, tons of exceptions and linker errors...still hoping for a ZIP of a eVC4 workspace and all needed files.

Regards,

René
Woah, that would be phenomally slow since it uses floating point math.

Try this instead:

Code:

_inline byte ScummEngine::adjustBrightness(byte data, unsigned int factor) {
//factor is 16.8 fixed point, where 256==1.0
unsigned int newValue=(data*factor)>>8;
return newValue > 255 ? 255 : (byte)newValue;
}


Dan East

The factor 1.5 gives very good results on my 3870 - I can play DOTT without guessing where to click. I think this feature should really be included and able to be adjusted in the options menu.


thanks, will see where it fits best for the next release
Cool...thanks Arisme.

@Dan: sure...this was just a quick hack. :-)

René
That's because it's untested. :D

Dan East
Do you have an algorithm for real gamma adjustment? The code above only increases brightness linear.

AFAIK gamma correction affects dark areas stronger than light areas, is this correct?


René