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 gp2x_set_cpuclk_(unsigned int mhz)
44 static void set_ram_timings_(void)
48 static void unset_ram_timings_(void)
53 static void set_lcd_custom_rate_(int is_pal)
57 static void unset_lcd_custom_rate_(void)
61 static void set_lcd_gamma_(int g100, int A_SNs_curve)
65 static int gp2x_read_battery_(void)
73 g_screen_ptr = malloc(320 * 240 * 2);
74 for (i = 0; i < array_size(gp2x_screens); i++)
75 gp2x_screens[i] = g_screen_ptr;
77 gp2x_video_flip = gp2x_video_flip_;
78 gp2x_video_flip2 = gp2x_video_flip2_;
79 gp2x_video_changemode_ll = gp2x_video_changemode_ll_;
80 gp2x_video_setpalette = gp2x_video_setpalette_;
81 gp2x_video_RGB_setscaling = gp2x_video_RGB_setscaling_;
82 gp2x_video_wait_vsync = gp2x_video_wait_vsync_;
84 gp2x_set_cpuclk = gp2x_set_cpuclk_;
86 set_lcd_custom_rate = set_lcd_custom_rate_;
87 unset_lcd_custom_rate = unset_lcd_custom_rate_;
88 set_lcd_gamma = set_lcd_gamma_;
90 set_ram_timings = set_ram_timings_;
91 unset_ram_timings = unset_ram_timings_;
92 gp2x_read_battery = gp2x_read_battery_;
94 gp2x_get_ticks_ms = plat_get_ticks_ms_good;
95 gp2x_get_ticks_us = plat_get_ticks_us_good;
98 void dummy_finish(void)
100 free(gp2x_screens[0]);