Try SDL_GP2X_WaitForBlitter after each blit rather then after all the blits.Gadget posted on Aug 27 2006 at 07:35 AM said:Thanks! Tried all of that to no avail :blink:
Can I confirm that someone here has FW 2.0 and the HW libs working? As in, working with HW surfaces actually on?
I have double buffering enabled, do my blits, then SDL_GP2X_WaitForBlitter, then the SDL_Flip(screen).
Do I need more than one surface?? Presumably my backbuffer (screen) is 640 x 240 in size even though I set it to 320 x 240, and the flipping chain is all handled automatically? There is nothing special I need to do after blit, wait for blit, flip?
You shouldn't really be calling SDL_GP2X_WaitForBlitter(), both the Blit() & Flip() functions call it internally.Gadget posted on Aug 27 2006 at 07:35 AM said:Can I confirm that someone here has FW 2.0 and the HW libs working? As in, working with HW surfaces actually on?
I have double buffering enabled, do my blits, then SDL_GP2X_WaitForBlitter, then the SDL_Flip(screen).
Actually the screen surface is still 320x240 but there are two of them. There is only one surface but it is special in that it's bitmap pointers swap between the two bitmaps every time you call SDL_Flip(). After a Flip() the surface bitmap is of the frame that had been shown prior to the flip.Do I need more than one surface?? Presumably my backbuffer (screen) is 640 x 240 in size even though I set it to 320 x 240, and the flipping chain is all handled automatically? There is nothing special I need to do after blit, wait for blit, flip?
Start of program | surface=blank | display=blank
draw 1st frame | surface=frame 1 | display=blank
SDL_Flip() | surface=blank | display=frame 1
draw 2nd frame | surface=frame 2 | display=frame 1
SDL_Flip() | surface=frame 1 | display=frame 2
draw 3rd frame | surface=frame 3 | display=frame 2
SDL_Flip() | surface=frame 2 | display=frame 3
Thanks, hopefully I'll be able to get back to working on this a couple of days a week. I've just heard from djwillis that SDL is now at 1.2.11 so I'll be updating as soon as I can.yaustar posted on Aug 28 2006 at 01:09 AM said:Nice to see you back paeryn, regarding the WaitForBlitter Issue, I had to call it after each blit otherwise my sprites/graphics tend to tear or 'shiver'. More details in this thread:
http://www.gp32x.de/board/index.php?showtopic=31307
yaustar posted on Aug 28 2006 at 01:38 AM said:Cheers for that. I have only tested Dance2x with firmware 2.0 if that's any help. I believe I am flipping straight after a series of blits. No rush though, just extremely curious wha the problem could be...
Alex. posted on Aug 28 2006 at 01:54 PM said:I think it is the other way around actually, SDL_DOUBLEBUF is required in SetVideoMode but not in Init. Take a look at the SDL doc wiki for SDL_Init and for SDL_SetVideoMode.
Everything is going well for me too, as I said with a good 30+ FPS boost over the stock SDL. Now I'll give background music another try, see if I'll be able to keep it at 60 FPS.
I agree with you Gadget, it's great to see experienced developers like Yaustar, Paeryn, and DJWillis always willing to help beginners out! Thanks a lot guys
- Alex