#include "../gp2x/minimal.h"
#include "../gp2x/usbjoy.h"
+#include "../gp2x/cpuctrl.h"
SDL_Surface *screen;
void *gp2x_screen;
}
-void gp2x_video_RGB_setscaling(int ln_offs, int W, int H)
+void gp2x_video_RGB_setscaling(int W, int H)
{
}
{
}
+void gp2x_video_flush_cache(void)
+{
+}
+
void gp2x_memcpy_buffers(int buffers, void *data, int offset, int len)
{
}
{
printf("entering init()\n"); fflush(stdout);
- gp2x_screen = malloc(320*240*2);
+ gp2x_screen = malloc(320*240*2 + 32);
if(gp2x_screen == NULL) return;
- memset(gp2x_screen, 0, 320*240*2);
+ memset(gp2x_screen, 0, 320*240*2 + 32);
if(SDL_Init(SDL_INIT_NOPARACHUTE))
{
{
}
+void set_LCD_custom_rate(lcd_rate_t rate)
+{
+}
+
+void unset_LCD_custom_rate(void)
+{
+}
+
int mmuhack(void)
{
usleep(c/200);
}
+void convert2RGB555(unsigned short *dst, unsigned char *src, unsigned short *pal, int count)
+{
+ while (count--)
+ *dst++ = pal[*src++];
+}
+
+/* don't scale, just convert */
void soft_scale(void *dst, unsigned short *pal, int line_offs, int lines)
{
+ unsigned char *src = (unsigned char *)dst + (line_offs + lines) * 320;
+ unsigned short *dest = (unsigned short *)dst + (line_offs + lines) * 320;
+ int count = lines*320;
+
+ while (count--)
+ *(--dest) = pal[*(--src)];
}