当前位置: 首页>>代码示例>>C++>>正文


C++ osd_fclose函数代码示例

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


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

示例1: driver

/***************************************************************************

  Game driver(s)

***************************************************************************/


ROM_START( arkanoi2_rom )
	ROM_REGION(0x10000)				/* Region 0 - main cpu */
	ROM_LOAD( "a2-05.rom", 0x00000, 0x10000, 0x136edf9d )

	ROM_REGION_DISPOSE(0x20000*4)	/* Region 1 - temporary for gfx roms */
	ROM_LOAD( "a2-m04.rom", 0x00000, 0x20000, 0x548117c6 )	/* btp 0 */
	ROM_LOAD( "a2-m03.rom", 0x20000, 0x20000, 0x49a21c5e )	/* btp 1 */
	ROM_LOAD( "a2-m02.bin", 0x40000, 0x20000, 0x056a985f )	/* btp 2 */
	ROM_LOAD( "a2-m01.rom", 0x60000, 0x20000, 0x70cc559d )	/* btp 3 */

	ROM_REGION(0x10000)				/* Region 2 - sound cpu */
	ROM_LOAD( "a2-13.rom", 0x00000, 0x10000, 0xe8035ef1 )

	ROM_REGION(0x400)				/* Region 3 - color proms */
	ROM_LOAD( "b08-08.bin", 0x00000, 0x200, 0xa4f7ebd9 )	/* hi bytes */
	ROM_LOAD( "b08-07.bin", 0x00200, 0x200, 0xea34d9f7 )	/* lo bytes */
ROM_END

ROM_START( ark2us_rom )
	ROM_REGION(0x10000)				/* Region 0 - main cpu */
	ROM_LOAD( "b08-11.bin", 0x00000, 0x10000, 0x99555231 )

	ROM_REGION_DISPOSE(0x20000*4)	/* Region 1 - temporary for gfx roms */
	ROM_LOAD( "a2-m04.bin", 0x00000, 0x20000, 0x9754f703 )	/* btp 0 */
	ROM_LOAD( "a2-m03.bin", 0x20000, 0x20000, 0x274a795f )	/* btp 1 */
	ROM_LOAD( "a2-m02.bin", 0x40000, 0x20000, 0x056a985f )	/* btp 2 */
	ROM_LOAD( "a2-m01.bin", 0x60000, 0x20000, 0x2ccc86b4 )	/* btp 3 */

	ROM_REGION(0x10000)				/* Region 2 - sound cpu */
	ROM_LOAD( "b08-12.bin", 0x00000, 0x10000, 0xdc84e27d )

	ROM_REGION(0x400)				/* Region 3 - color proms */
	ROM_LOAD( "b08-08.bin", 0x00000, 0x200, 0xa4f7ebd9 )	/* hi bytes */
	ROM_LOAD( "b08-07.bin", 0x00200, 0x200, 0xea34d9f7 )	/* lo bytes */
ROM_END


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

		void *f;

		if ((f = osd_fopen(Machine->gamedrv->name,0,OSD_FILETYPE_HIGHSCORE,0)) != 0)
		{
			osd_fread(f, &RAM[0xe3a8], 3);
			osd_fclose(f);
		}


	/* check if the hi score table has already been initialized */
	if (memcmp(&RAM[0xeca5], "\x54\x4b\x4e\xff", 4) == 0 && memcmp(&RAM[0xec81], "\x01\x00\x00\x05", 4) == 0 )
	{

		if ((f = osd_fopen(Machine->gamedrv->name,0,OSD_FILETYPE_HIGHSCORE,0)) != 0)
		{
			osd_fread(f, &RAM[0xec81], 8*5);
			osd_fclose(f);
		}

		return 1;
	}
	else return 0; /* we can't load the hi scores yet */
}
开发者ID:cyberkni,项目名称:276in1JAMMA,代码行数:71,代码来源:arkanoi2.cpp

示例2: turtles_hiload

static int turtles_hiload(void) /* V.V */
{
	unsigned char *RAM = Machine->memory_region[Machine->drv->cpu[0].memory_region];


	/* same as Amidar, but the high score table is initialized with zeros */
	/* a working quick-and-dirty solution is to update the top high score */
	/* and the whole table at different times */
	/* further study of the game code may provide a cleaner solution */

	static int first_pass = 0;
	static unsigned char top_score[] = { 0, 0, 0 };

	if (first_pass == 0)
	{
		void *f;

			if ((f = osd_fopen(Machine->gamedrv->name,0,OSD_FILETYPE_HIGHSCORE,0)) != 0)
			{
				osd_fread(f,top_score,3);
				osd_fclose(f);
			}
		first_pass = 1;
	}

	if ((memcmp(&RAM[0x80A0],"\xc0\xc0\x00",3) == 0))
	{
		RAM[0x80a8] = top_score[0];
		RAM[0x80a9] = top_score[1];
		RAM[0x80aa] = top_score[2];
		return 0;
	} /* continuously updating top high score - really dirty solution */

	else if (memcmp(&RAM[0x80A0],"\xc6\xc6\x00",3) == 0)
	{
		void *f;


		if ((f = osd_fopen(Machine->gamedrv->name,0,OSD_FILETYPE_HIGHSCORE,0)) != 0)
		{
			osd_fread(f,&RAM[0x8200],3*10);
			osd_fclose(f);
		}

		return 1;
	}
	else return 0;  /* we can't load the hi scores yet */
}
开发者ID:cyberkni,项目名称:276in1JAMMA,代码行数:48,代码来源:amidar.cpp

示例3: hs_load

static void hs_load (void)
{
	void *f = osd_fopen (Machine->gamedrv->name, 0, OSD_FILETYPE_HIGHSCORE, 0);
	state.hiscores_have_been_loaded = 1;
	LOG(("hs_load\n"));
	if (f)
	{
		struct mem_range *mem_range = state.mem_range;
		LOG(("loading...\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
				*/
				osd_fread (f, data, mem_range->num_bytes);
				copy_to_memory (mem_range->cpu, mem_range->addr, data, mem_range->num_bytes);
				free(data);
			}
			mem_range = mem_range->next;
		}
		osd_fclose (f);
	}
}
开发者ID:Nebuleon,项目名称:mame4all,代码行数:27,代码来源:hiscore.cpp

示例4: vanguard_hiload

ROM_END



static int vanguard_hiload(void)     /* V.V */
{
	unsigned char *RAM = Machine->memory_region[Machine->drv->cpu[0].memory_region];


	/* check if the hi score table has already been initialized */
	if (memcmp(&RAM[0x0025],"\x00\x10",2) == 0)
	{
		void *f;

		if ((f = osd_fopen(Machine->gamedrv->name,0,OSD_FILETYPE_HIGHSCORE,0)) != 0)
		{
			osd_fread(f,&RAM[0x0025],3);
			osd_fread(f,&RAM[0x0220],112);
			osd_fread(f,&RAM[0x02a0],16);
			osd_fclose(f);
		}

		return 1;
	}
	else return 0;   /* we can't load the hi scores yet */

}
开发者ID:OS2World,项目名称:APP-EMULATION-MAME,代码行数:27,代码来源:rockola.c

示例5: hiload

ROM_END



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


	/* check if the hi score table has already been initialized */
	if (memcmp(&RAM[0xe204],"\x02\x00\x00",3) == 0 &&
			memcmp(&RAM[0xe244],"\x01\x02\x00",3) == 0 &&
			memcmp(&RAM[0xe012],"\x6a\x81\x00",3) == 0)

	{
		void *f;


		if ((f = osd_fopen(Machine->gamedrv->name,0,OSD_FILETYPE_HIGHSCORE,0)) != 0)
		{
			osd_fread(f,&RAM[0xe200],16*5);
			memcpy(&RAM[0xe1e0],&RAM[0xe200],8);
			osd_fclose(f);
		}

		return 1;
	}
	else return 0;	/* we can't load the hi scores yet */
}
开发者ID:OS2World,项目名称:APP-EMULATION-MAME,代码行数:29,代码来源:blktiger.c

示例6: maketrax_hiload

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


    /* during a reset, leave time to the game to clear the screen */
    if (++resetcount < 60) return 0;

    /* wait for "HI SCORE" to be on screen */
    if (memcmp(&RAM[0x43d0],"\x53\x40\x49\x48",4) == 0)
    {
        resetcount = 0;

        if ((f = osd_fopen(Machine->gamedrv->name,0,OSD_FILETYPE_HIGHSCORE,0)) != 0)
        {
            osd_fread(f,&RAM[0x4E40],30);

            RAM[0x4c80] = RAM[0x4e43];
            RAM[0x4c81] = RAM[0x4e44];
            RAM[0x4c82] = RAM[0x4e45];

            osd_fclose(f);
        }

        return 1;
    }
    else return 0;  /* we can't load the hi scores yet */
}
开发者ID:xobs,项目名称:chumby-mame,代码行数:30,代码来源:maketrax.cpp

示例7: 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

示例8: hiload

ROM_END



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


	/* check if the hi score table has already been initialized */
	if ((memcmp(&RAM[0x0308],"\x00\x00\x21",3) == 0) &&
		(memcmp(&RAM[0x033C],"\x0C\x1D\x0C",3) == 0))
	{
		void *f;


		if ((f = osd_fopen(Machine->gamedrv->name,0,OSD_FILETYPE_HIGHSCORE,0)) != 0)
		{
			osd_fread(f,&RAM[0x0308],11*5);
			osd_fclose(f);
		}

		return 1;
	}
	else return 0;	/* we can't load the hi scores yet */
}
开发者ID:cyberkni,项目名称:276in1JAMMA,代码行数:26,代码来源:mystston.cpp

示例9: ROM_LOAD

	/* all the following are banked at 0x4000-0x5fff */
	ROM_LOAD( "pl1-3",        0x10000, 0x4000, 0xaa9fa739 )
	ROM_LOAD( "pl1-4",        0x14000, 0x4000, 0x2b895a90 )
	ROM_LOAD( "pl1-5",        0x18000, 0x4000, 0x7af66200 )
	ROM_LOAD( "pl1-6",        0x1c000, 0x4000, 0xb01e59a9 )

	ROM_REGION_DISPOSE(0x20000)	/* temporary space for graphics (disposed after conversion) */
	ROM_LOAD( "pl1-12",       0x00000, 0x2000, 0xc159fbce )	/* chars */
	ROM_LOAD( "pl1-13",       0x02000, 0x2000, 0x6c5ed9ae )
	ROM_LOAD( "pl1-9",        0x10000, 0x4000, 0xf5d5962b )	/* sprites */
	ROM_LOAD( "pl1-10",       0x14000, 0x4000, 0xc7cf1904 )
	ROM_LOAD( "pl1-8",        0x18000, 0x4000, 0xa2ebfa4a )
	ROM_LOAD( "pl1-11",       0x1c000, 0x4000, 0x6621361a )

	ROM_REGION(0x1400)	/* color PROMs */
	ROM_LOAD( "pl1-2.bin",    0x0000, 0x0400, 0x472885de )	/* red and green component */
	ROM_LOAD( "pl1-1.bin",    0x0400, 0x0400, 0xa78ebdaf )	/* blue component */
	ROM_LOAD( "pl1-3.bin",    0x0800, 0x0400, 0x80558da8 )	/* sprites lookup table */
	ROM_LOAD( "pl1-5.bin",    0x0c00, 0x0400, 0x4b7ee712 )	/* foreground lookup table */
	ROM_LOAD( "pl1-4.bin",    0x1000, 0x0400, 0x3a7be418 )	/* background lookup table */

	ROM_REGION(0x10000)	/* 64k for code */
	ROM_LOAD( "pl1-7",        0x8000, 0x2000, 0x8c5becae ) /* sub program for the mcu */
	ROM_LOAD( "pl1-mcu.bin",  0xf000, 0x1000, 0x6ef08fb3 ) /* microcontroller */
ROM_END



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


	if  (memcmp(&RAM[0x2140],"\x00\x08\x00",3) == 0 &&
			memcmp(&RAM[0x02187],"\xE6\xE6\xE6",3) == 0 )
	{
		void *f;

		if ((f = osd_fopen(Machine->gamedrv->name,0,OSD_FILETYPE_HIGHSCORE,0)) != 0)
		{
			osd_fread(f,&RAM[0x2140],74);
			RAM[0x205D] = RAM[0x2140];
			RAM[0x205E] = RAM[0x2141];
			RAM[0x205F] = RAM[0x2142];

			osd_fclose(f);
		}

		return 1;
	}
	else return 0;   /* we can't load the hi scores yet */
}
开发者ID:cyberkni,项目名称:276in1JAMMA,代码行数:52,代码来源:pacland.cpp

示例10: name

ROM_END


/* Ten entries, 13 bytes each:  3 bytes - score/10 (BCD)
					 10 bytes - name (ASCII)		*/
static int galivan_hiload(void)
{
	unsigned char *RAM = Machine->memory_region[0];

	/* check if the high scores table has already been initialized */
	if ((memcmp(&RAM[0xe14f], "\x00\x01\x50\x4B", 4) == 0)&&
	    (memcmp(&RAM[0xe1cd], "\x54\x45\x52\x20", 4) == 0))
	{
		void *f;

		if ((f = osd_fopen(Machine->gamedrv->name,0,OSD_FILETYPE_HIGHSCORE,0)) != 0)
		{
			osd_fread(f, &RAM[0xe14f], 13*10);
			osd_fclose(f);
		}

		return 1;
	}
	else return 0; /* we can't load the high scores yet */
}
开发者ID:OS2World,项目名称:APP-EMULATION-MAME,代码行数:25,代码来源:galivan.c

示例11: kingofb_hiload

static int kingofb_hiload(void)
{
	unsigned char *RAM1 = Machine->memory_region[Machine->drv->cpu[0].memory_region];
	unsigned char *RAM2 = Machine->memory_region[Machine->drv->cpu[1].memory_region];


	if  (memcmp(&RAM2[0x8048],"\x00\x15\x00",3) == 0 &&
    	 memcmp(&RAM2[0x80D1],"\x10\x11\x12",3) == 0 &&
		 memcmp(&RAM1[0xc22b],"\x03\x00\x05\x00\x00\x00",6) == 0)
	{
		void *f;

		if ((f = osd_fopen(Machine->gamedrv->name,0,OSD_FILETYPE_HIGHSCORE,0)) != 0)
		{
			osd_fread(f,&RAM2[0x8048],140);
			osd_fclose(f);

			RAM1[0xc22a]=(RAM2[0x8063] >> 4 );
			RAM1[0xc22b]=(RAM2[0x8063] & 0x0f );
			RAM1[0xc22c]=(RAM2[0x8064] >> 4 );
			RAM1[0xc22d]=(RAM2[0x8064] & 0x0f );



		}
开发者ID:OS2World,项目名称:APP-EMULATION-MAME,代码行数:25,代码来源:kingobox.c

示例12: hiload

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


	if (memcmp(&RAM[0x2163],"CBR",3) == 0 &&
		memcmp(&RAM[0x20A6],"\x01\x98\x30",3) == 0 &&
		memcmp(&RAM[0x3627],"\x01",1) == 0)
	{
		void *f;

		if ((f = osd_fopen(Machine->gamedrv->name,0,OSD_FILETYPE_HIGHSCORE,0)) != 0)
		{
			osd_fread(f,&RAM[0x2160],0x32);
			RAM[0x20A6] = RAM[0x2160];
			RAM[0x20A7] = RAM[0x2161];
			RAM[0x20A8] = RAM[0x2162];

			/* Copy high score to videoram */
			RAM[0x35A7] = RAM[0x2162] & 0x0F;
			RAM[0x35C7] = (RAM[0x2162] & 0xF0) >> 4;
			RAM[0x35E7] = RAM[0x2161] & 0x0F;
			RAM[0x3607] = (RAM[0x2161] & 0xF0) >> 4;
			RAM[0x3627] = RAM[0x2160] & 0x0F;
			if ((RAM[0x2160] & 0xF0) != 0)
				RAM[0x3647] = (RAM[0x2160] & 0xF0) >> 4;

			osd_fclose(f);
		}
开发者ID:cyberkni,项目名称:276in1JAMMA,代码行数:29,代码来源:circusc.cpp

示例13: hiload

ROM_END

/* HSC 12/02/98 */
static int hiload(void)
{

	static int firsttime =0;
	unsigned char *RAM = Machine->memory_region[Machine->drv->cpu[0].memory_region];
	if (firsttime == 0)
		{
			fast_memset(&RAM[0x4014],0xff,5); /* hi score */
			fast_memset(&RAM[0x417d],0xff,12); /* name */
			firsttime = 1;
		}

    /* check if the hi score table has already been initialized */
    if (memcmp(&RAM[0x4014],"\x00\x00\x00\x00\x00",5) == 0 &&
		memcmp(&RAM[0x417f],"\x11\x12\x29\x1c\x0c\x18\x1b\x0e\x00\x00",10) == 0  )
    {
        void *f;

        if ((f = osd_fopen(Machine->gamedrv->name,0,OSD_FILETYPE_HIGHSCORE,0)) != 0)
        {
            osd_fread(f,&RAM[0x4014],5);
			osd_fread(f,&RAM[0x417d],12);
			osd_fclose(f);
        }
		firsttime = 0;
        return 1;
    }
    else return 0;  /* we can't load the hi scores yet */
}
开发者ID:cyberkni,项目名称:276in1JAMMA,代码行数:32,代码来源:crbaloon.cpp

示例14: hiload

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


	/* during a reset, leave time to the game to clear the screen */
	if (++resetcount < 10) return 0;

	if(memcmp(&RAM[0x0240],"\x20\x31\x53",3) == 0 &&
			memcmp(&RAM[0x028D],"\x00\x77\x00",3) == 0)
	{
		void *f;

		if ((f = osd_fopen(Machine->gamedrv->name,0,OSD_FILETYPE_HIGHSCORE,0)) != 0)
		{
			osd_fread(f,&RAM[0x0240],80);
			osd_fclose(f);
		}

		resetcount = 0;

		return 1;
	}
	else return 0;   /* we can't load the hi scores yet */
}
开发者ID:OS2World,项目名称:APP-EMULATION-MAME,代码行数:26,代码来源:exprraid.c

示例15: amidar_hiload

ROM_END



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


	/* check if the hi score table has already been initialized */
	if (memcmp(&RAM[0x8200],"\x00\x00\x01",3) == 0 &&
			memcmp(&RAM[0x821b],"\x00\x00\x01",3) == 0)
	{
		void *f;


		if ((f = osd_fopen(Machine->gamedrv->name,0,OSD_FILETYPE_HIGHSCORE,0)) != 0)
		{
			osd_fread(f,&RAM[0x8200],3*10);
			RAM[0x80a8] = RAM[0x8200];
			RAM[0x80a9] = RAM[0x8201];
			RAM[0x80aa] = RAM[0x8202];
			osd_fclose(f);
		}

		return 1;
	}
	else return 0;	/* we can't load the hi scores yet */
}
开发者ID:cyberkni,项目名称:276in1JAMMA,代码行数:29,代码来源:amidar.cpp


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