⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 gunsmoke.c

📁 这个是延伸mame的在wince平台下的游戏模拟器的代码
💻 C
📖 第 1 页 / 共 2 页
字号:
	ROM_LOAD( "03n_gs20.bin", 0x54000, 0x8000, 0x0be932ed ) /* Sprites planes 2-3 */
	ROM_LOAD( "01n_gs19.bin", 0x5c000, 0x8000, 0x63072f93 ) /* Sprites planes 2-3 */
	ROM_LOAD( "06l_gs18.bin", 0x64000, 0x8000, 0xf69a3c7c ) /* Sprites planes 0-1 */
	ROM_LOAD( "04l_gs17.bin", 0x6c000, 0x8000, 0x4e98562a ) /* Sprites planes 0-1 */
	ROM_LOAD( "03l_gs16.bin", 0x74000, 0x8000, 0x0d99c3b3 ) /* Sprites planes 0-1 */
	ROM_LOAD( "01l_gs15.bin", 0x7c000, 0x8000, 0x7f14270e ) /* Sprites planes 0-1 */

	ROM_REGION(0x0800)	/* color PROMs */
	ROM_LOAD( "03b_g-01.bin", 0x0000, 0x0100, 0x02f55589 )	/* red component */
	ROM_LOAD( "04b_g-02.bin", 0x0100, 0x0100, 0xe1e36dd9 )	/* green component */
	ROM_LOAD( "05b_g-03.bin", 0x0200, 0x0100, 0x989399c0 )	/* blue component */
	ROM_LOAD( "09d_g-04.bin", 0x0300, 0x0100, 0x906612b5 )	/* char lookup table */
	ROM_LOAD( "14a_g-06.bin", 0x0400, 0x0100, 0x4a9da18b )	/* tile lookup table */
	ROM_LOAD( "15a_g-07.bin", 0x0500, 0x0100, 0xcb9394fc )	/* tile palette bank */
	ROM_LOAD( "09f_g-09.bin", 0x0600, 0x0100, 0x3cee181e )	/* sprite lookup table */
	ROM_LOAD( "08f_g-08.bin", 0x0700, 0x0100, 0xef91cdd2 )	/* sprite palette bank */

	ROM_REGION(0x10000)	/* 64k for the audio CPU */
	ROM_LOAD( "14h_gs02.bin", 0x00000, 0x8000, 0xcd7a2c38 )

	ROM_REGION(0x8000)
	ROM_LOAD( "11c_gs14.bin", 0x00000, 0x8000, 0x0af4f7eb ) /* Background tile map */
ROM_END

ROM_START( gunsmrom_rom )
	ROM_REGION(0x20000)     /* 2*64k for code */
	ROM_LOAD( "9n_gs03.bin",  0x00000, 0x8000, 0x592f211b ) /* Code 0000-7fff */
	ROM_LOAD( "10n_gs04.bin", 0x10000, 0x8000, 0x8d4b423f ) /* Paged code */
	ROM_LOAD( "12n_gs05.bin", 0x18000, 0x8000, 0x2b5667fb ) /* Paged code */

	ROM_REGION_DISPOSE(0x84000)     /* temporary space for graphics (disposed after conversion) */
	ROM_LOAD( "11f_gs01.bin", 0x00000, 0x4000, 0xb61ece9b ) /* Characters */
	ROM_LOAD( "06c_gs13.bin", 0x04000, 0x8000, 0xf6769fc5 ) /* 32x32 tiles planes 2-3 */
	ROM_LOAD( "05c_gs12.bin", 0x0c000, 0x8000, 0xd997b78c )
	ROM_LOAD( "04c_gs11.bin", 0x14000, 0x8000, 0x125ba58e )
	ROM_LOAD( "02c_gs10.bin", 0x1c000, 0x8000, 0xf469c13c )
	ROM_LOAD( "06a_gs09.bin", 0x24000, 0x8000, 0x539f182d ) /* 32x32 tiles planes 0-1 */
	ROM_LOAD( "05a_gs08.bin", 0x2c000, 0x8000, 0xe87e526d )
	ROM_LOAD( "04a_gs07.bin", 0x34000, 0x8000, 0x4382c0d2 )
	ROM_LOAD( "02a_gs06.bin", 0x3c000, 0x8000, 0x4cafe7a6 )
	ROM_LOAD( "06n_gs22.bin", 0x44000, 0x8000, 0xdc9c508c ) /* Sprites planes 2-3 */
	ROM_LOAD( "04n_gs21.bin", 0x4c000, 0x8000, 0x68883749 ) /* Sprites planes 2-3 */
	ROM_LOAD( "03n_gs20.bin", 0x54000, 0x8000, 0x0be932ed ) /* Sprites planes 2-3 */
	ROM_LOAD( "01n_gs19.bin", 0x5c000, 0x8000, 0x63072f93 ) /* Sprites planes 2-3 */
	ROM_LOAD( "06l_gs18.bin", 0x64000, 0x8000, 0xf69a3c7c ) /* Sprites planes 0-1 */
	ROM_LOAD( "04l_gs17.bin", 0x6c000, 0x8000, 0x4e98562a ) /* Sprites planes 0-1 */
	ROM_LOAD( "03l_gs16.bin", 0x74000, 0x8000, 0x0d99c3b3 ) /* Sprites planes 0-1 */
	ROM_LOAD( "01l_gs15.bin", 0x7c000, 0x8000, 0x7f14270e ) /* Sprites planes 0-1 */

	ROM_REGION(0x0800)	/* color PROMs */
	ROM_LOAD( "03b_g-01.bin", 0x0000, 0x0100, 0x02f55589 )	/* red component */
	ROM_LOAD( "04b_g-02.bin", 0x0100, 0x0100, 0xe1e36dd9 )	/* green component */
	ROM_LOAD( "05b_g-03.bin", 0x0200, 0x0100, 0x989399c0 )	/* blue component */
	ROM_LOAD( "09d_g-04.bin", 0x0300, 0x0100, 0x906612b5 )	/* char lookup table */
	ROM_LOAD( "14a_g-06.bin", 0x0400, 0x0100, 0x4a9da18b )	/* tile lookup table */
	ROM_LOAD( "15a_g-07.bin", 0x0500, 0x0100, 0xcb9394fc )	/* tile palette bank */
	ROM_LOAD( "09f_g-09.bin", 0x0600, 0x0100, 0x3cee181e )	/* sprite lookup table */
	ROM_LOAD( "08f_g-08.bin", 0x0700, 0x0100, 0xef91cdd2 )	/* sprite palette bank */

	ROM_REGION(0x10000)	/* 64k for the audio CPU */
	ROM_LOAD( "14h_gs02.bin", 0x00000, 0x8000, 0xcd7a2c38 )

	ROM_REGION(0x8000)
	ROM_LOAD( "11c_gs14.bin", 0x00000, 0x8000, 0x0af4f7eb ) /* Background tile map */
ROM_END

ROM_START( gunsmokj_rom )
	ROM_REGION(0x20000)     /* 2*64k for code */
	ROM_LOAD( "gs03_9n.rom",  0x00000, 0x8000, 0xb56b5df6 ) /* Code 0000-7fff */
	ROM_LOAD( "10n_gs04.bin", 0x10000, 0x8000, 0x8d4b423f ) /* Paged code */
	ROM_LOAD( "12n_gs05.bin", 0x18000, 0x8000, 0x2b5667fb ) /* Paged code */

	ROM_REGION_DISPOSE(0x84000)     /* temporary space for graphics (disposed after conversion) */
	ROM_LOAD( "11f_gs01.bin", 0x00000, 0x4000, 0xb61ece9b ) /* Characters */
	ROM_LOAD( "06c_gs13.bin", 0x04000, 0x8000, 0xf6769fc5 ) /* 32x32 tiles planes 2-3 */
	ROM_LOAD( "05c_gs12.bin", 0x0c000, 0x8000, 0xd997b78c )
	ROM_LOAD( "04c_gs11.bin", 0x14000, 0x8000, 0x125ba58e )
	ROM_LOAD( "02c_gs10.bin", 0x1c000, 0x8000, 0xf469c13c )
	ROM_LOAD( "06a_gs09.bin", 0x24000, 0x8000, 0x539f182d ) /* 32x32 tiles planes 0-1 */
	ROM_LOAD( "05a_gs08.bin", 0x2c000, 0x8000, 0xe87e526d )
	ROM_LOAD( "04a_gs07.bin", 0x34000, 0x8000, 0x4382c0d2 )
	ROM_LOAD( "02a_gs06.bin", 0x3c000, 0x8000, 0x4cafe7a6 )
	ROM_LOAD( "06n_gs22.bin", 0x44000, 0x8000, 0xdc9c508c ) /* Sprites planes 2-3 */
	ROM_LOAD( "04n_gs21.bin", 0x4c000, 0x8000, 0x68883749 ) /* Sprites planes 2-3 */
	ROM_LOAD( "03n_gs20.bin", 0x54000, 0x8000, 0x0be932ed ) /* Sprites planes 2-3 */
	ROM_LOAD( "01n_gs19.bin", 0x5c000, 0x8000, 0x63072f93 ) /* Sprites planes 2-3 */
	ROM_LOAD( "06l_gs18.bin", 0x64000, 0x8000, 0xf69a3c7c ) /* Sprites planes 0-1 */
	ROM_LOAD( "04l_gs17.bin", 0x6c000, 0x8000, 0x4e98562a ) /* Sprites planes 0-1 */
	ROM_LOAD( "03l_gs16.bin", 0x74000, 0x8000, 0x0d99c3b3 ) /* Sprites planes 0-1 */
	ROM_LOAD( "01l_gs15.bin", 0x7c000, 0x8000, 0x7f14270e ) /* Sprites planes 0-1 */

	ROM_REGION(0x0800)	/* color PROMs */
	ROM_LOAD( "03b_g-01.bin", 0x0000, 0x0100, 0x02f55589 )	/* red component */
	ROM_LOAD( "04b_g-02.bin", 0x0100, 0x0100, 0xe1e36dd9 )	/* green component */
	ROM_LOAD( "05b_g-03.bin", 0x0200, 0x0100, 0x989399c0 )	/* blue component */
	ROM_LOAD( "09d_g-04.bin", 0x0300, 0x0100, 0x906612b5 )	/* char lookup table */
	ROM_LOAD( "14a_g-06.bin", 0x0400, 0x0100, 0x4a9da18b )	/* tile lookup table */
	ROM_LOAD( "15a_g-07.bin", 0x0500, 0x0100, 0xcb9394fc )	/* tile palette bank */
	ROM_LOAD( "09f_g-09.bin", 0x0600, 0x0100, 0x3cee181e )	/* sprite lookup table */
	ROM_LOAD( "08f_g-08.bin", 0x0700, 0x0100, 0xef91cdd2 )	/* sprite palette bank */

	ROM_REGION(0x10000)	/* 64k for the audio CPU */
	ROM_LOAD( "14h_gs02.bin", 0x00000, 0x8000, 0xcd7a2c38 )

	ROM_REGION(0x8000)
	ROM_LOAD( "11c_gs14.bin", 0x00000, 0x8000, 0x0af4f7eb ) /* Background tile map */
ROM_END

ROM_START( gunsmoka_rom )
	ROM_REGION(0x20000)     /* 2*64k for code */
	ROM_LOAD( "gs03.9n",      0x00000, 0x8000, 0x51dc3f76 ) /* Code 0000-7fff */
	ROM_LOAD( "gs04.10n",     0x10000, 0x8000, 0x5ecf31b8 ) /* Paged code */
	ROM_LOAD( "gs05.12n",     0x18000, 0x8000, 0x1c9aca13 ) /* Paged code */

	ROM_REGION_DISPOSE(0x84000)     /* temporary space for graphics (disposed after conversion) */
	ROM_LOAD( "11f_gs01.bin", 0x00000, 0x4000, 0xb61ece9b ) /* Characters */
	ROM_LOAD( "06c_gs13.bin", 0x04000, 0x8000, 0xf6769fc5 ) /* 32x32 tiles planes 2-3 */
	ROM_LOAD( "05c_gs12.bin", 0x0c000, 0x8000, 0xd997b78c )
	ROM_LOAD( "04c_gs11.bin", 0x14000, 0x8000, 0x125ba58e )
	ROM_LOAD( "02c_gs10.bin", 0x1c000, 0x8000, 0xf469c13c )
	ROM_LOAD( "06a_gs09.bin", 0x24000, 0x8000, 0x539f182d ) /* 32x32 tiles planes 0-1 */
	ROM_LOAD( "05a_gs08.bin", 0x2c000, 0x8000, 0xe87e526d )
	ROM_LOAD( "04a_gs07.bin", 0x34000, 0x8000, 0x4382c0d2 )
	ROM_LOAD( "02a_gs06.bin", 0x3c000, 0x8000, 0x4cafe7a6 )
	ROM_LOAD( "06n_gs22.bin", 0x44000, 0x8000, 0xdc9c508c ) /* Sprites planes 2-3 */
	ROM_LOAD( "04n_gs21.bin", 0x4c000, 0x8000, 0x68883749 ) /* Sprites planes 2-3 */
	ROM_LOAD( "03n_gs20.bin", 0x54000, 0x8000, 0x0be932ed ) /* Sprites planes 2-3 */
	ROM_LOAD( "01n_gs19.bin", 0x5c000, 0x8000, 0x63072f93 ) /* Sprites planes 2-3 */
	ROM_LOAD( "06l_gs18.bin", 0x64000, 0x8000, 0xf69a3c7c ) /* Sprites planes 0-1 */
	ROM_LOAD( "04l_gs17.bin", 0x6c000, 0x8000, 0x4e98562a ) /* Sprites planes 0-1 */
	ROM_LOAD( "03l_gs16.bin", 0x74000, 0x8000, 0x0d99c3b3 ) /* Sprites planes 0-1 */
	ROM_LOAD( "01l_gs15.bin", 0x7c000, 0x8000, 0x7f14270e ) /* Sprites planes 0-1 */

	ROM_REGION(0x0800)	/* color PROMs */
	ROM_LOAD( "03b_g-01.bin", 0x0000, 0x0100, 0x02f55589 )	/* red component */
	ROM_LOAD( "04b_g-02.bin", 0x0100, 0x0100, 0xe1e36dd9 )	/* green component */
	ROM_LOAD( "05b_g-03.bin", 0x0200, 0x0100, 0x989399c0 )	/* blue component */
	ROM_LOAD( "09d_g-04.bin", 0x0300, 0x0100, 0x906612b5 )	/* char lookup table */
	ROM_LOAD( "14a_g-06.bin", 0x0400, 0x0100, 0x4a9da18b )	/* tile lookup table */
	ROM_LOAD( "15a_g-07.bin", 0x0500, 0x0100, 0xcb9394fc )	/* tile palette bank */
	ROM_LOAD( "09f_g-09.bin", 0x0600, 0x0100, 0x3cee181e )	/* sprite lookup table */
	ROM_LOAD( "08f_g-08.bin", 0x0700, 0x0100, 0xef91cdd2 )	/* sprite palette bank */

	ROM_REGION(0x10000)	/* 64k for the audio CPU */
	ROM_LOAD( "14h_gs02.bin", 0x00000, 0x8000, 0xcd7a2c38 )

	ROM_REGION(0x8000)
	ROM_LOAD( "11c_gs14.bin", 0x00000, 0x8000, 0x0af4f7eb ) /* Background tile map */
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[0xe683],"\x01\x00\x00",3) == 0)
	{
		void *f;


		if ((f = osd_fopen(Machine->gamedrv->name,0,OSD_FILETYPE_HIGHSCORE,0)) != 0)
		{

                        osd_fread(f,&RAM[0xe680],16*5);

                        memcpy(&RAM[0xe600], &RAM[0xe680], 8);
                        osd_fclose(f);
		}

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



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[0xe680],16*5);
		osd_fclose(f);
	}
}


struct GameDriver gunsmoke_driver =
{
	__FILE__,
	0,
	"gunsmoke",
	"Gunsmoke (World)",
	"1985",
	"Capcom",
	"Paul Leaman (MAME driver)\nRichard Davies\nAnders Nilsson\nMirko Buffoni\nNicola Salmoria\nPaul Swan (color info)",
	0,
	&machine_driver,
	0,

	gunsmoke_rom,
	0, 0,
	0,
	0,	/* sound_prom */

	input_ports,

	PROM_MEMORY_REGION(2), 0, 0,
	ORIENTATION_DEFAULT,

	hiload, hisave
};

struct GameDriver gunsmrom_driver =
{
	__FILE__,
	&gunsmoke_driver,
	"gunsmrom",
	"Gunsmoke (US set 1)",
	"1985",
	"Capcom (Romstar license)",
	"Paul Leaman (MAME driver)\nRichard Davies\nAnders Nilsson\nMirko Buffoni\nNicola Salmoria\nPaul Swan (color info)",
	0,
	&machine_driver,
	0,

	gunsmrom_rom,
	0, 0,
	0,
	0,	/* sound_prom */

	input_ports,

	PROM_MEMORY_REGION(2), 0, 0,
	ORIENTATION_DEFAULT,

	hiload, hisave
};

struct GameDriver gunsmoka_driver =
{
	__FILE__,
	&gunsmoke_driver,
	"gunsmoka",
	"Gunsmoke (US set 2)",
	"1986",
	"Capcom",
	"Paul Leaman (MAME driver)\nRichard Davies\nAnders Nilsson\nMirko Buffoni\nNicola Salmoria\nPaul Swan (color info)",
	0,
	&machine_driver,
	0,

	gunsmoka_rom,
	0, 0,
	0,
	0,	/* sound_prom */

	input_ports,

	PROM_MEMORY_REGION(2), 0, 0,
	ORIENTATION_DEFAULT,

	hiload, hisave
};

struct GameDriver gunsmokj_driver =
{
	__FILE__,
	&gunsmoke_driver,
	"gunsmokj",
	"Gunsmoke (Japan)",
	"1985",
	"Capcom",
	"Paul Leaman (MAME driver)\nRichard Davies\nAnders Nilsson\nMirko Buffoni\nNicola Salmoria\nPaul Swan (color info)",
	0,
	&machine_driver,
	0,

	gunsmokj_rom,
	0, 0,
	0,
	0,	/* sound_prom */

	input_ports,

	PROM_MEMORY_REGION(2), 0, 0,
	ORIENTATION_DEFAULT,

	hiload, hisave
};

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -