📄 slapfght.c
字号:
INPUT_PORTS_START( getstar_input_ports )
PORT_START /* IN0 */
PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_JOYSTICK_UP | IPF_8WAY )
PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_JOYSTICK_RIGHT | IPF_8WAY )
PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_JOYSTICK_DOWN | IPF_8WAY )
PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_JOYSTICK_LEFT | IPF_8WAY )
PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_JOYSTICK_UP | IPF_8WAY | IPF_COCKTAIL )
PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_JOYSTICK_RIGHT | IPF_8WAY | IPF_COCKTAIL )
PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_JOYSTICK_DOWN | IPF_8WAY | IPF_COCKTAIL )
PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_JOYSTICK_LEFT | IPF_8WAY | IPF_COCKTAIL )
PORT_START /* IN1 */
PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_BUTTON2 )
PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_BUTTON1 )
PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_BUTTON2 | IPF_COCKTAIL )
PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_BUTTON1 | IPF_COCKTAIL )
PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_START1 )
PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_START2 )
PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_COIN1 )
PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_COIN2 )
PORT_START /* DSW1 */
PORT_DIPNAME( 0x80, 0x80, "Unknown", IP_KEY_NONE )
PORT_DIPSETTING( 0x80, "Off" )
PORT_DIPSETTING( 0x00, "On" )
PORT_BITX( 0x40, 0x40, IPT_DIPSWITCH_NAME | IPF_TOGGLE, "Dipswitch Test", OSD_KEY_F2, IP_JOY_NONE, 0 )
PORT_DIPSETTING( 0x40, "Off" )
PORT_DIPSETTING( 0x00, "On" )
PORT_DIPNAME( 0x20, 0x20, "Flip Screen", IP_KEY_NONE )
PORT_DIPSETTING( 0x20, "Off" )
PORT_DIPSETTING( 0x00, "On" )
PORT_DIPNAME( 0x10, 0x00, "Cabinet", IP_KEY_NONE )
PORT_DIPSETTING( 0x00, "Upright" )
PORT_DIPSETTING( 0x10, "Cocktail" )
PORT_DIPNAME( 0x08, 0x08, "Demo Sounds", IP_KEY_NONE )
PORT_DIPSETTING( 0x00, "Off" )
PORT_DIPSETTING( 0x08, "On" )
PORT_DIPNAME( 0x07, 0x07, "Coinage", IP_KEY_NONE )
PORT_DIPSETTING( 0x01, "3 Coins/1 Credit" )
PORT_DIPSETTING( 0x02, "3 Coins/1 Credit" )
PORT_DIPSETTING( 0x04, "2 Coins/1 Credit" )
PORT_DIPSETTING( 0x07, "1 Coin/1 Credit" )
PORT_DIPSETTING( 0x03, "2 Coins/3 Credits" )
PORT_DIPSETTING( 0x06, "1 Coin/2 Credits" )
PORT_DIPSETTING( 0x05, "1 Coin/3 Credits" )
PORT_DIPSETTING( 0x00, "Free Play" )
PORT_START /* DSW2 */
PORT_DIPNAME( 0x80, 0x80, "Unknown", IP_KEY_NONE )
PORT_DIPSETTING( 0x80, "Off" )
PORT_DIPSETTING( 0x00, "On" )
PORT_DIPNAME( 0x40, 0x40, "Unknown", IP_KEY_NONE )
PORT_DIPSETTING( 0x40, "Off" )
PORT_DIPSETTING( 0x00, "On" )
PORT_DIPNAME( 0x20, 0x20, "Unknown", IP_KEY_NONE )
PORT_DIPSETTING( 0x20, "Off" )
PORT_DIPSETTING( 0x00, "On" )
PORT_DIPNAME( 0x10, 0x10, "Bonus Life", IP_KEY_NONE )
PORT_DIPSETTING( 0x10, "30000 100000" )
PORT_DIPSETTING( 0x00, "50000 150000" )
PORT_DIPNAME( 0x0c, 0x0c, "Difficulty", IP_KEY_NONE )
PORT_DIPSETTING( 0x0c, "Easy" )
PORT_DIPSETTING( 0x08, "Medium" )
PORT_DIPSETTING( 0x04, "Hard" )
PORT_DIPSETTING( 0x00, "Hardest" )
PORT_DIPNAME( 0x03, 0x02, "Lives", IP_KEY_NONE )
PORT_DIPSETTING( 0x02, "3" )
PORT_DIPSETTING( 0x01, "4" )
PORT_DIPSETTING( 0x00, "5" )
PORT_BITX( 0, 0x03, IPT_DIPSWITCH_SETTING | IPF_CHEAT, "Infinite", IP_KEY_NONE, IP_JOY_NONE, 0 )
INPUT_PORTS_END
static struct GfxLayout charlayout =
{
8,8, /* 8*8 characters */
1024, /* 1024 characters */
2, /* 2 bits per pixel */
{ 0, 1024*8*8 },
{ 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 */
};
static struct GfxLayout tigerh_tilelayout =
{
8,8, /* 8*8 tiles */
2048, /* 2048 tiles */
4, /* 4 bits per pixel */
{ 0, 2048*8*8, 2*2048*8*8, 3*2048*8*8 },
{ 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 tile takes 8 consecutive bytes */
};
static struct GfxLayout tilelayout =
{
8,8, /* 8*8 tiles */
4096, /* 4096 tiles */
4, /* 4 bits per pixel */
{ 0, 4096*8*8, 2*4096*8*8, 3*4096*8*8 },
{ 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 tile takes 8 consecutive bytes */
};
static struct GfxLayout tigerh_spritelayout =
{
16,16, /* 16*16 sprites */
512, /* 512 sprites */
4, /* 4 bits per pixel */
{ 0, 512*32*8, 2*512*32*8, 3*512*32*8 },
{ 0, 1, 2, 3, 4, 5, 6, 7, 8,
9, 10 ,11, 12, 13, 14, 15 },
{ 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 },
32*8 /* every sprite takes 64 consecutive bytes */
};
static struct GfxLayout spritelayout =
{
16,16, /* 16*16 sprites */
1024, /* 1024 sprites */
4, /* 4 bits per pixel */
{ 0, 1024*32*8, 2*1024*32*8, 3*1024*32*8 },
{ 0, 1, 2, 3, 4, 5, 6, 7, 8,
9, 10 ,11, 12, 13, 14, 15 },
{ 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 },
32*8 /* every sprite takes 64 consecutive bytes */
};
static struct GfxDecodeInfo tigerh_gfxdecodeinfo[] =
{
{ 1, 0x00000, &charlayout, 0, 64 },
{ 1, 0x04000, &tigerh_tilelayout, 0, 16 },
{ 1, 0x14000, &tigerh_spritelayout, 0, 16 },
{ -1 } /* end of array */
};
static struct GfxDecodeInfo gfxdecodeinfo[] =
{
{ 1, 0x00000, &charlayout, 0, 64 },
{ 1, 0x04000, &tilelayout, 0, 16 },
{ 1, 0x24000, &spritelayout, 0, 16 },
{ -1 } /* end of array */
};
static struct AY8910interface ay8910_interface =
{
2, /* 2 chips */
1500000, /* 1.5 MHz ? */
{ 255, 255 },
{ input_port_0_r, input_port_2_r },
{ input_port_1_r, input_port_3_r },
{ 0, 0 },
{ 0, 0 }
};
static struct MachineDriver tigerh_machine_driver =
{
/* basic machine hardware */
{
{
CPU_Z80,
6000000,
0,
tigerh_readmem,writemem,readport,tigerh_writeport,
interrupt,1
},
{
CPU_Z80,
6000000,
3,
sound_readmem,sound_writemem,0,0,
nmi_interrupt,6, /* ??? */
}
},
60, /* fps - frames per second */
5000, /* wrong, but fixes graphics glitches */
10, /* 10 CPU slices per frame - enough for the sound CPU to read all commands */
slapfight_init_machine,
/* video hardware */
64*8, 32*8, { 1*8, 36*8-1, 2*8, 32*8-1 },
tigerh_gfxdecodeinfo,
256, 256,
slapfight_vh_convert_color_prom,
VIDEO_TYPE_RASTER,
0,
generic_vh_start,
generic_vh_stop,
slapfight_vh_screenrefresh,
/* sound hardware */
0,0,0,0,
{
{
SOUND_AY8910,
&ay8910_interface
}
}
};
static struct MachineDriver slapfigh_machine_driver =
{
/* basic machine hardware */
{
{
CPU_Z80,
6000000,
0,
readmem,writemem,readport,writeport,
interrupt,1
},
{
CPU_Z80,
6000000,
3,
sound_readmem,sound_writemem,0,0,
getstar_interrupt/*nmi_interrupt*/, 3, /* p'tit Seb 980926 this way it sound much better ! */
0,0 /* I think music is not so far from correct speed */
/* ignore_interrupt, 0,
slapfight_sound_interrupt, 27306667 */
}
},
60, /* fps - frames per second */
5000, /* wrong, but fixes graphics glitches */
10, /* 10 CPU slices per frame - enough for the sound CPU to read all commands */
slapfight_init_machine,
/* video hardware */
64*8, 32*8, { 1*8, 36*8-1, 2*8, 32*8-1 },
gfxdecodeinfo,
256, 256,
slapfight_vh_convert_color_prom,
VIDEO_TYPE_RASTER,
0,
generic_vh_start,
generic_vh_stop,
slapfight_vh_screenrefresh,
/* sound hardware */
0,0,0,0,
{
{
SOUND_AY8910,
&ay8910_interface
}
}
};
/* identical to slapfigh_ but writemem has different scroll registers */
static struct MachineDriver slapbtuk_machine_driver =
{
/* basic machine hardware */
{
{
CPU_Z80,
6000000,
0,
readmem,slapbtuk_writemem,readport,writeport,
interrupt,1
},
{
CPU_Z80,
6000000,
3,
sound_readmem,sound_writemem,0,0,
getstar_interrupt/*nmi_interrupt*/, 3, /* p'tit Seb 980926 this way it sound much better ! */
0,0 /* I think music is not so far from correct speed */
/* ignore_interrupt, 0,
slapfight_sound_interrupt, 27306667 */
}
},
60, /* fps - frames per second */
5000, /* wrong, but fixes graphics glitches */
10, /* 10 CPU slices per frame - enough for the sound CPU to read all commands */
slapfight_init_machine,
/* video hardware */
64*8, 32*8, { 1*8, 36*8-1, 2*8, 32*8-1 },
gfxdecodeinfo,
256, 256,
slapfight_vh_convert_color_prom,
VIDEO_TYPE_RASTER,
0,
generic_vh_start,
generic_vh_stop,
slapfight_vh_screenrefresh,
/* sound hardware */
0,0,0,0,
{
{
SOUND_AY8910,
&ay8910_interface
}
}
};
ROM_START( tigerh_rom )
ROM_REGION(0x10000)
ROM_LOAD( "0.4", 0x00000, 0x4000, 0x4be73246 )
ROM_LOAD( "1.4", 0x04000, 0x4000, 0xaad04867 )
ROM_LOAD( "2.4", 0x08000, 0x4000, 0x4843f15c )
ROM_REGION_DISPOSE(0x24000)
ROM_LOAD( "5.4", 0x00000, 0x2000, 0xc5325b49 ) /* Chars */
ROM_LOAD( "4.4", 0x02000, 0x2000, 0xcd59628e )
ROM_LOAD( "9.4", 0x04000, 0x4000, 0x31fae8a8 ) /* Tiles */
ROM_LOAD( "8.4", 0x08000, 0x4000, 0xe539af2b )
ROM_LOAD( "7.4", 0x0c000, 0x4000, 0x02fdd429 )
ROM_LOAD( "6.4", 0x10000, 0x4000, 0x11fbcc8c )
ROM_LOAD( "13.4", 0x14000, 0x4000, 0x739a7e7e ) /* Sprites */
ROM_LOAD( "12.4", 0x18000, 0x4000, 0xc064ecdb )
ROM_LOAD( "11.4", 0x1c000, 0x4000, 0x744fae9b )
ROM_LOAD( "10.4", 0x20000, 0x4000, 0xe1cf844e )
ROM_REGION(0x0300)
ROM_LOAD( "82s129.12q", 0x0000, 0x0100, 0x2c69350d )
ROM_LOAD( "82s129.12m", 0x0100, 0x0100, 0x7142e972 )
ROM_LOAD( "82s129.12n", 0x0200, 0x0100, 0x25f273f2 )
ROM_REGION(0x10000) /* 64k for the audio CPU */
ROM_LOAD( "3.4", 0x0000, 0x2000, 0xd105260f )
/* The 68705 ROM is missing! */
ROM_END
ROM_START( tigerh2_rom )
ROM_REGION(0x10000)
ROM_LOAD( "b0.5", 0x00000, 0x4000, 0x6ae7e13c )
ROM_LOAD( "a-1.5", 0x04000, 0x4000, 0x65df2152 )
ROM_LOAD( "a-2.5", 0x08000, 0x4000, 0x633d324b )
ROM_REGION_DISPOSE(0x24000)
ROM_LOAD( "5.4", 0x00000, 0x2000, 0xc5325b49 ) /* Chars */
ROM_LOAD( "4.4", 0x02000, 0x2000, 0xcd59628e )
ROM_LOAD( "9.4", 0x04000, 0x4000, 0x31fae8a8 ) /* Tiles */
ROM_LOAD( "8.4", 0x08000, 0x4000, 0xe539af2b )
ROM_LOAD( "7.4", 0x0c000, 0x4000, 0x02fdd429 )
ROM_LOAD( "6.4", 0x10000, 0x4000, 0x11fbcc8c )
ROM_LOAD( "13.4", 0x14000, 0x4000, 0x739a7e7e ) /* Sprites */
ROM_LOAD( "12.4", 0x18000, 0x4000, 0xc064ecdb )
ROM_LOAD( "11.4", 0x1c000, 0x4000, 0x744fae9b )
ROM_LOAD( "10.4", 0x20000, 0x4000, 0xe1cf844e )
ROM_REGION(0x0300)
ROM_LOAD( "82s129.12q", 0x0000, 0x0100, 0x2c69350d )
ROM_LOAD( "82s129.12m", 0x0100, 0x0100, 0x7142e972 )
ROM_LOAD( "82s129.12n", 0x0200, 0x0100, 0x25f273f2 )
ROM_REGION(0x10000) /* 64k for the audio CPU */
ROM_LOAD( "3.4", 0x0000, 0x2000, 0xd105260f )
/* Is there a 68705 ROM missing? */
ROM_END
ROM_START( tigerhb1_rom )
ROM_REGION(0x10000)
ROM_LOAD( "14", 0x00000, 0x4000, 0xca59dd73 )
ROM_LOAD( "13", 0x04000, 0x4000, 0x38bd54db )
ROM_LOAD( "a-2.5", 0x08000, 0x4000, 0x633d324b )
ROM_REGION_DISPOSE(0x24000)
ROM_LOAD( "5.4", 0x00000, 0x2000, 0xc5325b49 ) /* Chars */
ROM_LOAD( "4.4", 0x02000, 0x2000, 0xcd59628e )
ROM_LOAD( "9.4", 0x04000, 0x4000, 0x31fae8a8 ) /* Tiles */
ROM_LOAD( "8.4", 0x08000, 0x4000, 0xe539af2b )
ROM_LOAD( "7.4", 0x0c000, 0x4000, 0x02fdd429 )
ROM_LOAD( "6.4", 0x10000, 0x4000, 0x11fbcc8c )
ROM_LOAD( "13.4", 0x14000, 0x4000, 0x739a7e7e ) /* Sprites */
ROM_LOAD( "12.4", 0x18000, 0x4000, 0xc064ecdb )
ROM_LOAD( "11.4", 0x1c000, 0x4000, 0x744fae9b )
ROM_LOAD( "10.4", 0x20000, 0x4000, 0xe1cf844e )
ROM_REGION(0x0300)
ROM_LOAD( "82s129.12q", 0x0000, 0x0100, 0x2c69350d )
ROM_LOAD( "82s129.12m", 0x0100, 0x0100, 0x7142e972 )
ROM_LOAD( "82s129.12n", 0x0200, 0x0100, 0x25f273f2 )
ROM_REGION(0x10000) /* 64k for the audio CPU */
ROM_LOAD( "3.4", 0x0000, 0x2000, 0xd105260f )
ROM_END
ROM_START( tigerhb2_rom )
ROM_REGION(0x10000)
ROM_LOAD( "rom00_09.bin", 0x00000, 0x4000, 0xef738c68 )
ROM_LOAD( "a-1.5", 0x04000, 0x4000, 0x65df2152 )
ROM_LOAD( "rom02_07.bin", 0x08000, 0x4000, 0x36e250b9 )
ROM_REGION_DISPOSE(0x24000)
ROM_LOAD( "5.4", 0x00000, 0x2000, 0xc5325b49 ) /* Chars */
ROM_LOAD( "4.4", 0x02000, 0x2000, 0xcd59628e )
ROM_LOAD( "9.4", 0x04000, 0x4000, 0x31fae8a8 ) /* Tiles */
ROM_LOAD( "8.4", 0x08000, 0x4000, 0xe539af2b )
ROM_LOAD( "7.4", 0x0c000, 0x4000, 0x02fdd429 )
ROM_LOAD( "6.4", 0x10000, 0x4000, 0x11fbcc8c )
ROM_LOAD( "13.4", 0x14000, 0x4000, 0x739a7e7e ) /* Sprites */
ROM_LOAD( "12.4", 0x18000, 0x4000, 0xc064ecdb )
ROM_LOAD( "11.4", 0x1c000, 0x4000, 0x744fae9b )
ROM_LOAD( "10.4", 0x20000, 0x4000, 0xe1cf844e )
ROM_REGION(0x0300)
ROM_LOAD( "82s129.12q", 0x0000, 0x0100, 0x2c69350d )
ROM_LOAD( "82s129.12m", 0x0100, 0x0100, 0x7142e972 )
ROM_LOAD( "82s129.12n", 0x0200, 0x0100, 0x25f273f2 )
ROM_REGION(0x10000) /* 64k for the audio CPU */
ROM_LOAD( "3.4", 0x0000, 0x2000, 0xd105260f )
ROM_END
ROM_START( slapfigh_rom )
ROM_REGION(0x18000)
ROM_LOAD( "sf_r19.bin", 0x00000, 0x8000, 0x674c0e0f )
ROM_LOAD( "sf_rh.bin", 0x10000, 0x8000, 0x3c42e4a7 ) /* banked at 8000 */
ROM_REGION_DISPOSE(0x44000)
ROM_LOAD( "sf_r11.bin", 0x00000, 0x2000, 0x2ac7b943 ) /* Chars */
ROM_LOAD( "sf_r10.bin", 0x02000, 0x2000, 0x33cadc93 )
ROM_LOAD( "sf_r06.bin", 0x04000, 0x8000, 0xb6358305 ) /* Tiles */
ROM_LOAD( "sf_r09.bin", 0x0c000, 0x8000, 0xe92d9d60 )
ROM_LOAD( "sf_r08.bin", 0x14000, 0x8000, 0x5faeeea3 )
ROM_LOAD( "sf_r07.bin", 0x1c000, 0x8000, 0x974e2ea9 )
ROM_LOAD( "sf_r03.bin", 0x24000, 0x8000, 0x8545d397 ) /* Sprites */
ROM_LOAD( "sf_r01.bin", 0x2c000, 0x8000, 0xb1b7b925 )
ROM_LOAD( "sf_r04.bin", 0x34000, 0x8000, 0x422d946b )
ROM_LOAD( "sf_r02.bin", 0x3c000, 0x8000, 0x587113ae )
ROM_REGION(0x0300)
ROM_LOAD( "sf_col21.bin", 0x0000, 0x0100, 0xa0efaf99 )
ROM_LOAD( "sf_col20.bin", 0x0100, 0x0100, 0xa56d57e5 )
ROM_LOAD( "sf_col19.bin", 0x0200, 0x0100, 0x5cbf9fbf )
ROM_REGION(0x10000) /* 64k for the audio CPU */
ROM_LOAD( "sf_r05.bin", 0x0000, 0x2000, 0x87f4705a )
ROM_END
ROM_START( slapbtjp_rom )
ROM_REGION(0x18000)
ROM_LOAD( "sf_r19jb.bin", 0x00000, 0x8000, 0x9a7ac8b3 )
ROM_LOAD( "sf_rh.bin", 0x10000, 0x8000, 0x3c42e4a7 ) /* banked at 8000 */
ROM_REGION_DISPOSE(0x44000)
ROM_LOAD( "sf_r11.bin", 0x00000, 0x2000, 0x2ac7b943 ) /* Chars */
ROM_LOAD( "sf_r10.bin", 0x02000, 0x2000, 0x33cadc93 )
ROM_LOAD( "sf_r06.bin", 0x04000, 0x8000, 0xb6358305 ) /* Tiles */
ROM_LOAD( "sf_r09.bin", 0x0c000, 0x8000, 0xe92d9d60 )
ROM_LOAD( "sf_r08.bin", 0x14000, 0x8000, 0x5faeeea3 )
ROM_LOAD( "sf_r07.bin", 0x1c000, 0x8000, 0x974e2ea9 )
ROM_LOAD( "sf_r03.bin", 0x24000, 0x8000, 0x8545d397 ) /* Sprites */
ROM_LOAD( "sf_r01.bin", 0x2c000, 0x8000, 0xb1b7b925 )
ROM_LOAD( "sf_r04.bin", 0x34000, 0x8000, 0x422d946b )
ROM_LOAD( "sf_r02.bin", 0x3c000, 0x8000, 0x587113ae )
ROM_REGION(0x0300)
ROM_LOAD( "sf_col21.bin", 0x0000, 0x0100, 0xa0efaf99 )
ROM_LOAD( "sf_col20.bin", 0x0100, 0x0100, 0xa56d57e5 )
ROM_LOAD( "sf_col19.bin", 0x0200, 0x0100, 0x5cbf9fbf )
ROM_REGION(0x10000) /* 64k for the audio CPU */
ROM_LOAD( "sf_r05.bin", 0x0000, 0x2000, 0x87f4705a )
ROM_END
ROM_START( slapbtuk_rom )
ROM_REGION(0x18000)
ROM_LOAD( "sf_r19eb.bin", 0x00000, 0x4000, 0x2efe47af )
ROM_LOAD( "sf_r20eb.bin", 0x04000, 0x4000, 0xf42c7951 )
ROM_LOAD( "sf_rh.bin", 0x10000, 0x8000, 0x3c42e4a7 ) /* banked at 8000 */
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -