1 /* dummy code for qemu testing, etc */
5 #include "../common/emu.h"
7 extern void *gp2x_screens[4];
9 extern unsigned int plat_get_ticks_ms_good(void);
10 extern unsigned int plat_get_ticks_us_good(void);
13 static void gp2x_video_flip_(void)
17 /* doulblebuffered flip */
18 static void gp2x_video_flip2_(void)
22 static void gp2x_video_changemode_ll_(int bpp)
26 static void gp2x_video_setpalette_(int *pal, int len)
30 static void gp2x_video_RGB_setscaling_(int ln_offs, int W, int H)
34 static void gp2x_video_wait_vsync_(void)
39 static void set_ram_timings_(void)
43 static void unset_ram_timings_(void)
48 static void set_lcd_custom_rate_(int is_pal)
52 static void unset_lcd_custom_rate_(void)
56 static void set_lcd_gamma_(int g100, int A_SNs_curve)
60 static int gp2x_read_battery_(void)
68 g_screen_ptr = malloc(320 * 240 * 2);
69 for (i = 0; i < array_size(gp2x_screens); i++)
70 gp2x_screens[i] = g_screen_ptr;
72 gp2x_video_flip = gp2x_video_flip_;
73 gp2x_video_flip2 = gp2x_video_flip2_;
74 gp2x_video_changemode_ll = gp2x_video_changemode_ll_;
75 gp2x_video_setpalette = gp2x_video_setpalette_;
76 gp2x_video_RGB_setscaling = gp2x_video_RGB_setscaling_;
77 gp2x_video_wait_vsync = gp2x_video_wait_vsync_;
79 set_lcd_custom_rate = set_lcd_custom_rate_;
80 unset_lcd_custom_rate = unset_lcd_custom_rate_;
81 set_lcd_gamma = set_lcd_gamma_;
83 set_ram_timings = set_ram_timings_;
84 unset_ram_timings = unset_ram_timings_;
85 gp2x_read_battery = gp2x_read_battery_;
87 gp2x_get_ticks_ms = plat_get_ticks_ms_good;
88 gp2x_get_ticks_us = plat_get_ticks_us_good;
91 void dummy_finish(void)
93 free(gp2x_screens[0]);