Jump to content


Photo

Problem With Openxdk And Sdl


  • Please log in to reply
7 replies to this topic

#1 Eskema

Eskema

    X-S Enthusiast

  • Members
  • 15 posts

Posted 17 April 2006 - 09:40 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?

#2 Carcharius

Carcharius

    X-S Expert

  • Members
  • PipPipPip
  • 635 posts

Posted 17 April 2006 - 11:09 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

#3 Eskema

Eskema

    X-S Enthusiast

  • Members
  • 15 posts

Posted 17 April 2006 - 11:32 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

Edited by Eskema, 17 April 2006 - 11:37 PM.


#4 friedgold

friedgold

    X-S Expert

  • Moderator
  • PipPipPip
  • 667 posts
  • Location:Bristol, England
  • Xbox Version:v1.1
  • 360 version:none

Posted 18 April 2006 - 02:25 AM

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?

#5 Eskema

Eskema

    X-S Enthusiast

  • Members
  • 15 posts

Posted 18 April 2006 - 07:38 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,

#6 Eskema

Eskema

    X-S Enthusiast

  • Members
  • 15 posts

Posted 18 April 2006 - 10:34 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

#7 Carcharius

Carcharius

    X-S Expert

  • Members
  • PipPipPip
  • 635 posts

Posted 18 April 2006 - 11:47 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.


#8 Eskema

Eskema

    X-S Enthusiast

  • Members
  • 15 posts

Posted 18 April 2006 - 12:14 PM

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

Edited by Eskema, 18 April 2006 - 12:22 PM.





0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users