📄 aerofgt.c
字号:
PORT_BIT( 0x0001, IP_ACTIVE_LOW, IPT_JOYSTICK_UP | IPF_8WAY | IPF_PLAYER2 )
PORT_BIT( 0x0002, IP_ACTIVE_LOW, IPT_JOYSTICK_DOWN | IPF_8WAY | IPF_PLAYER2 )
PORT_BIT( 0x0004, IP_ACTIVE_LOW, IPT_JOYSTICK_LEFT | IPF_8WAY | IPF_PLAYER2 )
PORT_BIT( 0x0008, IP_ACTIVE_LOW, IPT_JOYSTICK_RIGHT | IPF_8WAY | IPF_PLAYER2 )
PORT_BIT( 0x0010, IP_ACTIVE_LOW, IPT_BUTTON1 | IPF_PLAYER2 )
PORT_BIT( 0x0020, IP_ACTIVE_LOW, IPT_UNKNOWN )
PORT_BIT( 0x0040, IP_ACTIVE_LOW, IPT_UNKNOWN )
PORT_BIT( 0x0080, IP_ACTIVE_LOW, IPT_UNKNOWN )
PORT_START
PORT_DIPNAME( 0x0007, 0x0007, "Coinage", IP_KEY_NONE )
PORT_DIPSETTING( 0x0004, "4 Coins/1 Credit" )
PORT_DIPSETTING( 0x0005, "3 Coins/1 Credit" )
PORT_DIPSETTING( 0x0006, "2 Coins/1 Credit" )
PORT_DIPSETTING( 0x0007, "1 Coin/1 Credit" )
PORT_DIPSETTING( 0x0003, "1 Coin/2 Credits" )
PORT_DIPSETTING( 0x0002, "1 Coin/3 Credits" )
PORT_DIPSETTING( 0x0001, "1 Coin/5 Credits" )
PORT_DIPSETTING( 0x0000, "1 Coin/6 Credits" )
PORT_DIPNAME( 0x0008, 0x0008, "2 Coins to Start, 1 to Continue", IP_KEY_NONE )
PORT_DIPSETTING( 0x0008, "Off" )
PORT_DIPSETTING( 0x0000, "On" )
PORT_DIPNAME( 0x0010, 0x0010, "Coin Slot", IP_KEY_NONE )
PORT_DIPSETTING( 0x0010, "Same" )
PORT_DIPSETTING( 0x0000, "Individual" )
PORT_DIPNAME( 0x0020, 0x0000, "Max Players", IP_KEY_NONE )
PORT_DIPSETTING( 0x0020, "2" )
PORT_DIPSETTING( 0x0000, "3" )
PORT_DIPNAME( 0x0040, 0x0000, "Demo Sounds", IP_KEY_NONE )
PORT_DIPSETTING( 0x0040, "Off" )
PORT_DIPSETTING( 0x0000, "On" )
PORT_BITX( 0x0080, 0x0080, IPT_DIPSWITCH_NAME | IPF_TOGGLE, "Service Mode", OSD_KEY_F2, IP_JOY_NONE, 0 )
PORT_DIPSETTING( 0x0080, "Off" )
PORT_DIPSETTING( 0x0000, "On" )
PORT_DIPNAME( 0x0100, 0x0100, "Flip Screen", IP_KEY_NONE )
PORT_DIPSETTING( 0x0100, "Off" )
PORT_DIPSETTING( 0x0000, "On" )
PORT_DIPNAME( 0x0200, 0x0200, "Unknown", IP_KEY_NONE )
PORT_DIPSETTING( 0x0200, "Off" )
PORT_DIPSETTING( 0x0000, "On" )
PORT_DIPNAME( 0x0400, 0x0400, "Unknown", IP_KEY_NONE )
PORT_DIPSETTING( 0x0400, "Off" )
PORT_DIPSETTING( 0x0000, "On" )
PORT_DIPNAME( 0x0800, 0x0800, "Unknown", IP_KEY_NONE )
PORT_DIPSETTING( 0x0800, "Off" )
PORT_DIPSETTING( 0x0000, "On" )
PORT_DIPNAME( 0x1000, 0x1000, "Lives", IP_KEY_NONE )
PORT_DIPSETTING( 0x0000, "2" )
PORT_DIPSETTING( 0x1000, "3" )
PORT_DIPNAME( 0x2000, 0x2000, "Unknown", IP_KEY_NONE )
PORT_DIPSETTING( 0x2000, "Off" )
PORT_DIPSETTING( 0x0000, "On" )
PORT_DIPNAME( 0x4000, 0x4000, "Unknown", IP_KEY_NONE )
PORT_DIPSETTING( 0x4000, "Off" )
PORT_DIPSETTING( 0x0000, "On" )
PORT_DIPNAME( 0x8000, 0x8000, "Unknown", IP_KEY_NONE )
PORT_DIPSETTING( 0x8000, "Off" )
PORT_DIPSETTING( 0x0000, "On" )
PORT_START
PORT_BIT( 0x0001, IP_ACTIVE_LOW, IPT_JOYSTICK_UP | IPF_8WAY | IPF_PLAYER3 )
PORT_BIT( 0x0002, IP_ACTIVE_LOW, IPT_JOYSTICK_DOWN | IPF_8WAY | IPF_PLAYER3 )
PORT_BIT( 0x0004, IP_ACTIVE_LOW, IPT_JOYSTICK_LEFT | IPF_8WAY | IPF_PLAYER3 )
PORT_BIT( 0x0008, IP_ACTIVE_LOW, IPT_JOYSTICK_RIGHT | IPF_8WAY | IPF_PLAYER3 )
PORT_BIT( 0x0010, IP_ACTIVE_LOW, IPT_BUTTON1 | IPF_PLAYER3 )
PORT_BIT( 0x0020, IP_ACTIVE_LOW, IPT_UNKNOWN )
PORT_BIT( 0x0040, IP_ACTIVE_LOW, IPT_UNKNOWN )
PORT_BIT( 0x0080, IP_ACTIVE_LOW, IPT_START3 )
INPUT_PORTS_END
INPUT_PORTS_START( aerofgt_input_ports )
PORT_START
PORT_BIT( 0x0001, IP_ACTIVE_LOW, IPT_JOYSTICK_UP | IPF_8WAY )
PORT_BIT( 0x0002, IP_ACTIVE_LOW, IPT_JOYSTICK_DOWN | IPF_8WAY )
PORT_BIT( 0x0004, IP_ACTIVE_LOW, IPT_JOYSTICK_LEFT | IPF_8WAY )
PORT_BIT( 0x0008, IP_ACTIVE_LOW, IPT_JOYSTICK_RIGHT | IPF_8WAY )
PORT_BIT( 0x0010, IP_ACTIVE_LOW, IPT_BUTTON1 )
PORT_BIT( 0x0020, IP_ACTIVE_LOW, IPT_BUTTON2 )
PORT_BIT( 0x0040, IP_ACTIVE_LOW, IPT_UNKNOWN )
PORT_BIT( 0x0080, IP_ACTIVE_LOW, IPT_UNKNOWN )
PORT_START
PORT_BIT( 0x0001, IP_ACTIVE_LOW, IPT_JOYSTICK_UP | IPF_8WAY | IPF_PLAYER2 )
PORT_BIT( 0x0002, IP_ACTIVE_LOW, IPT_JOYSTICK_DOWN | IPF_8WAY | IPF_PLAYER2 )
PORT_BIT( 0x0004, IP_ACTIVE_LOW, IPT_JOYSTICK_LEFT | IPF_8WAY | IPF_PLAYER2 )
PORT_BIT( 0x0008, IP_ACTIVE_LOW, IPT_JOYSTICK_RIGHT | IPF_8WAY | IPF_PLAYER2 )
PORT_BIT( 0x0010, IP_ACTIVE_LOW, IPT_BUTTON1 | IPF_PLAYER2 )
PORT_BIT( 0x0020, IP_ACTIVE_LOW, IPT_BUTTON2 | IPF_PLAYER2 )
PORT_BIT( 0x0040, IP_ACTIVE_LOW, IPT_UNKNOWN )
PORT_BIT( 0x0080, IP_ACTIVE_LOW, IPT_UNKNOWN )
PORT_START
PORT_BIT( 0x0001, IP_ACTIVE_LOW, IPT_COIN1 )
PORT_BIT( 0x0002, IP_ACTIVE_LOW, IPT_COIN2 )
PORT_BIT( 0x0004, IP_ACTIVE_LOW, IPT_START1 )
PORT_BIT( 0x0008, IP_ACTIVE_LOW, IPT_START2 )
PORT_BIT( 0x0010, IP_ACTIVE_LOW, IPT_UNKNOWN )
PORT_BIT( 0x0020, IP_ACTIVE_LOW, IPT_UNKNOWN )
PORT_BIT( 0x0040, IP_ACTIVE_LOW, IPT_COIN3 )
PORT_BIT( 0x0080, IP_ACTIVE_LOW, IPT_UNKNOWN )
PORT_START
PORT_DIPNAME( 0x0001, 0x0001, "Coin Slot", IP_KEY_NONE )
PORT_DIPSETTING( 0x0001, "Same" )
PORT_DIPSETTING( 0x0000, "Individual" )
PORT_DIPNAME( 0x000e, 0x000e, "Coin A", IP_KEY_NONE )
PORT_DIPSETTING( 0x000a, "3 Coins/1 Credit" )
PORT_DIPSETTING( 0x000c, "2 Coins/1 Credit" )
PORT_DIPSETTING( 0x000e, "1 Coin/1 Credit" )
PORT_DIPSETTING( 0x0008, "1 Coin/2 Credits" )
PORT_DIPSETTING( 0x0006, "1 Coin/3 Credits" )
PORT_DIPSETTING( 0x0004, "1 Coin/4 Credits" )
PORT_DIPSETTING( 0x0002, "1 Coin/5 Credits" )
PORT_DIPSETTING( 0x0000, "1 Coin/6 Credits" )
PORT_DIPNAME( 0x0070, 0x0070, "Coin B", IP_KEY_NONE )
PORT_DIPSETTING( 0x0050, "3 Coins/1 Credit" )
PORT_DIPSETTING( 0x0060, "2 Coins/1 Credit" )
PORT_DIPSETTING( 0x0070, "1 Coin/1 Credit" )
PORT_DIPSETTING( 0x0040, "1 Coin/2 Credits" )
PORT_DIPSETTING( 0x0030, "1 Coin/3 Credits" )
PORT_DIPSETTING( 0x0020, "1 Coin/4 Credits" )
PORT_DIPSETTING( 0x0010, "1 Coin/5 Credits" )
PORT_DIPSETTING( 0x0000, "1 Coin/6 Credits" )
PORT_DIPNAME( 0x0080, 0x0080, "2 Coins to Start, 1 to Continue", IP_KEY_NONE )
PORT_DIPSETTING( 0x0080, "Off" )
PORT_DIPSETTING( 0x0000, "On" )
PORT_START
PORT_DIPNAME( 0x0001, 0x0001, "Flip Screen", IP_KEY_NONE )
PORT_DIPSETTING( 0x0001, "Off" )
PORT_DIPSETTING( 0x0000, "On" )
PORT_DIPNAME( 0x0002, 0x0000, "Demo Sounds", IP_KEY_NONE )
PORT_DIPSETTING( 0x0002, "Off" )
PORT_DIPSETTING( 0x0000, "On" )
PORT_DIPNAME( 0x000c, 0x000c, "Difficulty", IP_KEY_NONE )
PORT_DIPSETTING( 0x0008, "Easy" )
PORT_DIPSETTING( 0x000c, "Normal" )
PORT_DIPSETTING( 0x0004, "Hard" )
PORT_DIPSETTING( 0x0000, "Hardest" )
PORT_DIPNAME( 0x0030, 0x0030, "Lives", IP_KEY_NONE )
PORT_DIPSETTING( 0x0020, "1" )
PORT_DIPSETTING( 0x0010, "2" )
PORT_DIPSETTING( 0x0030, "3" )
PORT_DIPSETTING( 0x0000, "4" )
PORT_DIPNAME( 0x0040, 0x0040, "Bonus Life", IP_KEY_NONE )
PORT_DIPSETTING( 0x0040, "200000" )
PORT_DIPSETTING( 0x0000, "300000" )
PORT_BITX( 0x0080, 0x0080, IPT_DIPSWITCH_NAME | IPF_TOGGLE, "Service Mode", OSD_KEY_F2, IP_JOY_NONE, 0 )
PORT_DIPSETTING( 0x0080, "Off" )
PORT_DIPSETTING( 0x0000, "On" )
PORT_START
PORT_DIPNAME( 0x000f, 0x0000, "Country", IP_KEY_NONE )
PORT_DIPSETTING( 0x0000, "Any" )
PORT_DIPSETTING( 0x000f, "USA" )
PORT_DIPSETTING( 0x000e, "Korea" )
PORT_DIPSETTING( 0x000d, "Hong Kong" )
PORT_DIPSETTING( 0x000b, "Taiwan" )
INPUT_PORTS_END
static struct GfxLayout pspikes_charlayout =
{
8,8, /* 8*8 characters */
16384, /* 16384 characters */
4, /* 4 bits per pixel */
{ 0, 1, 2, 3 },
{ 1*4, 0*4, 3*4, 2*4, 5*4, 4*4, 7*4, 6*4 },
{ 0*32, 1*32, 2*32, 3*32, 4*32, 5*32, 6*32, 7*32 },
32*8 /* every char takes 32 consecutive bytes */
};
static struct GfxLayout pspikes_spritelayout =
{
16,16, /* 16*16 sprites */
8192, /* 8192 sprites */
4, /* 4 bits per pixel */
{ 0, 1, 2, 3 },
{ 1*4, 0*4, 3*4, 2*4, 8192*64*8+1*4, 8192*64*8+0*4, 8192*64*8+3*4, 8192*64*8+2*4,
5*4, 4*4, 7*4, 6*4, 8192*64*8+5*4, 8192*64*8+4*4, 8192*64*8+7*4, 8192*64*8+6*4 },
{ 0*32, 1*32, 2*32, 3*32, 4*32, 5*32, 6*32, 7*32,
8*32, 9*32, 10*32, 11*32, 12*32, 13*32, 14*32, 15*32 },
64*8 /* every char takes 32 consecutive bytes */
};
static struct GfxDecodeInfo pspikes_gfxdecodeinfo[] =
{
{ 1, 0x000000, &pspikes_charlayout, 0, 64 }, /* colors 0-1023 in 8 banks */
{ 1, 0x080000, &pspikes_spritelayout, 1024, 64 }, /* colors 1024-2047 in 4 banks */
{ -1 } /* end of array */
};
static struct GfxLayout turbofrc_charlayout =
{
8,8, /* 8*8 characters */
40960, /* 40960 characters */
4, /* 4 bits per pixel */
{ 0, 1, 2, 3 },
{ 1*4, 0*4, 3*4, 2*4, 5*4, 4*4, 7*4, 6*4 },
{ 0*32, 1*32, 2*32, 3*32, 4*32, 5*32, 6*32, 7*32 },
32*8 /* every char takes 32 consecutive bytes */
};
static struct GfxLayout turbofrc_spritelayout =
{
16,16, /* 16*16 sprites */
12288, /* 12288 sprites */
4, /* 4 bits per pixel */
{ 0, 1, 2, 3 },
{ 1*4, 0*4, 3*4, 2*4, 12288*64*8+1*4, 12288*64*8+0*4, 12288*64*8+3*4, 12288*64*8+2*4,
5*4, 4*4, 7*4, 6*4, 12288*64*8+5*4, 12288*64*8+4*4, 12288*64*8+7*4, 12288*64*8+6*4 },
{ 0*32, 1*32, 2*32, 3*32, 4*32, 5*32, 6*32, 7*32,
8*32, 9*32, 10*32, 11*32, 12*32, 13*32, 14*32, 15*32 },
64*8 /* every char takes 32 consecutive bytes */
};
static struct GfxDecodeInfo turbofrc_gfxdecodeinfo[] =
{
{ 1, 0x000000, &turbofrc_charlayout, 0, 32 }, /* I could split this one, first half is bg1 second half bg2 */
{ 1, 0x140000, &turbofrc_spritelayout, 512, 16 },
{ 1, 0x2c0000, &pspikes_spritelayout, 768, 16 },
{ -1 } /* end of array */
};
static struct GfxLayout aerofgt_charlayout =
{
8,8, /* 8*8 characters */
32768, /* 32768 characters */
4, /* 4 bits per pixel */
{ 0, 1, 2, 3 },
{ 2*4, 3*4, 0*4, 1*4, 6*4, 7*4, 4*4, 5*4 },
{ 0*32, 1*32, 2*32, 3*32, 4*32, 5*32, 6*32, 7*32 },
32*8 /* every char takes 32 consecutive bytes */
};
static struct GfxLayout aerofgt_spritelayout1 =
{
16,16, /* 16*16 sprites */
8192, /* 8192 sprites */
4, /* 4 bits per pixel */
{ 0, 1, 2, 3 },
{ 2*4, 3*4, 0*4, 1*4, 6*4, 7*4, 4*4, 5*4,
10*4, 11*4, 8*4, 9*4, 14*4, 15*4, 12*4, 13*4 },
{ 0*64, 1*64, 2*64, 3*64, 4*64, 5*64, 6*64, 7*64,
8*64, 9*64, 10*64, 11*64, 12*64, 13*64, 14*64, 15*64 },
128*8 /* every sprite takes 128 consecutive bytes */
};
static struct GfxLayout aerofgt_spritelayout2 =
{
16,16, /* 16*16 sprites */
4096, /* 4096 sprites */
4, /* 4 bits per pixel */
{ 0, 1, 2, 3 },
{ 2*4, 3*4, 0*4, 1*4, 6*4, 7*4, 4*4, 5*4,
10*4, 11*4, 8*4, 9*4, 14*4, 15*4, 12*4, 13*4 },
{ 0*64, 1*64, 2*64, 3*64, 4*64, 5*64, 6*64, 7*64,
8*64, 9*64, 10*64, 11*64, 12*64, 13*64, 14*64, 15*64 },
128*8 /* every sprite takes 128 consecutive bytes */
};
static struct GfxDecodeInfo aerofgt_gfxdecodeinfo[] =
{
{ 1, 0x000000, &aerofgt_charlayout, 0, 32 },
{ 1, 0x100000, &aerofgt_spritelayout1, 512, 16 },
{ 1, 0x200000, &aerofgt_spritelayout2, 768, 16 },
{ -1 } /* end of array */
};
static struct GfxLayout unkvsys_charlayout =
{
8,8, /* 8*8 characters */
8192, /* 32768 characters */
4, /* 4 bits per pixel */
{ 0, 1, 2, 3 },
{ 1*4, 0*4, 3*4, 2*4, 5*4, 4*4, 7*4, 6*4 },
{ 0*32, 1*32, 2*32, 3*32, 4*32, 5*32, 6*32, 7*32 },
32*8 /* every char takes 32 consecutive bytes */
};
static struct GfxLayout unkvsys_spritelayout1 =
{
16,16, /* 16*16 sprites */
4096, /* 4096 sprites */
4, /* 4 bits per pixel */
{ 0, 1, 2, 3 },
{ 1*4, 0*4, 3*4, 2*4, 4096*64*8+1*4, 4096*64*8+0*4, 4096*64*8+3*4, 4096*64*8+2*4,
5*4, 4*4, 7*4, 6*4, 4096*64*8+5*4, 4096*64*8+4*4, 4096*64*8+7*4, 4096*64*8+6*4 },
{ 0*32, 1*32, 2*32, 3*32, 4*32, 5*32, 6*32, 7*32,
8*32, 9*32, 10*32, 11*32, 12*32, 13*32, 14*32, 15*32 },
64*8 /* every char takes 32 consecutive bytes */
};
static struct GfxLayout unkvsys_spritelayout2 =
{
16,16, /* 16*16 sprites */
4096, /* 4096 sprites */
4, /* 4 bits per pixel */
{ 0, 1, 2, 3 },
{ 10*4, 11*4, 8*4, 9*4, 14*4, 15*4, 12*4, 13*4,
2*4, 3*4, 0*4, 1*4, 6*4, 7*4, 4*4, 5*4 },
{ 0*64, 1*64, 2*64, 3*64, 4*64, 5*64, 6*64, 7*64,
8*64, 9*64, 10*64, 11*64, 12*64, 13*64, 14*64, 15*64 },
128*8 /* every sprite takes 128 consecutive bytes */
};
static struct GfxDecodeInfo unkvsys_gfxdecodeinfo[] =
{
{ 1, 0x000000, &unkvsys_charlayout, 0, 32 },
{ 1, 0x040000, &unkvsys_charlayout, 0, 32 },
{ 1, 0x080000, &unkvsys_charlayout, 0, 32 },
{ 1, 0x0c0000, &unkvsys_spritelayout1, 0, 32 },
{ 1, 0x140000, &unkvsys_spritelayout2, 0, 32 },
{ -1 } /* end of array */
};
static void irqhandler(void)
{
cpu_cause_interrupt(1,0xff);
}
struct YM2610interface ym2610_interface =
{
1,
8000000, /* 8 MHz??? */
{ YM2203_VOL(50,50) },
{ 0 },
{ 0 },
{ 0 },
{ 0 },
{ irqhandler },
{ 4 },
{ 3 }
};
static struct MachineDriver pspikes_machine_driver =
{
/* basic machine hardware */
{
{
CPU_M68000,
10000000, /* 10 MHz (?) */
0,
pspikes_readmem,pspikes_writemem,0,0,
m68_level1_irq,1 /* all inrq vectors are the same */
},
{
CPU_Z80 | CPU_AUDIO_CPU,
4000000, /* 4 Mhz ??? */
2, /* memory region #2 */
sound_readmem,sound_writemem,turbofrc_sound_readport,turbofrc_sound_writeport,
ignore_interrupt,0 /* NMIs are triggered by the main CPU */
/* IRQs are triggered by the YM2610 */
}
},
60, DEFAULT_60HZ_VBLANK_DURATION, /* frames per second, vblank duration */
1, /* 1 CPU slice per frame - interleaving is forced when a sound command is written */
0,
/* video hardware */
64*8, 64*8, { 2*8-4, 44*8-4-1, 1*8, 29*8-1 },
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -