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

📄 gameplan.c

📁 这个是延伸mame的在wince平台下的游戏模拟器的代码
💻 C
📖 第 1 页 / 共 3 页
字号:

there are three 6522 VIAs, at 2000, 2800, and 3000
*/

ROM_START( kaos_rom )
    ROM_REGION(0x10000)
    ROM_LOAD( "kaosab.g2",    0x9000, 0x0800, 0xb23d858f )
    ROM_CONTINUE(		   0xd000, 0x0800			  )
    ROM_LOAD( "kaosab.j2",    0x9800, 0x0800, 0x4861e5dc )
    ROM_CONTINUE(		   0xd800, 0x0800			  )
    ROM_LOAD( "kaosab.j1",    0xa000, 0x0800, 0xe055db3f )
    ROM_CONTINUE(		   0xe000, 0x0800			  )
    ROM_LOAD( "kaosab.g1",    0xa800, 0x0800, 0x35d7c467 )
    ROM_CONTINUE(		   0xe800, 0x0800			  )
    ROM_LOAD( "kaosab.f1",    0xb000, 0x0800, 0x995b9260 )
    ROM_CONTINUE(		   0xf000, 0x0800			  )
    ROM_LOAD( "kaosab.e1",    0xb800, 0x0800, 0x3da5202a )
    ROM_CONTINUE(		   0xf800, 0x0800			  )

	ROM_REGION_DISPOSE(0x1000)
	/* empty memory region - not used by the game, but needed because the main */
	/* core currently always frees region #1 after initialization. */

    ROM_REGION(0x10000)
	ROM_LOAD( "kaossnd.e1",   0xf800, 0x800, 0xab23d52a )
ROM_END


ROM_START( killcom_rom )
    ROM_REGION(0x10000)
    ROM_LOAD( "killcom.e2",   0xc000, 0x800, 0xa01cbb9a )
    ROM_LOAD( "killcom.f2",   0xc800, 0x800, 0xbb3b4a93 )
    ROM_LOAD( "killcom.g2",   0xd000, 0x800, 0x86ec68b2 )
    ROM_LOAD( "killcom.j2",   0xd800, 0x800, 0x28d8c6a1 )
    ROM_LOAD( "killcom.j1",   0xe000, 0x800, 0x33ef5ac5 )
    ROM_LOAD( "killcom.g1",   0xe800, 0x800, 0x49cb13e2 )
    ROM_LOAD( "killcom.f1",   0xf000, 0x800, 0xef652762 )
    ROM_LOAD( "killcom.e1",   0xf800, 0x800, 0xbc19dcb7 )

	ROM_REGION_DISPOSE(0x1000)
	/* empty memory region - not used by the game, but needed because the main */
	/* core currently always frees region #1 after initialization. */

    ROM_REGION(0x10000)
	ROM_LOAD( "killsnd.e1",   0xf800, 0x800, 0x77d4890d )
ROM_END

ROM_START( megatack_rom )
    ROM_REGION(0x10000)
    ROM_LOAD( "megattac.e2",  0xc000, 0x800, 0x33fa5104 )
    ROM_LOAD( "megattac.f2",  0xc800, 0x800, 0xaf5e96b1 )
    ROM_LOAD( "megattac.g2",  0xd000, 0x800, 0x670103ea )
    ROM_LOAD( "megattac.j2",  0xd800, 0x800, 0x4573b798 )
    ROM_LOAD( "megattac.j1",  0xe000, 0x800, 0x3b1d01a1 )
    ROM_LOAD( "megattac.g1",  0xe800, 0x800, 0xeed75ef4 )
    ROM_LOAD( "megattac.f1",  0xf000, 0x800, 0xc93a8ed4 )
    ROM_LOAD( "megattac.e1",  0xf800, 0x800, 0xd9996b9f )

	ROM_REGION_DISPOSE(0x1000)
	/* empty memory region - not used by the game, but needed because the main */
	/* core currently always frees region #1 after initialization. */

    ROM_REGION(0x10000)
	ROM_LOAD( "megatsnd.e1",  0xf800, 0x800, 0x0c186bdb )
ROM_END

ROM_START( challeng_rom )
    ROM_REGION(0x10000)
    ROM_LOAD( "chall.6",      0xa000, 0x1000, 0xb30fe7f5 )
    ROM_LOAD( "chall.5",      0xb000, 0x1000, 0x34c6a88e )
    ROM_LOAD( "chall.4",      0xc000, 0x1000, 0x0ddc18ef )
    ROM_LOAD( "chall.3",      0xd000, 0x1000, 0x6ce03312 )
    ROM_LOAD( "chall.2",      0xe000, 0x1000, 0x948912ad )
    ROM_LOAD( "chall.1",      0xf000, 0x1000, 0x7c71a9dc )

	ROM_REGION_DISPOSE(0x1000)
	/* empty memory region - not used by the game, but needed because the main */
	/* core currently always frees region #1 after initialization. */

    ROM_REGION(0x10000)
	ROM_LOAD( "chall.snd",    0xf800, 0x800, 0x1b2bffd2 )
ROM_END



static int kaos_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[0x03c8], "\x84\x00\x00", 3) == 0 &&
		memcmp(&RAM[0x03dd], "\x43\x00\x00", 3) == 0 &&
		memcmp(&RAM[0x03e0], "\x50\x50\x43", 3) == 0 &&
		memcmp(&RAM[0x03f5], "\x54\x4f\x44", 3) == 0)
	{
		void *f;

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

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

static void kaos_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[0x03c8], 0x30);
		osd_fclose(f);
	}
}

static int killcom_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[0x88], "\x47\x00", 2) == 0)
	{
		void *f;

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

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

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

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

static int megatack_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[0xd0], "\x1f\x20\x1a", 3) == 0)
	{
		void *f;

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

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

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

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

static int challeng_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[0xcc], "\x00\x01\x00", 3) == 0 &&
	memcmp(&RAM[0xd8], "\x1f\x1f\x1f", 3) == 0 )
	{
		void *f;

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

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

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

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


struct GameDriver kaos_driver =
{
	__FILE__,
	0,
	"kaos",
	"Kaos",
	"1981",
	"GamePlan",
    "Chris Moore      (MAME driver)\nSanteri Saarimaa (not a sausage)",
	0,
	&machine_driver,
	0,

	kaos_rom,
	0, 0, 0, 0,					/* sound_prom */

	kaos_input_ports,

	0, palette, colortable,
	ORIENTATION_DEFAULT,

	kaos_hiload, kaos_hisave
};


struct GameDriver killcom_driver =
{
	__FILE__,
	0,
	"killcom",
	"Killer Comet",
	"1980",
	"GamePlan (Centuri license)",
    "Chris Moore      (MAME driver)\nSanteri Saarimaa (cleaning up, hi-scores)",
	0,
    &machine_driver,
	0,

	killcom_rom,
	0, 0, 0, 0,					/* sound_prom */

	killcom_input_ports,

	0, palette, colortable,
	ORIENTATION_DEFAULT,

    killcom_hiload, killcom_hisave
};


struct GameDriver megatack_driver =
{
	__FILE__,
	0,
	"megatack",
	"MegaTack",
	"1980",
	"GamePlan (Centuri license)",
    "Chris Moore      (MAME driver)\nSanteri Saarimaa (cleaning up, hi-scores)",
	0,
	&machine_driver,
	0,

	megatack_rom,
	0, 0, 0, 0,					/* sound_prom */

	megatack_input_ports,

	0, palette, colortable,
	ORIENTATION_DEFAULT,

    megatack_hiload, megatack_hisave
};

struct GameDriver challeng_driver =
{
	__FILE__,
	0,
    "challeng",
    "Challenger",
	"1980",
	"GamePlan (Centuri license)",
    "Chris Moore      (MAME driver)\nSanteri Saarimaa (cleaning up, hi-scores)",
	0,
    &machine_driver,
	0,

    challeng_rom,
    0, 0, 0, 0,                 /* sound_prom */

    challeng_input_ports,

    0, palette, colortable,
    ORIENTATION_DEFAULT,

    challeng_hiload, challeng_hisave
};

⌨️ 快捷键说明

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