Hi there,
I started writing one game for the gp2x. So I figured out that I'd like to have a frame rate of 60. So I setuped an Idle loop. Until I try to
do some alpha blended blit everything was fine. So the trouble come from the Alpha Blended blit . What I do is an alpha blened blit from
a surface of 256 * 160 to the main screen. My FPS got down from 60 to ~34 and I was seeing the refresh at the screen. So 1st question:
- Is there a way to ENSURE that the hardware blitter has ended is job before Dooing the SDL_Flip ? I tryed to SDL_LockSurface(MainScreen) / SDL_UnlockSurface(MainScreen) without any success.
2nd question : Can the MMU Hack help me, or It'll only help me if I do some direct access to the HW surface [ witch SDL is dooing because of the alpha blitting is rendered in software. ] If so, what do I have to do, do I have something else to do that `insmod mmuhack.o' before the start of SDL ? do I need ot modify the open in SDL from /dev/mem to /dev/mmuhackmem or how it is called.
Thanks for your help all, I was planning to write my own alpha blitter in ASM, but for this I think I should use the MMU hack. So can somone give me advice.
paxl13
EDIT:
After rereading the post I said to myself that I wasn't clear so ! What I want to know is :
- How to make sure that the HW blitter has ended before calling SDL_Flip ?
- What do the MMU Hack and can it help me in coding a Alpha blitter ?
- Thanks for your support !
I started writing one game for the gp2x. So I figured out that I'd like to have a frame rate of 60. So I setuped an Idle loop. Until I try to
do some alpha blended blit everything was fine. So the trouble come from the Alpha Blended blit . What I do is an alpha blened blit from
a surface of 256 * 160 to the main screen. My FPS got down from 60 to ~34 and I was seeing the refresh at the screen. So 1st question:
- Is there a way to ENSURE that the hardware blitter has ended is job before Dooing the SDL_Flip ? I tryed to SDL_LockSurface(MainScreen) / SDL_UnlockSurface(MainScreen) without any success.
2nd question : Can the MMU Hack help me, or It'll only help me if I do some direct access to the HW surface [ witch SDL is dooing because of the alpha blitting is rendered in software. ] If so, what do I have to do, do I have something else to do that `insmod mmuhack.o' before the start of SDL ? do I need ot modify the open in SDL from /dev/mem to /dev/mmuhackmem or how it is called.
Thanks for your help all, I was planning to write my own alpha blitter in ASM, but for this I think I should use the MMU hack. So can somone give me advice.
paxl13
EDIT:
After rereading the post I said to myself that I wasn't clear so ! What I want to know is :
- How to make sure that the HW blitter has ended before calling SDL_Flip ?
- What do the MMU Hack and can it help me in coding a Alpha blitter ?
- Thanks for your support !