2 * (C) GraÅžvydas "notaz" Ignotas, 2009,2010
4 * This work is licensed under the terms of any of these licenses
6 * - GNU GPL, version 2 or later.
7 * - GNU LGPL, version 2.1 or later.
9 * See the COPYING file in the top-level directory.
12 /* dummy code for qemu testing, etc */
18 extern void *gp2x_screens[4];
20 extern unsigned int plat_get_ticks_ms_good(void);
21 extern unsigned int plat_get_ticks_us_good(void);
24 static void gp2x_video_flip_(void)
28 /* doulblebuffered flip */
29 static void gp2x_video_flip2_(void)
33 static void gp2x_video_changemode_ll_(int bpp)
37 static void gp2x_video_setpalette_(int *pal, int len)
41 static void gp2x_video_RGB_setscaling_(int ln_offs, int W, int H)
45 static void gp2x_video_wait_vsync_(void)
50 static void set_ram_timings_(void)
54 static void unset_ram_timings_(void)
59 static void set_lcd_custom_rate_(int is_pal)
63 static void unset_lcd_custom_rate_(void)
67 static void set_lcd_gamma_(int g100, int A_SNs_curve)
71 static int gp2x_read_battery_(void)
79 g_screen_ptr = malloc(320 * 240 * 2);
80 for (i = 0; i < array_size(gp2x_screens); i++)
81 gp2x_screens[i] = g_screen_ptr;
83 gp2x_video_flip = gp2x_video_flip_;
84 gp2x_video_flip2 = gp2x_video_flip2_;
85 gp2x_video_changemode_ll = gp2x_video_changemode_ll_;
86 gp2x_video_setpalette = gp2x_video_setpalette_;
87 gp2x_video_RGB_setscaling = gp2x_video_RGB_setscaling_;
88 gp2x_video_wait_vsync = gp2x_video_wait_vsync_;
90 set_lcd_custom_rate = set_lcd_custom_rate_;
91 unset_lcd_custom_rate = unset_lcd_custom_rate_;
92 set_lcd_gamma = set_lcd_gamma_;
94 set_ram_timings = set_ram_timings_;
95 unset_ram_timings = unset_ram_timings_;
96 gp2x_read_battery = gp2x_read_battery_;
98 gp2x_get_ticks_ms = plat_get_ticks_ms_good;
99 gp2x_get_ticks_us = plat_get_ticks_us_good;
102 void dummy_finish(void)
104 free(gp2x_screens[0]);