• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    公众号

C++ osd_fwrite函数代码示例

原作者: [db:作者] 来自: [db:来源] 收藏 邀请

本文整理汇总了C++中osd_fwrite函数的典型用法代码示例。如果您正苦于以下问题:C++ osd_fwrite函数的具体用法?C++ osd_fwrite怎么用?C++ osd_fwrite使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。



在下文中一共展示了osd_fwrite函数的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的C++代码示例。

示例1: jackrabt_hisave

static void jackrabt_hisave(void)
{
	void *f;
	unsigned char *RAM = Machine->memory_region[Machine->drv->cpu[0].memory_region];


	if ((f = osd_fopen(Machine->gamedrv->name,0,OSD_FILETYPE_HIGHSCORE,1)) != 0)
	{
		osd_fwrite(f,&RAM[0x73ba],8*6);
		osd_fwrite(f,&RAM[0x73ea],8*3);
		osd_fclose(f);
	}
}
开发者ID:OS2World,项目名称:APP-EMULATION-MAME,代码行数:13,代码来源:zaccaria.c


示例2: gemini_hisave

static void gemini_hisave(void)
{
	void *f;
	unsigned char *RAM = Machine->memory_region[Machine->drv->cpu[0].memory_region];


	if ((f = osd_fopen(Machine->gamedrv->name,0,OSD_FILETYPE_HIGHSCORE,1)) != 0)
	{
		osd_fwrite(f,&RAM[0xc026],3);
		osd_fwrite(f,&RAM[0xcf41],3*10+4*10);
		osd_fclose(f);
	}
}
开发者ID:cyberkni,项目名称:276in1JAMMA,代码行数:13,代码来源:tecmo.cpp


示例3: fantasy_hisave

static void fantasy_hisave(void)
{
	void *f;
	unsigned char *RAM = Machine->memory_region[Machine->drv->cpu[0].memory_region];


	if ((f = osd_fopen(Machine->gamedrv->name,0,OSD_FILETYPE_HIGHSCORE,1)) != 0)
	{
		osd_fwrite(f,&RAM[0x0025],3);
		osd_fwrite(f,&RAM[0x0220],3*16);
		osd_fclose(f);
	}
}
开发者ID:OS2World,项目名称:APP-EMULATION-MAME,代码行数:13,代码来源:rockola.c


示例4: mixer_write_config

void mixer_write_config(void *f)
{
	UINT8 default_levels[MIXER_MAX_CHANNELS];
	UINT8 mixing_levels[MIXER_MAX_CHANNELS];
	int i;

	for (i = 0; i < MIXER_MAX_CHANNELS; i++)
	{
		default_levels[i] = mixer_channel[i].default_mixing_level;
		mixing_levels[i] = mixer_channel[i].mixing_level;
	}
	osd_fwrite(f, default_levels, MIXER_MAX_CHANNELS);
	osd_fwrite(f, mixing_levels, MIXER_MAX_CHANNELS);
}
开发者ID:AlanApter,项目名称:steamlink-sdk,代码行数:14,代码来源:mixer.cpp


示例5: hisave

static void hisave(void)
{
	void *f;
	unsigned char *RAM = Machine->memory_region[Machine->drv->cpu[0].memory_region];


	if ((f = osd_fopen(Machine->gamedrv->name,0,OSD_FILETYPE_HIGHSCORE,1)) != 0)
	{
		osd_fwrite(f,&RAM[0x8BC5],15);
		osd_fwrite(f,&RAM[0x8BE4],16);
		osd_fwrite(f,&RAM[0x885C],4);
		osd_fwrite(f,&RAM[0x8060],8);
		osd_fclose(f);
	}
}
开发者ID:OS2World,项目名称:APP-EMULATION-MAME,代码行数:15,代码来源:bosco.c


示例6: silkworm_hisave

static void silkworm_hisave(void)
{
	void *f;
	unsigned char *RAM = Machine->memory_region[Machine->drv->cpu[0].memory_region];


	if ((f = osd_fopen(Machine->gamedrv->name,0,OSD_FILETYPE_HIGHSCORE,1)) != 0)
	{
		osd_fwrite(f,&RAM[0xd262],10*10);
		osd_fwrite(f,&RAM[0xd54e],4);
		osd_fwrite(f,&RAM[0xd572],4);
		osd_fclose(f);
	}

}
开发者ID:cyberkni,项目名称:276in1JAMMA,代码行数:15,代码来源:tecmo.cpp


示例7: gsword_hisave

static void gsword_hisave(void)
{
    	/* get RAM pointer (this game is multiCPU, we can't assume the global */
	/* RAM pointer is pointing to the right place) */

	unsigned char *RAM = Machine->memory_region[0];
	void *f = osd_fopen(Machine->gamedrv->name,0,OSD_FILETYPE_HIGHSCORE,1);

	if (f)
	{
                osd_fwrite(f,&RAM[0x9c00],3*10);
                osd_fwrite(f,&RAM[0x9c78],6*10);
		osd_fclose(f);
	}
}
开发者ID:cyberkni,项目名称:276in1JAMMA,代码行数:15,代码来源:gsword.cpp


示例8: hs_save

static void hs_save (void)
{
	void *f = osd_fopen (Machine->gamedrv->name, 0, OSD_FILETYPE_HIGHSCORE, 1);
	LOG(("hs_save\n"));
	if (f)
	{
		struct mem_range *mem_range = state.mem_range;
		LOG(("saving...\n"));
		while (mem_range)
		{
			UINT8 *data = (UINT8*)malloc(mem_range->num_bytes);
			if (data)
			{
				/*	this buffer will almost certainly be small
					enough to be dynamically allocated, but let's
					avoid memory trashing just in case
				*/
				copy_from_memory (mem_range->cpu, mem_range->addr, data, mem_range->num_bytes);
				osd_fwrite(f, data, mem_range->num_bytes);
				free(data);
			}
			mem_range = mem_range->next;
		}
		osd_fclose(f);
	}
}
开发者ID:Nebuleon,项目名称:mame4all,代码行数:26,代码来源:hiscore.cpp


示例9: osd_fwrite_swap

int osd_fwrite_swap(void *file,const void *buffer,int length)
{
	int i;
	unsigned char *buf;
	unsigned char temp;
	int res;


	buf = (unsigned char *)buffer;
	for (i = 0;i < length;i+=2)
	{
		temp = buf[i];
		buf[i] = buf[i+1];
		buf[i+1] = temp;
	}

	res = osd_fwrite(file,buffer,length);

	for (i = 0;i < length;i+=2)
	{
		temp = buf[i];
		buf[i] = buf[i+1];
		buf[i+1] = temp;
	}

	return res;
}
开发者ID:cdrr,项目名称:MAME_hack,代码行数:27,代码来源:osdepend.c


示例10: hisave

static void hisave(void)
{
    void *f;
	unsigned char *RAM = Machine->memory_region[Machine->drv->cpu[0].memory_region];


    if ((f = osd_fopen(Machine->gamedrv->name,0,OSD_FILETYPE_HIGHSCORE,1)) != 0)
    {
	 	osd_fwrite(f,&RAM[0x4014],5);
		osd_fwrite(f,&RAM[0x417d],12);
        osd_fclose(f);
    	fast_memset(&RAM[0x4014],0xff,5); /* hi score */
		fast_memset(&RAM[0x417d],0xff,12); /* name */

	}
}
开发者ID:cyberkni,项目名称:276in1JAMMA,代码行数:16,代码来源:crbaloon.cpp


示例11: save_snapshot_xpm

/*----------------------------------------------------------------------*/
static int	save_snapshot_xpm( OSD_FILE *fp )
{
  unsigned char buf[80];
  int i, j, c;
  char *p = screen_snapshot;

  if( fp==NULL ) return 0;

  sprintf( buf,
	   "/* XPM */\n"
	   "static char * quasi88_xpm[] = {\n"
	   "\"640 400 16 1\",\n" );
  osd_fwrite( buf, sizeof(char), strlen(buf), fp );

  for( i=0; i<16; i++ ){
    sprintf( buf, "\"%1X      c #%04X%04X%04X\",\n",
	     i,
	     (unsigned short)pal[i].red   << 8,
	     (unsigned short)pal[i].green << 8,
	     (unsigned short)pal[i].blue  << 8 );
    osd_fwrite( buf, sizeof(char), strlen(buf), fp );
  }


  for( i=0; i<400; i++ ){

    osd_fputc( '\"', fp );

    for( j=0; j<640; j++ ){
      c = *p++;
      if( c < 10 ) c += '0';
      else         c += 'A' - 10;
      osd_fputc( c, fp );
    }

    sprintf( buf, "\",\n" );
    osd_fwrite( buf, sizeof(char), strlen(buf), fp );

  }

  sprintf( buf, "};\n" );
  osd_fwrite( buf, sizeof(char), strlen(buf), fp );

  return 1;
}
开发者ID:toyoshim,项目名称:quasi88nc,代码行数:46,代码来源:snapshot.c


示例12: save_snapshot_bmp

/*----------------------------------------------------------------------*/
static int	save_snapshot_bmp( OSD_FILE *fp )
{
  static const char header[] =
  {
    'B', 'M',			/* BM */
    0x36, 0xb8, 0x0b, 0x00,	/* ファイルサイズ 0xbb836 */
    0x00, 0x00,
    0x00, 0x00,
    0x36, 0x00, 0x00, 0x00,	/* 画像データオフセット 0x36 */

    0x28, 0x00, 0x00, 0x00,	/* 情報サイズ 0x28 */
    0x80, 0x02, 0x00, 0x00,	/* 幅	0x280 */
    0x90, 0x01, 0x00, 0x00,	/* 高さ	0x190 */
    0x01, 0x00,
    0x18, 0x00,			/* 色深度 */
    0x00, 0x00, 0x00, 0x00,
    0x00, 0x00, 0x00, 0x00,	/* 画像サイズ?	0xbb800 */
    0x00, 0x00, 0x00, 0x00,	/* 横方向解像度?	*/
    0x00, 0x00, 0x00, 0x00,	/* 縦方向解像度?	*/
    0x00, 0x00, 0x00, 0x00,	/* 使用パレット数	*/
    0x00, 0x00, 0x00, 0x00,	/* 重要?		*/
  };

  unsigned char buf[4];
  int i, j;
  char *p;

  if( fp==NULL ) return 0;

  osd_fwrite( header, sizeof(char), sizeof(header), fp );


  for( i=0; i<400; i++ ){
    p = screen_snapshot + (399-i)*640;
    for( j=0; j<640; j++ ){
      buf[0] = pal[ (int)*p ].blue;
      buf[1] = pal[ (int)*p ].green;
      buf[2] = pal[ (int)*p ].red;
      osd_fwrite( buf, sizeof(char), 3, fp );
      p++;
    }
  }

  return 1;
}
开发者ID:toyoshim,项目名称:quasi88nc,代码行数:46,代码来源:snapshot.c


示例13: nvram_handler

static void nvram_handler(void *file,int read_or_write)
{
	if (read_or_write)
		osd_fwrite(file, nvram, nvram_size);
	else if (file)
		osd_fread(file, nvram, nvram_size);
	else
		memset(nvram, 0, nvram_size);
}
开发者ID:slaanesh-dev,项目名称:xMame37B16-Pi,代码行数:9,代码来源:qix.c


示例14: nvram_handler

static void nvram_handler(void *file, int read_or_write)
{
	if (read_or_write)
		osd_fwrite(file, wms_cmos_ram, 0x4000);
	else if (file)
		osd_fread(file, wms_cmos_ram, 0x4000);
	else
		memset(wms_cmos_ram, 0, 0x4000);
}
开发者ID:slaanesh-dev,项目名称:xMame37B16-Pi,代码行数:9,代码来源:wmstunit.c


示例15: berzerk_nvram_handler

static void berzerk_nvram_handler(void *file,int read_or_write)
{
    if (read_or_write)
        osd_fwrite(file,nvram,nvram_size);
    else
    {
        if (file)
            osd_fread(file,nvram,nvram_size);
    }
}
开发者ID:Nebuleon,项目名称:mame4all,代码行数:10,代码来源:berzerk.cpp


示例16: hisave

static void hisave(void)
{
	void *f;

	if ((f = osd_fopen(Machine->gamedrv->name,0,OSD_FILETYPE_HIGHSCORE,1)) != 0)
	{
		osd_fwrite(f,&ram[0x6B66],180);
		osd_fclose(f);
	}
}
开发者ID:OS2World,项目名称:APP-EMULATION-MAME,代码行数:10,代码来源:toki.c


示例17: dangar_hisave

static void dangar_hisave(void)
{
	void *f;
	unsigned char *RAM = Machine->memory_region[Machine->drv->cpu[0].memory_region];

	if ((f = osd_fopen(Machine->gamedrv->name,0,OSD_FILETYPE_HIGHSCORE,1)) != 0)
	{
                osd_fwrite(f, &RAM[0xe209], 10*13);
		osd_fclose(f);
	}
}
开发者ID:OS2World,项目名称:APP-EMULATION-MAME,代码行数:11,代码来源:galivan.c


示例18: galivan_hisave

static void galivan_hisave(void)
{
    unsigned char *RAM = Machine->memory_region[0];
    void *f;

	if ((f = osd_fopen(Machine->gamedrv->name,0,OSD_FILETYPE_HIGHSCORE,1)) != 0)
	{
		osd_fwrite(f, &RAM[0xe14f], 13*10);
		osd_fclose(f);
	}
}
开发者ID:OS2World,项目名称:APP-EMULATION-MAME,代码行数:11,代码来源:galivan.c


示例19: mame_fwrite

UINT32 mame_fwrite(mame_file *file, const void *buffer, size_t length)
{
	/* switch off the file type */
	switch (file->type)
	{
		case PLAIN_FILE:
			return osd_fwrite(file->file, buffer, length);
	}

	return 0;
}
开发者ID:enver-haase,项目名称:PinMAME-jsm174,代码行数:11,代码来源:fileio.c


示例20: namcos2_hisave

void namcos2_hisave(void)
{
	void *f;

	f = osd_fopen (Machine->gamedrv->name, 0, OSD_FILETYPE_HIGHSCORE, 1);
	if (f)
	{
		osd_fwrite (f, namcos2_eeprom, namcos2_eeprom_size);
		osd_fclose (f);
	}
}
开发者ID:OS2World,项目名称:APP-EMULATION-MAME,代码行数:11,代码来源:namcos2.c



注:本文中的osd_fwrite函数示例由纯净天空整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。


鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
上一篇:
C++ osd_invariant函数代码示例发布时间:2022-05-30
下一篇:
C++ osd_fread函数代码示例发布时间:2022-05-30
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap