mirror of
https://github.com/RaySollium99/picodrive.git
synced 2025-09-06 07:38:05 -04:00
SH2 drc, dummy soc for GP2X
git-svn-id: file:///home/notaz/opt/svn/PicoDrive@823 be3aeb3a-fb24-0410-a615-afba39da0efa
This commit is contained in:
parent
7f5a3fc12a
commit
274f95a9a9
10 changed files with 158 additions and 37 deletions
102
platform/gp2x/soc_dummy.c
Normal file
102
platform/gp2x/soc_dummy.c
Normal file
|
@ -0,0 +1,102 @@
|
|||
/* dummy code for qemu testing, etc */
|
||||
#include <stdlib.h>
|
||||
|
||||
#include "soc.h"
|
||||
#include "../common/emu.h"
|
||||
|
||||
extern void *gp2x_screens[4];
|
||||
|
||||
extern unsigned int plat_get_ticks_ms_good(void);
|
||||
extern unsigned int plat_get_ticks_us_good(void);
|
||||
|
||||
/* video stuff */
|
||||
static void gp2x_video_flip_(void)
|
||||
{
|
||||
}
|
||||
|
||||
/* doulblebuffered flip */
|
||||
static void gp2x_video_flip2_(void)
|
||||
{
|
||||
}
|
||||
|
||||
static void gp2x_video_changemode_ll_(int bpp)
|
||||
{
|
||||
}
|
||||
|
||||
static void gp2x_video_setpalette_(int *pal, int len)
|
||||
{
|
||||
}
|
||||
|
||||
static void gp2x_video_RGB_setscaling_(int ln_offs, int W, int H)
|
||||
{
|
||||
}
|
||||
|
||||
static void gp2x_video_wait_vsync_(void)
|
||||
{
|
||||
}
|
||||
|
||||
/* CPU clock */
|
||||
static void gp2x_set_cpuclk_(unsigned int mhz)
|
||||
{
|
||||
}
|
||||
|
||||
/* RAM timings */
|
||||
static void set_ram_timings_(void)
|
||||
{
|
||||
}
|
||||
|
||||
static void unset_ram_timings_(void)
|
||||
{
|
||||
}
|
||||
|
||||
/* LCD refresh */
|
||||
static void set_lcd_custom_rate_(int is_pal)
|
||||
{
|
||||
}
|
||||
|
||||
static void unset_lcd_custom_rate_(void)
|
||||
{
|
||||
}
|
||||
|
||||
static void set_lcd_gamma_(int g100, int A_SNs_curve)
|
||||
{
|
||||
}
|
||||
|
||||
static int gp2x_read_battery_(void)
|
||||
{
|
||||
return 0;
|
||||
}
|
||||
|
||||
void dummy_init(void)
|
||||
{
|
||||
int i;
|
||||
g_screen_ptr = malloc(320 * 240 * 2);
|
||||
for (i = 0; i < array_size(gp2x_screens); i++)
|
||||
gp2x_screens[i] = g_screen_ptr;
|
||||
|
||||
gp2x_video_flip = gp2x_video_flip_;
|
||||
gp2x_video_flip2 = gp2x_video_flip2_;
|
||||
gp2x_video_changemode_ll = gp2x_video_changemode_ll_;
|
||||
gp2x_video_setpalette = gp2x_video_setpalette_;
|
||||
gp2x_video_RGB_setscaling = gp2x_video_RGB_setscaling_;
|
||||
gp2x_video_wait_vsync = gp2x_video_wait_vsync_;
|
||||
|
||||
gp2x_set_cpuclk = gp2x_set_cpuclk_;
|
||||
|
||||
set_lcd_custom_rate = set_lcd_custom_rate_;
|
||||
unset_lcd_custom_rate = unset_lcd_custom_rate_;
|
||||
set_lcd_gamma = set_lcd_gamma_;
|
||||
|
||||
set_ram_timings = set_ram_timings_;
|
||||
unset_ram_timings = unset_ram_timings_;
|
||||
gp2x_read_battery = gp2x_read_battery_;
|
||||
|
||||
gp2x_get_ticks_ms = plat_get_ticks_ms_good;
|
||||
gp2x_get_ticks_us = plat_get_ticks_us_good;
|
||||
}
|
||||
|
||||
void dummy_finish(void)
|
||||
{
|
||||
free(gp2x_screens[0]);
|
||||
}
|
||||
|
Loading…
Add table
Add a link
Reference in a new issue