一、输入接口:osd_get_code_value
二、显示接口:sysdep_display_update SDL_UpdateRects
char *sysdep_display_update(mame_bitmap *bitmap,
rectangle *vis_area, rectangle *dirty_area,
struct sysdep_palette_struct *palette, int keyb_leds, int flags);
mame_bitmap *bitmap:图像数据
struct _mame_bitmap
{
int width,height; /*位图的宽高 */
int depth; /* 像素大小 */
void **line; /* pointers to the start of each line - can be UINT8 **, UINT16 ** or UINT32 ** */
/* 接受图像的另一种方法 */
void *base; /* 指向像素(0,0)的指针(针对填充进行了调整) */
int rowpixels; /* 每行像素数(包括填充) */
int rowbytes; /* 每行字节数(包括填充) */
/* functions to render in the correct orientation */
void (*plot)(struct _mame_bitmap *bitmap,int x,int y,pen_t pen);
pen_t (*read)(struct _mame_bitmap *bitmap,int x,int y);
void (*plot_box)(struct _mame_bitmap *bitmap,int x,int y,int width,int height,pen_t pen);
};
rectangle *vis_area:显示区域
rectangle *dirty_area:显示区域
struct _rectangle
{
int min_x,max_x;
int min_y,max_y;
};
struct sysdep_palette_struct *palette:调色板
struct sysdep_palette_struct
{
int src_depth;//标志颜色格式,是否需要调色板。
/*
15 555 direct rgb mode
16 palettised mode
32 888 direct rgb mode
*/
struct sysdep_palette_info *display_palette;
unsigned int *lookup; /* lookup table to be used for blitters to convert
the src palette to the display palette */
};
int keyb_leds, int flags:other