Exemplo n.º 1
0
void hec2hrp_state::hec2mdhrx(machine_config &config)
{
	Z80(config, m_maincpu, 5_MHz_XTAL);
	m_maincpu->set_addrmap(AS_PROGRAM, &hec2hrp_state::hec2hrx_mem);
	m_maincpu->set_addrmap(AS_IO, &hec2hrp_state::hec2mdhrx_io);
	m_maincpu->set_periodic_int(FUNC(hec2hrp_state::irq0_line_hold), attotime::from_hz(50)); /*  put on the Z80 irq in Hz*/

	MCFG_MACHINE_RESET_OVERRIDE(hec2hrp_state,hec2mdhrx)
	MCFG_MACHINE_START_OVERRIDE(hec2hrp_state,hec2mdhrx)

	/* 3.5" ("mini") disc */
	FD1793(config, m_minidisc_fdc, 1_MHz_XTAL);
	FLOPPY_CONNECTOR(config, "wd179x:0", minidisc_floppies, "dd", hec2hrp_state::minidisc_formats);

	screen_device &screen(SCREEN(config, "screen", SCREEN_TYPE_RASTER));
	screen.set_refresh_hz(50);
	screen.set_vblank_time(ATTOSECONDS_IN_USEC(400)); /* 2500 not accurate */
	screen.set_size(512, 230);
	screen.set_visarea(0, 243, 0, 227);
	screen.set_screen_update(FUNC(hec2hrp_state::screen_update_hec2hrp));
	screen.set_palette(m_palette);

	PALETTE(config, m_palette).set_entries(16);
	MCFG_VIDEO_START_OVERRIDE(hec2hrp_state,hec2hrp)

	hector_audio(config);

	CASSETTE(config, m_cassette);
	m_cassette->set_formats(hector_cassette_formats);
	m_cassette->set_default_state(CASSETTE_PLAY | CASSETTE_MOTOR_DISABLED | CASSETTE_SPEAKER_ENABLED);

	PRINTER(config, m_printer, 0);
}
Exemplo n.º 2
0
void ts802_state::ts802(machine_config &config)
{
	/* basic machine hardware */
	Z80(config, m_maincpu, 16_MHz_XTAL / 4);
	m_maincpu->set_addrmap(AS_PROGRAM, &ts802_state::ts802_mem);
	m_maincpu->set_addrmap(AS_IO, &ts802_state::ts802_io);
	//m_maincpu->set_daisy_config(daisy_chain_intf); // causes problems

	/* Devices */
	GENERIC_TERMINAL(config, m_terminal, 0);
	m_terminal->set_keyboard_callback(FUNC(ts802_state::kbd_put));

	z80dma_device& dma(Z80DMA(config, "dma", 16_MHz_XTAL / 4));
	dma.out_busreq_callback().set_inputline(m_maincpu, INPUT_LINE_HALT);
	dma.out_int_callback().set_inputline(m_maincpu, INPUT_LINE_IRQ0);
	dma.in_mreq_callback().set(FUNC(ts802_state::memory_read_byte));
	dma.out_mreq_callback().set(FUNC(ts802_state::memory_write_byte));
	dma.in_iorq_callback().set(FUNC(ts802_state::io_read_byte));
	dma.out_iorq_callback().set(FUNC(ts802_state::io_write_byte));

	z80dart_device& dart1(Z80DART(config, "dart1", 16_MHz_XTAL / 4));
	dart1.out_int_callback().set_inputline(m_maincpu, INPUT_LINE_IRQ0);

	z80dart_device& dart2(Z80DART(config, "dart2", 16_MHz_XTAL / 4));
	dart2.out_int_callback().set_inputline(m_maincpu, INPUT_LINE_IRQ0);

	z80ctc_device& ctc(Z80CTC(config, "ctc", 16_MHz_XTAL / 4));
	ctc.intr_callback().set_inputline(m_maincpu, INPUT_LINE_IRQ0);

	FD1793(config, "fdc", 4'000'000 / 2);                  // unknown clock
	FLOPPY_CONNECTOR(config, "fdc:0", ts802_floppies, "525dd", floppy_image_device::default_floppy_formats).enable_sound(true);
}
Exemplo n.º 3
0
ROM_END


//-------------------------------------------------
//  device_add_mconfig - add device configuration
//-------------------------------------------------

void mc1502_fdc_device::device_add_mconfig(machine_config &config)
{
	FD1793(config, m_fdc, 16_MHz_XTAL / 16);
	m_fdc->intrq_wr_callback().set(FUNC(mc1502_fdc_device::mc1502_fdc_irq_drq));
	m_fdc->drq_wr_callback().set(FUNC(mc1502_fdc_device::mc1502_fdc_irq_drq));
	FLOPPY_CONNECTOR(config, "fdc:0", mc1502_floppies, "525qd", mc1502_fdc_device::floppy_formats);
	FLOPPY_CONNECTOR(config, "fdc:1", mc1502_floppies, "525qd", mc1502_fdc_device::floppy_formats);
}
Exemplo n.º 4
0
void zorba_state::zorba(machine_config &config)
{
	// basic machine hardware
	Z80(config, m_maincpu, 24_MHz_XTAL / 6);
	m_maincpu->set_addrmap(AS_PROGRAM, &zorba_state::zorba_mem);
	m_maincpu->set_addrmap(AS_IO, &zorba_state::zorba_io);

	/* video hardware */
	screen_device &screen(SCREEN(config, "screen", SCREEN_TYPE_RASTER));
	screen.set_color(rgb_t::green());
	screen.set_refresh_hz(50);
	screen.set_screen_update("crtc", FUNC(i8275_device::screen_update));
	GFXDECODE(config, "gfxdecode", m_palette, gfx_zorba);
	PALETTE(config, m_palette, palette_device::MONOCHROME_HIGHLIGHT);

	/* sound hardware */
	SPEAKER(config, "mono").front_center();
	BEEP(config, m_beep, 800).add_route(ALL_OUTPUTS, "mono", 1.00); // should be horizontal frequency / 16, so depends on CRTC parameters

	INPUT_MERGER_ANY_HIGH(config, "irq0").output_handler().set(FUNC(zorba_state::irq_w<0>));
	INPUT_MERGER_ANY_HIGH(config, "irq1").output_handler().set(FUNC(zorba_state::irq_w<1>));
	INPUT_MERGER_ANY_HIGH(config, "irq2").output_handler().set(FUNC(zorba_state::irq_w<2>));

	/* devices */
	Z80DMA(config, m_dma, 24_MHz_XTAL / 6);
	// busack on cpu connects to bai pin
	m_dma->out_busreq_callback().set(FUNC(zorba_state::busreq_w));  //connects to busreq on cpu
	m_dma->out_int_callback().set("irq0", FUNC(input_merger_device::in_w<0>));
	//ba0 - not connected
	m_dma->in_mreq_callback().set(FUNC(zorba_state::memory_read_byte));
	m_dma->out_mreq_callback().set(FUNC(zorba_state::memory_write_byte));
	m_dma->in_iorq_callback().set(FUNC(zorba_state::io_read_byte));
	m_dma->out_iorq_callback().set(FUNC(zorba_state::io_write_byte));

	I8251(config, m_uart0, 0); // U32 COM port J2
	m_uart0->txd_handler().set("rs232", FUNC(rs232_port_device::write_txd)); // TODO: this line has a LED attached
	m_uart0->dtr_handler().set("rs232", FUNC(rs232_port_device::write_dtr));
	m_uart0->rts_handler().set("rs232", FUNC(rs232_port_device::write_rts));
	m_uart0->rxrdy_handler().set(FUNC(zorba_state::tx_rx_rdy_w<1>));
	m_uart0->txrdy_handler().set(FUNC(zorba_state::tx_rx_rdy_w<0>));

	I8251(config, m_uart1, 0); // U31 printer port J3
	m_uart1->txd_handler().set("serprn", FUNC(rs232_port_device::write_txd));
	m_uart1->rts_handler().set("serprn", FUNC(rs232_port_device::write_rts));
	m_uart1->rxrdy_handler().set(FUNC(zorba_state::tx_rx_rdy_w<3>));
	m_uart1->txrdy_handler().set(FUNC(zorba_state::tx_rx_rdy_w<2>));

	I8251(config, m_uart2, 0); // U30 serial keyboard J6
	m_uart2->txd_handler().set("keyboard", FUNC(zorba_keyboard_device::txd_w));
	m_uart2->rxrdy_handler().set(FUNC(zorba_state::tx_rx_rdy_w<5>));
	m_uart2->txrdy_handler().set(FUNC(zorba_state::tx_rx_rdy_w<4>));

	// port A - disk select etc, beeper
	// port B - parallel interface
	PIA6821(config, m_pia0, 0);
	m_pia0->writepa_handler().set(FUNC(zorba_state::pia0_porta_w));
	m_pia0->writepb_handler().set("parprndata", FUNC(output_latch_device::bus_w));
	m_pia0->cb2_handler().set("parprn", FUNC(centronics_device::write_strobe));

	// IEEE488 interface
	PIA6821(config, m_pia1, 0);
	m_pia1->readpa_handler().set(m_ieee, FUNC(ieee488_device::dio_r)); // TODO: gated with PB1
	m_pia1->writepa_handler().set(m_ieee, FUNC(ieee488_device::host_dio_w)); // TODO: gated with PB1
	m_pia1->readpb_handler().set(FUNC(zorba_state::pia1_portb_r));
	m_pia1->writepb_handler().set(FUNC(zorba_state::pia1_portb_w));
	m_pia1->ca2_handler().set(m_ieee, FUNC(ieee488_device::host_ifc_w));
	m_pia1->cb2_handler().set(m_ieee, FUNC(ieee488_device::host_ren_w));
	m_pia1->irqa_handler().set("irq1", FUNC(input_merger_device::in_w<0>));
	m_pia1->irqb_handler().set("irq1", FUNC(input_merger_device::in_w<1>));

	// PIT
	pit8254_device &pit(PIT8254(config, "pit", 0));
	pit.set_clk<0>(24_MHz_XTAL / 3);
	pit.set_clk<1>(24_MHz_XTAL / 3);
	pit.set_clk<2>(24_MHz_XTAL / 3);
	pit.out_handler<0>().set(FUNC(zorba_state::br1_w));
	pit.out_handler<1>().set(m_uart1, FUNC(i8251_device::write_txc));
	pit.out_handler<1>().append(m_uart1, FUNC(i8251_device::write_rxc));
	pit.out_handler<2>().set(m_uart2, FUNC(i8251_device::write_txc));
	pit.out_handler<2>().append(m_uart2, FUNC(i8251_device::write_rxc));

	// CRTC
	I8275(config, m_crtc, 14.318'181_MHz_XTAL / 7);
	m_crtc->set_character_width(8);
	m_crtc->set_display_callback(FUNC(zorba_state::zorba_update_chr), this);
	m_crtc->drq_wr_callback().set(m_dma, FUNC(z80dma_device::rdy_w));
	m_crtc->irq_wr_callback().set("irq0", FUNC(input_merger_device::in_w<1>));
	m_crtc->set_screen("screen");

	// Floppies
	FD1793(config, m_fdc, 24_MHz_XTAL / 24);
	m_fdc->intrq_wr_callback().set("irq2", FUNC(input_merger_device::in_w<0>));
	m_fdc->drq_wr_callback().set("irq2", FUNC(input_merger_device::in_w<1>));
	FLOPPY_CONNECTOR(config, m_floppy0, zorba_floppies, "525dd", floppy_image_device::default_floppy_formats).enable_sound(true);
	FLOPPY_CONNECTOR(config, m_floppy1, zorba_floppies, "525dd", floppy_image_device::default_floppy_formats).enable_sound(true);

	// J1 IEEE-488
	IEEE488(config, m_ieee);
	m_ieee->srq_callback().set(m_pia1, FUNC(pia6821_device::ca2_w)); // TODO: gated with PB1 from PIA

	// J2 EIA RS232/internal modem
	// TODO: this has additional lines compared to a regular RS232 port (TxC in, RxC in, RxC out, speaker in, power)
	rs232_port_device &rs232(RS232_PORT(config, "rs232", default_rs232_devices, nullptr));
	rs232.rxd_handler().set(m_uart0, FUNC(i8251_device::write_rxd)); // TODO: this line has a LED attached
	rs232.cts_handler().set(m_uart0, FUNC(i8251_device::write_cts)); // TODO: this line has a LED attached
	rs232.dsr_handler().set(m_uart0, FUNC(i8251_device::write_dsr));

	// J3 Parallel printer
	centronics_device &parprn(CENTRONICS(config, "parprn", centronics_devices, "printer"));
	parprn.busy_handler().set(m_uart1, FUNC(i8251_device::write_cts));
	parprn.busy_handler().append(m_uart1, FUNC(i8251_device::write_dsr)); // TODO: shared with serial CTS
	parprn.fault_handler().set(FUNC(zorba_state::printer_fault_w));
	parprn.select_handler().set(FUNC(zorba_state::printer_select_w));

	output_latch_device &parprndata(OUTPUT_LATCH(config, "parprndata"));
	parprn.set_output_latch(parprndata);

	// J3 Serial printer
	rs232_port_device &serprn(RS232_PORT(config, "serprn", default_rs232_devices, nullptr));
	serprn.rxd_handler().set(m_uart1, FUNC(i8251_device::write_rxd)); // TODO: this line has a LED attached

	// J6 TTL-level serial keyboard
	ZORBA_KEYBOARD(config, "keyboard").rxd_cb().set(m_uart2, FUNC(i8251_device::write_rxd));

	SOFTWARE_LIST(config, "flop_list").set_original("zorba");
}
Exemplo n.º 5
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);
}
Exemplo n.º 6
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);
}
Exemplo n.º 7
0
void camplynx_state::lynx_disk(machine_config &config)
{
	FD1793(config, m_fdc, 24_MHz_XTAL / 24);
	FLOPPY_CONNECTOR(config, m_floppy0, camplynx_floppies, "525qd", camplynx_state::camplynx_floppy_formats).enable_sound(true);
	FLOPPY_CONNECTOR(config, m_floppy1, camplynx_floppies, "525qd", camplynx_state::camplynx_floppy_formats).enable_sound(true);
}