📄 amidar.c
字号:
/***************************************************************************
Amidar memory map (preliminary)
0000-3fff ROM (Amidar US version and Turtles: 0000-4fff)
8000-87ff RAM
9000-93ff Video RAM
9800-983f Screen attributes
9840-985f sprites
read:
a800 watchdog reset
b000 IN0
b010 IN1
b020 IN2
b820 DSW (not Turtles)
see the input_ports definition below for details on the input bits
write:
a008 interrupt enable
a010/a018 flip screen X & Y (I don't know which is which)
a030 coin counter A
a038 coin counter B
b800 To AY-3-8910 port A (commands for the audio CPU)
b810 bit 3 = interrupt trigger on audio CPU
SOUND BOARD:
0000-1fff ROM
8000-83ff RAM
write:
9000 ?
9080 ?
I/0 ports:
read:
20 8910 #2 read
80 8910 #1 read
write
10 8910 #2 control
20 8910 #2 write
40 8910 #1 control
80 8910 #1 write
interrupts:
interrupt mode 1 triggered by the main CPU
***************************************************************************/
#include "driver.h"
#include "vidhrdw/generic.h"
extern unsigned char *amidar_attributesram;
void amidar_vh_convert_color_prom(unsigned char *palette, unsigned short *colortable,const unsigned char *color_prom);
void amidar_flipx_w(int offset,int data);
void amidar_flipy_w(int offset,int data);
void amidar_attributes_w(int offset,int data);
void amidar_vh_screenrefresh(struct osd_bitmap *bitmap,int full_refresh);
int scramble_portB_r(int offset);
void scramble_sh_irqtrigger_w(int offset,int data);
void amidar_coina_w (int offset, int data)
{
coin_counter_w (0, data);
coin_counter_w (0, 0);
}
void amidar_coinb_w (int offset, int data)
{
coin_counter_w (1, data);
coin_counter_w (1, 0);
}
static struct MemoryReadAddress amidar_readmem[] =
{
{ 0x0000, 0x4fff, MRA_ROM },
{ 0x8000, 0x87ff, MRA_RAM },
{ 0x9000, 0x93ff, MRA_RAM },
{ 0x9800, 0x985f, MRA_RAM },
{ 0xa800, 0xa800, watchdog_reset_r },
{ 0xb000, 0xb000, input_port_0_r }, /* IN0 */
{ 0xb010, 0xb010, input_port_1_r }, /* IN1 */
{ 0xb020, 0xb020, input_port_2_r }, /* IN2 */
{ 0xb820, 0xb820, input_port_3_r }, /* DSW */
{ -1 } /* end of table */
};
static struct MemoryWriteAddress writemem[] =
{
{ 0x0000, 0x4fff, MWA_ROM },
{ 0x8000, 0x87ff, MWA_RAM },
{ 0x9000, 0x93ff, videoram_w, &videoram, &videoram_size },
{ 0x9800, 0x983f, amidar_attributes_w, &amidar_attributesram },
{ 0x9840, 0x985f, MWA_RAM, &spriteram, &spriteram_size },
{ 0x9860, 0x987f, MWA_NOP },
{ 0xa008, 0xa008, interrupt_enable_w },
{ 0xa010, 0xa010, amidar_flipx_w },
{ 0xa018, 0xa018, amidar_flipy_w },
{ 0xa030, 0xa030, amidar_coina_w },
{ 0xa038, 0xa038, amidar_coinb_w },
{ 0xb800, 0xb800, soundlatch_w },
{ 0xb810, 0xb810, scramble_sh_irqtrigger_w },
{ -1 } /* end of table */
};
static struct MemoryReadAddress sound_readmem[] =
{
{ 0x0000, 0x1fff, MRA_ROM },
{ 0x8000, 0x83ff, MRA_RAM },
{ -1 } /* end of table */
};
static struct MemoryWriteAddress sound_writemem[] =
{
{ 0x0000, 0x1fff, MWA_ROM },
{ 0x8000, 0x83ff, MWA_RAM },
{ 0x9000, 0x9000, MWA_NOP },
{ 0x9080, 0x9080, MWA_NOP },
{ -1 } /* end of table */
};
static struct IOReadPort sound_readport[] =
{
{ 0x80, 0x80, AY8910_read_port_0_r },
{ 0x20, 0x20, AY8910_read_port_1_r },
{ -1 } /* end of table */
};
static struct IOWritePort sound_writeport[] =
{
{ 0x40, 0x40, AY8910_control_port_0_w },
{ 0x80, 0x80, AY8910_write_port_0_w },
{ 0x10, 0x10, AY8910_control_port_1_w },
{ 0x20, 0x20, AY8910_write_port_1_w },
{ -1 } /* end of table */
};
INPUT_PORTS_START( amidar_input_ports )
PORT_START /* IN0 */
PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_JOYSTICK_UP | IPF_4WAY | IPF_COCKTAIL )
PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_UNKNOWN ) /* probably space for button 2 */
PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_COIN3 )
PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_BUTTON1 )
PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_JOYSTICK_RIGHT | IPF_4WAY )
PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_JOYSTICK_LEFT | IPF_4WAY )
PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_COIN2 )
PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_COIN1 )
PORT_START /* IN1 */
PORT_DIPNAME( 0x03, 0x03, "Lives", IP_KEY_NONE )
PORT_DIPSETTING( 0x03, "3" )
PORT_DIPSETTING( 0x02, "4" )
PORT_DIPSETTING( 0x01, "5" )
PORT_BITX (0, 0x00, IPT_DIPSWITCH_SETTING | IPF_CHEAT, "255", IP_KEY_NONE, IP_JOY_NONE, 0 )
PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_UNKNOWN ) /* probably space for player 2 button 2 */
PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_BUTTON1 | IPF_COCKTAIL )
PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_JOYSTICK_RIGHT | IPF_4WAY | IPF_COCKTAIL )
PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_JOYSTICK_LEFT | IPF_4WAY | IPF_COCKTAIL )
PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_START2 )
PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_START1 )
PORT_START /* IN2 */
PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_JOYSTICK_DOWN | IPF_4WAY | IPF_COCKTAIL )
PORT_DIPNAME( 0x02, 0x00, "Demo Sounds", IP_KEY_NONE )
PORT_DIPSETTING( 0x02, "Off" )
PORT_DIPSETTING( 0x00, "On" )
PORT_DIPNAME( 0x04, 0x00, "Bonus Life", IP_KEY_NONE )
PORT_DIPSETTING( 0x00, "30000 70000" )
PORT_DIPSETTING( 0x04, "50000 80000" )
PORT_DIPNAME( 0x08, 0x00, "Cabinet", IP_KEY_NONE )
PORT_DIPSETTING( 0x00, "Upright" )
PORT_DIPSETTING( 0x08, "Cocktail" )
PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_JOYSTICK_UP | IPF_4WAY )
PORT_DIPNAME( 0x20, 0x00, "Unknown 1", IP_KEY_NONE )
PORT_DIPSETTING( 0x20, "Off" )
PORT_DIPSETTING( 0x00, "On" )
PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_JOYSTICK_DOWN | IPF_4WAY )
PORT_DIPNAME( 0x80, 0x00, "Unknown 2", IP_KEY_NONE )
PORT_DIPSETTING( 0x80, "Off" )
PORT_DIPSETTING( 0x00, "On" )
PORT_START /* DSW */
PORT_DIPNAME( 0x0f, 0x0f, "Coin A", IP_KEY_NONE )
PORT_DIPSETTING( 0x04, "4 Coins/1 Credit" )
PORT_DIPSETTING( 0x0a, "3 Coins/1 Credit" )
PORT_DIPSETTING( 0x01, "2 Coins/1 Credit" )
PORT_DIPSETTING( 0x02, "3 Coins/2 Credits" )
PORT_DIPSETTING( 0x08, "4 Coins/3 Credits" )
PORT_DIPSETTING( 0x0f, "1 Coin/1 Credit" )
PORT_DIPSETTING( 0x0c, "3 Coins/4 Credits" )
PORT_DIPSETTING( 0x0e, "2 Coins/3 Credits" )
PORT_DIPSETTING( 0x07, "1 Coin/2 Credits" )
PORT_DIPSETTING( 0x06, "2 Coins/5 Credits" )
PORT_DIPSETTING( 0x0b, "1 Coin/3 Credits" )
PORT_DIPSETTING( 0x03, "1 Coin/4 Credits" )
PORT_DIPSETTING( 0x0d, "1 Coin/5 Credits" )
PORT_DIPSETTING( 0x05, "1 Coin/6 Credits" )
PORT_DIPSETTING( 0x09, "1 Coin/7 Credits" )
PORT_DIPSETTING( 0x00, "Free Play" )
PORT_DIPNAME( 0xf0, 0xf0, "Coin B", IP_KEY_NONE )
PORT_DIPSETTING( 0x40, "4 Coins/1 Credit" )
PORT_DIPSETTING( 0xa0, "3 Coins/1 Credit" )
PORT_DIPSETTING( 0x10, "2 Coins/1 Credit" )
PORT_DIPSETTING( 0x20, "3 Coins/2 Credits" )
PORT_DIPSETTING( 0x80, "4 Coins/3 Credits" )
PORT_DIPSETTING( 0xf0, "1 Coin/1 Credit" )
PORT_DIPSETTING( 0xc0, "3 Coins/4 Credits" )
PORT_DIPSETTING( 0xe0, "2 Coins/3 Credits" )
PORT_DIPSETTING( 0x70, "1 Coin/2 Credits" )
PORT_DIPSETTING( 0x60, "2 Coins/5 Credits" )
PORT_DIPSETTING( 0xb0, "1 Coin/3 Credits" )
PORT_DIPSETTING( 0x30, "1 Coin/4 Credits" )
PORT_DIPSETTING( 0xd0, "1 Coin/5 Credits" )
PORT_DIPSETTING( 0x50, "1 Coin/6 Credits" )
PORT_DIPSETTING( 0x90, "1 Coin/7 Credits" )
PORT_DIPSETTING( 0x00, "Disable All Coins" )
INPUT_PORTS_END
/* absolutely identical to amidar, the only difference is the BONUS dip switch */
INPUT_PORTS_START( amidarjp_input_ports )
PORT_START /* IN0 */
PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_JOYSTICK_UP | IPF_4WAY | IPF_COCKTAIL )
PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_UNKNOWN ) /* probably space for button 2 */
PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_COIN3 )
PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_BUTTON1 )
PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_JOYSTICK_RIGHT | IPF_4WAY )
PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_JOYSTICK_LEFT | IPF_4WAY )
PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_COIN2 )
PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_COIN1 )
PORT_START /* IN1 */
PORT_DIPNAME( 0x03, 0x03, "Lives", IP_KEY_NONE )
PORT_DIPSETTING( 0x03, "3" )
PORT_DIPSETTING( 0x02, "4" )
PORT_DIPSETTING( 0x01, "5" )
PORT_BITX (0, 0x00, IPT_DIPSWITCH_SETTING | IPF_CHEAT, "255", IP_KEY_NONE, IP_JOY_NONE, 0 )
PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_UNKNOWN ) /* probably space for player 2 button 2 */
PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_BUTTON1 | IPF_COCKTAIL )
PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_JOYSTICK_RIGHT | IPF_4WAY | IPF_COCKTAIL )
PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_JOYSTICK_LEFT | IPF_4WAY | IPF_COCKTAIL )
PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_START2 )
PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_START1 )
PORT_START /* IN2 */
PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_JOYSTICK_DOWN | IPF_4WAY | IPF_COCKTAIL )
PORT_DIPNAME( 0x02, 0x00, "Demo Sounds", IP_KEY_NONE )
PORT_DIPSETTING( 0x02, "Off" )
PORT_DIPSETTING( 0x00, "On" )
PORT_DIPNAME( 0x04, 0x00, "Bonus Life", IP_KEY_NONE )
PORT_DIPSETTING( 0x00, "30000 50000" )
PORT_DIPSETTING( 0x04, "50000 50000" )
PORT_DIPNAME( 0x08, 0x00, "Cabinet", IP_KEY_NONE )
PORT_DIPSETTING( 0x00, "Upright" )
PORT_DIPSETTING( 0x08, "Cocktail" )
PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_JOYSTICK_UP | IPF_4WAY )
PORT_DIPNAME( 0x20, 0x00, "Unknown 1", IP_KEY_NONE )
PORT_DIPSETTING( 0x20, "Off" )
PORT_DIPSETTING( 0x00, "On" )
PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_JOYSTICK_DOWN | IPF_4WAY )
PORT_DIPNAME( 0x80, 0x00, "Unknown 2", IP_KEY_NONE )
PORT_DIPSETTING( 0x80, "Off" )
PORT_DIPSETTING( 0x00, "On" )
PORT_START /* DSW */
PORT_DIPNAME( 0x0f, 0x0f, "Coin A", IP_KEY_NONE )
PORT_DIPSETTING( 0x04, "4 Coins/1 Credit" )
PORT_DIPSETTING( 0x0a, "3 Coins/1 Credit" )
PORT_DIPSETTING( 0x01, "2 Coins/1 Credit" )
PORT_DIPSETTING( 0x02, "3 Coins/2 Credits" )
PORT_DIPSETTING( 0x08, "4 Coins/3 Credits" )
PORT_DIPSETTING( 0x0f, "1 Coin/1 Credit" )
PORT_DIPSETTING( 0x0c, "3 Coins/4 Credits" )
PORT_DIPSETTING( 0x0e, "2 Coins/3 Credits" )
PORT_DIPSETTING( 0x07, "1 Coin/2 Credits" )
PORT_DIPSETTING( 0x06, "2 Coins/5 Credits" )
PORT_DIPSETTING( 0x0b, "1 Coin/3 Credits" )
PORT_DIPSETTING( 0x03, "1 Coin/4 Credits" )
PORT_DIPSETTING( 0x0d, "1 Coin/5 Credits" )
PORT_DIPSETTING( 0x05, "1 Coin/6 Credits" )
PORT_DIPSETTING( 0x09, "1 Coin/7 Credits" )
PORT_DIPSETTING( 0x00, "Free Play" )
PORT_DIPNAME( 0xf0, 0xf0, "Coin B", IP_KEY_NONE )
PORT_DIPSETTING( 0x40, "4 Coins/1 Credit" )
PORT_DIPSETTING( 0xa0, "3 Coins/1 Credit" )
PORT_DIPSETTING( 0x10, "2 Coins/1 Credit" )
PORT_DIPSETTING( 0x20, "3 Coins/2 Credits" )
PORT_DIPSETTING( 0x80, "4 Coins/3 Credits" )
PORT_DIPSETTING( 0xf0, "1 Coin/1 Credit" )
PORT_DIPSETTING( 0xc0, "3 Coins/4 Credits" )
PORT_DIPSETTING( 0xe0, "2 Coins/3 Credits" )
PORT_DIPSETTING( 0x70, "1 Coin/2 Credits" )
PORT_DIPSETTING( 0x60, "2 Coins/5 Credits" )
PORT_DIPSETTING( 0xb0, "1 Coin/3 Credits" )
PORT_DIPSETTING( 0x30, "1 Coin/4 Credits" )
PORT_DIPSETTING( 0xd0, "1 Coin/5 Credits" )
PORT_DIPSETTING( 0x50, "1 Coin/6 Credits" )
PORT_DIPSETTING( 0x90, "1 Coin/7 Credits" )
PORT_DIPSETTING( 0x00, "Disable All Coins" )
INPUT_PORTS_END
/* similar to Amidar, dip swtiches are different and port 3, which in Amidar */
/* selects coins per credit, is not used. */
INPUT_PORTS_START( turtles_input_ports )
PORT_START /* IN0 */
PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_JOYSTICK_UP | IPF_8WAY | IPF_COCKTAIL )
PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_UNKNOWN ) /* probably space for button 2 */
PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_COIN3 )
PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_BUTTON1 )
PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_JOYSTICK_RIGHT | IPF_8WAY )
PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_JOYSTICK_LEFT | IPF_8WAY )
PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_COIN2 )
PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_COIN1 )
PORT_START /* IN1 */
PORT_DIPNAME( 0x03, 0x01, "Lives", IP_KEY_NONE )
PORT_DIPSETTING( 0x00, "2" )
PORT_DIPSETTING( 0x01, "3" )
PORT_DIPSETTING( 0x02, "4" )
PORT_BITX (0, 0x03, IPT_DIPSWITCH_SETTING | IPF_CHEAT, "126", IP_KEY_NONE, IP_JOY_NONE, 0 )
PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_UNKNOWN ) /* probably space for player 2 button 2 */
PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_BUTTON1 | IPF_COCKTAIL )
PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_JOYSTICK_RIGHT | IPF_8WAY | IPF_COCKTAIL )
PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_JOYSTICK_LEFT | IPF_8WAY | IPF_COCKTAIL )
PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_START2 )
PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_START1 )
PORT_START /* IN2 */
PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_JOYSTICK_DOWN | IPF_8WAY | IPF_COCKTAIL )
PORT_DIPNAME( 0x06, 0x00, "Coinage", IP_KEY_NONE )
PORT_DIPSETTING( 0x00, "A 1/1 B 2/1 C 1/1" )
PORT_DIPSETTING( 0x02, "A 1/2 B 1/1 C 1/2" )
PORT_DIPSETTING( 0x04, "A 1/3 B 3/1 C 1/3" )
PORT_DIPSETTING( 0x06, "A 1/4 B 4/1 C 1/4" )
PORT_DIPNAME( 0x08, 0x00, "Cabinet", IP_KEY_NONE )
PORT_DIPSETTING( 0x00, "Upright" )
PORT_DIPSETTING( 0x08, "Cocktail" )
PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_JOYSTICK_UP | IPF_8WAY )
PORT_DIPNAME( 0x20, 0x00, "Unknown 1", IP_KEY_NONE )
PORT_DIPSETTING( 0x20, "Off" )
PORT_DIPSETTING( 0x00, "On" )
PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_JOYSTICK_DOWN | IPF_8WAY )
PORT_DIPNAME( 0x80, 0x00, "Unknown 2", IP_KEY_NONE )
PORT_DIPSETTING( 0x80, "Off" )
PORT_DIPSETTING( 0x00, "On" )
INPUT_PORTS_END
/* same as Turtles, but dip switches are different. */
INPUT_PORTS_START( turpin_input_ports )
PORT_START /* IN0 */
PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_JOYSTICK_UP | IPF_4WAY | IPF_COCKTAIL )
PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_UNKNOWN ) /* probably space for button 2 */
PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_COIN3 )
PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_BUTTON1 )
PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_JOYSTICK_RIGHT | IPF_4WAY )
PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_JOYSTICK_LEFT | IPF_4WAY )
PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_COIN2 )
PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_COIN1 )
PORT_START /* IN1 */
PORT_DIPNAME( 0x03, 0x01, "Lives", IP_KEY_NONE )
PORT_DIPSETTING( 0x00, "2" )
PORT_DIPSETTING( 0x01, "4" )
PORT_DIPSETTING( 0x02, "6" )
PORT_BITX (0, 0x03, IPT_DIPSWITCH_SETTING | IPF_CHEAT, "126", IP_KEY_NONE, IP_JOY_NONE, 0 )
PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_UNKNOWN ) /* probably space for player 2 button 2 */
PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_BUTTON1 | IPF_COCKTAIL )
PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_JOYSTICK_RIGHT | IPF_4WAY | IPF_COCKTAIL )
PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_JOYSTICK_LEFT | IPF_4WAY | IPF_COCKTAIL )
PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_START2 )
PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_START1 )
PORT_START /* IN2 */
PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_JOYSTICK_DOWN | IPF_4WAY | IPF_COCKTAIL )
PORT_DIPNAME( 0x06, 0x00, "Coinage", IP_KEY_NONE )
PORT_DIPSETTING( 0x06, "4 Coins/1 Credit" )
PORT_DIPSETTING( 0x02, "2 Coins/1 Credit" )
PORT_DIPSETTING( 0x00, "1 Coin/1 Credit" )
PORT_DIPSETTING( 0x04, "1 Coin/2 Credits" )
PORT_DIPNAME( 0x08, 0x00, "Cabinet", IP_KEY_NONE )
PORT_DIPSETTING( 0x00, "Upright" )
PORT_DIPSETTING( 0x08, "Cocktail" )
PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_JOYSTICK_UP | IPF_4WAY )
PORT_DIPNAME( 0x20, 0x00, "Unknown 1", IP_KEY_NONE )
PORT_DIPSETTING( 0x20, "Off" )
PORT_DIPSETTING( 0x00, "On" )
PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_JOYSTICK_DOWN | IPF_4WAY )
PORT_DIPNAME( 0x80, 0x00, "Unknown 2", IP_KEY_NONE )
PORT_DIPSETTING( 0x80, "Off" )
PORT_DIPSETTING( 0x00, "On" )
INPUT_PORTS_END
/* similar to Turtles, lives are different */
INPUT_PORTS_START( k600_input_ports )
PORT_START /* IN0 */
PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_JOYSTICK_UP | IPF_8WAY | IPF_COCKTAIL )
PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_UNKNOWN ) /* probably space for button 2 */
PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_COIN3 )
PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_BUTTON1 )
PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_JOYSTICK_RIGHT | IPF_8WAY )
PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_JOYSTICK_LEFT | IPF_8WAY )
PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_COIN2 )
PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_COIN1 )
PORT_START /* IN1 */
PORT_DIPNAME( 0x03, 0x01, "Lives", IP_KEY_NONE )
PORT_DIPSETTING( 0x00, "3" )
PORT_DIPSETTING( 0x01, "4" )
PORT_DIPSETTING( 0x02, "5" )
PORT_BITX (0, 0x03, IPT_DIPSWITCH_SETTING | IPF_CHEAT, "126", IP_KEY_NONE, IP_JOY_NONE, 0 )
PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_UNKNOWN ) /* probably space for player 2 button 2 */
PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_BUTTON1 | IPF_COCKTAIL )
PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_JOYSTICK_RIGHT | IPF_8WAY | IPF_COCKTAIL )
PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_JOYSTICK_LEFT | IPF_8WAY | IPF_COCKTAIL )
PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_START2 )
PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_START1 )
PORT_START /* IN2 */
PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_JOYSTICK_DOWN | IPF_8WAY | IPF_COCKTAIL )
PORT_DIPNAME( 0x06, 0x00, "Coinage", IP_KEY_NONE )
PORT_DIPSETTING( 0x00, "A 1/1 B 2/1 C 1/1" )
PORT_DIPSETTING( 0x02, "A 1/2 B 1/1 C 1/2" )
PORT_DIPSETTING( 0x04, "A 1/3 B 3/1 C 1/3" )
PORT_DIPSETTING( 0x06, "A 1/4 B 4/1 C 1/4" )
PORT_DIPNAME( 0x08, 0x00, "Cabinet", IP_KEY_NONE )
PORT_DIPSETTING( 0x00, "Upright" )
PORT_DIPSETTING( 0x08, "Cocktail" )
PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_JOYSTICK_UP | IPF_8WAY )
PORT_DIPNAME( 0x20, 0x00, "Unknown 1", IP_KEY_NONE )
PORT_DIPSETTING( 0x20, "Off" )
PORT_DIPSETTING( 0x00, "On" )
PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_JOYSTICK_DOWN | IPF_8WAY )
PORT_DIPNAME( 0x80, 0x00, "Unknown 2", IP_KEY_NONE )
PORT_DIPSETTING( 0x80, "Off" )
PORT_DIPSETTING( 0x00, "On" )
INPUT_PORTS_END
static struct GfxLayout charlayout =
{
8,8, /* 8*8 characters */
256, /* 256 characters */
2, /* 2 bits per pixel */
{ 0, 256*8*8 }, /* the two bitplanes are separated */
{ 0, 1, 2, 3, 4, 5, 6, 7 },
{ 0*8, 1*8, 2*8, 3*8, 4*8, 5*8, 6*8, 7*8 },
8*8 /* every char takes 8 consecutive bytes */
};
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -