xboxscene.org forums

Author Topic: Problem With Openxdk And Sdl  (Read 105 times)

Eskema

  • Archived User
  • Newbie
  • *
  • Posts: 8
Problem With Openxdk And Sdl
« on: April 17, 2006, 03:16:00 PM »

Hi all, im doing a 2d game for my gp32 handheld and i want to do a port for the xbox, im using openxdk and the game works but, i cant use the fullscreen option. Im using this code :

SDL_SetVideoMode(320, 240, 32, SDL_HWSURFACE | SDL_DOUBLEBUF | SDL_FULLSCREEN);

but the game only runs in a 320x240 centered window and not at fullscreen, ¿its a problem with the openxdk?
Logged

Carcharius

  • Archived User
  • Sr. Member
  • *
  • Posts: 304
Problem With Openxdk And Sdl
« Reply #1 on: April 17, 2006, 04:45:00 PM »

It's not really a problem - more a lack of functionality within OpenXDK.

You're asking for a mode that OpenXDK doesn't support, so you're getting the default 640x480 mode and your 320x240 screen is rendered in the centre of it - there's no stretching functionality within OpenXDK.

I am currently working on some improvements to OpenXDK, but there's no ETA on when these will be completed.

In the meantime I'd suggest you can either rework your game to support 640x480 on the xbox. Or you can carry on as you are, because you're using SDL any changes that happen behind the scenes won't affect your code.

Carcharius
Logged

Eskema

  • Archived User
  • Newbie
  • *
  • Posts: 8
Problem With Openxdk And Sdl
« Reply #2 on: April 17, 2006, 05:08:00 PM »

Ok just as i expected, so i have another problem with the sound, sdl_mixer only play sounds not music, i think the sdl_mixer support its not complete yet.

Edit. I tried the 640x480 mode but the game runs slooooooooooooooowly. At this point i only can wait for the improvements you say

This post has been edited by Eskema: Apr 18 2006, 12:13 AM
Logged

friedgold

  • Archived User
  • Sr. Member
  • *
  • Posts: 266
Problem With Openxdk And Sdl
« Reply #3 on: April 17, 2006, 07:25:00 PM »

QUOTE(Eskema @ Apr 17 2006, 11:39 PM) View Post
Edit. I tried the 640x480 mode but the game runs slooooooooooooooowly. At this point i only can wait for the improvements you say

Blitting to the screen with SDL in the OpenXDK is pretty slow. I modified the Xbox SDL driver and stripped out a lot of unnecessary things it was doing and got a much improved frame rate. I've sent the patch onto d0wnlab and edwardaux but I don't think it's been added to CVS. You can download it here if you want to try it. You'll need to rebuild the OpenXDK SDL libs and compile your game again.

PS - any info on the game your making?
Logged

Eskema

  • Archived User
  • Newbie
  • *
  • Posts: 8
Problem With Openxdk And Sdl
« Reply #4 on: April 18, 2006, 12:38:00 AM »

QUOTE(friedgold @ Apr 18 2006, 03:32 AM) View Post

Blitting to the screen with SDL in the OpenXDK is pretty slow. I modified the Xbox SDL driver and stripped out a lot of unnecessary things it was doing and got a much improved frame rate. I've sent the patch onto d0wnlab and edwardaux but I don't think it's been added to CVS. You can download it here if you want to try it. You'll need to rebuild the OpenXDK SDL libs and compile your game again.

PS - any info on the game your making?


Thanks pal, my game its a new version of Biohazard(Resident evil), new history, new graphics, bla bla, u can download a demo (its still beta) from my website www.telefonica.net/web2/eskematico/biohazard_XBOX.rar

Regards,
Logged

Eskema

  • Archived User
  • Newbie
  • *
  • Posts: 8
Problem With Openxdk And Sdl
« Reply #5 on: April 18, 2006, 03:34:00 AM »

QUOTE(friedgold @ Apr 18 2006, 03:32 AM) View Post

 You can download it here if you want to try it. You'll need to rebuild the OpenXDK SDL libs and compile your game again.

PS - any info on the game your making?


Im testing your patch and now the framerate its perfect,  smile.gif  so ill do a new xbox version with 640x480 res.
The only thing that i need to be happy its the music support   wink.gif
Logged

Carcharius

  • Archived User
  • Sr. Member
  • *
  • Posts: 304
Problem With Openxdk And Sdl
« Reply #6 on: April 18, 2006, 05:23:00 AM »

What format music do you want to use?

Ogg can be made to work with the OpenXDK SDL_mixer - you have to use the libTremor ogg codec and rebuild SDL_mixer accordingly.

The regular ogg libs and SMPEG (for mp3) cause the xbox to lock up if you try to use those, I've not yet found time to try and debug my way through it to see what exactly the problem is yet.
Logged

Eskema

  • Archived User
  • Newbie
  • *
  • Posts: 8
Problem With Openxdk And Sdl
« Reply #7 on: April 18, 2006, 05:14:00 AM »

QUOTE(Carcharius @ Apr 18 2006, 12:54 PM) View Post

What format music do you want to use?

Ogg can be made to work with the OpenXDK SDL_mixer - you have to use the libTremor ogg codec and rebuild SDL_mixer accordingly.

The regular ogg libs and SMPEG (for mp3) cause the xbox to lock up if you try to use those, I've not yet found time to try and debug my way through it to see what exactly the problem is yet.


I want to use ogg music, so ill try recompile sdl_mixer to add support for ogg
Logged