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

📄 toobin.c

📁 这个是延伸mame的在wince平台下的游戏模拟器的代码
💻 C
📖 第 1 页 / 共 2 页
字号:
	PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_UNUSED )
	PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_UNUSED )
	PORT_BIT( 0x03, IP_ACTIVE_LOW, IPT_UNUSED )
INPUT_PORTS_END



/*************************************
 *
 *		Graphics definitions
 *
 *************************************/

static struct GfxLayout toobin_charlayout =
{
	8,8,	/* 8*8 chars */
	1024,	/* 1024 chars */
	2,		/* 2 bits per pixel */
	{ 0, 4 },
	{ 0, 1, 2, 3, 8, 9, 10, 11 },
	{ 0*16, 1*16, 2*16, 3*16, 4*16, 5*16, 6*16, 7*16 },
	8*16	/* every char takes 16 consecutive bytes */
};


static struct GfxLayout toobin_pflayout =
{
	8,8,	/* 8*8 sprites */
	16384,/* 16384 of them */
	4,		/* 4 bits per pixel */
	{ 256*1024*8, 256*1024*8+4, 0, 4 },
	{ 0, 1, 2, 3, 8, 9, 10, 11 },
	{ 0*16, 1*16, 2*16, 3*16, 4*16, 5*16, 6*16, 7*16 },
	8*16	/* every sprite takes 16 consecutive bytes */
};


static struct GfxLayout toobin_spritelayout =
{
	16,16,/* 16*16 sprites */
	16384,/* 16384 of them */
	4,		/* 4 bits per pixel */
	{ 1024*1024*8, 1024*1024*8+4, 0, 4 },
	{ 0, 1, 2, 3, 8, 9, 10, 11, 16, 17, 18, 19, 24, 25, 26, 27 },
	{ 0*32, 1*32, 2*32, 3*32, 4*32, 5*32, 6*32, 7*32, 8*32, 9*32, 10*32, 11*32, 12*32, 13*32, 14*32, 15*32 },
	8*64	/* every sprite takes 64 consecutive bytes */
};


static struct GfxDecodeInfo toobin_gfxdecodeinfo[] =
{
	{ 1, 0x280000, &toobin_charlayout,     512, 64 },
	{ 1, 0x000000, &toobin_pflayout,         0, 16 },
	{ 1, 0x080000, &toobin_spritelayout,   256, 16 },
	{ -1 } /* end of array */
};



/*************************************
 *
 *		Sound definitions
 *
 *************************************/

static struct POKEYinterface pokey_interface =
{
	1,	/* 1 chip */
	1789790,	/* ? */
	40,
	POKEY_DEFAULT_GAIN,
	NO_CLIP,
	/* The 8 pot handlers */
	{ 0 },
	{ 0 },
	{ 0 },
	{ 0 },
	{ 0 },
	{ 0 },
	{ 0 },
	{ 0 },
	/* The allpot handler */
	{ 0 }
};


static struct YM2151interface ym2151_interface =
{
	1,			/* 1 chip */
	3579580,	/* 3.58 MHZ ? */
	{ 80 },
	{ 0 }
};



/*************************************
 *
 *		Machine driver
 *
 *************************************/

static struct MachineDriver toobin_machine_driver =
{
	/* basic machine hardware */
	{
		{
			CPU_M68000,
			7159160,
			0,
			toobin_readmem,toobin_writemem,0,0,
			toobin_interrupt,1
		},
		{
			CPU_M6502,
			1789790,
			2,
			toobin_sound_readmem,toobin_sound_writemem,0,0,
			0,0,
			toobin_sound_interrupt,250
		},
	},
	60, DEFAULT_REAL_60HZ_VBLANK_DURATION,	/* frames per second, vblank duration */
	10,    /* we need some interleave since the sound CPU talks to the main CPU */
	toobin_init_machine,

	/* video hardware */
	64*8, 48*8, { 0*8, 64*8-1, 0*8, 48*8-1 },
	toobin_gfxdecodeinfo,
	1024,1024,
	0,

	VIDEO_TYPE_RASTER | VIDEO_MODIFIES_PALETTE | VIDEO_UPDATE_BEFORE_VBLANK,
	0,
	toobin_vh_start,
	toobin_vh_stop,
	toobin_vh_screenrefresh,

	/* sound hardware */
	SOUND_SUPPORTS_STEREO,0,0,0,
	{
		{
			SOUND_YM2151,
			&ym2151_interface
		},
		{
			SOUND_POKEY,
			&pokey_interface
		}
	}
};



/*************************************
 *
 *		ROM definition(s)
 *
 *************************************/

ROM_START( toobin_rom )
	ROM_REGION(0x80000)	/* 8*64k for 68000 code */
	ROM_LOAD_EVEN( "061-3133.bin", 0x00000, 0x10000, 0x79a92d02 )
	ROM_LOAD_ODD ( "061-3137.bin", 0x00000, 0x10000, 0xe389ef60 )
	ROM_LOAD_EVEN( "061-3134.bin", 0x20000, 0x10000, 0x3dbe9a48 )
	ROM_LOAD_ODD ( "061-3138.bin", 0x20000, 0x10000, 0xa17fb16c )
	ROM_LOAD_EVEN( "061-3135.bin", 0x40000, 0x10000, 0xdc90b45c )
	ROM_LOAD_ODD ( "061-3139.bin", 0x40000, 0x10000, 0x6f8a719a )
	ROM_LOAD_EVEN( "061-1136.bin", 0x60000, 0x10000, 0x5ae3eeac )
	ROM_LOAD_ODD ( "061-1140.bin", 0x60000, 0x10000, 0xdacbbd94 )

	ROM_REGION_DISPOSE(0x284000)	/* temporary space for graphics (disposed after conversion) */
	ROM_LOAD( "061-1101.bin", 0x000000, 0x10000, 0x02696f15 )  /* bank 0 (4 bpp)*/
	ROM_LOAD( "061-1102.bin", 0x010000, 0x10000, 0x4bed4262 )
	ROM_LOAD( "061-1103.bin", 0x020000, 0x10000, 0xe62b037f )
	ROM_LOAD( "061-1104.bin", 0x030000, 0x10000, 0xfa05aee6 )
	ROM_LOAD( "061-1105.bin", 0x040000, 0x10000, 0xab1c5578 )
	ROM_LOAD( "061-1106.bin", 0x050000, 0x10000, 0x4020468e )
	ROM_LOAD( "061-1107.bin", 0x060000, 0x10000, 0xfe6f6aed )
	ROM_LOAD( "061-1108.bin", 0x070000, 0x10000, 0x26fe71e1 )
	ROM_LOAD( "061-1143.bin", 0x080000, 0x20000, 0x211c1049 )  /* bank 0 (4 bpp)*/
	ROM_LOAD( "061-1144.bin", 0x0a0000, 0x20000, 0xef62ed2c )
	ROM_LOAD( "061-1145.bin", 0x0c0000, 0x20000, 0x067ecb8a )
	ROM_LOAD( "061-1146.bin", 0x0e0000, 0x20000, 0xfea6bc92 )
	ROM_LOAD( "061-1125.bin", 0x100000, 0x10000, 0xc37f24ac )
	ROM_RELOAD(               0x140000, 0x10000 )
	ROM_LOAD( "061-1126.bin", 0x110000, 0x10000, 0x015257f0 )
	ROM_RELOAD(               0x150000, 0x10000 )
	ROM_LOAD( "061-1127.bin", 0x120000, 0x10000, 0xd05417cb )
	ROM_RELOAD(               0x160000, 0x10000 )
	ROM_LOAD( "061-1128.bin", 0x130000, 0x10000, 0xfba3e203 )
	ROM_RELOAD(               0x170000, 0x10000 )
	ROM_LOAD( "061-1147.bin", 0x180000, 0x20000, 0xca4308cf )
	ROM_LOAD( "061-1148.bin", 0x1a0000, 0x20000, 0x23ddd45c )
	ROM_LOAD( "061-1149.bin", 0x1c0000, 0x20000, 0xd77cd1d0 )
	ROM_LOAD( "061-1150.bin", 0x1e0000, 0x20000, 0xa37157b8 )
	ROM_LOAD( "061-1129.bin", 0x200000, 0x10000, 0x294aaa02 )
	ROM_RELOAD(               0x240000, 0x10000 )
	ROM_LOAD( "061-1130.bin", 0x210000, 0x10000, 0xdd610817 )
	ROM_RELOAD(               0x250000, 0x10000 )
	ROM_LOAD( "061-1131.bin", 0x220000, 0x10000, 0xe8e2f919 )
	ROM_RELOAD(               0x260000, 0x10000 )
	ROM_LOAD( "061-1132.bin", 0x230000, 0x10000, 0xc79f8ffc )
	ROM_RELOAD(               0x270000, 0x10000 )
	ROM_LOAD( "061-1142.bin", 0x280000, 0x04000, 0xa6ab551f )  /* alpha font */

	ROM_REGION(0x14000)	/* 64k for 6502 code */
	ROM_LOAD( "061-1114.bin", 0x10000, 0x4000, 0xc0dcce1a )
	ROM_CONTINUE(             0x04000, 0xc000 )
ROM_END



/*************************************
 *
 *		Game driver(s)
 *
 *************************************/

struct GameDriver toobin_driver =
{
	__FILE__,
	0,
	"toobin",
	"Toobin'",
	"1988",
	"Atari Games",
	"Aaron Giles (MAME driver)\nTim Lindquist (hardware info)",
	0,
	&toobin_machine_driver,
	0,

	toobin_rom,
	0,
	0,
	0,
	0,	/* sound_prom */

	toobin_ports,

	0, 0, 0,   /* colors, palette, colortable */
	ORIENTATION_ROTATE_270,
	atarigen_hiload, atarigen_hisave
};

⌨️ 快捷键说明

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