📄 bwidow.c
字号:
{ 0x88c0, 0x88c0, MWA_NOP }, /* interrupt acknowledge */
{ 0x8900, 0x8900, atari_vg_earom_ctrl },
{ 0x8980, 0x89ed, MWA_NOP }, /* watchdog clear */
{ 0x8940, 0x897f, atari_vg_earom_w },
{ 0x9000, 0xffff, MWA_ROM },
{ 0x2800, 0x5fff, MWA_ROM },
{ -1 } /* end of table */
};
static struct MemoryReadAddress spacduel_readmem[] =
{
{ 0x0000, 0x03ff, MRA_RAM },
{ 0x4000, 0x8fff, MRA_ROM },
{ 0xf000, 0xffff, MRA_ROM },
{ 0x2800, 0x3fff, MRA_ROM },
{ 0x2000, 0x27ff, MRA_RAM, &vectorram, &vectorram_size },
{ 0x0a00, 0x0a00, atari_vg_earom_r },
{ 0x0800, 0x0800, bzone_IN0_r }, /* IN0 */
{ 0x0900, 0x0907, spacduel_IN3_r }, /* IN1 */
{ 0x1000, 0x100f, pokey1_r },
{ 0x1400, 0x140f, pokey2_r },
{ -1 } /* end of table */
};
static struct MemoryWriteAddress spacduel_writemem[] =
{
{ 0x0000, 0x03ff, MWA_RAM },
{ 0x2000, 0x27ff, MWA_RAM, &vectorram },
{ 0x1000, 0x13ff, pokey1_w },
{ 0x1400, 0x17ff, pokey2_w },
{ 0x0905, 0x0906, MWA_NOP }, /* ignore? */
/* { 0x0c00, 0x0c00, coin_counter_w }, */ /* coin out */
{ 0x0c80, 0x0c80, avgdvg_go },
{ 0x0d00, 0x0d00, MWA_NOP }, /* watchdog clear */
{ 0x0d80, 0x0d80, avgdvg_reset },
{ 0x0e00, 0x0e00, MWA_NOP }, /* interrupt acknowledge */
{ 0x0e80, 0x0e80, atari_vg_earom_ctrl },
{ 0x0f00, 0x0f3f, atari_vg_earom_w },
{ 0x4000, 0x8fff, MWA_ROM },
{ 0x2800, 0x3fff, MWA_ROM },
{ 0xf000, 0xffff, MWA_ROM },
{ -1 } /* end of table */
};
INPUT_PORTS_START( bwidow_input_ports )
PORT_START /* IN0 */
PORT_BIT ( 0x01, IP_ACTIVE_LOW, IPT_COIN1)
PORT_BIT ( 0x02, IP_ACTIVE_LOW, IPT_COIN2)
PORT_BIT ( 0x0c, IP_ACTIVE_LOW, IPT_UNUSED)
PORT_BITX( 0x10, 0x10, IPT_DIPSWITCH_NAME | IPF_TOGGLE, "Service Mode", OSD_KEY_F2, IP_JOY_NONE, 0 )
PORT_DIPSETTING( 0x10, "Off" )
PORT_DIPSETTING( 0x00, "On" )
PORT_BITX( 0x20, IP_ACTIVE_LOW, IPT_SERVICE, "Diagnostic Step", OSD_KEY_F1, IP_JOY_NONE, 0 )
/* bit 6 is the VG HALT bit. We set it to "low" */
/* per default (busy vector processor). */
PORT_BIT ( 0x40, IP_ACTIVE_HIGH, IPT_UNKNOWN )
/* bit 7 is tied to a 3khz clock */
PORT_BIT ( 0x80, IP_ACTIVE_HIGH, IPT_UNKNOWN )
PORT_START /* DSW0 */
PORT_DIPNAME (0x03, 0x00, "Coinage", IP_KEY_NONE )
PORT_DIPSETTING ( 0x00, "1 Coin/1 Credit" )
PORT_DIPSETTING ( 0x01, "2 Coins/1 Credit" )
PORT_DIPSETTING ( 0x02, "Free Play" )
PORT_DIPSETTING ( 0x03, "1 Coin/2 Credits" )
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, "Left Coin", IP_KEY_NONE )
PORT_DIPSETTING ( 0x00, "*1" )
PORT_DIPSETTING ( 0x10, "*2" )
PORT_DIPNAME (0xe0, 0x00, "Bonus Coins", IP_KEY_NONE )
PORT_DIPSETTING ( 0x00, "None" )
PORT_DIPSETTING ( 0x20, "3 credits/2 coins" )
PORT_DIPSETTING ( 0x40, "5 credits/4 coins" )
PORT_DIPSETTING ( 0x60, "6 credits/4 coins" )
PORT_DIPSETTING ( 0x80, "6 credits/6 coins" )
PORT_DIPSETTING ( 0xa0, "4 credits/3 coins" )
PORT_START /* DSW1 */
PORT_DIPNAME (0x03, 0x01, "Max Start", IP_KEY_NONE )
PORT_DIPSETTING ( 0x00, "Lev 13" )
PORT_DIPSETTING ( 0x01, "Lev 21" )
PORT_DIPSETTING ( 0x02, "Lev 37" )
PORT_DIPSETTING ( 0x03, "Lev 53" )
PORT_DIPNAME (0x0c, 0x00, "Lives", IP_KEY_NONE )
PORT_DIPSETTING ( 0x00, "3" )
PORT_DIPSETTING ( 0x04, "4" )
PORT_DIPSETTING ( 0x08, "5" )
PORT_DIPSETTING ( 0x0c, "6" )
PORT_DIPNAME (0x30, 0x10, "Difficulty", IP_KEY_NONE )
PORT_DIPSETTING ( 0x00, "Easy" )
PORT_DIPSETTING ( 0x10, "Medium" )
PORT_DIPSETTING ( 0x20, "Hard" )
PORT_DIPSETTING ( 0x30, "Demo" )
PORT_DIPNAME (0xc0, 0x00, "Bonus Life", IP_KEY_NONE )
PORT_DIPSETTING ( 0x00, "20000" )
PORT_DIPSETTING ( 0x40, "30000" )
PORT_DIPSETTING ( 0x80, "40000" )
PORT_DIPSETTING ( 0xc0, "None" )
PORT_START /* IN3 - Movement joystick */
PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_JOYSTICKLEFT_RIGHT )
PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_JOYSTICKLEFT_LEFT )
PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_JOYSTICKLEFT_DOWN )
PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_JOYSTICKLEFT_UP )
PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_UNUSED )
PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_START1 )
PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_START2 )
PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_UNUSED )
PORT_START /* IN4 - Firing joystick */
PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_JOYSTICKRIGHT_RIGHT )
PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_JOYSTICKRIGHT_LEFT )
PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_JOYSTICKRIGHT_DOWN )
PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_JOYSTICKRIGHT_UP )
PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_UNUSED )
PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_START1 )
PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_START2 )
PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_UNUSED )
INPUT_PORTS_END
INPUT_PORTS_START( gravitar_input_ports )
PORT_START /* IN0 */
PORT_BIT ( 0x01, IP_ACTIVE_LOW, IPT_COIN1)
PORT_BIT ( 0x02, IP_ACTIVE_LOW, IPT_COIN2)
PORT_BIT ( 0x0c, IP_ACTIVE_LOW, IPT_UNUSED)
PORT_BITX( 0x10, 0x10, IPT_DIPSWITCH_NAME | IPF_TOGGLE, "Service Mode", OSD_KEY_F2, IP_JOY_NONE, 0 )
PORT_DIPSETTING( 0x10, "Off" )
PORT_DIPSETTING( 0x00, "On" )
PORT_BITX( 0x20, IP_ACTIVE_LOW, IPT_SERVICE, "Diagnostic Step", OSD_KEY_F1, IP_JOY_NONE, 0 )
/* bit 6 is the VG HALT bit. We set it to "low" */
/* per default (busy vector processor). */
PORT_BIT ( 0x40, IP_ACTIVE_HIGH, IPT_UNKNOWN )
/* bit 7 is tied to a 3khz clock */
PORT_BIT ( 0x80, IP_ACTIVE_HIGH, IPT_UNKNOWN )
PORT_START /* DSW0 */
PORT_BIT( 0x03, IP_ACTIVE_HIGH, IPT_UNUSED )
PORT_DIPNAME (0x0c, 0x04, "Lives", IP_KEY_NONE )
PORT_DIPSETTING ( 0x00, "3" )
PORT_DIPSETTING ( 0x04, "4" )
PORT_DIPSETTING ( 0x08, "5" )
PORT_DIPSETTING ( 0x0c, "6" )
PORT_DIPNAME (0x10, 0x00, "Difficulty", IP_KEY_NONE )
PORT_DIPSETTING ( 0x00, "Easy" )
PORT_DIPSETTING ( 0x10, "Hard" )
PORT_BIT( 0x20, IP_ACTIVE_HIGH, IPT_UNUSED )
PORT_DIPNAME (0xc0, 0x00, "Bonus Life", IP_KEY_NONE )
PORT_DIPSETTING ( 0x00, "10000" )
PORT_DIPSETTING ( 0x40, "20000" )
PORT_DIPSETTING ( 0x80, "30000" )
PORT_DIPSETTING ( 0xc0, "None" )
PORT_START /* DSW1 */
PORT_DIPNAME (0x03, 0x00, "Coinage", IP_KEY_NONE )
PORT_DIPSETTING ( 0x00, "1 Coin/1 Credit" )
PORT_DIPSETTING ( 0x01, "2 Coins/1 Credit" )
PORT_DIPSETTING ( 0x02, "Free Play" )
PORT_DIPSETTING ( 0x03, "1 Coin/2 Credits" )
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, "Left Coin", IP_KEY_NONE )
PORT_DIPSETTING ( 0x00, "*1" )
PORT_DIPSETTING ( 0x10, "*2" )
PORT_DIPNAME (0xe0, 0x00, "Bonus Coins", IP_KEY_NONE )
PORT_DIPSETTING ( 0x00, "None" )
PORT_DIPSETTING ( 0x20, "3 credits/2 coins" )
PORT_DIPSETTING ( 0x40, "5 credits/4 coins" )
PORT_DIPSETTING ( 0x60, "6 credits/4 coins" )
PORT_DIPSETTING ( 0x80, "6 credits/6 coins" )
PORT_DIPSETTING ( 0xa0, "4 credits/3 coins" )
PORT_START /* IN3 - Player 1 */
PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_BUTTON3 )
PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_BUTTON1 )
PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_JOYSTICK_RIGHT | IPF_2WAY )
PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_JOYSTICK_LEFT | IPF_2WAY )
PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_BUTTON2 )
PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_START1 )
PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_START2 )
PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_UNUSED )
PORT_START /* IN4 - Player 2 */
PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_BUTTON2 | IPF_PLAYER2 )
PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_BUTTON1 | IPF_PLAYER2 )
PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_JOYSTICK_RIGHT | IPF_PLAYER2 | IPF_2WAY )
PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_JOYSTICK_LEFT | IPF_PLAYER2 | IPF_2WAY )
PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_BUTTON3 | IPF_PLAYER2 )
PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_START1 )
PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_START2 )
PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_UNUSED )
INPUT_PORTS_END
INPUT_PORTS_START( spacduel_input_ports )
PORT_START /* IN0 */
PORT_BIT ( 0x01, IP_ACTIVE_LOW, IPT_COIN1)
PORT_BIT ( 0x02, IP_ACTIVE_LOW, IPT_COIN2)
PORT_BIT ( 0x0c, IP_ACTIVE_LOW, IPT_UNUSED)
PORT_BITX( 0x10, 0x10, IPT_DIPSWITCH_NAME | IPF_TOGGLE, "Service Mode", OSD_KEY_F2, IP_JOY_NONE, 0 )
PORT_DIPSETTING( 0x10, "Off" )
PORT_DIPSETTING( 0x00, "On" )
PORT_BITX( 0x20, IP_ACTIVE_LOW, IPT_SERVICE, "Diagnostic Step", OSD_KEY_F1, IP_JOY_NONE, 0 )
/* bit 6 is the VG HALT bit. We set it to "low" */
/* per default (busy vector processor). */
PORT_BIT ( 0x40, IP_ACTIVE_HIGH, IPT_UNKNOWN )
/* bit 7 is tied to a 3khz clock */
PORT_BIT ( 0x80, IP_ACTIVE_HIGH, IPT_UNKNOWN )
PORT_START /* DSW0 */
PORT_DIPNAME (0x03, 0x01, "Lives", IP_KEY_NONE )
PORT_DIPSETTING ( 0x01, "3" )
PORT_DIPSETTING ( 0x00, "4" )
PORT_DIPSETTING ( 0x03, "5" )
PORT_DIPSETTING ( 0x02, "6" )
PORT_DIPNAME (0x0c, 0x00, "Difficulty", IP_KEY_NONE )
PORT_DIPSETTING ( 0x04, "Easy" )
PORT_DIPSETTING ( 0x00, "Normal" )
PORT_DIPSETTING ( 0x0c, "Medium" )
PORT_DIPSETTING ( 0x08, "Hard" )
PORT_DIPNAME (0x30, 0x00, "Language", IP_KEY_NONE )
PORT_DIPSETTING ( 0x00, "English" )
PORT_DIPSETTING ( 0x10, "German" )
PORT_DIPSETTING ( 0x20, "French" )
PORT_DIPSETTING ( 0x30, "Spanish" )
PORT_DIPNAME (0xc0, 0x00, "Bonus Life", IP_KEY_NONE )
PORT_DIPSETTING ( 0xc0, "8000" )
PORT_DIPSETTING ( 0x00, "10000" )
PORT_DIPSETTING ( 0x40, "15000" )
PORT_DIPSETTING ( 0x80, "None" )
PORT_START /* DSW1 */
PORT_DIPNAME (0x03, 0x00, "Coinage", IP_KEY_NONE )
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, "Left Coin", IP_KEY_NONE )
PORT_DIPSETTING ( 0x00, "*1" )
PORT_DIPSETTING ( 0x10, "*2" )
PORT_DIPNAME (0xe0, 0x00, "Bonus Coins", IP_KEY_NONE )
PORT_DIPSETTING ( 0x00, "None" )
PORT_DIPSETTING ( 0x20, "3 credits/2 coins" )
PORT_DIPSETTING ( 0xa0, "4 credits/3 coins" )
PORT_DIPSETTING ( 0x40, "5 credits/4 coins" )
PORT_DIPSETTING ( 0x60, "6 credits/4 coins" )
PORT_DIPSETTING ( 0x80, "6 credits/6 coins" )
/* See machine/spacduel.c for more info on these 2 ports */
PORT_START /* IN3 - Player 1 - spread over 8 memory locations */
PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_JOYSTICK_LEFT | IPF_2WAY )
PORT_BIT( 0x02, IP_ACTIVE_HIGH, IPT_JOYSTICK_RIGHT | IPF_2WAY )
PORT_BIT( 0x04, IP_ACTIVE_HIGH, IPT_BUTTON1 )
PORT_BIT( 0x08, IP_ACTIVE_HIGH, IPT_BUTTON3 )
PORT_BIT( 0x10, IP_ACTIVE_HIGH, IPT_BUTTON2 )
PORT_BIT( 0x20, IP_ACTIVE_HIGH, IPT_START1 )
PORT_BIT( 0x40, IP_ACTIVE_HIGH, IPT_START2 )
PORT_BIT( 0x80, IP_ACTIVE_HIGH, IPT_UNUSED )
PORT_START /* IN4 - Player 2 - spread over 8 memory locations */
PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_JOYSTICK_LEFT | IPF_2WAY | IPF_PLAYER2 )
PORT_BIT( 0x02, IP_ACTIVE_HIGH, IPT_JOYSTICK_RIGHT | IPF_2WAY | IPF_PLAYER2 )
PORT_BIT( 0x04, IP_ACTIVE_HIGH, IPT_BUTTON1 | IPF_PLAYER2 )
PORT_BIT( 0x08, IP_ACTIVE_HIGH, IPT_BUTTON2 | IPF_PLAYER2 )
PORT_BIT( 0x10, IP_ACTIVE_HIGH, IPT_BUTTON3 | IPF_PLAYER2 )
PORT_BIT( 0x20, IP_ACTIVE_HIGH, IPT_START1 )
PORT_BIT( 0x40, IP_ACTIVE_HIGH, IPT_START2 )
PORT_BIT( 0x80, IP_ACTIVE_HIGH, IPT_UNUSED )
INPUT_PORTS_END
static unsigned char color_prom[] = { VEC_PAL_COLOR };
static struct POKEYinterface pokey_interface =
{
2, /* 2 chips */
1500000, /* 1.5 MHz??? */
50,
POKEY_DEFAULT_GAIN,
NO_CLIP,
/* The 8 pot handlers */
{ 0, 0 },
{ 0, 0 },
{ 0, 0 },
{ 0, 0 },
{ 0, 0 },
{ 0, 0 },
{ 0, 0 },
{ 0, 0 },
/* The allpot handler */
{ input_port_1_r, input_port_2_r },
};
static struct MachineDriver bwidow_machine_driver =
{
/* basic machine hardware */
{
{
CPU_M6502,
1500000, /* 1.5 Mhz */
0,
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -