GP2X Game With Tv-out Too Fast!


synkro

0xdeadbeef
Joined
Aug 26, 2003
Messages
823
Location
Germany
Website
Visit site
When I run my game on the pc and gp2x (LCD) everything runs fine as I have a 60 fps limiter. but when I enable the tv-out, the game seems to run twice as fast. how can that be? Do I need 30 fps have tv-out properly working?
 
synkro said:
When I run my game on the pc and gp2x (LCD) everything runs fine as I have a 60 fps limiter. but when I enable the tv-out, the game seems to run twice as fast. how can that be? Do I need 30 fps have tv-out properly working?
Thats doesnt make too much sense, what do you base your loop time by? Do you use vsync with the lcd and base your blit loop on it?
 
Last edited by a moderator:
I use SDL_GP2X_WaitForBlitter(); to wait for the blitter. Is there an explicit way to force to wait for vsync?
 
synkro said:
I use SDL_GP2X_WaitForBlitter(); to wait for the blitter. Is there an explicit way to force to wait for vsync?

Do a search on that function and you will find some discussions about it. From the way you desribe the problem it seems the blitter takes less time in tv-out mode than lcd-mode.
You could try using a sdl timer to build a software frame limiter it wouldnt be vsync'd, but it would keep the game at the right speed no matter what the output.
 
Last edited by a moderator:
synkro said:
I use SDL_GP2X_WaitForBlitter(); to wait for the blitter. Is there an explicit way to force to wait for vsync?

WaitForBlitter() only waits for the last hardware blit to finish and won't make any difference between TV and LCD modes. To wait for the vsync you want to call SDL_GP2X_VSync().

I've never noticed the TV-out to go fast, the problems I had with it (at the hardware level) was after switching back to LCD from TV, if the TV hadn't shown an even number of frames then the vsync detection was returning inverted results (i.e. saying it was in vsync when it wasn't and vice-versa) which totally screws the timing up and made the LCD fast half the time.

I know there can be issues with the vsync detection (especially after the gp2x has been in TV mode), I'm looking into using the hardware interrupt to get better synchronization but it'll require either a whole new device driver or modifications to open2x's framebuffer driver.
 
Last edited by a moderator:
Back
Top