Example #1
0
INPUT_PORTS_END

/* Machine driver */
void galeb_state::galeb(machine_config &config)
{
	/* basic machine hardware */
	M6502(config, m_maincpu, 1000000);
	m_maincpu->set_addrmap(AS_PROGRAM, &galeb_state::galeb_mem);

	/* video hardware */
	screen_device &screen(SCREEN(config, "screen", SCREEN_TYPE_RASTER));
	screen.set_refresh_hz(50);
	screen.set_vblank_time(ATTOSECONDS_IN_USEC(2500)); /* not accurate */
	screen.set_size(48*8, 16*8);
	screen.set_visarea(0, 48*8-1, 0, 16*8-1);
	screen.set_screen_update(FUNC(galeb_state::screen_update_galeb));
	screen.set_palette(m_palette);

	GFXDECODE(config, m_gfxdecode, m_palette, gfx_galeb);

	PALETTE(config, m_palette, palette_device::MONOCHROME);


	/* audio hardware */
	SPEAKER(config, "speaker").front_center();
	DAC_1BIT(config, m_dac, 0).add_route(ALL_OUTPUTS, "speaker", 0.0625); // unknown DAC
	voltage_regulator_device &vref(VOLTAGE_REGULATOR(config, "vref", 0));
	vref.set_output(5.0);
	vref.add_route(0, "dac", 1.0, DAC_VREF_POS_INPUT);
}
Example #2
0
void n8080_state::spacefev_sound(machine_config &config)
{
	MCFG_SOUND_START_OVERRIDE(n8080_state,spacefev)
	MCFG_SOUND_RESET_OVERRIDE(n8080_state,spacefev)

	/* basic machine hardware */
	I8035(config, m_audiocpu, 6000000);
	m_audiocpu->set_addrmap(AS_PROGRAM, &n8080_state::n8080_sound_cpu_map);
	m_audiocpu->t0_in_cb().set(FUNC(n8080_state::n8080_8035_t0_r));
	m_audiocpu->t1_in_cb().set(FUNC(n8080_state::n8080_8035_t1_r));
	m_audiocpu->p1_in_cb().set(FUNC(n8080_state::n8080_8035_p1_r));
	m_audiocpu->p2_out_cb().set(FUNC(n8080_state::n8080_dac_w));

	TIMER(config, "vco_timer").configure_periodic(FUNC(n8080_state::spacefev_vco_voltage_timer), attotime::from_hz(1000));

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

	DAC_1BIT(config, m_n8080_dac, 0).add_route(ALL_OUTPUTS, "speaker", 0.15);
	voltage_regulator_device &vref(VOLTAGE_REGULATOR(config, "vref", 0));
	vref.add_route(0, "n8080_dac", 1.0, DAC_VREF_POS_INPUT);

	SN76477(config, m_sn);
	m_sn->set_noise_params(RES_K(36), RES_K(150), CAP_N(1));
	m_sn->set_decay_res(RES_M(1));
	m_sn->set_attack_params(CAP_U(1.0), RES_K(20));
	m_sn->set_amp_res(RES_K(150));
	m_sn->set_feedback_res(RES_K(47));
	m_sn->set_vco_params(0, CAP_N(1), RES_M(1.5));
	m_sn->set_pitch_voltage(0);
	m_sn->set_slf_params(CAP_N(47), RES_M(1));
	m_sn->set_oneshot_params(CAP_N(47), RES_K(820));
	m_sn->set_vco_mode(0);
	m_sn->set_mixer_params(0, 0, 0);
	m_sn->set_envelope_params(1, 0);
	m_sn->set_enable(1);
	m_sn->add_route(ALL_OUTPUTS, "speaker", 0.35);
}
Example #3
0
void hp48_state::hp48_common(machine_config &config)
{
	/* cpu */
	SATURN(config, m_maincpu, 3937007); /* almost 4 MHz */
	m_maincpu->set_addrmap(AS_PROGRAM, &hp48_state::hp48);
	m_maincpu->out_func().set(FUNC(hp48_state::reg_out));
	m_maincpu->in_func().set(FUNC(hp48_state::reg_in));
	m_maincpu->reset_func().set(FUNC(hp48_state::mem_reset));
	m_maincpu->config_func().set(FUNC(hp48_state::mem_config));
	m_maincpu->unconfig_func().set(FUNC(hp48_state::mem_unconfig));
	m_maincpu->id_func().set(FUNC(hp48_state::mem_id));
	m_maincpu->crc_func().set(FUNC(hp48_state::mem_crc));
	m_maincpu->rsi_func().set(FUNC(hp48_state::rsi));

	/* memory */
	NVRAM(config, "nvram", nvram_device::DEFAULT_ALL_0);

	/* video */
	SCREEN(config, m_screen, SCREEN_TYPE_RASTER);
	m_screen->set_refresh_hz(64);
	m_screen->set_vblank_time(0);
	m_screen->set_size(131, 64);
	m_screen->set_visarea(0, 130, 0, 63);
	m_screen->set_screen_update(FUNC(hp48_state::screen_update_hp48));
	m_screen->set_palette(m_palette);

	/* monochrome, but with varying contrast and grayscale */
	PALETTE(config, m_palette, 256).set_init(FUNC(hp48_state::palette_init_hp48));

	/* sound */
	SPEAKER(config, "speaker").front_center();
	DAC_1BIT(config, m_dac, 0).add_route(ALL_OUTPUTS, "speaker", 0.5);
	voltage_regulator_device &vref(VOLTAGE_REGULATOR(config, "vref", 0));
	vref.set_output(5.0);
	vref.add_route(0, "dac", 1.0, DAC_VREF_POS_INPUT);
}