コード例 #1
0
ファイル: raiden.cpp プロジェクト: fesh0r/mame-full
void raiden_state::raidene(machine_config &config)
{
	raiden(config);
	subdevice<z80_device>("audiocpu")->set_addrmap(AS_PROGRAM, &raiden_state::raiden_sound_map);
	subdevice<z80_device>("audiocpu")->set_addrmap(AS_OPCODES, &raiden_state::raiden_sound_decrypted_opcodes_map);

	sei80bu_device &sei80bu(SEI80BU(config, "sei80bu", 0));
	sei80bu.set_addrmap(AS_PROGRAM, &raiden_state::sei80bu_encrypted_full_map);
}
コード例 #2
0
ファイル: deadang.cpp プロジェクト: PugsyMAME/mame
void deadang_state::deadang(machine_config &config)
{
	/* basic machine hardware */
	V30(config, m_maincpu, XTAL(16'000'000)/2); /* Sony 8623h9 CXQ70116D-8 (V30 compatible) */
	m_maincpu->set_addrmap(AS_PROGRAM, &deadang_state::main_map);
	TIMER(config, "scantimer1").configure_scanline(FUNC(deadang_state::main_scanline), "screen", 0, 1);

	V30(config, m_subcpu, XTAL(16'000'000)/2); /* Sony 8623h9 CXQ70116D-8 (V30 compatible) */
	m_subcpu->set_addrmap(AS_PROGRAM, &deadang_state::sub_map);
	TIMER(config, "scantimer2").configure_scanline(FUNC(deadang_state::sub_scanline), "screen", 0, 1);

	Z80(config, m_audiocpu, XTAL(14'318'181)/4);
	m_audiocpu->set_addrmap(AS_PROGRAM, &deadang_state::sound_map);
	m_audiocpu->set_addrmap(AS_OPCODES, &deadang_state::sound_decrypted_opcodes_map);
	m_audiocpu->set_irq_acknowledge_callback("seibu_sound", FUNC(seibu_sound_device::im0_vector_cb));

	SEI80BU(config, "sei80bu", 0).set_device_rom_tag("audiocpu");

	config.m_minimum_quantum = attotime::from_hz(60); // the game stops working with higher interleave rates..

	WATCHDOG_TIMER(config, "watchdog");

	/* video hardware */
	SCREEN(config, m_screen, SCREEN_TYPE_RASTER);
	m_screen->set_refresh_hz(60);
	m_screen->set_vblank_time(ATTOSECONDS_IN_USEC(2500)); /* not accurate */
	m_screen->set_size(32*8, 32*8);
	m_screen->set_visarea(0*8, 32*8-1, 2*8, 30*8-1);
	m_screen->set_screen_update(FUNC(deadang_state::screen_update));
	m_screen->set_palette(m_palette);

	GFXDECODE(config, m_gfxdecode, m_palette, gfx_deadang);
	PALETTE(config, m_palette).set_format(palette_device::xBGR_444, 2048);

	/* sound hardware */
	SPEAKER(config, "mono").front_center();

	SEIBU_SOUND(config, m_seibu_sound, 0);
	m_seibu_sound->int_callback().set_inputline(m_audiocpu, 0);
	m_seibu_sound->set_rom_tag("audiocpu");
	m_seibu_sound->set_rombank_tag("seibu_bank1");
	m_seibu_sound->ym_read_callback().set("ym1", FUNC(ym2203_device::read));
	m_seibu_sound->ym_write_callback().set("ym1", FUNC(ym2203_device::write));

	ym2203_device &ym1(YM2203(config, "ym1", XTAL(14'318'181)/4));
	ym1.irq_handler().set("seibu_sound", FUNC(seibu_sound_device::fm_irqhandler));
	ym1.add_route(ALL_OUTPUTS, "mono", 0.15);

	ym2203_device &ym2(YM2203(config, "ym2", XTAL(14'318'181)/4));
	ym2.add_route(ALL_OUTPUTS, "mono", 0.15);

	SEIBU_ADPCM(config, m_adpcm1, 8000).add_route(ALL_OUTPUTS, "mono", 0.40);

	SEIBU_ADPCM(config, m_adpcm2, 8000).add_route(ALL_OUTPUTS, "mono", 0.40);
}