gp2x.h 1.2 KB

1234567891011121314151617181920212223242526272829303132333435363738394041
  1. #ifndef __GP2X_H__
  2. #define __GP2X_H__
  3. void gp2x_init(void);
  4. void gp2x_deinit(void);
  5. /* video */
  6. void gp2x_video_flip(void);
  7. void gp2x_video_flip2(void);
  8. void gp2x_video_changemode(int bpp);
  9. void gp2x_video_changemode2(int bpp);
  10. void gp2x_video_setpalette(int *pal, int len);
  11. void gp2x_video_RGB_setscaling(int ln_offs, int W, int H);
  12. void gp2x_video_wait_vsync(void);
  13. void gp2x_video_flush_cache(void);
  14. void gp2x_memcpy_buffers(int buffers, void *data, int offset, int len);
  15. void gp2x_memcpy_all_buffers(void *data, int offset, int len);
  16. void gp2x_memset_all_buffers(int offset, int byte, int len);
  17. void gp2x_pd_clone_buffer2(void);
  18. /* input */
  19. unsigned long gp2x_joystick_read(int allow_usb_joy);
  20. int gp2x_touchpad_read(int *x, int *y);
  21. /* 940 core */
  22. void Pause940(int yes);
  23. void Reset940(int yes, int bank);
  24. extern void *gp2x_screen;
  25. extern int memdev;
  26. enum { GP2X_UP=0x1, GP2X_LEFT=0x4, GP2X_DOWN=0x10, GP2X_RIGHT=0x40,
  27. GP2X_START=1<<8, GP2X_SELECT=1<<9, GP2X_L=1<<10, GP2X_R=1<<11,
  28. GP2X_A=1<<12, GP2X_B=1<<13, GP2X_X=1<<14, GP2X_Y=1<<15,
  29. GP2X_VOL_UP=1<<23, GP2X_VOL_DOWN=1<<22, GP2X_PUSH=1<<27 };
  30. #endif