📄 8080bw.c
字号:
"5.SAM",
"6.SAM",
"7.SAM",
"8.SAM",
0 /* end of array */
};
struct GameDriver invaders_driver =
{
__FILE__,
0,
"invaders",
"Space Invaders",
"1978",
"Midway",
"Michael Strutts (Space Invaders emulator)\nNicola Salmoria\nTormod Tjaberg (sound)\nMirko Buffoni\nValerio Verrando\nMarco Cassili",
0,
&machine_driver,
0,
invaders_rom,
0, 0,
invaders_sample_names,
0, /* sound_prom */
invaders_input_ports,
0, palette, 0,
ORIENTATION_ROTATE_270,
invaders_hiload, invaders_hisave
};
/*******************************************************/
/* */
/* Midway "Space Invaders Part II" */
/* */
/*******************************************************/
ROM_START( invaders2_rom )
ROM_REGION(0x10000) /* 64k for code */
ROM_LOAD( "pv.01", 0x0000, 0x0800, 0x7288a511 )
ROM_LOAD( "pv.02", 0x0800, 0x0800, 0x097dd8d5 )
ROM_LOAD( "pv.03", 0x1000, 0x0800, 0x1766337e )
ROM_LOAD( "pv.04", 0x1800, 0x0800, 0x8f0e62e0 )
ROM_LOAD( "pv.05", 0x4000, 0x0800, 0x19b505e9 )
ROM_END
static struct IOReadPort invadpt2_readport[] =
{
{ 0x00, 0x00, input_port_0_r },
{ 0x01, 0x01, input_port_1_r },
{ 0x02, 0x02, input_port_2_r },
{ 0x03, 0x03, invaders_shift_data_r },
{ -1 } /* end of table */
};
/* LT 20-3-1998 */
static struct IOWritePort invadpt2_writeport[] =
{
{ 0x02, 0x02, invaders_shift_amount_w },
{ 0x03, 0x03, invadpt2_sh_port3_w },
{ 0x04, 0x04, invaders_shift_data_w },
{ 0x05, 0x05, invaders_sh_port5_w },
{ 0x06, 0x06, invaders_dummy_write },
{ -1 } /* end of table */
};
static struct MemoryWriteAddress invadpt2_writemem[] =
{
{ 0x2000, 0x23ff, MWA_RAM },
{ 0x2400, 0x3fff, lrescue_videoram_w, &invaders_videoram },
{ 0x0000, 0x1fff, MWA_ROM },
{ 0x4000, 0x57ff, MWA_ROM },
{ -1 } /* end of table */
};
INPUT_PORTS_START( invadpt2_input_ports )
PORT_START /* IN0 */
PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_UNKNOWN )
PORT_BIT( 0x02, IP_ACTIVE_HIGH, IPT_UNKNOWN )
PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_UNKNOWN )
PORT_BIT( 0x08, IP_ACTIVE_HIGH, IPT_UNKNOWN )
PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_UNKNOWN )
PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_UNKNOWN )
PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_UNKNOWN ) /* N ? */
PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_UNKNOWN )
PORT_START /* IN1 */
PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_COIN1 )
PORT_BIT( 0x02, IP_ACTIVE_HIGH, IPT_START2 )
PORT_BIT( 0x04, IP_ACTIVE_HIGH, IPT_START1 )
PORT_BIT( 0x08, IP_ACTIVE_HIGH, IPT_UNKNOWN )
PORT_BIT( 0x10, IP_ACTIVE_HIGH, IPT_BUTTON1 )
PORT_BIT( 0x20, IP_ACTIVE_HIGH, IPT_JOYSTICK_LEFT | IPF_2WAY )
PORT_BIT( 0x40, IP_ACTIVE_HIGH, IPT_JOYSTICK_RIGHT | IPF_2WAY )
PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_UNKNOWN )
PORT_START /* DSW0 */
PORT_DIPNAME( 0x01, 0x00, "Lives", IP_KEY_NONE )
PORT_DIPSETTING( 0x00, "3" )
PORT_DIPSETTING( 0x01, "4" )
PORT_DIPNAME( 0x02, 0x00, "Unknown", IP_KEY_NONE )
PORT_DIPSETTING( 0x00, "Off" )
PORT_DIPSETTING( 0x02, "On" )
PORT_BIT( 0x04, IP_ACTIVE_HIGH, IPT_UNKNOWN )
PORT_DIPNAME( 0x08, 0x00, "Preset Mode", IP_KEY_NONE )
PORT_DIPSETTING( 0x00, "Off" )
PORT_DIPSETTING( 0x08, "On" )
PORT_BIT( 0x10, IP_ACTIVE_HIGH, IPT_BUTTON1 | IPF_COCKTAIL )
PORT_BIT( 0x20, IP_ACTIVE_HIGH, IPT_JOYSTICK_LEFT | IPF_2WAY | IPF_COCKTAIL )
PORT_BIT( 0x40, IP_ACTIVE_HIGH, IPT_JOYSTICK_RIGHT | IPF_2WAY | IPF_COCKTAIL )
PORT_DIPNAME( 0x80, 0x00, "Coin Info", IP_KEY_NONE )
PORT_DIPSETTING( 0x00, "On" )
PORT_DIPSETTING( 0x80, "Off" )
PORT_START /* BSR */
PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_UNKNOWN )
PORT_BIT( 0x02, IP_ACTIVE_HIGH, IPT_UNKNOWN )
PORT_BIT( 0x04, IP_ACTIVE_HIGH, IPT_UNKNOWN )
PORT_BIT( 0x08, IP_ACTIVE_HIGH, IPT_UNKNOWN )
PORT_BIT( 0x10, IP_ACTIVE_HIGH, IPT_UNKNOWN )
PORT_BIT( 0x20, IP_ACTIVE_HIGH, IPT_UNKNOWN )
PORT_BIT( 0x40, IP_ACTIVE_HIGH, IPT_UNKNOWN )
PORT_BIT( 0x80, IP_ACTIVE_HIGH, IPT_UNKNOWN )
PORT_START /* Dummy port for cocktail mode */
PORT_DIPNAME( 0x01, 0x00, "Cabinet", IP_KEY_NONE )
PORT_DIPSETTING( 0x00, "Upright" )
PORT_DIPSETTING( 0x01, "Cocktail" )
INPUT_PORTS_END
static struct MachineDriver invadpt2_machine_driver =
{
/* basic machine hardware */
{
{
CPU_8080,
2000000, /* 2 Mhz? */
0,
readmem, invadpt2_writemem, invadpt2_readport, invadpt2_writeport,
invaders_interrupt,2 /* two interrupts per frame */
}
},
60, DEFAULT_60HZ_VBLANK_DURATION, /* frames per second, vblank duration */
1, /* single CPU, no need for interleaving */
0,
/* video hardware */
32*8, 32*8, { 0*8, 32*8-1, 0*8, 28*8-1 },
0, /* no gfxdecodeinfo - bitmapped display */
sizeof(palette)/3, 0,
0,
VIDEO_TYPE_RASTER|VIDEO_SUPPORTS_DIRTY|VIDEO_MODIFIES_PALETTE,
0,
invaders_vh_start,
invaders_vh_stop,
invaders_vh_screenrefresh,
/* sound hardware */
0, 0, 0, 0,
{
{
SOUND_SAMPLES,
&samples_interface
}
}
};
static int invadpt2_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[0x2340],"\x1b\x1b",2) == 0)
{
void *f;
if ((f = osd_fopen(Machine->gamedrv->name,0,OSD_FILETYPE_HIGHSCORE,0)) != 0)
{
/* Load the actual score */
osd_fread(f,&RAM[0x20f4], 0x2);
/* Load the name */
osd_fread(f,&RAM[0x2340], 0xa);
osd_fclose(f);
}
return 1;
}
else return 0; /* we can't load the hi scores yet */
}
static void invadpt2_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)
{
/* Save the actual score */
osd_fwrite(f,&RAM[0x20f4], 0x2);
/* Save the name */
osd_fwrite(f,&RAM[0x2340], 0xa);
osd_fclose(f);
RAM[0x2340] = 0;
}
}
/* LT 24-11-1997 */
/* LT 20-3-1998 UPDATED */
struct GameDriver invadpt2_driver =
{
__FILE__,
0,
"invadpt2",
"Space Invaders Part II (Taito)",
"1980",
"Taito",
"Michael Strutts (Space Invaders emulator)\nNicola Salmoria\nTormod Tjaberg (sound)\nMirko Buffoni\nValerio Verrando\nLee Taylor\nMarco Cassili",
0,
&invadpt2_machine_driver,
0,
invaders2_rom,
0, 0,
invaders_sample_names,
0, /* sound_prom */
invadpt2_input_ports,
0,palette, 0,
ORIENTATION_ROTATE_270,
invadpt2_hiload, invadpt2_hisave
};
/*******************************************************/
/* */
/* ?????? "Super Earth Invasion" */
/* */
/*******************************************************/
ROM_START( earthinv_rom )
ROM_REGION(0x10000) /* 64k for code */
ROM_LOAD( "earthinv.h", 0x0000, 0x0800, 0x58a750c8 )
ROM_LOAD( "earthinv.g", 0x0800, 0x0800, 0xb91742f1 )
ROM_LOAD( "earthinv.f", 0x1000, 0x0800, 0x4acbbc60 )
ROM_LOAD( "earthinv.e", 0x1800, 0x0800, 0xdf397b12 )
ROM_END
INPUT_PORTS_START( earthinv_input_ports )
PORT_START /* IN0 */
PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_COIN1 )
PORT_BIT( 0x02, IP_ACTIVE_HIGH, IPT_START2 )
PORT_BIT( 0x04, IP_ACTIVE_HIGH, IPT_START1 )
PORT_BIT( 0x08, IP_ACTIVE_HIGH, IPT_UNKNOWN )
PORT_BIT( 0x10, IP_ACTIVE_HIGH, IPT_BUTTON1 )
PORT_BIT( 0x20, IP_ACTIVE_HIGH, IPT_JOYSTICK_LEFT | IPF_2WAY )
PORT_BIT( 0x40, IP_ACTIVE_HIGH, IPT_JOYSTICK_RIGHT | IPF_2WAY )
PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_UNKNOWN )
PORT_START /* DSW0 */
PORT_DIPNAME( 0x01, 0x00, "Lives", IP_KEY_NONE )
PORT_DIPSETTING( 0x00, "2" )
PORT_DIPSETTING( 0x01, "3" )
PORT_DIPNAME( 0x02, 0x00, "Unknown DSW 1", IP_KEY_NONE )
PORT_DIPSETTING( 0x00, "On" )
PORT_DIPSETTING( 0x02, "Off" )
PORT_BIT( 0x04, IP_ACTIVE_HIGH, IPT_UNKNOWN )
PORT_DIPNAME( 0x08, 0x00, "Unknown DSW 2", IP_KEY_NONE )
PORT_DIPSETTING( 0x00, "On" )
PORT_DIPSETTING( 0x08, "Off" )
PORT_BIT( 0x10, IP_ACTIVE_HIGH, IPT_BUTTON1 )
PORT_BIT( 0x20, IP_ACTIVE_HIGH, IPT_JOYSTICK_LEFT )
PORT_BIT( 0x40, IP_ACTIVE_HIGH, IPT_JOYSTICK_RIGHT )
PORT_DIPNAME( 0x80, 0x80, "Coinage", IP_KEY_NONE )
PORT_DIPSETTING( 0x00, "2 Coins/1 Credit" )
PORT_DIPSETTING( 0x80, "1 Coin/1 Credit" )
INPUT_PORTS_END
struct GameDriver earthinv_driver =
{
__FILE__,
&invaders_driver,
"earthinv",
"Super Earth Invasion",
"1980",
"bootleg",
"Michael Strutts (Space Invaders emulator)\nNicola Salmoria\nTormod Tjaberg (sound)\nMirko Buffoni\nMarco Cassili",
0,
&machine_driver,
0,
earthinv_rom,
0, 0,
invaders_sample_names,
0, /* sound_prom */
earthinv_input_ports,
0, palette, 0,
ORIENTATION_ROTATE_270,
invaders_hiload, invaders_hisave
};
/*******************************************************/
/* */
/* ?????? "Space Attack II" */
/* */
/*******************************************************/
ROM_START( spaceatt_rom )
ROM_REGION(0x10000) /* 64k for code */
ROM_LOAD( "spaceatt.h", 0x0000, 0x0800, 0xa31d0756 )
ROM_LOAD( "spaceatt.g", 0x0800, 0x0800, 0xf41241f7 )
ROM_LOAD( "spaceatt.f", 0x1000, 0x0800, 0x4c060223 )
ROM_LOAD( "spaceatt.e", 0x1800, 0x0800, 0x7cf6f604 )
ROM_END
INPUT_PORTS_START( spaceatt_input_ports )
PORT_START /* IN0 */
PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_COIN1 )
PORT_BIT( 0x02, IP_ACTIVE_HIGH, IPT_START2 )
PORT_BIT( 0x04, IP_ACTIVE_HIGH, IPT_START1 )
PORT_BIT( 0x08, IP_ACTIVE_HIGH, IPT_UNKNOWN )
PORT_BIT( 0x10, IP_ACTIVE_HIGH, IPT_BUTTON1 )
PORT_BIT( 0x20, IP_ACTIVE_HIGH, IPT_JOYSTICK_LEFT | IPF_2WAY )
PORT_BIT( 0x40, IP_ACTIVE_HIGH, IPT_JOYSTICK_RIGHT | IPF_2WAY )
PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_UNKNOWN )
PORT_START /* DSW0 */
PORT_DIPNAME( 0x03, 0x00, "Lives", IP_KEY_NONE )
PORT_DIPSETTING( 0x00, "3" )
PORT_DIPSETTING( 0x01, "4" )
PORT_DIPSETTING( 0x02, "5" )
PORT_DIPSETTING( 0x03, "6" )
PORT_BIT( 0x04, IP_ACTIVE_HIGH, IPT_UNKNOWN )
PORT_DIPNAME( 0x08, 0x00, "Bonus", IP_KEY_NONE )
PORT_DIPSETTING( 0x00, "1500" )
PORT_DIPSETTING( 0x08, "1000" )
PORT_BIT( 0x10, IP_ACTIVE_HIGH, IPT_BUTTON1 )
PORT_BIT( 0x20, IP_ACTIVE_HIGH, IPT_JOYSTICK_LEFT )
PORT_BIT( 0x40, IP_ACTIVE_HIGH, IPT_JOYSTICK_RIGHT )
PORT_DIPNAME( 0x80, 0x00, "Coinage", IP_KEY_NONE )
PORT_DIPSETTING( 0x00, "1 Coin/1 Credit" )
PORT_DIPSETTING( 0x80, "2 Coins/1 Credit" )
INPUT_PORTS_END
struct GameDriver spaceatt_driver =
{
__FILE__,
&invaders_driver,
"spaceatt",
"Space Attack II",
"1980",
"Zenitone Microsec",
"Michael Strutts (Space Invaders emulator)\nNicola Salmoria\nTormod Tjaberg (sound)\nMirko Buffoni\nValerio Verrando\nMarco Cassili",
0,
&machine_driver,
0,
spaceatt_rom,
0, 0,
invaders_sample_names,
0, /* sound_prom */
spaceatt_input_ports,
0, palette, 0,
ORIENTATION_ROTATE_270,
invaders_hiload, invaders_hisave
};
/*******************************************************/
/* */
/* Zenitone Microsec "Invaders Revenge" */
/* */
/*******************************************************/
ROM_START( invrvnge_rom )
ROM_REGION(0x10000) /* 64k for code */
ROM_LOAD( "invrvnge.h", 0x0000, 0x0800, 0xaca41bbb )
ROM_LOAD( "invrvnge.g", 0x0800, 0x0800, 0xcfe89dad )
ROM_LOAD( "invrvnge.f", 0x1000, 0x0800, 0xe350de2c )
ROM_LOAD( "invrvnge.e", 0x1800, 0x0800, 0x1ec8dfc8 )
ROM_END
ROM_START( invrvnga_rom )
ROM_REGION(0x10000) /* 64k for code */
ROM_LOAD( "5m.bin", 0x0000, 0x0800, 0xb145cb71 )
ROM_LOAD( "5n.bin", 0x0800, 0x0800, 0x660e8af3 )
ROM_LOAD( "5p.bin", 0x1000, 0x0800, 0x6ec5a9ad )
ROM_LOAD( "5r.bin", 0x1800, 0x0800, 0x74516811 )
ROM_END
static struct MemoryWriteAddress invrvnge_writemem[] =
{
{ 0x0000, 0x1fff, MWA_ROM },
{ 0x2000, 0x23ff, MWA_RAM },
{ 0x2400, 0x3fff, invrvnge_videoram_w, &invaders_videoram },
{ 0x4000, 0x57ff, MWA_ROM },
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -