MySDL-02: All-in-one solution for SDL with Windows Mobile 5.0 Pocket PC SDK (ARMV4I)

Finally I could pack this up and second version is ready.

This is a all-in-one solution for those who are tired or scared of
downloading/compiling/fixing SDL and SDL libraries for Pocket PC. I have
gathered some handy libraries into a VS2008 solution and all files you need are
compiled without any pain. I also provide binaries too. Hope this helps.

Download here http://emreburhan.com/blog/?p=159

Everything is working, except I have only tried wave files with SDL_mixer. I
don?t know if it will play other formats.

Features:

  • SDL-1.2.13: SDL library itself.
  • JpegLib: Jpeg support
  • libpng-1.2.34: PNG support
  • SDL_draw: Some basic and fast drawing functions
  • SDL_gfx-2.0.18: Basic drawing routines such as lines, circles or polygons and
    SDL_rotozoom
  • SDL_image-1.2.7: BMP GIF PCX PNG TGA XPM support
  • SDL_mixer-1.2.8: Sound support
  • SDL_ttf-2.0.9: TTF support
  • zlib-1.2.3: For libpng

Using Directions:

  1. Copy compiled files from bin\0?501 folder to your application folder
  2. Include lib files from lib\0?501 folder to your project
  3. Include header files from include folder.

Hi,

I have also did it for myself using Visual Studio 2005.
If people are interested I can send them.

Basically what I recommend is to create the following tree :

C:\Program Files\Microsoft Visual Studio X\VC\

SDL
include
SDL
// put SDL includes here
lib
ARMV4 (should be compiled with Pocket PC 2003)
ARMV4I (should be compiled with Windows Mobile 5)

I have also noticed that generally wince project are wrong because linker
settings and preprocessor
have invalid values.
And so people think they provide ARMV4 lib but actually they give ARMV4I.

Just a reminder , when compiling dll check the following ine additional
options of linker settings

Pocket Pc 2003 : /subsystem:windowsce,4.20 /machine:ARM /ARMPADCODE
Windows Mobile 5 : /subsystem:windowsce,5.01 /machine:THUMB
Windows Mobile 6 : /subsystem:windowsce,5.02 /machine:THUMB

You can also force architecture but personnaly I prefer to put the
additional options as shown above.

For wince people, I have also proposed on bugzilla to implement a unicode
aware version of SDL and I think it
won’t break anything but just help us.
I propose to stopp using char but to declare a SDL_Char type and a macro
_SDLT("") that would be defined as char and ""
on all platforms but windows CE.

#ifndef _SDL_tchar_h
#define _SDL_tchar_h

#if defined(_WIN32) ||defined(_WIN32_WCE)
typedef char SDL_Char;
#define SDL_strcpy _tcscpy

#else
#define SDL_strcpy strcpy

#endif

#endif /* _SDL_tchar_h */

If this idea is not accepted I have started to do it on my local SDL
repository, so I will be able
to send it to wince developpers.

Forget to say also that after you need to add include path to Visual Studio
Tools->Options->Projects and solutions->VC++ Directories : Include
directories

All Platforms (Win32, Pocket PC 2003, Windows Mobile X)
$(VCInstallDir)SDL\include
$(VCInstallDir)SDL\include\SDL

And for libs:

Pocket PC 2003
$(VCInstallDir)SDL\lib\ARMV4

Windows Mobile (5/6)
$(VCInstallDir)SDL\lib\ARMV4I

RegardsOn Wed, 06 May 2009 15:50:02 +0200, “Vincent R.” <@Vincent_R> wrote:

Hi,

I have also did it for myself using Visual Studio 2005.
If people are interested I can send them.

Basically what I recommend is to create the following tree :

C:\Program Files\Microsoft Visual Studio X\VC\

SDL
include
SDL
// put SDL includes here
lib
ARMV4 (should be compiled with Pocket PC 2003)
ARMV4I (should be compiled with Windows Mobile 5)

Finally I could pack this up and second version is ready.

This is a all-in-one solution for those who are tired or scared of
downloading/compiling/fixing SDL and SDL libraries for Pocket PC. I have
gathered some handy libraries into a VS2008 solution and all files you
need
are
compiled without any pain. I also provide binaries too. Hope this helps.

Download here http://emreburhan.com/blog/?p=159

Everything is working, except I have only tried wave files with
SDL_mixer.
I
don?t know if it will play other formats.

Features:

  • SDL-1.2.13: SDL library itself.
  • JpegLib: Jpeg support
  • libpng-1.2.34: PNG support
  • SDL_draw: Some basic and fast drawing functions
  • SDL_gfx-2.0.18: Basic drawing routines such as lines, circles or
    polygons and
    SDL_rotozoom
  • SDL_image-1.2.7: BMP GIF PCX PNG TGA XPM support
  • SDL_mixer-1.2.8: Sound support
  • SDL_ttf-2.0.9: TTF support
  • zlib-1.2.3: For libpng

Using Directions:

  1. Copy compiled files from bin\0?501 folder to your application
    folder
  2. Include lib files from lib\0?501 folder to your project
  3. Include header files from include folder.

Please also note that if you have recompiled SDL from latest stable
version, I have discovered
a bug in image loading due to ANSI/UNICODE conversion.
So your binaries may not work.

in SDL_LoadFunction:

MultiByteToWideChar(CP_ACP, MB_PRECOMPOSED, name, -1, name_t, length+1); //
Added +1On Wed, 6 May 2009 12:53:51 +0000 (UTC), eymre wrote:

Finally I could pack this up and second version is ready.

This is a all-in-one solution for those who are tired or scared of
downloading/compiling/fixing SDL and SDL libraries for Pocket PC. I have
gathered some handy libraries into a VS2008 solution and all files you
need
are
compiled without any pain. I also provide binaries too. Hope this helps.

Download here http://emreburhan.com/blog/?p=159

Everything is working, except I have only tried wave files with
SDL_mixer.
I
don?t know if it will play other formats.

Ok I have tested your redist and I am impressed beccause you did a great
job.
Thanks for sharing this.

However I have tested with guichan (I have created a VIsualCE project so
tell me if you are interested)
and when I try it I get many crash when SDL.dll is loaded.
Actually I have the same kind of crash with the dll I have compiled myself
so I wanted to test yours.

It seems that when I compile SVN version I don’t have crash anymore but
mouse events are not working.
I need to check differences between SVN1.2 version and 1.2.13 and find why
wince doesn’t receive mouse events …
By doing this I hope I won’t have this nasty crash in debug.On Wed, 6 May 2009 12:53:51 +0000 (UTC), eymre wrote:

Please also note that if you have recompiled SDL from latest stable
version, I have discovered
a bug in image loading due to ANSI/UNICODE conversion.
So your binaries may not work.

in SDL_LoadFunction:

MultiByteToWideChar(CP_ACP, MB_PRECOMPOSED, name, -1, name_t, length+1); //
Added +1

Thanks, this is now fixed in subversion.

See ya,
-Sam Lantinga, Founder and President, Galaxy Gameworks LLC

Vincent R. <forumer smartmobili.com> writes:

Ok I have tested your redist and I am impressed beccause you did a great
job.
Thanks for sharing this.

However I have tested with guichan (I have created a VIsualCE project so
tell me if you are interested)
and when I try it I get many crash when SDL.dll is loaded.
Actually I have the same kind of crash with the dll I have compiled myself
so I wanted to test yours.

It seems that when I compile SVN version I don’t have crash anymore but
mouse events are not working.
I need to check differences between SVN1.2 version and 1.2.13 and find why
wince doesn’t receive mouse events …
By doing this I hope I won’t have this nasty crash in debug.

I was getting a similar crash with png dll in debug version only,
then I fixed it.
If you upload your project I can have a look at it.