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

📄 kingobox.c

📁 这个是延伸mame的在wince平台下的游戏模拟器的代码
💻 C
📖 第 1 页 / 共 3 页
字号:
	/* sound hardware */
	0,0,0,0,
	{
		{
			SOUND_AY8910,
			&ay8910_interface
		},
		{
			SOUND_DAC,
			&dac_interface
		}
	}
};


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

  Game driver(s)

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

ROM_START( kingofb_rom )
    ROM_REGION(0x10000)     /* 64k for code */
    ROM_LOAD( "d09_22.bin",   0x00000, 0x4000, 0x6220bfa2 )
    ROM_LOAD( "e09_23.bin",   0x04000, 0x4000, 0x5782fdd8 )

    ROM_REGION_DISPOSE(0x26000)     /* temporary space for graphics (disposed after conversion) */
    ROM_LOAD( "vd15_13.bin",  0x00000, 0x2000, 0xe36d4f4f ) /* characters */
	/* sprites (top) */
	ROM_LOAD( "vb01_01.bin",  0x02000, 0x4000, 0xce6580af ) /* plane 0 */
    ROM_LOAD( "vb04_03.bin",  0x06000, 0x4000, 0xcf74ea50 ) /* plane 1 */
    ROM_LOAD( "vb07_05.bin",  0x0a000, 0x4000, 0xd8b53975 ) /* plane 2 */
    /* sprites (bottom) */
    ROM_LOAD( "vb03_02.bin",  0x0e000, 0x4000, 0x4ab506d2 ) /* plane 0 */
    ROM_LOAD( "vb05_04.bin",  0x12000, 0x4000, 0xecf95a2c ) /* plane 1 */
    ROM_LOAD( "vb08_06.bin",  0x16000, 0x4000, 0x8200cb2b ) /* plane 2 */
    /* tiles (top) */
    ROM_LOAD( "vd01_07.bin",  0x1a000, 0x2000, 0x3d472a22 ) /* plane 0 */
    ROM_LOAD( "vd04_09.bin",  0x1c000, 0x2000, 0xcc002ea9 ) /* plane 1 */
    ROM_LOAD( "vd07_11.bin",  0x1e000, 0x2000, 0x23c1b3ee ) /* plane 2 */
	/* tiles (bottom) */
    ROM_LOAD( "vd03_08.bin",  0x20000, 0x2000, 0xd6b1b8fe ) /* plane 0 */
    ROM_LOAD( "vd05_10.bin",  0x22000, 0x2000, 0xfce71e5a ) /* plane 1 */
    ROM_LOAD( "vd08_12.bin",  0x24000, 0x2000, 0x3f68b991 ) /* plane 2 */

	ROM_REGION(0x0300)	/* color PROMs */
	ROM_LOAD( "vb14_col.bin", 0x0000, 0x0100, 0xc58e5121 )	/* red component */
	ROM_LOAD( "vb15_col.bin", 0x0100, 0x0100, 0x5ab06f25 )	/* green component */
	ROM_LOAD( "vb16_col.bin", 0x0200, 0x0100, 0x1171743f )	/* blue component */

    ROM_REGION(0x10000)     /* 64k for the video cpu */
    ROM_LOAD( "b09_21.bin",   0x00000, 0x4000, 0x3fb39489 )

    ROM_REGION(0x10000)     /* 64k for the sprite cpu */
    ROM_LOAD( "j09_dcr.bin",  0x00000, 0x2000, 0x379f4f84 )

    ROM_REGION(0x10000)     /* 64k for the audio cpu */
    ROM_LOAD( "f05_18.bin",   0x00000, 0x4000, 0xc057e28e )
    ROM_LOAD( "h05_19.bin",   0x04000, 0x4000, 0x060253dd )
    ROM_LOAD( "j05_20.bin",   0x08000, 0x4000, 0x64c137a4 )
ROM_END

ROM_START( kingofbj_rom )
    ROM_REGION(0x10000)     /* 64k for code */
    ROM_LOAD( "d09_22.bin",   0x00000, 0x4000, 0x6220bfa2 )
    ROM_LOAD( "e09_23.bin",   0x04000, 0x4000, 0x5782fdd8 )

    ROM_REGION_DISPOSE(0x26000)     /* temporary space for graphics (disposed after conversion) */
    ROM_LOAD( "kob13.bin",    0x00000, 0x2000, 0x988a77bf ) /* characters */
	/* sprites (top) */
	ROM_LOAD( "vb01_01.bin",  0x02000, 0x4000, 0xce6580af ) /* plane 0 */
    ROM_LOAD( "vb04_03.bin",  0x06000, 0x4000, 0xcf74ea50 ) /* plane 1 */
    ROM_LOAD( "vb07_05.bin",  0x0a000, 0x4000, 0xd8b53975 ) /* plane 2 */
    /* sprites (bottom) */
    ROM_LOAD( "vb03_02.bin",  0x0e000, 0x4000, 0x4ab506d2 ) /* plane 0 */
    ROM_LOAD( "vb05_04.bin",  0x12000, 0x4000, 0xecf95a2c ) /* plane 1 */
    ROM_LOAD( "vb08_06.bin",  0x16000, 0x4000, 0x8200cb2b ) /* plane 2 */
    /* tiles (top) */
    ROM_LOAD( "vd01_07.bin",  0x1a000, 0x2000, 0x3d472a22 ) /* plane 0 */
    ROM_LOAD( "vd04_09.bin",  0x1c000, 0x2000, 0xcc002ea9 ) /* plane 1 */
    ROM_LOAD( "vd07_11.bin",  0x1e000, 0x2000, 0x23c1b3ee ) /* plane 2 */
	/* tiles (bottom) */
    ROM_LOAD( "vd03_08.bin",  0x20000, 0x2000, 0xd6b1b8fe ) /* plane 0 */
    ROM_LOAD( "vd05_10.bin",  0x22000, 0x2000, 0xfce71e5a ) /* plane 1 */
    ROM_LOAD( "vd08_12.bin",  0x24000, 0x2000, 0x3f68b991 ) /* plane 2 */

	ROM_REGION(0x0300)	/* color PROMs */
	ROM_LOAD( "vb14_col.bin", 0x0000, 0x0100, 0xc58e5121 )	/* red component */
	ROM_LOAD( "vb15_col.bin", 0x0100, 0x0100, 0x5ab06f25 )	/* green component */
	ROM_LOAD( "vb16_col.bin", 0x0200, 0x0100, 0x1171743f )	/* blue component */

    ROM_REGION(0x10000)     /* 64k for the video cpu */
    ROM_LOAD( "b09_21.bin",   0x00000, 0x4000, 0x3fb39489 )

    ROM_REGION(0x10000)     /* 64k for the sprite cpu */
    ROM_LOAD( "j09_dcr.bin",  0x00000, 0x2000, 0x379f4f84 )

    ROM_REGION(0x10000)     /* 64k for the audio cpu */
    ROM_LOAD( "f05_18.bin",   0x00000, 0x4000, 0xc057e28e )
    ROM_LOAD( "h05_19.bin",   0x04000, 0x4000, 0x060253dd )
    ROM_LOAD( "j05_20.bin",   0x08000, 0x4000, 0x64c137a4 )
ROM_END

/* Ring King */
ROM_START( ringking_rom )
    ROM_REGION(0x10000)     /* 64k for code */
    ROM_LOAD( "cx13.9f",      0x00000, 0x8000, 0x93e38c02 )
    ROM_LOAD( "cx14.11f",     0x08000, 0x4000, 0xa435acb0 )

    ROM_REGION_DISPOSE(0x2e000)     /* temporary space for graphics (disposed after conversion) */
    ROM_LOAD( "cx08.13b",     0x00000, 0x2000, 0xdbd7c1c2 )	/* characters */
	ROM_LOAD( "cx03.9j",      0x02000, 0x4000, 0x682fd1c4 )	/* sprites */
    ROM_LOAD( "cx01.7j",      0x06000, 0x4000, 0x85130b46 )
    ROM_LOAD( "cx05.12j",     0x0a000, 0x4000, 0xf7c4f3dc )
	ROM_LOAD( "cx04.11j",     0x0e000, 0x8000, 0x506a2ed9 )
	ROM_LOAD( "cx02.8j",      0x16000, 0x8000, 0x009dde6a )
	ROM_LOAD( "cx06.13j",     0x1e000, 0x8000, 0xd819a3b2 )
    ROM_LOAD( "cx09.17d",     0x26000, 0x4000, 0x37a082cf )	/* tiles */
    ROM_LOAD( "cx10.17e",     0x2a000, 0x4000, 0xab9446c5 )

	ROM_REGION(0x0200)	/* color PROMs */
	/* 2A is missing!!! */
/*	ROM_LOAD( "2a",           0x0000, 0x0100, 0x00000000 )	*/ /* red and green component */
	ROM_LOAD( "mb7052.1a",    0x0100, 0x0100, 0xd345cbb3 )	/* blue component */

    ROM_REGION(0x10000)     /* 64k for the video cpu */
    ROM_LOAD( "cx07.10c",     0x00000, 0x4000, 0x9f074746 )

    ROM_REGION(0x10000)     /* 64k for the sprite cpu */
    ROM_LOAD( "cx00.4c",      0x00000, 0x2000, 0x880b8aa7 )

    ROM_REGION(0x10000)     /* 64k for the audio cpu */
    ROM_LOAD( "cx12.4ef",     0x00000, 0x8000, 0x1d5d6c6b )
    ROM_LOAD( "cx11.2ef",     0x08000, 0x4000, 0x64c137a4 )
ROM_END

ROM_START( ringkin2_rom )
    ROM_REGION(0x10000)     /* 64k for code */
    ROM_LOAD( "14.9d",        0x00000, 0x4000, 0x63627b8b )
    ROM_LOAD( "15.9e",        0x04000, 0x4000, 0xe7557489 )
    ROM_LOAD( "16.9f",        0x08000, 0x4000, 0xa3b3bb16 )

    ROM_REGION_DISPOSE(0x26000)     /* temporary space for graphics (disposed after conversion) */
    ROM_LOAD( "12.15d",       0x00000, 0x2000, 0x988a77bf ) /* characters */
	/* sprites (top) */
	ROM_LOAD( "vb01_01.bin",  0x02000, 0x4000, 0xce6580af ) /* plane 0 */
    ROM_LOAD( "vb04_03.bin",  0x06000, 0x4000, 0xcf74ea50 ) /* plane 1 */
    ROM_LOAD( "vb07_05.bin",  0x0a000, 0x4000, 0xd8b53975 ) /* plane 2 */
    /* sprites (bottom) */
    ROM_LOAD( "vb03_02.bin",  0x0e000, 0x4000, 0x4ab506d2 ) /* plane 0 */
    ROM_LOAD( "vb05_04.bin",  0x12000, 0x4000, 0xecf95a2c ) /* plane 1 */
    ROM_LOAD( "vb08_06.bin",  0x16000, 0x4000, 0x8200cb2b ) /* plane 2 */
    /* tiles (top) */
    ROM_LOAD( "7.1d",         0x1a000, 0x2000, 0x019a88b0 ) /* plane 0 */
    ROM_LOAD( "9.4d",         0x1c000, 0x2000, 0xbfdc741a ) /* plane 1 */
    ROM_LOAD( "11.7d",        0x1e000, 0x2000, 0x3cc7bdc5 ) /* plane 2 */
	/* tiles (bottom) */
    ROM_LOAD( "8.3d",         0x20000, 0x2000, 0x65f1281b ) /* plane 0 */
    ROM_LOAD( "10.5d",        0x22000, 0x2000, 0xaf5013e7 ) /* plane 1 */
    ROM_LOAD( "12.8d",        0x24000, 0x2000, 0x142c102a ) /* plane 2 */

	ROM_REGION(0x0300)	/* color PROMs */
	/* we are using the King of Boxer PROMs, but they could be wrong!!! */
	ROM_LOAD( "vb14_col.bin", 0x0000, 0x0100, 0xc58e5121 )	/* red component */
	ROM_LOAD( "vb15_col.bin", 0x0100, 0x0100, 0x5ab06f25 )	/* green component */
	ROM_LOAD( "vb16_col.bin", 0x0200, 0x0100, 0x1171743f )	/* blue component */

    ROM_REGION(0x10000)     /* 64k for the video cpu */
    ROM_LOAD( "13.9b",        0x00000, 0x4000, 0xf33f94a2 )

    ROM_REGION(0x10000)     /* 64k for the sprite cpu */
    ROM_LOAD( "j09_dcr.bin",  0x00000, 0x2000, 0x379f4f84 )

    ROM_REGION(0x10000)     /* 64k for the audio cpu */
    ROM_LOAD( "f05_18.bin",   0x00000, 0x4000, 0xc057e28e )
    ROM_LOAD( "h05_19.bin",   0x04000, 0x4000, 0x060253dd )
    ROM_LOAD( "j05_20.bin",   0x08000, 0x4000, 0x64c137a4 )
ROM_END



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


	if  (memcmp(&RAM[0x8048],"\x00\x15\x00",3) == 0 &&
			memcmp(&RAM[0x80D1],"\x10\x11\x12",3) == 0 )
	{
		void *f;

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

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

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


	if ((f = osd_fopen(Machine->gamedrv->name,0,OSD_FILETYPE_HIGHSCORE,1)) != 0)
	{
		osd_fwrite(f,&RAM[0x8048],140);
		osd_fclose(f);
	}
}


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


	if  (memcmp(&RAM[0x8049],"\x00\x15\x00",3) == 0 &&
			memcmp(&RAM[0x80D2],"\x10\x11\x12",3) == 0 )
	{
		void *f;

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

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

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


	if ((f = osd_fopen(Machine->gamedrv->name,0,OSD_FILETYPE_HIGHSCORE,1)) != 0)
	{
		osd_fwrite(f,&RAM[0x8049],140);
		osd_fclose(f);
	}
}



struct GameDriver kingofb_driver =
{
	__FILE__,
	0,
	"kingofb",
	"King of Boxer (English)",
	"1985",
	"Woodplace Inc.",
	"Ernesto Corvi\nPhil Stroffolino\nNicola Salmoria",
	0,
	&machine_driver,
	0,

	kingofb_rom,
	0, 0,
	0,
	0,      /* sound_prom */

	input_ports,

	PROM_MEMORY_REGION(2), 0, 0,
	ORIENTATION_ROTATE_90,

	kingofb_hiload, kingofb_hisave
};

struct GameDriver kingofbj_driver =
{
	__FILE__,
	&kingofb_driver,
	"kingofbj",
	"King of Boxer (Japanese?)",
	"1985",
	"Woodplace Inc.",
	"Ernesto Corvi\nPhil Stroffolino\nNicola Salmoria",
	0,
	&machine_driver,
	0,

	kingofbj_rom,
	0, 0,
	0,
	0,      /* sound_prom */

	input_ports,

	PROM_MEMORY_REGION(2), 0, 0,
	ORIENTATION_ROTATE_90,

	kingofb_hiload, kingofb_hisave
};

/* Ring King */
struct GameDriver ringking_driver =
{
	__FILE__,
	&kingofb_driver,
	"ringking",
	"Ring King (set 1)",
	"1985",
	"Data East USA",
	"Ernesto Corvi\nPhil Stroffolino\nNicola Salmoria",
	GAME_WRONG_COLORS,
	&rk_machine_driver,
	0,

	ringking_rom,
	0, 0,
	0,
	0,      /* sound_prom */

	rk_input_ports,

	PROM_MEMORY_REGION(2), 0, 0,
	ORIENTATION_ROTATE_90,

	ringking_hiload, ringking_hisave
};

struct GameDriver ringkin2_driver =
{
	__FILE__,
	&kingofb_driver,
	"ringkin2",
	"Ring King (set 2)",
	"1985",
	"Data East USA",
	"Ernesto Corvi\nPhil Stroffolino\nNicola Salmoria",
	GAME_IMPERFECT_COLORS,
	&machine_driver,
	0,

	ringkin2_rom,
	0, 0,
	0,
	0,      /* sound_prom */

	input_ports,

	PROM_MEMORY_REGION(2), 0, 0,
	ORIENTATION_ROTATE_90,

	kingofb_hiload, kingofb_hisave
};

⌨️ 快捷键说明

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