📄 missile.c
字号:
PORT_DIPSETTING ( 0x01, "2 Coins/1 Credit" )
PORT_DIPSETTING ( 0x00, "1 Coin/1 Credit" )
PORT_DIPSETTING ( 0x03, "1 Coin/2 Credits" )
PORT_DIPSETTING ( 0x02, "Free Play" )
PORT_DIPNAME (0x0c, 0x00, "Right Coin", IP_KEY_NONE )
PORT_DIPSETTING ( 0x00, "*1" )
PORT_DIPSETTING ( 0x04, "*4" )
PORT_DIPSETTING ( 0x08, "*5" )
PORT_DIPSETTING ( 0x0c, "*6" )
PORT_DIPNAME (0x10, 0x00, "Center Coin", IP_KEY_NONE )
PORT_DIPSETTING ( 0x00, "*1" )
PORT_DIPSETTING ( 0x10, "*2" )
PORT_DIPNAME (0xE0, 0x40, "Game", IP_KEY_NONE )
PORT_DIPSETTING ( 0x00, "Missile Command" )
PORT_DIPSETTING ( 0x40, "Easy Super Missile Attack" )
PORT_DIPSETTING ( 0x80, "Reg. Super Missile Attack" )
PORT_DIPSETTING ( 0xC0, "Hard Super Missile Attack" )
PORT_START /* IN3 */
PORT_DIPNAME (0x03, 0x00, "Cities", IP_KEY_NONE )
PORT_DIPSETTING ( 0x02, "4" )
PORT_DIPSETTING ( 0x01, "5" )
PORT_DIPSETTING ( 0x03, "6" )
PORT_DIPSETTING ( 0x00, "7" )
PORT_DIPNAME (0x04, 0x04, "Bonus Credit for 4 Coins", IP_KEY_NONE )
PORT_DIPSETTING ( 0x04, "No" )
PORT_DIPSETTING ( 0x00, "Yes" )
PORT_DIPNAME (0x08, 0x08, "Trackball Size", IP_KEY_NONE )
PORT_DIPSETTING ( 0x00, "Large" )
PORT_DIPSETTING ( 0x08, "Mini" )
PORT_DIPNAME (0x70, 0x00, "Bonus City", IP_KEY_NONE )
PORT_DIPSETTING ( 0x10, "8000" )
PORT_DIPSETTING ( 0x70, "10000" )
PORT_DIPSETTING ( 0x60, "12000" )
PORT_DIPSETTING ( 0x50, "14000" )
PORT_DIPSETTING ( 0x40, "15000" )
PORT_DIPSETTING ( 0x30, "18000" )
PORT_DIPSETTING ( 0x20, "20000" )
PORT_DIPSETTING ( 0x00, "None" )
PORT_DIPNAME (0x80, 0x00, "Cabinet", IP_KEY_NONE )
PORT_DIPSETTING ( 0x00, "Upright" )
PORT_DIPSETTING ( 0x80, "Cocktail" )
PORT_START /* They don't seem "FAKE" to me */
PORT_ANALOGX( 0x0f, 0x00, IPT_TRACKBALL_X, 25, 0, 0, 255, OSD_KEY_LEFT, OSD_KEY_RIGHT, OSD_JOY_LEFT, OSD_JOY_RIGHT, 1)
/* PORT_ANALOG ( 0x0f, 0x00, IPT_TRACKBALL_X, 12, 7, 0, 0) */
PORT_START /* They don't seem "FAKE" to me */
PORT_ANALOGX( 0x0f, 0x00, IPT_TRACKBALL_Y, 30, 0, 0, 255, OSD_KEY_UP, OSD_KEY_DOWN, OSD_JOY_UP, OSD_JOY_DOWN, 1)
/* PORT_ANALOG ( 0x0f, 0x00, IPT_TRACKBALL_Y, 100, 7, 0, 0) */
INPUT_PORTS_END
static struct POKEYinterface pokey_interface =
{
1, /* 1 chip */
1250000, /* 1.25 MHz??? */
100,
POKEY_DEFAULT_GAIN,
NO_CLIP,
/* The 8 pot handlers */
{ 0 },
{ 0 },
{ 0 },
{ 0 },
{ 0 },
{ 0 },
{ 0 },
{ 0 },
/* The allpot handler */
{ input_port_3_r },
};
static struct MachineDriver machine_driver =
{
/* basic machine hardware */
{
{
CPU_M6502,
1000000, /* 1 Mhz ???? */
0,
readmem,writemem,0,0,
interrupt, 4 /* EEA was 1 */
}
},
60, DEFAULT_REAL_60HZ_VBLANK_DURATION, /* frames per second, vblank duration */
10,
missile_init_machine,
/* video hardware */
256, 231, { 0, 255, 0, 230 },
0,
8, 0,
0,
VIDEO_TYPE_RASTER | VIDEO_MODIFIES_PALETTE | VIDEO_SUPPORTS_DIRTY,
0,
missile_vh_start,
missile_vh_stop,
missile_vh_screenrefresh,
/* sound hardware */
0,0,0,0,
{
{
SOUND_POKEY,
&pokey_interface
}
}
};
/***************************************************************************
Game driver(s)
***************************************************************************/
ROM_START( missile_rom )
ROM_REGION(0x10000) /* 64k for code */
ROM_LOAD( "035820.02", 0x5000, 0x0800, 0x7a62ce6a )
ROM_LOAD( "035821.02", 0x5800, 0x0800, 0xdf3bd57f )
ROM_LOAD( "035822.02", 0x6000, 0x0800, 0xa1cd384a )
ROM_LOAD( "035823.02", 0x6800, 0x0800, 0x82e552bb )
ROM_LOAD( "035824.02", 0x7000, 0x0800, 0x606e42e0 )
ROM_LOAD( "035825.02", 0x7800, 0x0800, 0xf752eaeb )
ROM_RELOAD( 0xF800, 0x0800 ) /* for interrupt vectors */
ROM_END
ROM_START( missile2_rom )
ROM_REGION(0x10000) /* 64k for code */
ROM_LOAD( "35820-01.h1", 0x5000, 0x0800, 0x41cbb8f2 )
ROM_LOAD( "35821-01.jk1", 0x5800, 0x0800, 0x728702c8 )
ROM_LOAD( "35822-01.kl1", 0x6000, 0x0800, 0x28f0999f )
ROM_LOAD( "35823-01.mn1", 0x6800, 0x0800, 0xbcc93c94 )
ROM_LOAD( "35824-01.np1", 0x7000, 0x0800, 0x0ca089c8 )
ROM_LOAD( "35825-01.r1", 0x7800, 0x0800, 0x428cf0d5 )
ROM_RELOAD( 0xF800, 0x0800 ) /* for interrupt vectors */
ROM_END
ROM_START( suprmatk_rom )
ROM_REGION(0x10000) /* 64k for code */
ROM_LOAD( "035820.sma", 0x5000, 0x0800, 0x75f01b87 )
ROM_LOAD( "035821.sma", 0x5800, 0x0800, 0x3320d67e )
ROM_LOAD( "035822.sma", 0x6000, 0x0800, 0xe6be5055 )
ROM_LOAD( "035823.sma", 0x6800, 0x0800, 0xa6069185 )
ROM_LOAD( "035824.sma", 0x7000, 0x0800, 0x90a06be8 )
ROM_LOAD( "035825.sma", 0x7800, 0x0800, 0x1298213d )
ROM_RELOAD( 0xF800, 0x0800 ) /* for interrupt vectors */
ROM_END
static int hiload(void)
{
void *f;
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[0x002C],"\x47\x4A\x4C", 3) == 0 &&
memcmp(&RAM[0x0044],"\x50\x69\x00", 3) == 0){
if ((f = osd_fopen(Machine->gamedrv->name,0,OSD_FILETYPE_HIGHSCORE,0)) != 0){
osd_fread(f,&RAM[0x002C],6*8);
osd_fclose(f);
}
return 1;
}else
return 0; /* we can't load the hi scores yet */
}
static void 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[0x002C],6*8);
osd_fclose(f);
}
}
struct GameDriver missile_driver =
{
__FILE__,
0,
"missile",
"Missile Command (set 1)",
"1980",
"Atari",
"Ray Giarratana\nMarco Cassili\nEric Anschuetz", /* EEA */
0,
&machine_driver,
0,
missile_rom,
0, 0,
0,
0, /* sound_prom */
input_ports,
0, 0, 0,
ORIENTATION_DEFAULT,
hiload, hisave
};
struct GameDriver missile2_driver =
{
__FILE__,
&missile_driver,
"missile2",
"Missile Command (set 2)",
"1980",
"Atari",
"Ray Giarratana\nMarco Cassili\nEric Anschuetz", /* EEA */
0,
&machine_driver,
0,
missile2_rom,
0, 0,
0,
0, /* sound_prom */
input_ports,
0, 0, 0,
ORIENTATION_DEFAULT,
hiload, hisave
};
struct GameDriver suprmatk_driver =
{
__FILE__,
&missile_driver,
"suprmatk",
"Super Missile Attack",
"1981",
"Atari + Gencomp",
"Ray Giarratana\nMarco Cassili\nEric Anschuetz", /* EEA */
0,
&machine_driver,
0,
suprmatk_rom,
0, 0,
0,
0, /* sound_prom */
suprmatk_input_ports,
0, 0, 0,
ORIENTATION_DEFAULT,
hiload, hisave
};
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -