📄 lwings.c
字号:
/***************************************************************************
Legendary Wings
Section Z
Trojan
Avengers
Driver provided by Paul Leaman
Trojan contains a third Z80 to drive the game samples. This third
Z80 outputs the ADPCM data byte at a time to the sound hardware. Since
this will be expensive to do this extra processor is not emulated.
Instead, the ADPCM data is lifted directly from the sound ROMS.
***************************************************************************/
#include "driver.h"
#include "vidhrdw/generic.h"
#include "z80/z80.h"
void lwings_bankswitch_w(int offset,int data);
int lwings_bankedrom_r(int offset);
int lwings_interrupt(void);
int avengers_protection_r(int offset);
extern unsigned char *lwings_backgroundram;
extern unsigned char *lwings_backgroundattribram;
extern int lwings_backgroundram_size;
extern unsigned char *lwings_scrolly;
extern unsigned char *lwings_scrollx;
extern unsigned char *lwings_palette_bank;
void lwings_background_w(int offset,int data);
void lwings_backgroundattrib_w(int offset,int data);
void lwings_palette_bank_w(int offset,int data);
int lwings_vh_start(void);
void lwings_vh_stop(void);
void lwings_vh_screenrefresh(struct osd_bitmap *bitmap,int full_refresh);
extern unsigned char *trojan_scrolly;
extern unsigned char *trojan_scrollx;
extern unsigned char *trojan_bk_scrolly;
extern unsigned char *trojan_bk_scrollx;
int trojan_vh_start(void);
void trojan_vh_stop(void);
void trojan_vh_screenrefresh(struct osd_bitmap *bitmap,int full_refresh);
void trojan_sound_cmd_w(int offset, int data)
{
soundlatch_w(offset, data);
if (data != 0xff && (data & 0x08))
{
/*
I assume that Trojan's ADPCM output is directly derived
from the sound code. I can't find an output port that
does this on either the sound board or main board.
*/
ADPCM_trigger(0, data & 0x07);
}
}
static struct MemoryReadAddress readmem[] =
{
{ 0x0000, 0x7fff, MRA_ROM }, /* CODE */
{ 0x8000, 0xbfff, MRA_BANK1 }, /* CODE */
{ 0xc000, 0xf7ff, MRA_RAM },
{ 0xf808, 0xf808, input_port_0_r },
{ 0xf809, 0xf809, input_port_1_r },
{ 0xf80a, 0xf80a, input_port_2_r },
{ 0xf80b, 0xf80b, input_port_3_r },
{ 0xf80c, 0xf80c, input_port_4_r },
{ 0xf80d, 0xf80d, avengers_protection_r },
{ -1 } /* end of table */
};
static struct MemoryWriteAddress writemem[] =
{
{ 0x0000, 0xbfff, MWA_ROM },
{ 0xc000, 0xddff, MWA_RAM },
{ 0xde00, 0xdfff, MWA_RAM, &spriteram, &spriteram_size },
{ 0xe000, 0xe3ff, videoram_w, &videoram, &videoram_size },
{ 0xe400, 0xe7ff, colorram_w, &colorram },
{ 0xe800, 0xebff, lwings_background_w, &lwings_backgroundram, &lwings_backgroundram_size },
{ 0xec00, 0xefff, lwings_backgroundattrib_w, &lwings_backgroundattribram },
{ 0xf000, 0xf3ff, paletteram_RRRRGGGGBBBBxxxx_split2_w, &paletteram_2 },
{ 0xf400, 0xf7ff, paletteram_RRRRGGGGBBBBxxxx_split1_w, &paletteram },
{ 0xf800, 0xf801, MWA_RAM, &trojan_scrollx },
{ 0xf802, 0xf803, MWA_RAM, &trojan_scrolly },
{ 0xf804, 0xf804, MWA_RAM, &trojan_bk_scrollx },
{ 0xf805, 0xf805, MWA_RAM, &trojan_bk_scrolly },
{ 0xf808, 0xf809, MWA_RAM, &lwings_scrolly},
{ 0xf80a, 0xf80b, MWA_RAM, &lwings_scrollx},
{ 0xf80c, 0xf80c, soundlatch_w },
{ 0xf80d, 0xf80d, watchdog_reset_w },
{ 0xf80e, 0xf80e, lwings_bankswitch_w },
{ -1 } /* end of table */
};
/* TROJAN - intercept sound command write for ADPCM samples */
static struct MemoryWriteAddress trojan_writemem[] =
{
{ 0x0000, 0xbfff, MWA_ROM },
{ 0xc000, 0xddff, MWA_RAM },
{ 0xde00, 0xdfff, MWA_RAM, &spriteram, &spriteram_size },
{ 0xe000, 0xe3ff, videoram_w, &videoram, &videoram_size },
{ 0xe400, 0xe7ff, colorram_w, &colorram },
{ 0xe800, 0xebff, lwings_background_w, &lwings_backgroundram, &lwings_backgroundram_size },
{ 0xec00, 0xefff, lwings_backgroundattrib_w, &lwings_backgroundattribram },
{ 0xf000, 0xf3ff, paletteram_RRRRGGGGBBBBxxxx_split2_w, &paletteram_2 },
{ 0xf400, 0xf7ff, paletteram_RRRRGGGGBBBBxxxx_split1_w, &paletteram },
{ 0xf800, 0xf801, MWA_RAM, &trojan_scrollx },
{ 0xf802, 0xf803, MWA_RAM, &trojan_scrolly },
{ 0xf804, 0xf804, MWA_RAM, &trojan_bk_scrollx },
{ 0xf805, 0xf805, MWA_RAM, &trojan_bk_scrolly },
{ 0xf808, 0xf809, MWA_RAM, &lwings_scrolly},
{ 0xf80a, 0xf80b, MWA_RAM, &lwings_scrollx},
{ 0xf80c, 0xf80c, trojan_sound_cmd_w },
{ 0xf80d, 0xf80d, watchdog_reset_w },
{ 0xf80e, 0xf80e, lwings_bankswitch_w },
{ -1 } /* end of table */
};
static struct MemoryReadAddress sound_readmem[] =
{
{ 0xc000, 0xc7ff, MRA_RAM },
{ 0xc800, 0xc800, soundlatch_r },
{ 0xe006, 0xe006, MRA_RAM }, /* Avengers - ADPCM status?? */
{ 0x0000, 0x7fff, MRA_ROM },
{ -1 } /* end of table */
};
static struct MemoryWriteAddress sound_writemem[] =
{
{ 0xc000, 0xc7ff, MWA_RAM },
{ 0xe000, 0xe000, YM2203_control_port_0_w },
{ 0xe001, 0xe001, YM2203_write_port_0_w },
{ 0xe002, 0xe002, YM2203_control_port_1_w },
{ 0xe003, 0xe003, YM2203_write_port_1_w },
{ 0xe006, 0xe006, MWA_RAM }, /* Avengers - ADPCM output??? */
{ 0x0000, 0x7fff, MWA_ROM },
{ -1 } /* end of table */
};
INPUT_PORTS_START( sectionz_input_ports )
PORT_START /* IN0 */
PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_START1 )
PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_START2 )
PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_UNKNOWN ) /* probably unused */
PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_UNKNOWN ) /* probably unused */
PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_UNKNOWN ) /* probably unused */
PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_UNKNOWN ) /* probably unused */
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_8WAY )
PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_JOYSTICK_LEFT | IPF_8WAY )
PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_JOYSTICK_DOWN | IPF_8WAY )
PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_JOYSTICK_UP | IPF_8WAY )
PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_BUTTON1 )
PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_BUTTON2 )
PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_UNKNOWN ) /* probably unused */
PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_UNKNOWN ) /* probably unused */
PORT_START /* IN2 */
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_DOWN | IPF_8WAY | IPF_COCKTAIL )
PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_JOYSTICK_UP | 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( 0x40, IP_ACTIVE_LOW, IPT_UNKNOWN ) /* probably unused */
PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_UNKNOWN ) /* probably unused */
PORT_START /* DSW0 */
PORT_BITX( 0x01, 0x01, IPT_DIPSWITCH_NAME | IPF_TOGGLE, "Service Mode", OSD_KEY_F2, IP_JOY_NONE, 0 )
PORT_DIPSETTING( 0x01, "Off" )
PORT_DIPSETTING( 0x00, "On" )
PORT_DIPNAME( 0x02, 0x02, "Screen Inversion", IP_KEY_NONE )
PORT_DIPSETTING( 0x02, "Off" )
PORT_DIPSETTING( 0x00, "On" )
PORT_DIPNAME( 0x0c, 0x0c, "Lives", IP_KEY_NONE )
PORT_DIPSETTING( 0x04, "2" )
PORT_DIPSETTING( 0x0c, "3" )
PORT_DIPSETTING( 0x08, "4" )
PORT_DIPSETTING( 0x00, "5" )
PORT_DIPNAME( 0x30, 0x30, "Coin A", IP_KEY_NONE )
PORT_DIPSETTING( 0x00, "4 Coins/1 Credit" )
PORT_DIPSETTING( 0x20, "3 Coins/1 Credit" )
PORT_DIPSETTING( 0x10, "2 Coins/1 Credit" )
PORT_DIPSETTING( 0x30, "1 Coin/1 Credit" )
PORT_DIPNAME( 0xc0, 0xc0, "Coin B", IP_KEY_NONE )
PORT_DIPSETTING( 0x00, "2 Coins/1 Credit" )
PORT_DIPSETTING( 0xc0, "1 Coin/1 Credit" )
PORT_DIPSETTING( 0x40, "1 Coin/2 Credits" )
PORT_DIPSETTING( 0x80, "1 Coin/3 Credits" )
PORT_START /* DSW1 */
PORT_DIPNAME( 0x01, 0x01, "Allow Continue", IP_KEY_NONE )
PORT_DIPSETTING( 0x00, "No" )
PORT_DIPSETTING( 0x01, "Yes" )
PORT_DIPNAME( 0x06, 0x06, "Difficulty", IP_KEY_NONE )
PORT_DIPSETTING( 0x02, "Easy" )
PORT_DIPSETTING( 0x06, "Normal" )
PORT_DIPSETTING( 0x04, "Difficult" )
PORT_DIPSETTING( 0x00, "Very Difficult" )
PORT_DIPNAME( 0x38, 0x38, "Bonus Life", IP_KEY_NONE )
PORT_DIPSETTING( 0x38, "20000 50000" )
PORT_DIPSETTING( 0x18, "20000 60000" )
PORT_DIPSETTING( 0x28, "20000 70000" )
PORT_DIPSETTING( 0x08, "30000 60000" )
PORT_DIPSETTING( 0x30, "30000 70000" )
PORT_DIPSETTING( 0x10, "30000 80000" )
PORT_DIPSETTING( 0x20, "40000 100000" )
PORT_DIPSETTING( 0x00, "None" )
PORT_DIPNAME( 0xc0, 0x00, "Cabinet", IP_KEY_NONE )
PORT_DIPSETTING( 0x00, "Upright One Player" )
PORT_DIPSETTING( 0x40, "Upright Two Players" )
/* PORT_DIPSETTING( 0x80, "???" ) probably unused */
PORT_DIPSETTING( 0xc0, "Cocktail" )
INPUT_PORTS_END
INPUT_PORTS_START( lwings_input_ports )
PORT_START /* IN0 */
PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_START1 )
PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_START2 )
PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_UNKNOWN ) /* probably unused */
PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_UNKNOWN ) /* probably unused */
PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_UNKNOWN ) /* probably unused */
PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_UNKNOWN ) /* probably unused */
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_8WAY )
PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_JOYSTICK_LEFT | IPF_8WAY )
PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_JOYSTICK_DOWN | IPF_8WAY )
PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_JOYSTICK_UP | IPF_8WAY )
PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_BUTTON1 )
PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_BUTTON2 )
PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_UNKNOWN ) /* probably unused */
PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_UNKNOWN ) /* probably unused */
PORT_START /* IN2 */
PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_JOYSTICK_RIGHT | IPF_8WAY | IPF_PLAYER2 )
PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_JOYSTICK_LEFT | IPF_8WAY | IPF_PLAYER2 )
PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_JOYSTICK_DOWN | IPF_8WAY | IPF_PLAYER2 )
PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_JOYSTICK_UP | IPF_8WAY | IPF_PLAYER2 )
PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_BUTTON1 | IPF_PLAYER2 )
PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_BUTTON2 | IPF_PLAYER2 )
PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_UNKNOWN ) /* probably unused */
PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_UNKNOWN ) /* probably unused */
PORT_START /* DSW0 */
PORT_DIPNAME( 0x03, 0x03, "Unknown 1/2", IP_KEY_NONE )
PORT_DIPSETTING( 0x00, "0" )
PORT_DIPSETTING( 0x01, "1" )
PORT_DIPSETTING( 0x02, "2" )
PORT_DIPSETTING( 0x03, "3" )
PORT_DIPNAME( 0x0c, 0x0c, "Lives", IP_KEY_NONE )
PORT_DIPSETTING( 0x0c, "3" )
PORT_DIPSETTING( 0x04, "4" )
PORT_DIPSETTING( 0x08, "5" )
PORT_DIPSETTING( 0x00, "6" )
PORT_DIPNAME( 0x30, 0x30, "Coin B", IP_KEY_NONE )
PORT_DIPSETTING( 0x00, "4 Coins/1 Credit" )
PORT_DIPSETTING( 0x20, "3 Coins/1 Credit" )
PORT_DIPSETTING( 0x10, "2 Coins/1 Credit" )
PORT_DIPSETTING( 0x30, "1 Coin/1 Credit" )
PORT_DIPNAME( 0xc0, 0xc0, "Coin A", IP_KEY_NONE )
PORT_DIPSETTING( 0xc0, "1 Coin/1 Credit" )
PORT_DIPSETTING( 0x00, "2 Coins/4 Credits" )
PORT_DIPSETTING( 0x40, "1 Coin/2 Credits" )
PORT_DIPSETTING( 0x80, "1 Coin/3 Credits" )
PORT_START /* DSW1 */
PORT_DIPNAME( 0x01, 0x01, "Unknown 3", IP_KEY_NONE )
PORT_DIPSETTING( 0x00, "0" )
PORT_DIPSETTING( 0x01, "1" )
PORT_DIPNAME( 0x06, 0x06, "Difficulty?", IP_KEY_NONE )
PORT_DIPSETTING( 0x02, "Easy?" )
PORT_DIPSETTING( 0x06, "Normal?" )
PORT_DIPSETTING( 0x04, "Difficult?" )
PORT_DIPSETTING( 0x00, "Very Difficult?" )
PORT_DIPNAME( 0x08, 0x08, "Demo Sounds", IP_KEY_NONE )
PORT_DIPSETTING( 0x00, "Off" )
PORT_DIPSETTING( 0x08, "On" )
PORT_DIPNAME( 0x10, 0x10, "Allow Continue", IP_KEY_NONE )
PORT_DIPSETTING( 0x00, "No" )
PORT_DIPSETTING( 0x10, "Yes" )
PORT_DIPNAME( 0xe0, 0xe0, "Bonus Life", IP_KEY_NONE )
PORT_DIPSETTING( 0xe0, "20000 50000" )
PORT_DIPSETTING( 0x60, "20000 60000" )
PORT_DIPSETTING( 0xa0, "20000 70000" )
PORT_DIPSETTING( 0x20, "30000 60000" )
PORT_DIPSETTING( 0xc0, "30000 70000" )
PORT_DIPSETTING( 0x40, "30000 80000" )
PORT_DIPSETTING( 0x80, "40000 100000" )
PORT_DIPSETTING( 0x00, "None" )
INPUT_PORTS_END
INPUT_PORTS_START( trojan_input_ports )
PORT_START /* IN0 */
PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_START1 )
PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_START2 )
PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_UNKNOWN ) /* probably unused */
PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_UNKNOWN ) /* probably unused */
PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_UNKNOWN ) /* probably unused */
PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_UNKNOWN ) /* probably unused */
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_8WAY )
PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_JOYSTICK_LEFT | IPF_8WAY )
PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_JOYSTICK_DOWN | IPF_8WAY )
PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_JOYSTICK_UP | IPF_8WAY )
PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_BUTTON1 )
PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_BUTTON2 )
PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_UNKNOWN )
PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_UNKNOWN ) /* probably unused */
PORT_START /* IN2 */
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_DOWN | IPF_8WAY | IPF_COCKTAIL )
PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_JOYSTICK_UP | 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( 0x40, IP_ACTIVE_LOW, IPT_UNKNOWN )
PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_UNKNOWN ) /* probably unused */
PORT_START /* DSW0 */
PORT_DIPNAME( 0x03, 0x00, "Cabinet", IP_KEY_NONE )
PORT_DIPSETTING( 0x00, "Upright 1 Joystick" )
PORT_DIPSETTING( 0x02, "Upright 2 Joysticks" )
PORT_DIPSETTING( 0x03, "Cocktail" )
/* 0x01 same as 0x02 or 0x03 */
PORT_DIPNAME( 0x1c, 0x1c, "Bonus Life", IP_KEY_NONE )
PORT_DIPSETTING( 0x10, "20000 60000" )
PORT_DIPSETTING( 0x0c, "20000 70000" )
PORT_DIPSETTING( 0x08, "20000 80000" )
PORT_DIPSETTING( 0x1c, "30000 60000" )
PORT_DIPSETTING( 0x18, "30000 70000" )
PORT_DIPSETTING( 0x14, "30000 80000" )
PORT_DIPSETTING( 0x04, "40000 80000" )
PORT_DIPSETTING( 0x00, "None" )
PORT_DIPNAME( 0xe0, 0xe0, "Starting Level", IP_KEY_NONE )
PORT_DIPSETTING( 0xe0, "1" )
PORT_DIPSETTING( 0xc0, "2" )
PORT_DIPSETTING( 0xa0, "3" )
PORT_DIPSETTING( 0x80, "4" )
PORT_DIPSETTING( 0x60, "5" )
PORT_DIPSETTING( 0x40, "6" )
/* 0x00 and 0x20 start at level 6 */
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, "4 Coins/1 Credit" )
PORT_DIPSETTING( 0x04, "3 Coins/1 Credit" )
PORT_DIPSETTING( 0x08, "2 Coins/1 Credit" )
PORT_DIPSETTING( 0x0c, "1 Coin/1 Credit" )
PORT_DIPNAME( 0x30, 0x30, "Lives", IP_KEY_NONE )
PORT_DIPSETTING( 0x20, "2" )
PORT_DIPSETTING( 0x30, "3" )
PORT_DIPSETTING( 0x10, "4" )
PORT_DIPSETTING( 0x00, "5" )
PORT_DIPNAME( 0x40, 0x40, "Flip Screen?", IP_KEY_NONE )
PORT_DIPSETTING( 0x40, "Off" )
PORT_DIPSETTING( 0x00, "On" )
PORT_DIPNAME( 0x80, 0x80, "Allow Continue", IP_KEY_NONE )
PORT_DIPSETTING( 0x00, "No" )
PORT_DIPSETTING( 0x80, "Yes" )
INPUT_PORTS_END
static struct GfxLayout charlayout =
{
8,8, /* 8*8 characters */
1024, /* 1024 characters */
2, /* 2 bits per pixel */
{ 0, 4 },
{ 0, 1, 2, 3, 8+0, 8+1, 8+2, 8+3 },
{ 0*16, 1*16, 2*16, 3*16, 4*16, 5*16, 6*16, 7*16 },
16*8 /* every char takes 16 consecutive bytes */
};
static struct GfxLayout tilelayout =
{
16,16, /* 16*16 tiles */
2048, /* 2048 tiles */
4, /* 4 bits per pixel */
{ 0x30000*8, 0x20000*8, 0x10000*8, 0x00000*8 }, /* the bitplanes are separated */
{ 0, 1, 2, 3, 4, 5, 6, 7,
16*8+0, 16*8+1, 16*8+2, 16*8+3, 16*8+4, 16*8+5, 16*8+6, 16*8+7 },
{ 0*8, 1*8, 2*8, 3*8, 4*8, 5*8, 6*8, 7*8,
8*8, 9*8, 10*8, 11*8, 12*8, 13*8, 14*8, 15*8 },
32*8 /* every tile takes 32 consecutive bytes */
};
static struct GfxLayout spritelayout =
{
16,16, /* 16*16 sprites */
1024, /* 1024 sprites */
4, /* 4 bits per pixel */
{ 0x10000*8+4, 0x10000*8+0, 4, 0 },
{ 0, 1, 2, 3, 8+0, 8+1, 8+2, 8+3,
32*8+0, 32*8+1, 32*8+2, 32*8+3, 33*8+0, 33*8+1, 33*8+2, 33*8+3 },
{ 0*16, 1*16, 2*16, 3*16, 4*16, 5*16, 6*16, 7*16,
8*16, 9*16, 10*16, 11*16, 12*16, 13*16, 14*16, 15*16 },
64*8 /* every sprite takes 64 consecutive bytes */
};
static struct GfxDecodeInfo gfxdecodeinfo[] =
{
{ 1, 0x00000, &charlayout, 512, 16 }, /* colors 512-575 */
{ 1, 0x10000, &tilelayout, 0, 8 }, /* colors 0-127 */
{ 1, 0x50000, &spritelayout, 384, 8 }, /* colors 384-511 */
{ -1 } /* end of array */
};
static struct YM2203interface ym2203_interface =
{
2, /* 2 chips */
1500000, /* 1.5 MHz (?) */
{ YM2203_VOL(10,20), YM2203_VOL(10,20) },
{ 0 },
{ 0 },
{ 0 },
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -