mirror of
https://github.com/RaySollium99/libpicofe.git
synced 2025-09-06 15:18:05 -04:00
perfect vsync
git-svn-id: file:///home/notaz/opt/svn/PicoDrive/platform@218 be3aeb3a-fb24-0410-a615-afba39da0efa
This commit is contained in:
parent
0ae6813e48
commit
59d0f042a1
4 changed files with 64 additions and 32 deletions
|
@ -34,6 +34,7 @@
|
|||
|
||||
#include "gp2x.h"
|
||||
#include "usbjoy.h"
|
||||
#include "asmutils.h"
|
||||
|
||||
volatile unsigned short *gp2x_memregs;
|
||||
//static
|
||||
|
@ -149,11 +150,10 @@ void gp2x_video_RGB_setscaling(int ln_offs, int W, int H)
|
|||
}
|
||||
|
||||
|
||||
/* LCD updates @ 80Hz? */
|
||||
void gp2x_video_wait_vsync(void)
|
||||
{
|
||||
gp2x_memregs[0x2846>>1] = 0x20|2; //(gp2x_memregs[0x2846>>1] | 0x20) & ~2;
|
||||
while(!(gp2x_memregs[0x2846>>1] & 2));// usleep(1);
|
||||
unsigned short v = gp2x_memregs[0x1182>>1];
|
||||
while (!((v ^ gp2x_memregs[0x1182>>1]) & 0x10)) spend_cycles(1024);
|
||||
}
|
||||
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue