gbasys

diff src/gfx.h @ 2:e3dc7705ad9c

communications stuff
author John Tsiombikas <nuclear@member.fsf.org>
date Wed, 07 Mar 2012 06:11:51 +0200
parents 875ef6085efc
children 06726f0b8cd3
line diff
     1.1 --- a/src/gfx.h	Sun Mar 04 07:06:41 2012 +0200
     1.2 +++ b/src/gfx.h	Wed Mar 07 06:11:51 2012 +0200
     1.3 @@ -23,7 +23,7 @@
     1.4  struct pixel_buffer {
     1.5  	int x, y, bpp;
     1.6  	void *pixels;
     1.7 -};	
     1.8 +};
     1.9  
    1.10  enum {
    1.11  	VMODE_LFB_240x160_16	= 3,
    1.12 @@ -52,7 +52,7 @@
    1.13  
    1.14  void copy_buffer(const struct pixel_buffer *src, struct pixel_buffer *dst);
    1.15  
    1.16 -#define wait_vsync()	while(*reg_vcount < front_buffer->yres)
    1.17 +#define wait_vsync()	while(*((volatile unsigned short*)0x4000006) < front_buffer->y)
    1.18  
    1.19  #define put_pixel(px, py, col, pbuf)	((unsigned short*)(pbuf)->pixels)[(py) * (pbuf)->x + (px)] = col
    1.20  void draw_line(int x1, int y1, int x2, int y2, unsigned short col, struct pixel_buffer *pbuf);