Finally Got Around To Programming Again....


Last edited by a moderator:
Does the SDLTest sample compile and run on your setup?

If you can get that working its time to play spot the difference.

Try a different .WAV file etc.
 
When compiling the sdltest program, I get the following error:
Code:
  [Linker error] undefined reference to `rotozoomSurfaceXY'
To get around this temporarily, I just commented off the 'rotozoom test' section of the code. It then compiled fine but when I play it on my gp2x all I get is a blank screen.

Is there an alternative sdk that doesn't require much work to setup?
 
Can you post up your library linker line in the project settings?

The easiest SDK to setup up is GPH / DevCpp unzip and go package.
 
Can you post up your library linker line in the project settings?
is this what you want:
Code:
-lSDLmain -lSDL -static -lSDL_mixer -lSDL_ttf -lSDL_image -lvorbisidec -lfreetype -ljpeg -lpng12 -lz -lm -lSDL -lpthread -lmad

The easiest SDK to setup up is GPH / DevCpp unzip and go package.
That is the one I'm using. What I was wondering is if there is another that is also easy to setup that may fix these problems.
 
Last edited by a moderator:
That is the one I'm using. What I was wondering is if there is another that is also easy to setup that may fix these problems.

I like and use gp2xdev aka ooPo's toolchain: http://www.oopo.net/consoledev/#GP2X
and manage SDL_Mixer with these routines: http://gp2x.fullsack.com/cocoon/gp2x/docs/racket/

with start up code of:
Code:
	if ( SDL_Init( SDL_INIT_VIDEO | SDL_INIT_AUDIO | SDL_INIT_JOYSTICK )== -1 )
	{
		fprintf( stderr, "Init err: %s.\n", SDL_GetError());
		exit(1);
	}
	racketstart();
	Screen = SDL_SetVideoMode( SCREENWIDTH, SCREENHEIGHT, COLORDEPTH, SDL_SWSURFACE | SDL_FULLSCREEN );   
	if ( Screen != NULL )
	{
		joystick = SDL_JoystickOpen(0);
		if (!joystick)
		{
			fprintf(stderr, "Err joystick: %s\n", SDL_GetError());
		}
		SDL_SetClipRect(Screen, &rect);
		SDL_ShowCursor( SDL_DISABLE );
...
 
I remember reading a thread where setting the CPU frequency using the code in the wiki was causing oddities when the mixer was called( but only on later firmware but not on version 1). It may be worth a try if you are using that code.
 
Back
Top