📄 btime.c
字号:
{ 0x5c00, 0x5c0f, btime_paletteram_w, &paletteram },
{ -1 } /* end of table */
};
static struct MemoryReadAddress sound_readmem[] =
{
{ 0x0000, 0x03ff, MRA_RAM },
{ 0x0200, 0x0fff, MRA_ROM }, /* Cook Race */
{ 0xa000, 0xafff, soundlatch_r },
{ 0xf000, 0xffff, MRA_ROM },
{ -1 } /* end of table */
};
static struct MemoryWriteAddress sound_writemem[] =
{
{ 0x0000, 0x03ff, MWA_RAM },
{ 0x0200, 0x0fff, MWA_ROM }, /* Cook Race */
{ 0x2000, 0x2fff, AY8910_write_port_0_w },
{ 0x4000, 0x4fff, AY8910_control_port_0_w },
{ 0x6000, 0x6fff, AY8910_write_port_1_w },
{ 0x8000, 0x8fff, AY8910_control_port_1_w },
{ 0xc000, 0xcfff, interrupt_enable_w },
{ 0xf000, 0xffff, MWA_ROM },
{ -1 } /* end of table */
};
/***************************************************************************
These games don't have VBlank interrupts.
Interrupts are still used by the game, coin insertion generates an IRQ.
***************************************************************************/
static int btime_interrupt(int(*generated_interrupt)(void), int active_high)
{
static int coin;
int port;
port = readinputport(2) & 0xc0;
if (active_high) port ^= 0xc0;
if (port != 0xc0) /* Coin */
{
if (coin == 0)
{
coin = 1;
return generated_interrupt();
}
}
else coin = 0;
return ignore_interrupt();
}
static int btime_irq_interrupt(void)
{
return btime_interrupt(interrupt, 1);
}
static int zoar_irq_interrupt(void)
{
return btime_interrupt(interrupt, 0);
}
static int btime_nmi_interrupt(void)
{
return btime_interrupt(nmi_interrupt, 0);
}
static void sound_command_w(int offset,int data)
{
soundlatch_w(offset,data);
cpu_cause_interrupt(1,M6502_INT_IRQ);
}
INPUT_PORTS_START( btime_input_ports )
PORT_START /* IN0 */
PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_JOYSTICK_RIGHT | IPF_4WAY )
PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_JOYSTICK_LEFT | IPF_4WAY )
PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_JOYSTICK_UP | IPF_4WAY )
PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_JOYSTICK_DOWN | IPF_4WAY )
PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_BUTTON1 )
PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_UNKNOWN )
PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_UNUSED )
PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_UNUSED )
PORT_START /* IN1 */
PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_JOYSTICK_RIGHT | IPF_4WAY | IPF_COCKTAIL )
PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_JOYSTICK_LEFT | IPF_4WAY | IPF_COCKTAIL )
PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_JOYSTICK_UP | IPF_4WAY | IPF_COCKTAIL )
PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_JOYSTICK_DOWN | IPF_4WAY | IPF_COCKTAIL )
PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_BUTTON1 | IPF_COCKTAIL )
PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_UNKNOWN )
PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_UNUSED )
PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_UNUSED )
PORT_START /* IN2 */
PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_START1 )
PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_START2 )
PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_TILT )
PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_UNKNOWN )
PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_UNUSED )
PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_UNUSED )
PORT_BIT( 0x40, IP_ACTIVE_HIGH,IPT_COIN1 )
PORT_BIT( 0x80, IP_ACTIVE_HIGH,IPT_COIN2 )
PORT_START /* DSW1 */
PORT_DIPNAME( 0x03, 0x03, "Coin A", IP_KEY_NONE )
PORT_DIPSETTING( 0x00, "2 Coins/1 Credit" )
PORT_DIPSETTING( 0x03, "1 Coin/1 Credit" )
PORT_DIPSETTING( 0x02, "1 Coin/2 Credits" )
PORT_DIPSETTING( 0x01, "1 Coin/3 Credits" )
PORT_DIPNAME( 0x0c, 0x0c, "Coin B", IP_KEY_NONE )
PORT_DIPSETTING( 0x00, "2 Coins/1 Credit" )
PORT_DIPSETTING( 0x0c, "1 Coin/1 Credit" )
PORT_DIPSETTING( 0x08, "1 Coin/2 Credits" )
PORT_DIPSETTING( 0x04, "1 Coin/3 Credits" )
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_DIPNAME( 0x20, 0x20, "Cross Hatch Pattern", IP_KEY_NONE )
PORT_DIPSETTING( 0x20, "Off" )
PORT_DIPSETTING( 0x00, "On" )
PORT_DIPNAME( 0x40, 0x00, "Cabinet", IP_KEY_NONE )
PORT_DIPSETTING( 0x00, "Upright" )
PORT_DIPSETTING( 0x40, "Cocktail" )
PORT_BIT( 0x80, IP_ACTIVE_HIGH, IPT_VBLANK )
PORT_START /* DSW2 */
PORT_DIPNAME( 0x01, 0x01, "Lives", IP_KEY_NONE )
PORT_DIPSETTING( 0x01, "3" )
PORT_DIPSETTING( 0x00, "5" )
PORT_DIPNAME( 0x06, 0x06, "Bonus Life", IP_KEY_NONE )
PORT_DIPSETTING( 0x06, "10000" )
PORT_DIPSETTING( 0x04, "15000" )
PORT_DIPSETTING( 0x02, "20000" )
PORT_DIPSETTING( 0x00, "30000" )
PORT_DIPNAME( 0x08, 0x08, "Enemies", IP_KEY_NONE )
PORT_DIPSETTING( 0x08, "4" )
PORT_DIPSETTING( 0x00, "6" )
PORT_DIPNAME( 0x10, 0x10, "End of Level Pepper", IP_KEY_NONE )
PORT_DIPSETTING( 0x10, "No" )
PORT_DIPSETTING( 0x00, "Yes" )
PORT_DIPNAME( 0x20, 0x20, "Unknown", IP_KEY_NONE )
PORT_DIPSETTING( 0x20, "Off" )
PORT_DIPSETTING( 0x00, "On" )
PORT_DIPNAME( 0x40, 0x40, "Unknown", IP_KEY_NONE )
PORT_DIPSETTING( 0x40, "Off" )
PORT_DIPSETTING( 0x00, "On" )
PORT_DIPNAME( 0x80, 0x80, "Unknown", IP_KEY_NONE )
PORT_DIPSETTING( 0x80, "Off" )
PORT_DIPSETTING( 0x00, "On" )
INPUT_PORTS_END
INPUT_PORTS_START( cookrace_input_ports )
PORT_START /* IN0 */
PORT_BIT( 0x01, IP_ACTIVE_HIGH,IPT_JOYSTICK_RIGHT | IPF_4WAY )
PORT_BIT( 0x02, IP_ACTIVE_HIGH,IPT_JOYSTICK_LEFT | IPF_4WAY )
PORT_BIT( 0x04, IP_ACTIVE_HIGH,IPT_JOYSTICK_UP | IPF_4WAY )
PORT_BIT( 0x08, IP_ACTIVE_HIGH,IPT_JOYSTICK_DOWN | IPF_4WAY )
PORT_BIT( 0x10, IP_ACTIVE_HIGH,IPT_BUTTON1 )
PORT_BIT( 0x20, IP_ACTIVE_HIGH,IPT_UNKNOWN )
PORT_BIT( 0x40, IP_ACTIVE_HIGH,IPT_UNUSED )
PORT_BIT( 0x80, IP_ACTIVE_HIGH,IPT_UNUSED )
PORT_START /* IN1 */
PORT_BIT( 0x01, IP_ACTIVE_HIGH,IPT_JOYSTICK_RIGHT | IPF_4WAY | IPF_COCKTAIL )
PORT_BIT( 0x02, IP_ACTIVE_HIGH,IPT_JOYSTICK_LEFT | IPF_4WAY | IPF_COCKTAIL )
PORT_BIT( 0x04, IP_ACTIVE_HIGH,IPT_JOYSTICK_UP | IPF_4WAY | IPF_COCKTAIL )
PORT_BIT( 0x08, IP_ACTIVE_HIGH,IPT_JOYSTICK_DOWN | IPF_4WAY | IPF_COCKTAIL )
PORT_BIT( 0x10, IP_ACTIVE_HIGH,IPT_BUTTON1 | IPF_COCKTAIL )
PORT_BIT( 0x20, IP_ACTIVE_HIGH,IPT_UNKNOWN )
PORT_BIT( 0x40, IP_ACTIVE_HIGH,IPT_UNUSED )
PORT_BIT( 0x80, IP_ACTIVE_HIGH,IPT_UNUSED )
PORT_START /* IN2 */
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_START1 )
PORT_BIT( 0x10, IP_ACTIVE_HIGH,IPT_START2 )
PORT_BIT( 0x20, IP_ACTIVE_HIGH,IPT_UNKNOWN )
PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_COIN2 )
PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_COIN1 )
PORT_START /* DSW1 */
PORT_DIPNAME( 0x03, 0x03, "Coin A", IP_KEY_NONE )
PORT_DIPSETTING( 0x00, "2 Coins/1 Credit" )
PORT_DIPSETTING( 0x03, "1 Coin/1 Credit" )
PORT_DIPSETTING( 0x02, "1 Coin/2 Credits" )
PORT_DIPSETTING( 0x01, "1 Coin/3 Credits" )
PORT_DIPNAME( 0x0c, 0x0c, "Coin B", IP_KEY_NONE )
PORT_DIPSETTING( 0x00, "2 Coins/1 Credit" )
PORT_DIPSETTING( 0x0c, "1 Coin/1 Credit" )
PORT_DIPSETTING( 0x08, "1 Coin/2 Credits" )
PORT_DIPSETTING( 0x04, "1 Coin/3 Credits" )
PORT_DIPNAME( 0x10, 0x10, "Unknown", IP_KEY_NONE )
PORT_DIPSETTING( 0x10, "Off" )
PORT_DIPSETTING( 0x00, "On" )
PORT_DIPNAME( 0x20, 0x20, "Unknown", IP_KEY_NONE )
PORT_DIPSETTING( 0x20, "Off" )
PORT_DIPSETTING( 0x00, "On" )
PORT_DIPNAME( 0x40, 0x00, "Cabinet", IP_KEY_NONE )
PORT_DIPSETTING( 0x00, "Upright" )
PORT_DIPSETTING( 0x40, "Cocktail" )
PORT_BIT( 0x80, IP_ACTIVE_HIGH, IPT_VBLANK )
PORT_START /* DSW2 */
PORT_DIPNAME( 0x01, 0x01, "Lives", IP_KEY_NONE )
PORT_DIPSETTING( 0x01, "3" )
PORT_DIPSETTING( 0x00, "5" )
PORT_DIPNAME( 0x06, 0x06, "Bonus Life", IP_KEY_NONE )
PORT_DIPSETTING( 0x06, "20000" )
PORT_DIPSETTING( 0x04, "30000" )
PORT_DIPSETTING( 0x02, "40000" )
PORT_DIPSETTING( 0x00, "50000" )
PORT_DIPNAME( 0x08, 0x08, "Enemies", IP_KEY_NONE )
PORT_DIPSETTING( 0x08, "4" )
PORT_DIPSETTING( 0x00, "6" )
PORT_DIPNAME( 0x10, 0x10, "End of Level Pepper", IP_KEY_NONE )
PORT_DIPSETTING( 0x10, "No" )
PORT_DIPSETTING( 0x00, "Yes" )
PORT_DIPNAME( 0x20, 0x20, "Unknown", IP_KEY_NONE )
PORT_DIPSETTING( 0x20, "Off" )
PORT_DIPSETTING( 0x00, "On" )
PORT_DIPNAME( 0x40, 0x40, "Unknown", IP_KEY_NONE )
PORT_DIPSETTING( 0x40, "Off" )
PORT_DIPSETTING( 0x00, "On" )
PORT_DIPNAME( 0x80, 0x80, "Unknown", IP_KEY_NONE )
PORT_DIPSETTING( 0x80, "Off" )
PORT_DIPSETTING( 0x00, "On" )
INPUT_PORTS_END
INPUT_PORTS_START( zoar_input_ports )
PORT_START /* IN0 */
PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_JOYSTICK_RIGHT | IPF_8WAY )
PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_JOYSTICK_LEFT | IPF_8WAY )
PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_JOYSTICK_UP | IPF_8WAY )
PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_JOYSTICK_DOWN | IPF_8WAY )
PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_BUTTON1 )
PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_BUTTON2 )
PORT_BIT( 0xc0, IP_ACTIVE_LOW, IPT_UNUSED )
PORT_START /* IN1 */
PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_JOYSTICK_RIGHT | IPF_8WAY | IPF_COCKTAIL )
PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_JOYSTICK_LEFT | IPF_8WAY | IPF_COCKTAIL )
PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_JOYSTICK_UP | IPF_8WAY | IPF_COCKTAIL )
PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_JOYSTICK_DOWN | IPF_8WAY | IPF_COCKTAIL )
PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_BUTTON1 | IPF_COCKTAIL )
PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_BUTTON2 | IPF_COCKTAIL )
PORT_BIT( 0xc0, IP_ACTIVE_LOW, IPT_UNUSED )
PORT_START /* IN2 */
PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_START1 )
PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_START2 )
PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_BUTTON3 )
PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_BUTTON3 | IPF_COCKTAIL )
PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_UNUSED )
PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_UNUSED )
PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_COIN1 )
PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_COIN2 )
PORT_START /* DSW1 */
PORT_DIPNAME( 0x03, 0x03, "Coin A", IP_KEY_NONE )
PORT_DIPSETTING( 0x00, "2 Coins/1 Credit" )
PORT_DIPSETTING( 0x03, "1 Coin/1 Credits" )
PORT_DIPSETTING( 0x02, "1 Coin/2 Credits" )
PORT_DIPSETTING( 0x01, "1 Coin/3 Credits" )
PORT_DIPNAME( 0x0c, 0x0c, "Coin B", IP_KEY_NONE )
PORT_DIPSETTING( 0x00, "2 Coins/1 Credit" )
PORT_DIPSETTING( 0x0c, "1 Coin/1 Credits" )
PORT_DIPSETTING( 0x08, "1 Coin/2 Credits" )
PORT_DIPSETTING( 0x04, "1 Coin/3 Credits" )
PORT_DIPNAME( 0x10, 0x10, "Unknown", IP_KEY_NONE ) /* almost certainly unused */
PORT_DIPSETTING( 0x00, "Off" )
PORT_DIPSETTING( 0x10, "On" )
PORT_BITX( 0x20, 0x20, IPT_DIPSWITCH_NAME | IPF_TOGGLE, "Service Mode", OSD_KEY_F2, IP_JOY_NONE, 0 )
PORT_DIPSETTING( 0x20, "Off" )
PORT_DIPSETTING( 0x00, "On" )
PORT_DIPNAME( 0x40, 0x00, "Cabinet", IP_KEY_NONE )
PORT_DIPSETTING( 0x00, "Upright" )
PORT_DIPSETTING( 0x40, "Cocktail" )
PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_VBLANK )
PORT_START /* DSW2 */
PORT_DIPNAME( 0x01, 0x01, "Lives", IP_KEY_NONE )
PORT_DIPSETTING( 0x01, "3" )
PORT_DIPSETTING( 0x00, "5" )
PORT_DIPNAME( 0x06, 0x06, "Bonus Life", IP_KEY_NONE )
PORT_DIPSETTING( 0x06, "5000" )
PORT_DIPSETTING( 0x04, "10000" )
PORT_DIPSETTING( 0x02, "15000" )
PORT_DIPSETTING( 0x00, "20000" )
PORT_DIPNAME( 0x08, 0x08, "Difficulty", IP_KEY_NONE )
PORT_DIPSETTING( 0x08, "Easy" )
PORT_DIPSETTING( 0x00, "Hard" )
PORT_DIPNAME( 0x10, 0x00, "Weapon Select", IP_KEY_NONE )
PORT_DIPSETTING( 0x00, "Manual" )
PORT_DIPSETTING( 0x10, "Auto" )
PORT_DIPNAME( 0x20, 0x20, "Unknown", IP_KEY_NONE )
PORT_DIPSETTING( 0x00, "Off" )
PORT_DIPSETTING( 0x20, "On" )
PORT_DIPNAME( 0x40, 0x40, "Unknown", IP_KEY_NONE )
PORT_DIPSETTING( 0x00, "Off" )
PORT_DIPSETTING( 0x40, "On" )
PORT_DIPNAME( 0x80, 0x80, "Unknown", IP_KEY_NONE )
PORT_DIPSETTING( 0x00, "Off" )
PORT_DIPSETTING( 0x80, "On" )
INPUT_PORTS_END
INPUT_PORTS_START( eggs_input_ports )
PORT_START /* IN0 */
PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_JOYSTICK_RIGHT | IPF_4WAY )
PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_JOYSTICK_LEFT | IPF_4WAY )
PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_JOYSTICK_UP | IPF_4WAY )
PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_JOYSTICK_DOWN | IPF_4WAY )
PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_BUTTON1 )
PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_UNKNOWN )
PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_COIN1 )
PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_COIN2 )
PORT_START /* IN1 */
PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_JOYSTICK_RIGHT | IPF_4WAY | IPF_COCKTAIL )
PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_JOYSTICK_LEFT | IPF_4WAY | IPF_COCKTAIL )
PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_JOYSTICK_UP | IPF_4WAY | IPF_COCKTAIL )
PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_JOYSTICK_DOWN | IPF_4WAY | IPF_COCKTAIL )
PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_BUTTON1 | IPF_COCKTAIL )
PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_UNKNOWN )
PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_START1 )
PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_START2 )
PORT_START /* DSW1 */
PORT_DIPNAME( 0x03, 0x03, "Coin A", IP_KEY_NONE )
PORT_DIPSETTING( 0x00, "2 Coins/1 Credit" )
PORT_DIPSETTING( 0x03, "1 Coin/1 Credit" )
PORT_DIPSETTING( 0x01, "1 Coin/2 Credits" )
PORT_DIPSETTING( 0x02, "1 Coin/3 Credits" )
PORT_DIPNAME( 0x0c, 0x0c, "Coin B", IP_KEY_NONE )
PORT_DIPSETTING( 0x00, "2 Coins/1 Credit" )
PORT_DIPSETTING( 0x0c, "1 Coin/1 Credit" )
PORT_DIPSETTING( 0x04, "1 Coin/2 Credits" )
PORT_DIPSETTING( 0x08, "1 Coin/3 Credits" )
PORT_BIT( 0x30, 0x30, IPT_UNKNOWN ) /* almost certainly unused */
PORT_DIPNAME( 0x40, 0x00, "Cabinet", IP_KEY_NONE )
PORT_DIPSETTING( 0x00, "Upright" )
PORT_DIPSETTING( 0x40, "Cocktail" )
PORT_BIT( 0x80, IP_ACTIVE_HIGH, IPT_VBLANK )
PORT_START /* DSW2 */
PORT_DIPNAME( 0x01, 0x01, "Lives", IP_KEY_NONE )
PORT_DIPSETTING( 0x01, "3" )
PORT_DIPSETTING( 0x00, "5" )
PORT_DIPNAME( 0x06, 0x04, "Bonus Life", IP_KEY_NONE )
PORT_DIPSETTING( 0x04, "30000" )
PORT_DIPSETTING( 0x02, "50000" )
PORT_DIPSETTING( 0x00, "70000" )
PORT_DIPSETTING( 0x06, "Never" )
PORT_BIT( 0x78, 0x78, IPT_UNKNOWN ) /* almost certainly unused */
PORT_DIPNAME( 0x80, 0x80, "Difficulty", IP_KEY_NONE )
PORT_DIPSETTING( 0x80, "Easy" )
PORT_DIPSETTING( 0x00, "Hard" )
INPUT_PORTS_END
INPUT_PORTS_START( lnc_input_ports )
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -