diff options
author | Vas Crabb <vas@vastheman.com> | 2019-03-26 11:13:37 +1100 |
---|---|---|
committer | Vas Crabb <vas@vastheman.com> | 2019-03-26 11:13:37 +1100 |
commit | 97b67170277437131adf6ed4d60139c172529e4f (patch) | |
tree | 7a5cbf608f191075f1612b1af15832c206a3fe2d /src/mame/drivers/einstein.cpp | |
parent | b380514764cf857469bae61c11143a19f79a74c5 (diff) |
(nw) Clean up the mess on master
This effectively reverts b380514764cf857469bae61c11143a19f79a74c5 and
c24473ddff715ecec2e258a6eb38960cf8c8e98e, restoring the state at
598cd5227223c3b04ca31f0dbc1981256d9ea3ff.
Before pushing, please check that what you're about to push is sane.
Check your local commit log and ensure there isn't anything out-of-place
before pushing to mainline. When things like this happen, it wastes
everyone's time. I really don't need this in a week when real work⢠is
busting my balls and I'm behind where I want to be with preparing for
MAME release.
Diffstat (limited to 'src/mame/drivers/einstein.cpp')
-rw-r--r-- | src/mame/drivers/einstein.cpp | 44 |
1 files changed, 21 insertions, 23 deletions
diff --git a/src/mame/drivers/einstein.cpp b/src/mame/drivers/einstein.cpp index 9b06d8bfd80..b14aebedeb6 100644 --- a/src/mame/drivers/einstein.cpp +++ b/src/mame/drivers/einstein.cpp @@ -390,10 +390,6 @@ void einstein_state::machine_start() m_bank1->configure_entry(1, m_bios->base()); m_bank2->set_base(m_ram->pointer()); m_bank3->set_base(m_ram->pointer() + 0x8000); - - // setup expansion slot - m_pipe->set_program_space(&m_maincpu->space(AS_PROGRAM)); - m_pipe->set_io_space(&m_maincpu->space(AS_IO)); } void einstein_state::machine_reset() @@ -428,8 +424,7 @@ void einstein_state::einstein_io(address_map &map) map(0x00, 0x00).mirror(0xff04).rw(FUNC(einstein_state::reset_r), FUNC(einstein_state::reset_w)); map(0x02, 0x02).mirror(0xff04).rw(m_psg, FUNC(ay8910_device::data_r), FUNC(ay8910_device::address_w)); map(0x03, 0x03).mirror(0xff04).w(m_psg, FUNC(ay8910_device::data_w)); - map(0x08, 0x08).mirror(0xff06).rw("vdp", FUNC(tms9129_device::vram_r), FUNC(tms9129_device::vram_w)); - map(0x09, 0x09).mirror(0xff06).rw("vdp", FUNC(tms9129_device::register_r), FUNC(tms9129_device::register_w)); + map(0x08, 0x09).mirror(0xff06).rw("vdp", FUNC(tms9129_device::read), FUNC(tms9129_device::write)); map(0x10, 0x11).mirror(0xff06).rw(IC_I060, FUNC(i8251_device::read), FUNC(i8251_device::write)); map(0x18, 0x1b).mirror(0xff04).rw(m_fdc, FUNC(wd1770_device::read), FUNC(wd1770_device::write)); map(0x20, 0x20).mirror(0xff00).rw(FUNC(einstein_state::kybint_msk_r), FUNC(einstein_state::kybint_msk_w)); @@ -576,7 +571,8 @@ static void einstein_floppies(device_slot_interface &device) device.option_add("35dd", FLOPPY_35_DD); } -MACHINE_CONFIG_START(einstein_state::einstein) +void einstein_state::einstein(machine_config &config) +{ /* basic machine hardware */ Z80(config, m_maincpu, XTAL_X002 / 2); m_maincpu->set_addrmap(AS_PROGRAM, &einstein_state::einstein_mem); @@ -585,7 +581,7 @@ MACHINE_CONFIG_START(einstein_state::einstein) /* this is actually clocked at the system clock 4 MHz, but this would be too fast for our driver. So we update at 50Hz and hope this is good enough. */ - MCFG_TIMER_DRIVER_ADD_PERIODIC("keyboard", einstein_state, keyboard_timer_callback, attotime::from_hz(50)) + TIMER(config, "keyboard").configure_periodic(FUNC(einstein_state::keyboard_timer_callback), attotime::from_hz(50)); z80pio_device& pio(Z80PIO(config, IC_I063, XTAL_X002 / 2)); pio.out_int_callback().set(FUNC(einstein_state::int_w<0>)); @@ -633,15 +629,16 @@ MACHINE_CONFIG_START(einstein_state::einstein) adc.ch4_callback().set_ioport("analogue_2_y"); /* printer */ - MCFG_DEVICE_ADD(m_centronics, CENTRONICS, centronics_devices, "printer") - MCFG_CENTRONICS_ACK_HANDLER(WRITELINE(IC_I063, z80pio_device, strobe_a)) - MCFG_CENTRONICS_BUSY_HANDLER(WRITELINE(*this, einstein_state, write_centronics_busy)) - MCFG_CENTRONICS_PERROR_HANDLER(WRITELINE(*this, einstein_state, write_centronics_perror)) - MCFG_CENTRONICS_FAULT_HANDLER(WRITELINE(*this, einstein_state, write_centronics_fault)) + CENTRONICS(config, m_centronics, centronics_devices, "printer"); + m_centronics->ack_handler().set(IC_I063, FUNC(z80pio_device::strobe_a)); + m_centronics->busy_handler().set(FUNC(einstein_state::write_centronics_busy)); + m_centronics->perror_handler().set(FUNC(einstein_state::write_centronics_perror)); + m_centronics->fault_handler().set(FUNC(einstein_state::write_centronics_fault)); - MCFG_CENTRONICS_OUTPUT_LATCH_ADD("cent_data_out", "centronics") + output_latch_device ¢_data_out(OUTPUT_LATCH(config, "cent_data_out")); + m_centronics->set_output_latch(cent_data_out); - MCFG_TIMER_DRIVER_ADD("strobe", einstein_state, strobe_callback) + TIMER(config, m_strobe_timer).configure_generic(FUNC(einstein_state::strobe_callback)); // uart i8251_device &ic_i060(I8251(config, IC_I060, XTAL_X002 / 4)); @@ -658,13 +655,13 @@ MACHINE_CONFIG_START(einstein_state::einstein) // floppy WD1770(config, m_fdc, XTAL_X002); - MCFG_FLOPPY_DRIVE_ADD(IC_I042 ":0", einstein_floppies, "3ss", floppy_image_device::default_floppy_formats) - MCFG_FLOPPY_DRIVE_ADD(IC_I042 ":1", einstein_floppies, "3ss", floppy_image_device::default_floppy_formats) - MCFG_FLOPPY_DRIVE_ADD(IC_I042 ":2", einstein_floppies, "525qd", floppy_image_device::default_floppy_formats) - MCFG_FLOPPY_DRIVE_ADD(IC_I042 ":3", einstein_floppies, "525qd", floppy_image_device::default_floppy_formats) + FLOPPY_CONNECTOR(config, IC_I042 ":0", einstein_floppies, "3ss", floppy_image_device::default_floppy_formats); + FLOPPY_CONNECTOR(config, IC_I042 ":1", einstein_floppies, "3ss", floppy_image_device::default_floppy_formats); + FLOPPY_CONNECTOR(config, IC_I042 ":2", einstein_floppies, "525qd", floppy_image_device::default_floppy_formats); + FLOPPY_CONNECTOR(config, IC_I042 ":3", einstein_floppies, "525qd", floppy_image_device::default_floppy_formats); /* software lists */ - MCFG_SOFTWARE_LIST_ADD("disk_list","einstein") + SOFTWARE_LIST(config, "disk_list").set_original("einstein"); /* RAM is provided by 8k DRAM ICs i009, i010, i011, i012, i013, i014, i015 and i016 */ /* internal ram */ @@ -672,12 +669,13 @@ MACHINE_CONFIG_START(einstein_state::einstein) // tatung pipe connector TATUNG_PIPE(config, m_pipe, XTAL_X002 / 2, tatung_pipe_cards, nullptr); + m_pipe->set_program_space(m_maincpu, AS_PROGRAM); + m_pipe->set_io_space(m_maincpu, AS_IO); m_pipe->nmi_handler().set_inputline(IC_I001, INPUT_LINE_NMI); // user port - MCFG_EINSTEIN_USERPORT_ADD("user") - MCFG_EINSTEIN_USERPORT_BSTB_HANDLER(WRITELINE(IC_I063, z80pio_device, strobe_b)) -MACHINE_CONFIG_END + EINSTEIN_USERPORT(config, "user").bstb_handler().set(IC_I063, FUNC(z80pio_device::strobe_b)); +} /*************************************************************************** |