📄 dowild.c
字号:
PORT_DIPSETTING( 0x90, "2 Coins/3 Credits" )
PORT_DIPSETTING( 0xe0, "1 Coin/2 Credits" )
PORT_DIPSETTING( 0xd0, "1 Coin/3 Credits" )
PORT_DIPSETTING( 0xc0, "1 Coin/4 Credits" )
PORT_DIPSETTING( 0xb0, "1 Coin/5 Credits" )
PORT_DIPSETTING( 0x00, "Free Play" )
/* 0x10, 0x20, 0x30, 0x40, 0x50 all give 1 Coin/1 Credit */
INPUT_PORTS_END
static struct GfxLayout charlayout =
{
8,8, /* 8*8 characters */
512, /* 512 characters */
4, /* 4 bits per pixel */
{ 0, 1, 2, 3 }, /* the bitplanes are packed in one nibble */
{ 0, 4, 8, 12, 16, 20, 24, 28 },
{ 0*32, 1*32, 2*32, 3*32, 4*32, 5*32, 6*32, 7*32 },
32*8 /* every char takes 32 consecutive bytes */
};
static struct GfxLayout spritelayout =
{
16,16, /* 16*16 sprites */
256, /* 256 sprites */
4, /* 4 bits per pixel */
{ 0, 1, 2, 3 }, /* the bitplanes are packed in one nibble */
{ 0, 4, 8, 12, 16, 20, 24, 28,
32, 36, 40, 44, 48, 52, 56, 60 },
{ 0*64, 1*64, 2*64, 3*64, 4*64, 5*64, 6*64, 7*64,
8*64, 9*64, 10*64, 11*64, 12*64, 13*64, 14*64, 15*64 },
128*8 /* every sprite takes 128 consecutive bytes */
};
static struct GfxDecodeInfo gfxdecodeinfo[] =
{
{ 1, 0x0000, &charlayout, 0, 64 },
{ 1, 0x4000, &spritelayout, 64*16, 32 },
{ -1 } /* end of array */
};
static struct SN76496interface sn76496_interface =
{
4, /* 4 chips */
4000000, /* 4 Mhz? */
{ 60, 60, 60, 60 }
};
static struct MachineDriver machine_driver =
{
/* basic machine hardware */
{
{
CPU_Z80,
4000000, /* 4 Mhz */
0,
readmem,writemem,0,0,
interrupt,1
},
{
CPU_Z80,
4000000, /* 4 Mhz */
3, /* memory region #3 */
readmem2, writemem2,0,0,
interrupt,8
}
},
60, DEFAULT_60HZ_VBLANK_DURATION, /* frames per second, vblank duration */
1, /* 1 CPU slice per frame - interleaving is forced when communication takes place */
0,
/* video hardware */
32*8, 32*8, { 1*8, 31*8-1, 4*8, 28*8-1 },
gfxdecodeinfo,
258, 96*16,
dowild_vh_convert_color_prom,
VIDEO_TYPE_RASTER|VIDEO_SUPPORTS_DIRTY,
0,
docastle_vh_start,
docastle_vh_stop,
docastle_vh_screenrefresh,
/* sound hardware */
0,0,0,0,
{
{
SOUND_SN76496,
&sn76496_interface
}
}
};
/***************************************************************************
Game driver(s)
***************************************************************************/
ROM_START( dowild_rom )
ROM_REGION(0x10000) /* 64k for code */
ROM_LOAD( "w1", 0x0000, 0x2000, 0x097de78b )
ROM_LOAD( "w3", 0x4000, 0x2000, 0xfc6a1cbb )
ROM_LOAD( "w4", 0x6000, 0x2000, 0x8aac1d30 )
ROM_LOAD( "w2", 0x8000, 0x2000, 0x0914ab69 )
ROM_REGION_DISPOSE(0xc000) /* temporary space for graphics (disposed after conversion) */
ROM_LOAD( "w5", 0x0000, 0x4000, 0xb294b151 )
ROM_LOAD( "w6", 0x4000, 0x2000, 0x57e0208b )
ROM_LOAD( "w7", 0x6000, 0x2000, 0x5001a6f7 )
ROM_LOAD( "w8", 0x8000, 0x2000, 0xec503251 )
ROM_LOAD( "w9", 0xa000, 0x2000, 0xaf7bd7eb )
ROM_REGION(0x0100) /* color prom */
ROM_LOAD( "dowild.clr", 0x0000, 0x0100, 0xa703dea5 )
ROM_REGION(0x10000) /* 64k for the second CPU */
ROM_LOAD( "w10", 0x0000, 0x4000, 0xd1f37fba )
ROM_END
ROM_START( jjack_rom )
ROM_REGION(0x10000) /* 64k for code */
ROM_LOAD( "j1.bin", 0x0000, 0x2000, 0x87f29bd2 )
ROM_LOAD( "j3.bin", 0x4000, 0x2000, 0x35b0517e )
ROM_LOAD( "j4.bin", 0x6000, 0x2000, 0x35bb316a )
ROM_LOAD( "j2.bin", 0x8000, 0x2000, 0xdec52e80 )
ROM_REGION_DISPOSE(0xc000) /* temporary space for graphics (disposed after conversion) */
ROM_LOAD( "j5.bin", 0x0000, 0x4000, 0x75038ff9 )
ROM_LOAD( "j6.bin", 0x4000, 0x2000, 0x5937bd7b )
ROM_LOAD( "j7.bin", 0x6000, 0x2000, 0xcf8ae8e7 )
ROM_LOAD( "j8.bin", 0x8000, 0x2000, 0x84f6fc8c )
ROM_LOAD( "j9.bin", 0xa000, 0x2000, 0x3f9bb09f )
ROM_REGION(0x0400) /* proms */
ROM_LOAD( "bprom1.bin", 0x0000, 0x0200, 0x2f0955f2 ) /* color prom */
ROM_LOAD( "bprom2.bin", 0x0200, 0x0200, 0x2747ca77 ) /* ??? */
ROM_REGION(0x10000) /* 64k for the second CPU */
ROM_LOAD( "j0.bin", 0x0000, 0x4000, 0xab042f04 )
ROM_END
ROM_START( dorunrun_rom )
ROM_REGION(0x10000) /* 64k for code */
ROM_LOAD( "2764.p1", 0x0000, 0x2000, 0x95c86f8e )
ROM_LOAD( "2764.l1", 0x4000, 0x2000, 0xe9a65ba7 )
ROM_LOAD( "2764.k1", 0x6000, 0x2000, 0xb1195d3d )
ROM_LOAD( "2764.n1", 0x8000, 0x2000, 0x6a8160d1 )
ROM_REGION_DISPOSE(0xc000) /* temporary space for graphics (disposed after conversion) */
ROM_LOAD( "27128.a3", 0x0000, 0x4000, 0x4be96dcf )
ROM_LOAD( "2764.m4", 0x4000, 0x2000, 0x4bb231a0 )
ROM_LOAD( "2764.l4", 0x6000, 0x2000, 0x0c08508a )
ROM_LOAD( "2764.j4", 0x8000, 0x2000, 0x79287039 )
ROM_LOAD( "2764.h4", 0xa000, 0x2000, 0x523aa999 )
ROM_REGION(0x0100) /* color prom */
ROM_LOAD( "dorunrun.clr", 0x0000, 0x0100, 0xd5bab5d5 )
ROM_REGION(0x10000) /* 64k for the second CPU */
ROM_LOAD( "27128.p7", 0x0000, 0x4000, 0x8b06d461 )
ROM_END
ROM_START( spiero_rom )
ROM_REGION(0x10000) /* 64k for code */
ROM_LOAD( "sp1.bin", 0x0000, 0x2000, 0x08d23e38 )
ROM_LOAD( "sp3.bin", 0x4000, 0x2000, 0xfaa0c18c )
ROM_LOAD( "sp4.bin", 0x6000, 0x2000, 0x639b4e5d )
ROM_LOAD( "sp2.bin", 0x8000, 0x2000, 0x3a29ccb0 )
ROM_REGION_DISPOSE(0xc000) /* temporary space for graphics (disposed after conversion) */
ROM_LOAD( "sp5.bin", 0x0000, 0x4000, 0x1b704bb0 )
ROM_LOAD( "sp6.bin", 0x4000, 0x2000, 0x00f893a7 )
ROM_LOAD( "sp7.bin", 0x6000, 0x2000, 0x173e5c6a )
ROM_LOAD( "sp8.bin", 0x8000, 0x2000, 0x2e66525a )
ROM_LOAD( "sp9.bin", 0xa000, 0x2000, 0x9c571525 )
ROM_REGION(0x0400) /* proms */
ROM_LOAD( "bprom1.bin", 0x0000, 0x0200, 0xfc1b66ff ) /* color prom */
ROM_LOAD( "bprom2.bin", 0x0200, 0x0200, 0x2747ca77 ) /* ??? */
ROM_REGION(0x10000) /* 64k for the second CPU */
ROM_LOAD( "sp0.bin", 0x0000, 0x4000, 0x8b06d461 )
ROM_END
ROM_START( kickridr_rom )
ROM_REGION(0x10000) /* 64k for code */
ROM_LOAD( "k1", 0x0000, 0x2000, 0xdfdd1ab4 )
ROM_LOAD( "k3", 0x4000, 0x2000, 0x412244da )
ROM_LOAD( "k4", 0x6000, 0x2000, 0xa67dd2ec )
ROM_LOAD( "k2", 0x8000, 0x2000, 0xe193fb5c )
ROM_REGION_DISPOSE(0xc000) /* temporary space for graphics (disposed after conversion) */
ROM_LOAD( "k5", 0x0000, 0x4000, 0x3f7d7e49 )
ROM_LOAD( "k6", 0x4000, 0x2000, 0x94252ed3 )
ROM_LOAD( "k7", 0x6000, 0x2000, 0x7ef2420e )
ROM_LOAD( "k8", 0x8000, 0x2000, 0x29bed201 )
ROM_LOAD( "k9", 0xa000, 0x2000, 0x847584d3 )
ROM_REGION(0x0100) /* color prom */
ROM_LOAD( "kickridr.clr", 0x0000, 0x0100, 0x73ec281c )
ROM_REGION(0x10000) /* 64k for the second CPU */
ROM_LOAD( "k10", 0x0000, 0x4000, 0x6843dbc0 )
ROM_END
static int dowild_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[0x2020],"\x01\x00\x00",3) == 0 &&
memcmp(&RAM[0x2068],"\x01\x00\x00",3) == 0)
{
void *f;
if ((f = osd_fopen(Machine->gamedrv->name,0,OSD_FILETYPE_HIGHSCORE,0)) != 0)
{
osd_fread(f,&RAM[0x2020],10*8);
osd_fclose(f);
}
return 1;
}
else return 0; /* we can't load the hi scores yet */
}
static void dowild_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[0x2020],10*8);
osd_fclose(f);
}
}
static int dorunrun_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[0x2010],"\x00\x10\x00",3) == 0 &&
memcmp(&RAM[0x2198],"\x00\x10\x00",3) == 0)
{
void *f;
if ((f = osd_fopen(Machine->gamedrv->name,0,OSD_FILETYPE_HIGHSCORE,0)) != 0)
{
osd_fread(f,&RAM[0x2010],50*8);
osd_fclose(f);
}
return 1;
}
else return 0; /* we can't load the hi scores yet */
}
static void dorunrun_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[0x2010],50*8);
osd_fclose(f);
}
}
/* HSC 12/5/98 NOTE: spiero does NOT save a high score table like dorunrun does */
/* it only keeps a top score */
static int spiero_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[0x2010],"\x00\x10\x00",3) == 0)
{
void *f;
if ((f = osd_fopen(Machine->gamedrv->name,0,OSD_FILETYPE_HIGHSCORE,0)) != 0)
{
osd_fread(f,&RAM[0x2010],3);
osd_fclose(f);
}
return 1;
}
else return 0; /* we can't load the hi scores yet */
}
static void spiero_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[0x2010],3);
osd_fclose(f);
}
}
struct GameDriver dowild_driver =
{
__FILE__,
0,
"dowild",
"Mr. Do's Wild Ride",
"1984",
"Universal",
"Mirko Buffoni\nNicola Salmoria\nGary Walton\nSimon Walls\nMarco Cassili",
0,
&machine_driver,
0,
dowild_rom,
0, 0,
0,
0, /* sound_prom */
dowild_input_ports,
PROM_MEMORY_REGION(2), 0, 0,
ORIENTATION_DEFAULT,
dowild_hiload, dowild_hisave
};
struct GameDriver jjack_driver =
{
__FILE__,
0,
"jjack",
"Jumping Jack",
"1984",
"Universal",
"Mirko Buffoni\nNicola Salmoria\nGary Walton\nSimon Walls\nMarco Cassili",
0,
&machine_driver,
0,
jjack_rom,
0, 0,
0,
0, /* sound_prom */
jjack_input_ports,
PROM_MEMORY_REGION(2), 0, 0,
ORIENTATION_ROTATE_270,
dowild_hiload, dowild_hisave
};
struct GameDriver dorunrun_driver =
{
__FILE__,
0,
"dorunrun",
"Mr. Do! Run Run",
"1984",
"Universal",
"Mirko Buffoni\nNicola Salmoria\nGary Walton\nSimon Walls\nMarco Cassili",
0,
&machine_driver,
0,
dorunrun_rom,
0, 0,
0,
0, /* sound_prom */
dorunrun_input_ports,
PROM_MEMORY_REGION(2), 0, 0,
ORIENTATION_DEFAULT,
dorunrun_hiload, dorunrun_hisave
};
struct GameDriver spiero_driver =
{
__FILE__,
&dorunrun_driver,
"spiero",
"Super Pierrot (Japan)",
"1987",
"Universal",
"Mirko Buffoni\nNicola Salmoria\nGary Walton\nSimon Walls\nMarco Cassili",
0,
&machine_driver,
0,
spiero_rom,
0, 0,
0,
0, /* sound_prom */
dorunrun_input_ports,
PROM_MEMORY_REGION(2), 0, 0,
ORIENTATION_DEFAULT,
spiero_hiload, spiero_hisave
};
struct GameDriver kickridr_driver =
{
__FILE__,
0,
"kickridr",
"Kick Rider",
"1984",
"Universal",
"Mirko Buffoni\nNicola Salmoria\nGary Walton\nSimon Walls\nMarco Cassili",
0,
&machine_driver,
0,
kickridr_rom,
0, 0,
0,
0, /* sound_prom */
kickridr_input_ports,
PROM_MEMORY_REGION(2), 0, 0,
ORIENTATION_DEFAULT,
dowild_hiload, dowild_hisave
};
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -