Login
Username:

Password:

Remember me



Lost Password?

Register now!

Sections

Who's Online
129 user(s) are online (115 user(s) are browsing Forums)

Members: 0
Guests: 129

more...

Support us!

Headlines

 
  Register To Post  

Problem with SDL hardware surfaces
Just popping in
Just popping in


See User information
Since I got the full source text a few days ago, I'm currently porting "Giana's Return" to OS4. The MorphOS version is already running perfectly, but I won't release anything before both versions are working. ;)

Unfortunately there seems to be a problem with hardware surfaces with the recent libSDL.so from Google Code. After running the game for a short time I'm always getting system hangs (cannot move the mouse or switch display). The bug occurs in different situations, but now I finally found an SDL call which didn't return: SDL_ConvertSurface().

Hundreds of small graphics are converted into the native screen's graphics format with this call. So it must have run serveral times before, but suddenly it freezes.

I realized that the function was requesting a SDL_HWSURFACE, like many other calls in the game. Surprisingly, when I changed this call to SDL_SWSURFACE the program continues, and seems to work!

Why is that? Could it be that at some point no more video RAM for hardware surfaces is available? But then the system should just return a software-surface and continue? A bug?

But the performance was disappointing: 10 fps. Then, just for a test, I replaced all SDL_HWSURFACE with SDL_SWSURFACE and it accelerated to 50 fps!

Is it a bug in SDL_ConvertSurface() or with hardware surfaces in general? Can somebody check or confirm that?

Go to top
Re: Problem with SDL hardware surfaces
Home away from home
Home away from home


See User information
@phx
I notice the same some time ago, and everythere and all the time i try to replace HWSURFACE on SWSURFACE. But imho we need to ask for help from AfxGroup, maybe he can explain that .. I remember that 1 year ago or so, someone talk about it, but do not remember where and what exactly (sorry)

Join us to improve dopus5!
AmigaOS4 on youtube
Go to top
Re: Problem with SDL hardware surfaces
Just can't stay away
Just can't stay away


See User information
Cool! I have been curious of this game since it was announced!
I have noticed speed differences with hw/sw surfaces as well.
The best place to report os4sdl bugs is on the google code project page.

Go to top
Re: Problem with SDL hardware surfaces
Amigans Defender
Amigans Defender


See User information
@phx

please file a bug entry on google code. we will try to fix it asap..

i'm really tired...
Go to top
Re: Problem with SDL hardware surfaces
Just popping in
Just popping in


See User information
@afxgroup
The last thing I want to do is to create an account at Google. ;)

But you can count on my help regarding this bug. You can contact me for more information and for testing every time.

Go to top
Re: Problem with SDL hardware surfaces
Amigans Defender
Amigans Defender


See User information
@phx

i need at least something to test it and maybe grab a crashlog.. otherwise is har to understand where it crash

i'm really tired...
Go to top
Re: Problem with SDL hardware surfaces
Home away from home
Home away from home


See User information
@afxgroup

As far as i rememeber, there is not any crash. The problem is speed of programm: when you use HWSURFACE as options for SDL (in SetVideoModE), you have very slow work of app itself. If you set SWSURFACE options, it works faster in 4-5-6 times.

For me, it looks like just SWSURFACE and HWSURFACE in our SDL changes beetwen.

Join us to improve dopus5!
AmigaOS4 on youtube
Go to top
Re: Problem with SDL hardware surfaces
Just popping in
Just popping in


See User information
@afxgroup
I will try to create an example source for you and contact you privately.
I don't have your email address, so I hope the one linked under Contacts at www.amigasoft.net is correct?

Go to top
Re: Problem with SDL hardware surfaces
Just popping in
Just popping in


See User information
@kas1e
Actually we seem to have two problems.

1. HWSURFACE is very slow.
2. When creating too many hardware surfaces the system will lock up.

Another problem I just realized, is not related to hardware surfaces: the SDL Joystick doesn't work. Does it support USB joysticks? AFAICS those three are all problems to fix for brining the OS4-version on the same level as the MorphOS version.

Go to top
Re: Problem with SDL hardware surfaces
Amigans Defender
Amigans Defender


See User information
@phx

i have no joystick and so i cannot test it but iirc it should work.
If you make me a small example i'll try to fix the problem related the SDL surfaces

i'm really tired...
Go to top
Re: Problem with SDL hardware surfaces
Amigans Defender
Amigans Defender


See User information
i've fixed the problem on 24BIT screen and SDL_SWSURFACE.
Regard the speed it seems you are using an old version of SDL.. but it seems i've fixed a most important thing.. must check.. maybe are my eyes..

Edit:
i think are my eyes..


Edited by afxgroup on 2010/6/21 15:29:40
i'm really tired...
Go to top
Re: Problem with SDL hardware surfaces
Not too shy to talk
Not too shy to talk


See User information
@phx

If you're using 4.1 update 1 or 2, then USB joysticks should basically work.

If the USB joystick is detected in AmigaInput prefs, and you can calibrate it, it should work with SDL. For example, it works perfectly with Giddy 3 for me. You might want to try with that game to see if it is working with SDL at all on your system.

Go to top
Re: Problem with SDL hardware surfaces
Not too shy to talk
Not too shy to talk


See User information
@xeron, afxgroup : Nice to see there is activity around SDL. I think we should write some tests (or get existing ones) to put them in the repository.
I am still testing SDL and its extra libs, notably with vbcc.

Let's continue to improve SDL !

Go to top
Re: Problem with SDL hardware surfaces
Amigans Defender
Amigans Defender


See User information
@corto

i've found some interesting tests that are useful with SDL and OpenGL. I'll put them into the trunk. They are simply to compile and they seems valid tests

i'm really tired...
Go to top
Re: Problem with SDL hardware surfaces
Just can't stay away
Just can't stay away


See User information
I would like to see Emilia Pinball working properly. All of the obstacles on the table flicker. If anyone wants the source (modified so it actually compiles and runs on OS4), let me know. Or if you just want the binary and game data to see what i'm talking about.

Go to top
Re: Problem with SDL hardware surfaces
Just popping in
Just popping in


See User information
Quote:

xeron wrote:
If you're using 4.1 update 1 or 2, then USB joysticks should basically work.

If the USB joystick is detected in AmigaInput prefs, and you can calibrate it, it should work with SDL.


I cannot update my system but that's good to know. The same source works fine with PowerSDL, so I just compile and hope the best. :)

Go to top

  Register To Post

 




Currently Active Users Viewing This Thread: 1 ( 0 members and 1 Anonymous Users )




Powered by XOOPS 2.0 © 2001-2024 The XOOPS Project