Beispiel #1
0
	// 0x80 eeprom read bit
INPUT_PORTS_END

void timetrv_state::timetrv(machine_config &config)
{
	/* basic machine hardware */
	I80188(config, m_maincpu, 20000000); //???
	m_maincpu->set_addrmap(AS_PROGRAM, &timetrv_state::timetrv_map);
	m_maincpu->set_addrmap(AS_IO, &timetrv_state::timetrv_io);
	// interrupts are generated by internally-driven timers

	EEPROM_2816(config, "eeprom");

	i8255_device &ppi1(I8255(config, "ppi1"));
	ppi1.in_pa_callback().set(FUNC(timetrv_state::test1_r)); //inputs
	ppi1.in_pb_callback().set(FUNC(timetrv_state::test2_r)); //eeprom read bit + inputs

	i8255_device &ppi2(I8255(config, "ppi2"));
	ppi2.in_pa_callback().set(FUNC(timetrv_state::in_r)); //dsw
	ppi2.in_pb_callback().set(FUNC(timetrv_state::in_r)); //dsw
	ppi2.in_pc_callback().set(FUNC(timetrv_state::in_r)); //dsw

	NS16450(config, "uart", 1843200); // P82050 (serial interface for laserdisc)

	/* video hardware */
	screen_device &screen(SCREEN(config, "screen", SCREEN_TYPE_RASTER));
	screen.set_refresh_hz(60);
	screen.set_vblank_time(ATTOSECONDS_IN_USEC(0));
	screen.set_size(512, 512);
	screen.set_visarea(0*8, 512-1, 0*8, 512-1);
	screen.set_screen_update(FUNC(timetrv_state::screen_update_timetrv));

	PALETTE(config, "palette").set_entries(512);

	/* sound hardware */
}
Beispiel #2
0
GFXDECODE_END


void mbc200_state::mbc200(machine_config &config)
{
	/* basic machine hardware */
	Z80(config, m_maincpu, 8_MHz_XTAL / 2); // NEC D780C-1
	m_maincpu->set_addrmap(AS_PROGRAM, &mbc200_state::mbc200_mem);
	m_maincpu->set_addrmap(AS_IO, &mbc200_state::mbc200_io);

	z80_device &subcpu(Z80(config, "subcpu", 8_MHz_XTAL / 2)); // NEC D780C-1
	subcpu.set_addrmap(AS_PROGRAM, &mbc200_state::mbc200_sub_mem);
	subcpu.set_addrmap(AS_IO, &mbc200_state::mbc200_sub_io);

	/* 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(640, 400);
	screen.set_visarea(0, 640-1, 0, 400-1);
	screen.set_screen_update("crtc", FUNC(hd6845s_device::screen_update));
	GFXDECODE(config, "gfxdecode", m_palette, gfx_mbc200);
	PALETTE(config, m_palette, palette_device::MONOCHROME);

	HD6845S(config, m_crtc, 8_MHz_XTAL / 4); // HD46505SP
	m_crtc->set_screen("screen");
	m_crtc->set_show_border_area(false);
	m_crtc->set_char_width(8);
	m_crtc->set_update_row_callback(FUNC(mbc200_state::update_row), this);

	// sound
	SPEAKER(config, "mono").front_center();
	BEEP(config, m_beep, 1000).add_route(ALL_OUTPUTS, "mono", 0.50); // frequency unknown
	SPEAKER_SOUND(config, m_speaker).add_route(ALL_OUTPUTS, "mono", 0.50);

	I8255(config, "ppi_1").out_pc_callback().set(FUNC(mbc200_state::p1_portc_w));
	I8255(config, "ppi_2").in_pa_callback().set(FUNC(mbc200_state::p2_porta_r));

	I8255(config, m_ppi_m);
	m_ppi_m->out_pa_callback().set(FUNC(mbc200_state::pm_porta_w));
	m_ppi_m->out_pb_callback().set(FUNC(mbc200_state::pm_portb_w));

	I8251(config, "uart1", 0); // INS8251N

	I8251(config, "uart2", 0); // INS8251A

	MB8876(config, m_fdc, 8_MHz_XTAL / 8); // guess
	FLOPPY_CONNECTOR(config, "fdc:0", mbc200_floppies, "qd", floppy_image_device::default_floppy_formats).enable_sound(true);
	FLOPPY_CONNECTOR(config, "fdc:1", mbc200_floppies, "qd", floppy_image_device::default_floppy_formats).enable_sound(true);

	/* Keyboard */
	generic_keyboard_device &keyboard(GENERIC_KEYBOARD(config, "keyboard", 0));
	keyboard.set_keyboard_callback(FUNC(mbc200_state::kbd_put));

	/* software lists */
	SOFTWARE_LIST(config, "flop_list").set_original("mbc200");
}
Beispiel #3
0
void pg685_state::pg685_module(machine_config &config)
{
	FD1797(config, m_fdc, XTAL(4'000'000) / 2); // divider guessed
	m_fdc->intrq_wr_callback().set("mainpic", FUNC(pic8259_device::ir4_w));

	I8255(config, "modppi1", 0);
	I8255(config, "modppi2", 0);

	I8251(config, "moduart", XTAL(4'000'000) / 2); // divider guessed

	MM58167(config, "rtc", XTAL(32'768));
}
Beispiel #4
0
void acorn_vib_device::device_add_mconfig(machine_config &config)
{
	INPUT_MERGER_ANY_HIGH(config, m_irqs).output_handler().set(FUNC(acorn_vib_device::irq_w));

	VIA6522(config, m_via6522, XTAL(1'000'000));
	m_via6522->writepa_handler().set("cent_data_out", FUNC(output_latch_device::bus_w));
	m_via6522->ca2_handler().set(m_centronics, FUNC(centronics_device::write_strobe));
	m_via6522->irq_handler().set(m_irqs, FUNC(input_merger_device::in_w<0>));

	CENTRONICS(config, m_centronics, centronics_devices, "printer");
	m_centronics->ack_handler().set(m_via6522, FUNC(via6522_device::write_ca1));
	m_centronics->busy_handler().set(m_via6522, FUNC(via6522_device::write_pa7));
	output_latch_device &cent_data_out(OUTPUT_LATCH(config, "cent_data_out"));
	m_centronics->set_output_latch(cent_data_out);

	I8255(config, m_ppi8255, 0);

	ACIA6850(config, m_acia, 0);
	m_acia->txd_handler().set(m_rs232, FUNC(rs232_port_device::write_txd));
	m_acia->rts_handler().set(m_rs232, FUNC(rs232_port_device::write_rts));
	m_acia->irq_handler().set(m_irqs, FUNC(input_merger_device::in_w<1>));

	RS232_PORT(config, m_rs232, default_rs232_devices, nullptr);
	m_rs232->rxd_handler().set(m_acia, FUNC(acia6850_device::write_rxd));
	m_rs232->cts_handler().set(m_acia, FUNC(acia6850_device::write_cts));
	m_rs232->dcd_handler().set(m_acia, FUNC(acia6850_device::write_dcd));

	CLOCK(config, m_acia_clock, 1.8432_MHz_XTAL);
	m_acia_clock->signal_handler().set(FUNC(acorn_vib_device::write_acia_clock));
}
Beispiel #5
0
void idsa_state::bsktbllp(machine_config &config)
{
	idsa(config);
	auto &aysnd1(*subdevice<ay8910_device>("aysnd1"));
	aysnd1.port_a_write_callback().set(FUNC(idsa_state::ppi_control_w));
	aysnd1.port_b_write_callback().set(FUNC(idsa_state::ppi_data_w));

	I8255(config, m_ppi[0]);
	m_ppi[0]->out_pa_callback().set(FUNC(idsa_state::ppi1_a_w));
	m_ppi[0]->out_pb_callback().set(FUNC(idsa_state::ppi1_b_w));
	m_ppi[0]->out_pc_callback().set(FUNC(idsa_state::ppi1_c_w));

	I8255(config, m_ppi[1]);
	m_ppi[1]->out_pa_callback().set(FUNC(idsa_state::ppi2_a_w));
	m_ppi[1]->out_pb_callback().set(FUNC(idsa_state::ppi2_b_w));
	m_ppi[1]->out_pc_callback().set(FUNC(idsa_state::ppi2_c_w));
}
Beispiel #6
0
void konin_state::konin(machine_config &config)
{
	/* basic machine hardware */
	i8080_cpu_device &maincpu(I8080(config, m_maincpu, XTAL(4'000'000)));
	maincpu.set_addrmap(AS_PROGRAM, &konin_state::konin_mem);
	maincpu.set_addrmap(AS_IO, &konin_state::konin_io);
	maincpu.out_inte_func().set(m_picu, FUNC(i8214_device::inte_w));
	maincpu.set_irq_acknowledge_callback(device_irq_acknowledge_delegate(FUNC(i8212_device::inta_cb), "intlatch", (i8212_device*)nullptr));

	i8212_device &intlatch(I8212(config, "intlatch", 0));
	intlatch.md_rd_callback().set_constant(0);
	intlatch.di_rd_callback().set(m_picu, FUNC(i8214_device::vector_r));
	intlatch.int_wr_callback().set_inputline("maincpu", I8085_INTR_LINE);

	I8214(config, m_picu, XTAL(4'000'000));
	m_picu->int_wr_callback().set("intlatch", FUNC(i8212_device::stb_w));

	pit8253_device &mainpit(PIT8253(config, "mainpit", 0));
	// wild guess at UART clock and source
	mainpit.set_clk<0>(1536000);
	mainpit.out_handler<0>().set("uart", FUNC(i8251_device::write_txc));
	mainpit.out_handler<0>().append("uart", FUNC(i8251_device::write_rxc));

	I8255(config, "mainppi", 0);

	PIT8253(config, m_iopit, 0);

	I8255(config, m_ioppi, 0);

	i8251_device &uart(I8251(config, "uart", 0));
	uart.txd_handler().set("rs232", FUNC(rs232_port_device::write_txd));
	uart.dtr_handler().set("rs232", FUNC(rs232_port_device::write_dtr));
	uart.rts_handler().set("rs232", FUNC(rs232_port_device::write_rts));
	uart.rxrdy_handler().set(FUNC(konin_state::picu_r3_w));

	rs232_port_device &rs232(RS232_PORT(config, "rs232", default_rs232_devices, "terminal"));
	rs232.rxd_handler().set("uart", FUNC(i8251_device::write_rxd));
	rs232.dsr_handler().set("uart", FUNC(i8251_device::write_dsr));
	rs232.cts_handler().set("uart", FUNC(i8251_device::write_cts));
}
Beispiel #7
0
void dmv_k220_device::device_add_mconfig(machine_config &config)
{
	I8255(config, m_ppi);
	m_ppi->out_pa_callback().set(FUNC(dmv_k220_device::porta_w));
	m_ppi->in_pb_callback().set_ioport("SWITCH");
	m_ppi->out_pc_callback().set(FUNC(dmv_k220_device::portc_w));

	PIT8253(config, m_pit, 0);
	m_pit->set_clk<0>(XTAL(1'000'000));  // CLK1
	m_pit->out_handler<0>().set(FUNC(dmv_k220_device::write_out0));
	m_pit->out_handler<1>().set(FUNC(dmv_k220_device::write_out1));
	m_pit->out_handler<2>().set(FUNC(dmv_k220_device::write_out2));
}
Beispiel #8
0
void v550_state::v550(machine_config &config)
{
	Z80(config, m_maincpu, 34.846_MHz_XTAL / 16); // NEC D780C (2.177875 MHz verified)
	m_maincpu->set_addrmap(AS_PROGRAM, &v550_state::mem_map);
	m_maincpu->set_addrmap(AS_IO, &v550_state::io_map);

	NVRAM(config, "nvram", nvram_device::DEFAULT_ALL_0); // NEC D444C-2 + battery

	upd7220_device &gdc(UPD7220(config, "gdc", 34.846_MHz_XTAL / 16)); // NEC D7220D (2.177875 MHz verified)
	gdc.set_screen("screen");

	I8255(config, "ppi"); // NEC D8255AC-5

	I8251(config, m_usart, 34.846_MHz_XTAL / 16); // NEC D8251AC
	m_usart->rxrdy_handler().set("mainint", FUNC(input_merger_device::in_w<1>));

	upd7201_new_device& mpsc(UPD7201_NEW(config, "mpsc", 34.846_MHz_XTAL / 16)); // NEC D7201C
	mpsc.out_int_callback().set("mainint", FUNC(input_merger_device::in_w<0>));

	INPUT_MERGER_ANY_HIGH(config, "mainint").output_handler().set_inputline(m_maincpu, INPUT_LINE_IRQ0);

	com8116_device &brg1(COM8116(config, "brg1", 5068800)); // actually SMC COM8116T-020 (unknown clock)
	brg1.ft_handler().set("mpsc", FUNC(upd7201_new_device::txca_w));
	brg1.fr_handler().set("mpsc", FUNC(upd7201_new_device::rxca_w));

	com8116_device &brg2(COM8116(config, "brg2", 5068800)); // actually SMC COM8116T-020
	brg2.ft_handler().set("mpsc", FUNC(upd7201_new_device::txcb_w));
	brg2.ft_handler().append("mpsc", FUNC(upd7201_new_device::rxcb_w));
	brg2.fr_handler().set("usart", FUNC(i8251_device::write_txc));
	brg2.fr_handler().append("usart", FUNC(i8251_device::write_rxc));

	mcs48_cpu_device &kbdmcu(I8035(config, "kbdmcu", 4'608'000));
	kbdmcu.set_addrmap(AS_PROGRAM, &v550_state::kbd_map);

	SCREEN(config, m_screen, SCREEN_TYPE_RASTER);
	m_screen->set_raw(34.846_MHz_XTAL, 19 * 102, 0, 19 * 80, 295, 0, 272);
	m_screen->set_screen_update(FUNC(v550_state::screen_update));

	scn2672_device &pvtc(SCN2672(config, "pvtc", 34.846_MHz_XTAL / 19));
	pvtc.set_addrmap(0, &v550_state::pvtc_char_map);
	pvtc.set_addrmap(1, &v550_state::pvtc_attr_map);
	pvtc.set_character_width(19);
	pvtc.intr_callback().set_inputline(m_maincpu, INPUT_LINE_NMI);
	pvtc.set_screen("screen");
	// SCB2673 clock verified at 17.423 MHz
}
Beispiel #9
0
void pulsar_state::pulsar(machine_config &config)
{
	/* basic machine hardware */
	Z80(config, m_maincpu, 4_MHz_XTAL);
	m_maincpu->set_addrmap(AS_PROGRAM, &pulsar_state::mem_map);
	m_maincpu->set_addrmap(AS_IO, &pulsar_state::io_map);
	m_maincpu->set_daisy_config(daisy_chain_intf);


	/* Devices */
	i8255_device &ppi(I8255(config, "ppi"));
	ppi.out_pa_callback().set(FUNC(pulsar_state::ppi_pa_w));
	ppi.out_pb_callback().set(FUNC(pulsar_state::ppi_pb_w));
	ppi.in_pc_callback().set(FUNC(pulsar_state::ppi_pc_r));
	ppi.out_pc_callback().set(FUNC(pulsar_state::ppi_pc_w));

	MSM5832(config, "rtc", 32.768_kHz_XTAL);

	z80dart_device& dart(Z80DART(config, "dart", 4_MHz_XTAL));
	dart.out_txda_callback().set("rs232", FUNC(rs232_port_device::write_txd));
	dart.out_dtra_callback().set("rs232", FUNC(rs232_port_device::write_dtr));
	dart.out_rtsa_callback().set("rs232", FUNC(rs232_port_device::write_rts));
	dart.out_int_callback().set_inputline(m_maincpu, INPUT_LINE_IRQ0);

	rs232_port_device &rs232(RS232_PORT(config, "rs232", default_rs232_devices, "terminal"));
	rs232.rxd_handler().set("dart", FUNC(z80dart_device::rxa_w));
	rs232.cts_handler().set("dart", FUNC(z80dart_device::ctsa_w));
	rs232.set_option_device_input_defaults("terminal", DEVICE_INPUT_DEFAULTS_NAME(terminal));

	com8116_device &brg(COM8116(config, "brg", 5.0688_MHz_XTAL));
	// Schematic has the labels for FT and FR the wrong way around, but the pin numbers are correct.
	brg.fr_handler().set("dart", FUNC(z80dart_device::txca_w));
	brg.fr_handler().append("dart", FUNC(z80dart_device::rxca_w));
	brg.ft_handler().set("dart", FUNC(z80dart_device::txcb_w));
	brg.ft_handler().append("dart", FUNC(z80dart_device::rxcb_w));

	FD1797(config, m_fdc, 4_MHz_XTAL / 2);
	FLOPPY_CONNECTOR(config, "fdc:0", pulsar_floppies, "flop", floppy_image_device::default_floppy_formats).enable_sound(true);
	FLOPPY_CONNECTOR(config, "fdc:1", pulsar_floppies, "flop", floppy_image_device::default_floppy_formats).enable_sound(true);
}
Beispiel #10
0
void witch_state::witch(machine_config &config)
{
	/* basic machine hardware */
	Z80(config, m_maincpu, CPU_CLOCK);    /* 3 MHz */
	m_maincpu->set_addrmap(AS_PROGRAM, &witch_state::witch_main_map);
	m_maincpu->set_vblank_int("screen", FUNC(witch_state::irq0_line_assert));

	/* 2nd z80 */
	Z80(config, m_subcpu, CPU_CLOCK);    /* 3 MHz */
	m_subcpu->set_addrmap(AS_PROGRAM, &witch_state::witch_sub_map);
	m_subcpu->set_vblank_int("screen", FUNC(witch_state::irq0_line_assert));

	config.m_minimum_quantum = attotime::from_hz(6000);

	NVRAM(config, "nvram", nvram_device::DEFAULT_ALL_0);

	TICKET_DISPENSER(config, m_hopper, attotime::from_msec(HOPPER_PULSE), TICKET_MOTOR_ACTIVE_HIGH, TICKET_STATUS_ACTIVE_HIGH);

	// 82C255 (actual chip on PCB) is equivalent to two 8255s
	I8255(config, m_ppi[0]);
	m_ppi[0]->in_pa_callback().set(FUNC(witch_state::read_a000));
	m_ppi[0]->in_pb_callback().set_ioport("UNK");
	m_ppi[0]->out_pc_callback().set(FUNC(witch_state::write_a002));

	I8255(config, m_ppi[1]);
	m_ppi[1]->in_pa_callback().set_ioport("A004");
	m_ppi[1]->in_pb_callback().set_ioport("A005");
	m_ppi[1]->out_pc_callback().set(FUNC(witch_state::write_a006));

	/* video hardware */
	screen_device &screen(SCREEN(config, "screen", SCREEN_TYPE_RASTER));
	screen.set_refresh_hz(60);
	screen.set_vblank_time(ATTOSECONDS_IN_USEC(0));
	screen.set_size(256, 256);
	screen.set_visarea(8, 256-1-8, 8*4, 256-8*4-1);
	screen.set_screen_update(FUNC(witch_state::screen_update));
	screen.set_palette(m_palette);

	GFXDECODE(config, m_gfxdecode, m_palette, gfx_witch);
	PALETTE(config, m_palette).set_format(palette_device::xBGR_555, 0x800);

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

	es8712_device &essnd(ES8712(config, "essnd", 0));
	essnd.msm_write_handler().set("msm", FUNC(msm5205_device::data_w));
	essnd.set_msm_tag("msm");

	msm5205_device &msm(MSM5205(config, "msm", MSM5202_CLOCK));   /* actually MSM5202 */
	msm.vck_legacy_callback().set("essnd", FUNC(es8712_device::msm_int));
	msm.set_prescaler_selector(msm5205_device::S48_4B); /* 8 kHz */
	msm.add_route(ALL_OUTPUTS, "mono", 1.0);

	ym2203_device &ym1(YM2203(config, "ym1", YM2203_CLOCK));     /* 3 MHz */
	ym1.port_a_read_callback().set_ioport("YM_PortA");
	ym1.port_b_read_callback().set_ioport("YM_PortB");
	ym1.add_route(ALL_OUTPUTS, "mono", 0.5);

	ym2203_device &ym2(YM2203(config, "ym2", YM2203_CLOCK));     /* 3 MHz */
	ym2.port_a_write_callback().set(FUNC(witch_state::xscroll_w));
	ym2.port_b_write_callback().set(FUNC(witch_state::yscroll_w));
	ym2.add_route(ALL_OUTPUTS, "mono", 0.5);
}
Beispiel #11
0
void iq151_state::iq151(machine_config &config)
{
	/* basic machine hardware */
	I8080(config, m_maincpu, XTAL(2'000'000));
	m_maincpu->set_addrmap(AS_PROGRAM, &iq151_state::iq151_mem);
	m_maincpu->set_addrmap(AS_IO, &iq151_state::iq151_io);
	m_maincpu->set_vblank_int("screen", FUNC(iq151_state::iq151_vblank_interrupt));
	m_maincpu->set_irq_acknowledge_callback("pic8259", FUNC(pic8259_device::inta_cb));

	/* video hardware */
	screen_device &screen(SCREEN(config, "screen", SCREEN_TYPE_RASTER, rgb_t::green()));
	screen.set_refresh_hz(50);
	screen.set_vblank_time(ATTOSECONDS_IN_USEC(2500)); /* not accurate */
	screen.set_screen_update(FUNC(iq151_state::screen_update));
	screen.set_size(64*8, 32*8);
	screen.set_visarea(0, 32*8-1, 0, 32*8-1);
	screen.set_palette("palette");

	PALETTE(config, "palette", palette_device::MONOCHROME);

	/* sound hardware */
	SPEAKER(config, "mono").front_center();
	SPEAKER_SOUND(config, m_speaker).add_route(ALL_OUTPUTS, "mono", 0.50);

	PIC8259(config, m_pic, 0);
	m_pic->out_int_callback().set_inputline(m_maincpu, 0);

	i8255_device &ppi(I8255(config, "ppi8255"));
	ppi.in_pa_callback().set(FUNC(iq151_state::keyboard_row_r));
	ppi.in_pb_callback().set(FUNC(iq151_state::keyboard_column_r));
	ppi.in_pc_callback().set(FUNC(iq151_state::ppi_portc_r));
	ppi.out_pc_callback().set(FUNC(iq151_state::ppi_portc_w));

	CASSETTE(config, m_cassette);
	m_cassette->set_default_state(CASSETTE_STOPPED);
	m_cassette->set_interface("iq151_cass");

	TIMER(config, "cassette_timer").configure_periodic(FUNC(iq151_state::cassette_timer), attotime::from_hz(2000));

	/* cartridge */
	IQ151CART_SLOT(config, m_carts[0], iq151_cart, nullptr);
	m_carts[0]->set_screen_tag("screen");
	m_carts[0]->out_irq0_callback().set(m_pic, FUNC(pic8259_device::ir0_w));
	m_carts[0]->out_irq1_callback().set(m_pic, FUNC(pic8259_device::ir1_w));
	m_carts[0]->out_irq2_callback().set(m_pic, FUNC(pic8259_device::ir2_w));
	m_carts[0]->out_irq3_callback().set(m_pic, FUNC(pic8259_device::ir3_w));
	m_carts[0]->out_irq4_callback().set(m_pic, FUNC(pic8259_device::ir4_w));
	IQ151CART_SLOT(config, m_carts[1], iq151_cart, nullptr);
	m_carts[1]->set_screen_tag("screen");
	m_carts[1]->out_irq0_callback().set(m_pic, FUNC(pic8259_device::ir0_w));
	m_carts[1]->out_irq1_callback().set(m_pic, FUNC(pic8259_device::ir1_w));
	m_carts[1]->out_irq2_callback().set(m_pic, FUNC(pic8259_device::ir2_w));
	m_carts[1]->out_irq3_callback().set(m_pic, FUNC(pic8259_device::ir3_w));
	m_carts[1]->out_irq4_callback().set(m_pic, FUNC(pic8259_device::ir4_w));
	IQ151CART_SLOT(config, m_carts[2], iq151_cart, nullptr);
	m_carts[2]->set_screen_tag("screen");
	m_carts[2]->out_irq0_callback().set(m_pic, FUNC(pic8259_device::ir0_w));
	m_carts[2]->out_irq1_callback().set(m_pic, FUNC(pic8259_device::ir1_w));
	m_carts[2]->out_irq2_callback().set(m_pic, FUNC(pic8259_device::ir2_w));
	m_carts[2]->out_irq3_callback().set(m_pic, FUNC(pic8259_device::ir3_w));
	m_carts[2]->out_irq4_callback().set(m_pic, FUNC(pic8259_device::ir4_w));
	IQ151CART_SLOT(config, m_carts[3], iq151_cart, nullptr);
	m_carts[3]->set_screen_tag("screen");
	m_carts[3]->out_irq0_callback().set(m_pic, FUNC(pic8259_device::ir0_w));
	m_carts[3]->out_irq1_callback().set(m_pic, FUNC(pic8259_device::ir1_w));
	m_carts[3]->out_irq2_callback().set(m_pic, FUNC(pic8259_device::ir2_w));
	m_carts[3]->out_irq3_callback().set(m_pic, FUNC(pic8259_device::ir3_w));
	m_carts[3]->out_irq4_callback().set(m_pic, FUNC(pic8259_device::ir4_w));
	IQ151CART_SLOT(config, m_carts[4], iq151_cart, "video32");
	m_carts[4]->set_screen_tag("screen");
	m_carts[4]->out_irq0_callback().set(m_pic, FUNC(pic8259_device::ir0_w));
	m_carts[4]->out_irq1_callback().set(m_pic, FUNC(pic8259_device::ir1_w));
	m_carts[4]->out_irq2_callback().set(m_pic, FUNC(pic8259_device::ir2_w));
	m_carts[4]->out_irq3_callback().set(m_pic, FUNC(pic8259_device::ir3_w));
	m_carts[4]->out_irq4_callback().set(m_pic, FUNC(pic8259_device::ir4_w));

	/* Software lists */
	SOFTWARE_LIST(config, "cart_list").set_original("iq151_cart");
	SOFTWARE_LIST(config, "flop_list").set_original("iq151_flop");
}
Beispiel #12
0
/*
  On the PC Jr the input for clock 1 seems to be selectable
  based on bit 4(/5?) written to output port A0h. This is not
  supported yet.
 */
	PIT8253(config, m_pit8253, 0);
	m_pit8253->set_clk<0>(XTAL(14'318'181)/12);
	m_pit8253->out_handler<0>().set(m_pic8259, FUNC(pic8259_device::ir0_w));
	m_pit8253->set_clk<1>(XTAL(14'318'181)/12);
	m_pit8253->set_clk<2>(XTAL(14'318'181)/12);
	m_pit8253->out_handler<2>().set(FUNC(pcjr_state::out2_changed));

	PIC8259(config, m_pic8259, 0);
	m_pic8259->out_int_callback().set(FUNC(pcjr_state::pic8259_set_int_line));

	i8255_device &ppi(I8255(config, "ppi8255"));
	ppi.in_pa_callback().set_constant(0xff);
	ppi.out_pb_callback().set(FUNC(pcjr_state::pcjr_ppi_portb_w));
	ppi.in_pc_callback().set(FUNC(pcjr_state::pcjr_ppi_portc_r));

	ins8250_device &uart(INS8250(config, "ins8250", XTAL(1'843'200)));
	uart.out_tx_callback().set("serport", FUNC(rs232_port_device::write_txd));
	uart.out_dtr_callback().set("serport", FUNC(rs232_port_device::write_dtr));
	uart.out_rts_callback().set("serport", FUNC(rs232_port_device::write_rts));
	uart.out_int_callback().set(m_pic8259, FUNC(pic8259_device::ir3_w));

	rs232_port_device &serport(RS232_PORT(config, "serport", pcjr_com, nullptr));
	serport.rxd_handler().set("ins8250", FUNC(ins8250_uart_device::rx_w));
	serport.dcd_handler().set("ins8250", FUNC(ins8250_uart_device::dcd_w));
	serport.dsr_handler().set("ins8250", FUNC(ins8250_uart_device::dsr_w));
	serport.ri_handler().set("ins8250", FUNC(ins8250_uart_device::ri_w));
Beispiel #13
0
}

INTERRUPT_GEN_MEMBER(cabaret_state::cabaret_interrupt)
{
	if (m_nmi_enable & 0x80)
		device.execute().pulse_input_line(INPUT_LINE_NMI, attotime::zero);
}

MACHINE_CONFIG_START(cabaret_state::cabaret)
	/* basic machine hardware */
	MCFG_DEVICE_ADD("maincpu", Z180, XTAL(12'000'000) / 2)
	MCFG_DEVICE_PROGRAM_MAP(cabaret_map)
	MCFG_DEVICE_IO_MAP(cabaret_portmap)
	MCFG_DEVICE_VBLANK_INT_DRIVER("screen", cabaret_state, cabaret_interrupt)

	i8255_device &ppi1(I8255(config, "ppi1"));
	ppi1.in_pa_callback().set_ioport("BUTTONS2");
	ppi1.in_pb_callback().set_ioport("SERVICE");
	ppi1.in_pc_callback().set_ioport("COINS");

	i8255_device &ppi2(I8255(config, "ppi2"));
	ppi2.in_pa_callback().set_ioport("BUTTONS1");
	ppi2.out_pb_callback().set(FUNC(cabaret_state::ppi2_b_w));
	ppi2.out_pc_callback().set(FUNC(cabaret_state::ppi2_c_w));

	i8255_device &ppi3(I8255(config, "ppi3"));
	ppi3.out_pa_callback().set(FUNC(cabaret_state::nmi_and_coins_w));
	ppi3.tri_pa_callback().set_constant(0xf0);
	ppi3.in_pb_callback().set_ioport("DSW1");
	ppi3.in_pc_callback().set_ioport("DSW2");
Beispiel #14
0
MACHINE_CONFIG_START(mrflea_state::mrflea)

	/* basic machine hardware */
	MCFG_DEVICE_ADD("maincpu", Z80, 4000000) /* 4 MHz? */
	MCFG_DEVICE_PROGRAM_MAP(mrflea_master_map)
	MCFG_DEVICE_IO_MAP(mrflea_master_io_map)
	MCFG_DEVICE_VBLANK_INT_DRIVER("screen", mrflea_state,  irq0_line_hold) /* NMI resets the game */

	MCFG_DEVICE_ADD("subcpu", Z80, 6000000) // runs in IM 1, so doesn't use 8259 INTA
	MCFG_DEVICE_PROGRAM_MAP(mrflea_slave_map)
	MCFG_DEVICE_IO_MAP(mrflea_slave_io_map)
	TIMER(config, "scantimer").configure_scanline(FUNC(mrflea_state::mrflea_slave_interrupt), "screen", 0, 1);

	config.m_minimum_quantum = attotime::from_hz(6000);

	i8255_device &mainppi(I8255(config, "mainppi", 0));
	mainppi.in_pb_callback().set("subppi", FUNC(i8255_device::pb_r));
	mainppi.out_pc_callback().set("subppi", FUNC(i8255_device::pc4_w)).bit(7); // OBFA -> STBA
	mainppi.out_pc_callback().append("subppi", FUNC(i8255_device::pc2_w)).bit(1); // IBFB -> ACKB

	i8255_device &subppi(I8255(config, "subppi", 0));
	subppi.in_pa_callback().set("mainppi", FUNC(i8255_device::pa_r));
	subppi.out_pc_callback().set("mainppi", FUNC(i8255_device::pc6_w)).bit(5); // IBFA -> ACKA
	subppi.out_pc_callback().append(m_pic, FUNC(pic8259_device::ir0_w)).bit(3); // INTRA
	subppi.out_pc_callback().append("mainppi", FUNC(i8255_device::pc2_w)).bit(1); // OBFB -> STBB

	PIC8259(config, m_pic, 0);
	m_pic->out_int_callback().set_inputline(m_subcpu, 0);

	/* video hardware */
	MCFG_SCREEN_ADD("screen", RASTER)
Beispiel #15
0
GFXDECODE_END


void partner_state::partner(machine_config &config)
{
	/* basic machine hardware */
	I8080(config, m_maincpu, 16_MHz_XTAL / 9);
	m_maincpu->set_addrmap(AS_PROGRAM, &partner_state::partner_mem);

	auto &ppi1(I8255(config, "ppi8255_1"));
	ppi1.out_pa_callback().set(FUNC(radio86_state::radio86_8255_porta_w2));
	ppi1.in_pb_callback().set(FUNC(radio86_state::radio86_8255_portb_r2));
	ppi1.in_pc_callback().set(FUNC(radio86_state::radio86_8255_portc_r2));
	ppi1.out_pc_callback().set(FUNC(radio86_state::radio86_8255_portc_w2));

	auto &i8275(I8275(config, "i8275", 16_MHz_XTAL / 12));
	i8275.set_character_width(6);
	i8275.set_display_callback(FUNC(partner_state::display_pixels), this);
	i8275.drq_wr_callback().set("dma8257", FUNC(i8257_device::dreq2_w));

	/* video hardware */
	auto &screen(SCREEN(config, "screen", SCREEN_TYPE_RASTER));
	screen.set_screen_update("i8275", FUNC(i8275_device::screen_update));
	screen.set_refresh_hz(50);
	screen.set_size(78*6, 30*10);
	screen.set_visarea(0, 78*6-1, 0, 30*10-1);

	GFXDECODE(config, "gfxdecode", m_palette, gfx_partner);
	PALETTE(config, m_palette, FUNC(partner_state::radio86_palette), 3);

	SPEAKER(config, "mono").front_center();
	WAVE(config, "wave", "cassette").add_route(ALL_OUTPUTS, "mono", 0.25);

	auto &dma8257(I8257(config, "dma8257", 16_MHz_XTAL / 9));
	dma8257.out_hrq_cb().set(FUNC(partner_state::hrq_w));
	dma8257.in_memr_cb().set(FUNC(partner_state::memory_read_byte));
	dma8257.out_memw_cb().set(FUNC(partner_state::memory_write_byte));
	dma8257.in_ior_cb<0>().set("wd1793", FUNC(fd1793_device::data_r));
	dma8257.out_iow_cb<0>().set("wd1793", FUNC(fd1793_device::data_w));
	dma8257.out_iow_cb<2>().set("i8275", FUNC(i8275_device::dack_w));
	dma8257.set_reverse_rw_mode(true);

	auto &cassette(CASSETTE(config, "cassette"));
	cassette.set_formats(rkp_cassette_formats);
	cassette.set_default_state(CASSETTE_STOPPED | CASSETTE_SPEAKER_ENABLED | CASSETTE_MOTOR_ENABLED);
	cassette.set_interface("partner_cass");

	SOFTWARE_LIST(config, "cass_list").set_type("partner_cass", SOFTWARE_LIST_ORIGINAL_SYSTEM);

	FD1793(config, "wd1793", 16_MHz_XTAL / 16);

	FLOPPY_CONNECTOR(config, "fd0", "525qd", FLOPPY_525_QD, true, floppy_formats);
	FLOPPY_CONNECTOR(config, "fd1", "525qd", FLOPPY_525_QD, true, floppy_formats);

	SOFTWARE_LIST(config, "flop_list").set_type("partner_flop", SOFTWARE_LIST_ORIGINAL_SYSTEM);

	/* internal ram */
	RAM(config, m_ram);
	m_ram->set_default_size("64K");
	m_ram->set_default_value(0x00);
}
Beispiel #16
0
/* Machine driver */
void b2m_state::b2m(machine_config &config)
{
	/* basic machine hardware */
	I8080(config, m_maincpu, 2000000);
	m_maincpu->set_addrmap(AS_PROGRAM, &b2m_state::b2m_mem);
	m_maincpu->set_addrmap(AS_IO, &b2m_state::b2m_io);
	m_maincpu->set_vblank_int("screen", FUNC(b2m_state::b2m_vblank_interrupt));
	m_maincpu->set_irq_acknowledge_callback("pic8259", FUNC(pic8259_device::inta_cb));

	/* 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(384, 256);
	screen.set_visarea_full();
	screen.set_screen_update(FUNC(b2m_state::screen_update_b2m));
	screen.set_palette(m_palette);

	PALETTE(config, m_palette, FUNC(b2m_state::b2m_palette), 4);

	PIT8253(config, m_pit, 0);
	m_pit->set_clk<0>(0);
	m_pit->out_handler<0>().set(m_pic, FUNC(pic8259_device::ir1_w));
	m_pit->set_clk<1>(2000000);
	m_pit->out_handler<1>().set(FUNC(b2m_state::bm2_pit_out1));
	m_pit->set_clk<2>(2000000);
	m_pit->out_handler<2>().set(m_pit, FUNC(pit8253_device::write_clk0));

	i8255_device &ppi1(I8255(config, "ppi8255_1"));
	ppi1.out_pa_callback().set(FUNC(b2m_state::b2m_8255_porta_w));
	ppi1.in_pb_callback().set(FUNC(b2m_state::b2m_8255_portb_r));
	ppi1.out_pb_callback().set(FUNC(b2m_state::b2m_8255_portb_w));
	ppi1.out_pc_callback().set(FUNC(b2m_state::b2m_8255_portc_w));

	i8255_device &ppi2(I8255(config, "ppi8255_2"));
	ppi2.out_pc_callback().set(FUNC(b2m_state::b2m_ext_8255_portc_w));

	i8255_device &ppi3(I8255(config, "ppi8255_3"));
	ppi3.in_pa_callback().set(FUNC(b2m_state::b2m_romdisk_porta_r));
	ppi3.out_pb_callback().set(FUNC(b2m_state::b2m_romdisk_portb_w));
	ppi3.out_pc_callback().set(FUNC(b2m_state::b2m_romdisk_portc_w));

	PIC8259(config, m_pic, 0);
	m_pic->out_int_callback().set_inputline(m_maincpu, 0);

	/* sound */
	SPEAKER(config, "mono").front_center();
	SPEAKER_SOUND(config, m_speaker).add_route(ALL_OUTPUTS, "mono", 0.25);

	/* uart */
	I8251(config, "uart", 0);

	FD1793(config, m_fdc, 8_MHz_XTAL / 8);
	m_fdc->drq_wr_callback().set(FUNC(b2m_state::b2m_fdc_drq));

	FLOPPY_CONNECTOR(config, "fd0", b2m_floppies, "525qd", b2m_state::b2m_floppy_formats);
	FLOPPY_CONNECTOR(config, "fd1", b2m_floppies, "525qd", b2m_state::b2m_floppy_formats);
	SOFTWARE_LIST(config, "flop_list").set_original("b2m");

	/* internal ram */
	RAM(config, RAM_TAG).set_default_size("128K").set_default_value(0x00);
}