📄 sf1.c
字号:
4096,
4,
{ 4, 0, 4096*64*8+4, 4096*64*8 },
{ 0, 1, 2, 3, 8+0, 8+1, 8+2, 8+3,
16*16+0, 16*16+1, 16*16+2, 16*16+3, 16*16+8+0, 16*16+8+1, 16*16+8+2, 16*16+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
};
static struct GfxLayout sprite_layouts =
{
16,16,
14336,
4,
{ 4, 0, 14336*64*8+4, 14336*64*8 },
{ 0, 1, 2, 3, 8+0, 8+1, 8+2, 8+3,
16*16+0, 16*16+1, 16*16+2, 16*16+3, 16*16+8+0, 16*16+8+1, 16*16+8+2, 16*16+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
};
static struct GfxDecodeInfo gfxdecodeinfo[] =
{
{ 1, 0x000000, &sprite_layout1, 256, 16 },
{ 1, 0x100000, &sprite_layout2, 0, 16 },
{ 1, 0x180000, &sprite_layouts, 512, 16 },
{ 1, 0x340000, &char_layout, 768, 64 },
{ -1 }
};
static void irq_handler(void)
{
cpu_cause_interrupt(1,0xff);
}
static struct YM2151interface ym2151_interface =
{
1, /* 1 chip */
3579545, /* ? xtal is 3.579545MHz */
{ 60 },
{ irq_handler }
};
static struct MachineDriver machine_driver =
{
{
{
CPU_M68000,
8000000, /* 8 MHz ? (xtal is 16MHz) */
0,
readmem,writemem,0,0,
sf1_interrupt,1
},
{
CPU_Z80 | CPU_AUDIO_CPU,
3579545, /* ? xtal is 3.579545MHz */
3, /* memory region #3 */
sound_readmem,sound_writemem,0,0,
ignore_interrupt,0 /* IRQs are caused by the YM2151 */
/* NMIs are caused by the main CPU */
}
},
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 */
48*8, 32*8, { 0*8, 48*8-1, 2*8, 30*8-1 },
gfxdecodeinfo,
1024, 1024,
0,
VIDEO_TYPE_RASTER | VIDEO_MODIFIES_PALETTE,
0,
0,
0,
sf1_vh_screenrefresh,
/* sound hardware */
SOUND_SUPPORTS_STEREO,0,0,0,
{
{
SOUND_YM2151,
&ym2151_interface
}
}
};
static struct MachineDriver machineus_driver =
{
{
{
CPU_M68000,
8000000, /* 8 MHz ? (xtal is 16MHz) */
0,
readmemus,writemem,0,0,
sf1_interrupt,1
},
{
CPU_Z80 | CPU_AUDIO_CPU,
3579545, /* ? xtal is 3.579545MHz */
3, /* memory region #3 */
sound_readmem,sound_writemem,0,0,
ignore_interrupt,0 /* IRQs are caused by the YM2151 */
/* NMIs are caused by the main CPU */
}
},
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 */
48*8, 32*8, { 0*8, 48*8-1, 2*8, 30*8-1 },
gfxdecodeinfo,
1024, 1024,
0,
VIDEO_TYPE_RASTER | VIDEO_MODIFIES_PALETTE,
0,
0,
0,
sf1_vh_screenrefresh,
/* sound hardware */
SOUND_SUPPORTS_STEREO,0,0,0,
{
{
SOUND_YM2151,
&ym2151_interface
}
}
};
static struct MachineDriver machinejp_driver =
{
{
{
CPU_M68000,
8000000, /* 8 MHz ? (xtal is 16MHz) */
0,
readmemjp,writemem,0,0,
sf1_interrupt,1
},
{
CPU_Z80 | CPU_AUDIO_CPU,
3579545, /* ? xtal is 3.579545MHz */
3, /* memory region #3 */
sound_readmem,sound_writemem,0,0,
ignore_interrupt,0 /* IRQs are caused by the YM2151 */
/* NMIs are caused by the main CPU */
}
},
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 */
48*8, 32*8, { 0*8, 48*8-1, 2*8, 30*8-1 },
gfxdecodeinfo,
1024, 1024,
0,
VIDEO_TYPE_RASTER | VIDEO_MODIFIES_PALETTE,
0,
0,
0,
sf1_vh_screenrefresh,
/* sound hardware */
SOUND_SUPPORTS_STEREO,0,0,0,
{
{
SOUND_YM2151,
&ym2151_interface
}
}
};
ROM_START( sf1_rom )
ROM_REGION(0x60000)
ROM_LOAD_EVEN("sfe-19", 0x00000, 0x10000, 0x8346c3ca )
ROM_LOAD_ODD ("sfe-22", 0x00000, 0x10000, 0x3a4bfaa8 )
ROM_LOAD_EVEN("sfe-20", 0x20000, 0x10000, 0xb40e67ee )
ROM_LOAD_ODD ("sfe-23", 0x20000, 0x10000, 0x477c3d5b )
ROM_LOAD_EVEN("sfe-21", 0x40000, 0x10000, 0x2547192b )
ROM_LOAD_ODD ("sfe-24", 0x40000, 0x10000, 0x79680f4e )
ROM_REGION_DISPOSE(0x344000) /* temporary space for graphics (disposed after conversion) */
ROM_LOAD( "sf-25.bin", 0x000000, 0x020000, 0x7f23042e ) /* Background 1 planes 0-1 */
ROM_LOAD( "sf-28.bin", 0x020000, 0x020000, 0x92f8b91c )
ROM_LOAD( "sf-30.bin", 0x040000, 0x020000, 0xb1399856 )
ROM_LOAD( "sf-34.bin", 0x060000, 0x020000, 0x96b6ae2e )
ROM_LOAD( "sf-26.bin", 0x080000, 0x020000, 0x54ede9f5 ) /* planes 2-3 */
ROM_LOAD( "sf-29.bin", 0x0a0000, 0x020000, 0xf0649a67 )
ROM_LOAD( "sf-31.bin", 0x0c0000, 0x020000, 0x8f4dd71a )
ROM_LOAD( "sf-35.bin", 0x0e0000, 0x020000, 0x70c00fb4 )
ROM_LOAD( "sf-39.bin", 0x100000, 0x020000, 0xcee3d292 ) /* Background 2 planes 0-1*/
ROM_LOAD( "sf-38.bin", 0x120000, 0x020000, 0x2ea99676 )
ROM_LOAD( "sf-41.bin", 0x140000, 0x020000, 0xe0280495 ) /* planes 2-3 */
ROM_LOAD( "sf-40.bin", 0x160000, 0x020000, 0xc70b30de )
ROM_LOAD( "sf-15.bin", 0x180000, 0x020000, 0xfc0113db ) /* Sprites planes 1-2 */
ROM_LOAD( "sf-16.bin", 0x1a0000, 0x020000, 0x82e4a6d3 )
ROM_LOAD( "sf-11.bin", 0x1c0000, 0x020000, 0xe112df1b )
ROM_LOAD( "sf-12.bin", 0x1e0000, 0x020000, 0x42d52299 )
ROM_LOAD( "sf-07.bin", 0x200000, 0x020000, 0x49f340d9 )
ROM_LOAD( "sf-08.bin", 0x220000, 0x020000, 0x95ece9b1 )
ROM_LOAD( "sf-03.bin", 0x240000, 0x020000, 0x5ca05781 )
ROM_LOAD( "sf-17.bin", 0x260000, 0x020000, 0x69fac48e ) /* planes 2-3 */
ROM_LOAD( "sf-18.bin", 0x280000, 0x020000, 0x71cfd18d )
ROM_LOAD( "sf-13.bin", 0x2a0000, 0x020000, 0xfa2eb24b )
ROM_LOAD( "sf-14.bin", 0x2c0000, 0x020000, 0xad955c95 )
ROM_LOAD( "sf-09.bin", 0x2e0000, 0x020000, 0x41b73a31 )
ROM_LOAD( "sf-10.bin", 0x300000, 0x020000, 0x91c41c50 )
ROM_LOAD( "sf-05.bin", 0x320000, 0x020000, 0x538c7cbe )
ROM_LOAD( "sf-27.bin", 0x340000, 0x004000, 0x2b09b36d ) /* Characters planes 1-2 */
ROM_REGION(0x40000) /* Backgrounds */
ROM_LOAD( "sf-37.bin", 0x000000, 0x010000, 0x23d09d3d )
ROM_LOAD( "sf-36.bin", 0x010000, 0x010000, 0xea16df6c )
ROM_LOAD( "sf-32.bin", 0x020000, 0x010000, 0x72df2bd9 )
ROM_LOAD( "sf-33.bin", 0x030000, 0x010000, 0x3e99d3d5 )
ROM_REGION(0x10000) /* 64k for the music CPU */
ROM_LOAD( "sf-02.bin", 0x0000, 0x8000, 0x4a9ac534 )
ROM_REGION(0x40000) /* 256k for the samples CPU */
ROM_LOAD( "sfu-00", 0x00000, 0x20000, 0xa7cce903 )
ROM_LOAD( "sf-01.bin", 0x20000, 0x20000, 0x86e0f0d5 )
ROM_END
ROM_START( sf1us_rom )
ROM_REGION(0x60000)
ROM_LOAD_EVEN("sfd-19", 0x00000, 0x10000, 0xfaaf6255 )
ROM_LOAD_ODD ("sfd-22", 0x00000, 0x10000, 0xe1fe3519 )
ROM_LOAD_EVEN("sfd-20", 0x20000, 0x10000, 0x44b915bd )
ROM_LOAD_ODD ("sfd-23", 0x20000, 0x10000, 0x79c43ff8 )
ROM_LOAD_EVEN("sfd-21", 0x40000, 0x10000, 0xe8db799b )
ROM_LOAD_ODD ("sfd-24", 0x40000, 0x10000, 0x466a3440 )
ROM_REGION_DISPOSE(0x344000) /* temporary space for graphics (disposed after conversion) */
ROM_LOAD( "sf-25.bin", 0x000000, 0x020000, 0x7f23042e ) /* Background 1 planes 0-1 */
ROM_LOAD( "sf-28.bin", 0x020000, 0x020000, 0x92f8b91c )
ROM_LOAD( "sf-30.bin", 0x040000, 0x020000, 0xb1399856 )
ROM_LOAD( "sf-34.bin", 0x060000, 0x020000, 0x96b6ae2e )
ROM_LOAD( "sf-26.bin", 0x080000, 0x020000, 0x54ede9f5 ) /* planes 2-3 */
ROM_LOAD( "sf-29.bin", 0x0a0000, 0x020000, 0xf0649a67 )
ROM_LOAD( "sf-31.bin", 0x0c0000, 0x020000, 0x8f4dd71a )
ROM_LOAD( "sf-35.bin", 0x0e0000, 0x020000, 0x70c00fb4 )
ROM_LOAD( "sf-39.bin", 0x100000, 0x020000, 0xcee3d292 ) /* Background 2 planes 0-1*/
ROM_LOAD( "sf-38.bin", 0x120000, 0x020000, 0x2ea99676 )
ROM_LOAD( "sf-41.bin", 0x140000, 0x020000, 0xe0280495 ) /* planes 2-3 */
ROM_LOAD( "sf-40.bin", 0x160000, 0x020000, 0xc70b30de )
ROM_LOAD( "sf-15.bin", 0x180000, 0x020000, 0xfc0113db ) /* Sprites planes 1-2 */
ROM_LOAD( "sf-16.bin", 0x1a0000, 0x020000, 0x82e4a6d3 )
ROM_LOAD( "sf-11.bin", 0x1c0000, 0x020000, 0xe112df1b )
ROM_LOAD( "sf-12.bin", 0x1e0000, 0x020000, 0x42d52299 )
ROM_LOAD( "sf-07.bin", 0x200000, 0x020000, 0x49f340d9 )
ROM_LOAD( "sf-08.bin", 0x220000, 0x020000, 0x95ece9b1 )
ROM_LOAD( "sf-03.bin", 0x240000, 0x020000, 0x5ca05781 )
ROM_LOAD( "sf-17.bin", 0x260000, 0x020000, 0x69fac48e ) /* planes 2-3 */
ROM_LOAD( "sf-18.bin", 0x280000, 0x020000, 0x71cfd18d )
ROM_LOAD( "sf-13.bin", 0x2a0000, 0x020000, 0xfa2eb24b )
ROM_LOAD( "sf-14.bin", 0x2c0000, 0x020000, 0xad955c95 )
ROM_LOAD( "sf-09.bin", 0x2e0000, 0x020000, 0x41b73a31 )
ROM_LOAD( "sf-10.bin", 0x300000, 0x020000, 0x91c41c50 )
ROM_LOAD( "sf-05.bin", 0x320000, 0x020000, 0x538c7cbe )
ROM_LOAD( "sf-27.bin", 0x340000, 0x004000, 0x2b09b36d ) /* Characters planes 1-2 */
ROM_REGION(0x40000) /* Backgrounds */
ROM_LOAD( "sf-37.bin", 0x000000, 0x010000, 0x23d09d3d )
ROM_LOAD( "sf-36.bin", 0x010000, 0x010000, 0xea16df6c )
ROM_LOAD( "sf-32.bin", 0x020000, 0x010000, 0x72df2bd9 )
ROM_LOAD( "sf-33.bin", 0x030000, 0x010000, 0x3e99d3d5 )
ROM_REGION(0x10000) /* 64k for the music CPU */
ROM_LOAD( "sf-02.bin", 0x0000, 0x8000, 0x4a9ac534 )
ROM_REGION(0x40000) /* 256k for the samples CPU */
ROM_LOAD( "sfu-00", 0x00000, 0x20000, 0xa7cce903 )
ROM_LOAD( "sf-01.bin", 0x20000, 0x20000, 0x86e0f0d5 )
ROM_END
ROM_START( sf1jp_rom )
ROM_REGION(0x60000)
ROM_LOAD_EVEN("sf-19.bin", 0x00000, 0x10000, 0x116027d7 )
ROM_LOAD_ODD ("sf-22.bin", 0x00000, 0x10000, 0xd3cbd09e )
ROM_LOAD_EVEN("sf-20.bin", 0x20000, 0x10000, 0xfe07e83f )
ROM_LOAD_ODD ("sf-23.bin", 0x20000, 0x10000, 0x1e435d33 )
ROM_LOAD_EVEN("sf-21.bin", 0x40000, 0x10000, 0xe086bc4c )
ROM_LOAD_ODD ("sf-24.bin", 0x40000, 0x10000, 0x13a6696b )
ROM_REGION_DISPOSE(0x344000) /* temporary space for graphics (disposed after conversion) */
ROM_LOAD( "sf-25.bin", 0x000000, 0x020000, 0x7f23042e ) /* Background 1 planes 0-1 */
ROM_LOAD( "sf-28.bin", 0x020000, 0x020000, 0x92f8b91c )
ROM_LOAD( "sf-30.bin", 0x040000, 0x020000, 0xb1399856 )
ROM_LOAD( "sf-34.bin", 0x060000, 0x020000, 0x96b6ae2e )
ROM_LOAD( "sf-26.bin", 0x080000, 0x020000, 0x54ede9f5 ) /* planes 2-3 */
ROM_LOAD( "sf-29.bin", 0x0a0000, 0x020000, 0xf0649a67 )
ROM_LOAD( "sf-31.bin", 0x0c0000, 0x020000, 0x8f4dd71a )
ROM_LOAD( "sf-35.bin", 0x0e0000, 0x020000, 0x70c00fb4 )
ROM_LOAD( "sf-39.bin", 0x100000, 0x020000, 0xcee3d292 ) /* Background 2 planes 0-1*/
ROM_LOAD( "sf-38.bin", 0x120000, 0x020000, 0x2ea99676 )
ROM_LOAD( "sf-41.bin", 0x140000, 0x020000, 0xe0280495 ) /* planes 2-3 */
ROM_LOAD( "sf-40.bin", 0x160000, 0x020000, 0xc70b30de )
ROM_LOAD( "sf-15.bin", 0x180000, 0x020000, 0xfc0113db ) /* Sprites planes 1-2 */
ROM_LOAD( "sf-16.bin", 0x1a0000, 0x020000, 0x82e4a6d3 )
ROM_LOAD( "sf-11.bin", 0x1c0000, 0x020000, 0xe112df1b )
ROM_LOAD( "sf-12.bin", 0x1e0000, 0x020000, 0x42d52299 )
ROM_LOAD( "sf-07.bin", 0x200000, 0x020000, 0x49f340d9 )
ROM_LOAD( "sf-08.bin", 0x220000, 0x020000, 0x95ece9b1 )
ROM_LOAD( "sf-03.bin", 0x240000, 0x020000, 0x5ca05781 )
ROM_LOAD( "sf-17.bin", 0x260000, 0x020000, 0x69fac48e ) /* planes 2-3 */
ROM_LOAD( "sf-18.bin", 0x280000, 0x020000, 0x71cfd18d )
ROM_LOAD( "sf-13.bin", 0x2a0000, 0x020000, 0xfa2eb24b )
ROM_LOAD( "sf-14.bin", 0x2c0000, 0x020000, 0xad955c95 )
ROM_LOAD( "sf-09.bin", 0x2e0000, 0x020000, 0x41b73a31 )
ROM_LOAD( "sf-10.bin", 0x300000, 0x020000, 0x91c41c50 )
ROM_LOAD( "sf-05.bin", 0x320000, 0x020000, 0x538c7cbe )
ROM_LOAD( "sf-27.bin", 0x340000, 0x004000, 0x2b09b36d ) /* Characters planes 1-2 */
ROM_REGION(0x40000) /* Backgrounds */
ROM_LOAD( "sf-37.bin", 0x000000, 0x010000, 0x23d09d3d )
ROM_LOAD( "sf-36.bin", 0x010000, 0x010000, 0xea16df6c )
ROM_LOAD( "sf-32.bin", 0x020000, 0x010000, 0x72df2bd9 )
ROM_LOAD( "sf-33.bin", 0x030000, 0x010000, 0x3e99d3d5 )
ROM_REGION(0x10000) /* 64k for the music CPU */
ROM_LOAD( "sf-02.bin", 0x0000, 0x8000, 0x4a9ac534 )
ROM_REGION(0x40000) /* 256k for the samples CPU */
ROM_LOAD( "sf-00.bin", 0x00000, 0x20000, 0x4b733845 )
ROM_LOAD( "sf-01.bin", 0x20000, 0x20000, 0x86e0f0d5 )
ROM_END
struct GameDriver sf1_driver =
{
__FILE__,
0,
"sf1",
"Street Fighter (World)",
"1987",
"Capcom",
"Olivier Galibert",
0,
&machine_driver,
0,
sf1_rom,
0,0,0,0,
sf1_input_ports,
0,0,0,
ORIENTATION_DEFAULT,
0,0
};
struct GameDriver sf1us_driver =
{
__FILE__,
&sf1_driver,
"sf1us",
"Street Fighter (US)",
"1987",
"Capcom",
"Olivier Galibert",
0,
&machineus_driver,
0,
sf1us_rom,
0,0,0,0,
sf1us_input_ports,
0,0,0,
ORIENTATION_DEFAULT,
0,0
};
struct GameDriver sf1jp_driver =
{
__FILE__,
&sf1_driver,
"sf1jp",
"Street Fighter (Japan)",
"1987",
"Capcom",
"Olivier Galibert",
0,
&machinejp_driver,
0,
sf1jp_rom,
0,0,0,0,
sf1jp_input_ports,
0,0,0,
ORIENTATION_DEFAULT,
0,0
};
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -