ESDL

Subforum for discussion and help with ScummVM's Symbian (mobile phones, etc) ports

Moderator: ScummVM Team

Post Reply
Hoai Duc
Posts: 5
Joined: Tue Nov 08, 2005 2:22 am

ESDL

Post by Hoai Duc »

I got ESDL source code, go to /Epoc/s60 and compiled as the instruction in Readme.epoc file:

- bldmake bldfiles
- abld makefile vc6 (for creating Microsoft Visual C++ makefiles)
- abld build wins udeb (building for wins emulator)

Then, building the Simple DirectMedia Layer programs:
- abld test build wins udeb

Finally, I open the created VC6 project ( named ESDL_S60_EXE ) and compile it. The VC6 compiler shows some errors:

C:\ESDL_NEW\EPOC\Ebasicapp.cpp(135) : error C2660: 'EPOC_GenerateKeyEvent' : function does not take 2 parameters
C:\ESDL_NEW\EPOC\Ebasicapp.cpp(451) : error C2660: 'EPOC_GenerateKeyEvent' : function does not take 2 parameters
C:\ESDL_NEW\SRC\Video\epoc\sdl_epocevents.cpp(773) : error C2039: 'ES60FlippedCompressed' : is not a member of 'CFbsBitGc'
\Symbian\7.0s\Series60_v20\EPOC32\INCLUDE\bitstd.h(176) : see declaration of 'CFbsBitGc'
C:\ESDL_NEW\SRC\Video\epoc\sdl_epocevents.cpp(773) : error C2059: syntax error : ')'
C:\ESDL_NEW\SRC\Video\epoc\sdl_epocevents.cpp(773) : error C2143: syntax error : missing ';' before '{'
C:\ESDL_NEW\SRC\Video\epoc\sdl_epocevents.cpp(774) : error C2039: 'ES60FlippedCompressed' : is not a member of 'CFbsBitGc'
\Symbian\7.0s\Series60_v20\EPOC32\INCLUDE\bitstd.h(176) : see declaration of 'CFbsBitGc'
C:\ESDL_NEW\SRC\Video\epoc\sdl_epocevents.cpp(808) : error C2601: 'SetTextInputState' : local function definitions are illegal
C:\ESDL_NEW\SRC\Video\epoc\sdl_epocevents.cpp(837) : error C2601: 'SetJoystickState' : local function definitions are illegal

ESDL_EXE.LIB - 8 error(s), 0 warning(s)


What should I do ?? ( I'm using Symbian 7.0 SDK and Symbian 8.0_FP2 SDK for series 60. These errors occured with both SDKs)
Anotherguest
ScummVM Porter
Posts: 1423
Joined: Sun Oct 30, 2005 2:27 pm
Location: Malmoe, Sweden

There is a new version of ESDL

Post by Anotherguest »

Uploaded at anotherguest.b0.se
It now also contains S80 stretched mode and HannuVs (thank you Hannu) dynamic keyconfig.
Hoai Duc
Posts: 5
Joined: Tue Nov 08, 2005 2:22 am

Post by Hoai Duc »

What do you mean, anotherguest ?
I did get ESDL source code from http://anotherguest.b0.se/ , complied it and those errors came :?
Anotherguest
ScummVM Porter
Posts: 1423
Joined: Sun Oct 30, 2005 2:27 pm
Location: Malmoe, Sweden

Post by Anotherguest »

Well what I mean is that I have now uploaded a new version which fixed all the compile errors + additional functionality. Btw.. there are new compiled versions for all targets also uploaded now.
Hoai Duc
Posts: 5
Joined: Tue Nov 08, 2005 2:22 am

Post by Hoai Duc »

Thanks for your reply, Anotherguest !

I've already downloaded new version of ESDL from your website. No compile error anymore, very good !
Now I can build the library ( esdl_exe.lib ) without any problem. However, when I tried to build the test project (named GRAYWIN), VC6 showed hundreds of linking errors:

----------------------------------------------------------
esdl_exe.lib(Sdlsxxview.obj) : error LNK2001: unresolved external symbol "private: virtual class MObjectProvider * __thiscall CCoeControl::MopNext(void)" (?MopNext@CCoeControl@@EAEPAVMObjectProvider@@XZ)
esdl_exe.lib(Ebasicapp.obj) : error LNK2001: unresolved external symbol "private: virtual class MObjectProvider * __thiscall CCoeControl::MopNext(void)" (?MopNext@CCoeControl@@EAEPAVMObjectProvider@@XZ)
esdl_exe.lib(Sdlsxxview.obj) : error LNK2001: unresolved external symbol "protected: virtual class TTypeUid::Ptr __thiscall CCoeControl::MopSupplyObject(class TTypeUid)" (?MopSupplyObject@CCoeControl@@MAE?AVPtr@TTypeUid@@V3@@Z)
esdl_exe.lib(Ebasicapp.obj) : error LNK2001: unresolved external symbol "protected: virtual class TTypeUid::Ptr __thiscall CCoeControl::MopSupplyObject(class TTypeUid)" (?MopSupplyObject@CCoeControl@@MAE?AVPtr@TTypeUid@@V3@@Z)
esdl_exe.lib(Sdlsxxview.obj) : error LNK2001: unresolved external symbol "private: virtual void __thiscall CCoeControl::Reserved_2(void)" (?Reserved_2@CCoeControl@@EAEXXZ)
esdl_exe.lib(Ebasicapp.obj) : error LNK2001: unresolved external symbol "private: virtual void __thiscall CCoeControl::Reserved_2(void)" (?Reserved_2@CCoeControl@@EAEXXZ)
esdl_exe.lib(Sdlsxxview.obj) : error LNK2001: unresolved external symbol "protected: virtual void __thiscall CCoeControl::WriteInternalStateL(class RWriteStream &)const " (?WriteInternalStateL@CCoeControl@@MBEXAAVRWriteStream@@@Z)
esdl_exe.lib(Ebasicapp.obj) : error LNK2001: unresolved external symbol "protected: virtual void __thiscall CCoeControl::WriteInternalStateL(class RWriteStream &)const " (?WriteInternalStateL@CCoeControl@@MBEXAAVRWriteStream@@@Z)
esdl_exe.lib(Sdlsxxview.obj) : error LNK2001: unresolved external symbol "public: virtual class CCoeControl * __thiscall CCoeControl::ComponentControl(int)const " (?ComponentControl@CCoeControl@@UBEPAV1@H@Z)
esdl_exe.lib(Ebasicapp.obj) : error LNK2001: unresolved external symbol "public: virtual class CCoeControl * __thiscall CCoeControl::ComponentControl(int)const " (?ComponentControl@CCoeControl@@UBEPAV1@H@Z)
esdl_exe.lib(Sdlsxxview.obj) : error LNK2001: unresolved external symbol "public: virtual int __thiscall CCoeControl::CountComponentControls(void)const " (?CountComponentControls@CCoeControl@@UBEHXZ)
esdl_exe.lib(Ebasicapp.obj) : error LNK2001: unresolved external symbol "public: virtual int __thiscall CCoeControl::CountComponentControls(void)const " (?CountComponentControls@CCoeControl@@UBEHXZ)
esdl_exe.lib(Sdlsxxview.obj) : error LNK2001: unresolved external symbol "protected: virtual void __thiscall CCoeControl::PositionChanged(void)" (?PositionChanged@CCoeControl@@MAEXXZ)
esdl_exe.lib(Ebasicapp.obj) : error LNK2001: unresolved external symbol "protected: virtual void __thiscall CCoeControl::PositionChanged(void)" (?PositionChanged@CCoeControl@@MAEXXZ)
esdl_exe.lib(Sdlsxxview.obj) : error LNK2001: unresolved external symbol "protected: virtual void __thiscall CCoeControl::SizeChanged(void)" (?SizeChanged@CCoeControl@@MAEXXZ)
esdl_exe.lib(Ebasicapp.obj) : error LNK2001: unresolved external symbol "protected: virtual void __thiscall CCoeControl::SizeChanged(void)" (?SizeChanged@CCoeControl@@MAEXXZ)
esdl_exe.lib(Sdlsxxview.obj) : error LNK2001: unresolved external symbol "protected: virtual void __thiscall CCoeControl::FocusChanged(enum TDrawNow)" (?FocusChanged@CCoeControl@@MAEXW4TDrawNow@@@Z)
esdl_exe.lib(Ebasicapp.obj) : error LNK2001: unresolved external symbol "protected: virtual void __thiscall CCoeControl::FocusChanged(enum TDrawNow)" (?FocusChanged@CCoeControl@@MAEXW4TDrawNow@@@Z)
esdl_exe.lib(Sdlsxxview.obj) : error LNK2001: unresolved external symbol "protected: virtual void __thiscall CCoeControl::HandlePointerBufferReadyL(void)" (?HandlePointerBufferReadyL@CCoeControl@@MAEXXZ)
esdl_exe.lib(Ebasicapp.obj) : error LNK2001: unresolved external symbol "protected: virtual void __thiscall CCoeControl::HandlePointerBufferReadyL(void)" (?HandlePointerBufferReadyL@CCoeControl@@MAEXXZ)
esdl_exe.lib(Sdlsxxview.obj) : error LNK2001: unresolved external symbol "protected: virtual void __thiscall CCoeControl::HandlePointerEventL(struct TPointerEvent const &)" (?HandlePointerEventL@CCoeControl@@MAEXABUTPointerEvent@@@Z)
esdl_exe.lib(Ebasicapp.obj) : error LNK2001: unresolved external symbol "protected: virtual void __thiscall CCoeControl::HandlePointerEventL(struct TPointerEvent const &)" (?HandlePointerEventL@CCoeControl@@MAEXABUTPointerEvent@@@Z)
esdl_exe.lib(Sdlsxxview.obj) : error LNK2001: unresolved external symbol "public: virtual class TCoeInputCapabilities __thiscall CCoeControl::InputCapabilities(void)const " (?InputCapabilities@CCoeControl@@UBE?AVTCoeInputCapabilities@@XZ)


..... (so on)


GRAYWIN.exe - 134 error(s), 40 warning(s)

----------------------------------------------------------------------

What should I do now ? :roll:
Anotherguest
ScummVM Porter
Posts: 1423
Joined: Sun Oct 30, 2005 2:27 pm
Location: Malmoe, Sweden

Post by Anotherguest »

This version of SDL is using ScummVM as a reference, the test applications has NOT been tested with this version.

So that means that the test project files has NOT been updated to run/compile together with this version of SDL.

If you want to be able to compile the test and learn more about SDL try the the first version which hannu has released, which also included the working demos at http://koti.mbnet.fi/~haviital/. There are also a couple more versions floating around.

But if you want to build Scummvm then you have to use this version.
Hoai Duc
Posts: 5
Joined: Tue Nov 08, 2005 2:22 am

Post by Hoai Duc »

thanks Anotherguest ..
if the test project is not supported in ESDL, I will do it myself. Could you help me ? This work should be simple once we already had the SDL library.

I just make a Symbian application project, and put some function calls in ConstructL() method like this:

class StarterAppUi : public CEikAppUi
{
..............
void ConstructL()
{

SDL_Surface *screen;
Uint32 videoflags;
int width, height, bpp;

/* Initialize SDL */
if ( SDL_Init(SDL_INIT_VIDEO) < 0 ) {
fprintf(stderr, "Couldn't initialize SDL: %s\n", SDL_GetError());
exit(1);
}

/* See if we try to get a hardware colormap */
width = 176;
height = 208;
bpp = 8;
videoflags = SDL_SWSURFACE;

/* setup the video mode */
screen = SDL_SetVideoMode(w, h, bpp, flags);

.........

}
}

Now, I compile the project. OK, no errors. But when I try to run the app in emulator, the emulator show an error "Program close ...(error number)". Using debugger, I found that this error comes from the function call "screen = SDL_SetVideoMode(w, h, bpp, flags)". Seem that the video mode setting is wrong .

Could you tell me how to solve this problem ?
Anotherguest
ScummVM Porter
Posts: 1423
Joined: Sun Oct 30, 2005 2:27 pm
Location: Malmoe, Sweden

Post by Anotherguest »

Well this is not a SDL support forum. As for SDL, it depends on what kind of target you are using. The behaviour is different between Sxx and UIQ sdks. UIQ is using an ecompxl packed app and the S60 etc is using an exe target just as the 9210 original. So just creating the appui as you have done is not the way to do it.
Anotherguest
ScummVM Porter
Posts: 1423
Joined: Sun Oct 30, 2005 2:27 pm
Location: Malmoe, Sweden

Post by Anotherguest »

And this version of SDL do not support the native S60 resolutions, only the "normal" PC sdl resoultions, 320x200,320x240,640x200,640x240,640x480.
Anotherguest
ScummVM Porter
Posts: 1423
Joined: Sun Oct 30, 2005 2:27 pm
Location: Malmoe, Sweden

Post by Anotherguest »

I think that its best if you use the CDoom SDL sources if you want to do more SDL development for S60 in native resolutions.
Hoai Duc
Posts: 5
Joined: Tue Nov 08, 2005 2:22 am

Post by Hoai Duc »

Ok, I see.
Only a last question
Do we need the esdlmain.lib library to build an application based on your ESDL?
Or just esdl_exe.lib is enough ?
Anotherguest
ScummVM Porter
Posts: 1423
Joined: Sun Oct 30, 2005 2:27 pm
Location: Malmoe, Sweden

Post by Anotherguest »

You will only need the _exe.. but in order to be able to launch the application you will need an application which starts the exe. Examples of this can be found among the scummvm sources, and I guess also the CDoom sources, there are a couple of different approaches to do this. Either launching a separate process or start a process within the current environment (as done by EDoom).

So I would emphasize that this version of ESDL has been made in mind for experienced programmers to port existing PC sdl projects, that might require somekind of keyboard/joystick/mouse input, something that was n't present in the earlier versions of ESDL, and also some more dynamic screenmodes.

CDooms SDL for S60 support I think 18 different screenmodes , including all native resolutions and rotations, which I have opted for separate flip and rotate modes and only support for the native PC modes.

You are welcome to integrate any needed screenmodes from the other symbian SDL version for the needs you are having. That is the thing about opensource.

This would have been with Hannus Vs ground breaking SDL work, with Sprawls intentions to have ScummVM running with SDL, the CDoom teams continued work with SDL and all of the SDL projects. So thank you all.

But.. this has lead to the fact that there exist at least 4 different ports of SDL to Symbian OS today, Hannu has not released all of his SDL sources for S80,S90 etc yet, but I think he will do that when he is ready. And this version has been adopted to suite the needs of ScummVM with some thought for other project, but mainly ScummVM.

So if you are planning to use SDL for other projects, I think you will have to test the different version to find what you are looking for, and also make the changes needed to suite all your needs.

Good luck and happy compiling. :-)
Post Reply