From be4241cddb76ab1d4a9eaa1d81924a939de8d9a1 Mon Sep 17 00:00:00 2001 From: Ivan Vangelista Date: Tue, 24 Jul 2018 17:09:18 +0200 Subject: model3.cpp, next.cpp, inder_vid.cpp: removed some device tag look-ups (nw) --- src/mame/drivers/model3.cpp | 2 +- src/mame/drivers/next.cpp | 2 +- src/mame/includes/next.h | 2 ++ src/mame/machine/inder_vid.cpp | 19 ++++++------------- src/mame/machine/inder_vid.h | 2 -- 5 files changed, 10 insertions(+), 17 deletions(-) diff --git a/src/mame/drivers/model3.cpp b/src/mame/drivers/model3.cpp index a60f59cdf7d..1a2e67bff50 100644 --- a/src/mame/drivers/model3.cpp +++ b/src/mame/drivers/model3.cpp @@ -1332,7 +1332,7 @@ void model3_state::model3_init(int step) // copy the 68k vector table into RAM memcpy(m_soundram, memregion("audiocpu")->base()+0x80000, 16); - machine().device("audiocpu")->reset(); + m_audiocpu->reset(); m_m3_step = step; // step = BCD hardware rev. 0x10 for 1.0, 0x15 for 1.5, 0x20 for 2.0, etc. tap_reset(); diff --git a/src/mame/drivers/next.cpp b/src/mame/drivers/next.cpp index cb511a505a9..738f81d1838 100644 --- a/src/mame/drivers/next.cpp +++ b/src/mame/drivers/next.cpp @@ -625,7 +625,7 @@ READ32_MEMBER( next_state::fdc_control_r ) // reason. The kernel otoh behaves as expected. if(fdc) { - floppy_image_device *fdev = machine().device(":fdc:0")->get_device(); + floppy_image_device *fdev = floppy0->get_device(); if(fdev->exists()) { uint32_t variant = fdev->get_variant(); switch(variant) { diff --git a/src/mame/includes/next.h b/src/mame/includes/next.h index bfbf7baa4a0..7e96ce0b044 100644 --- a/src/mame/includes/next.h +++ b/src/mame/includes/next.h @@ -31,6 +31,7 @@ public: net(*this, "net"), mo(*this, "mo"), fdc(*this, "fdc"), + floppy0(*this, "fdc:0"), vram(*this, "vram") { } void next_base(machine_config &config); @@ -63,6 +64,7 @@ private: required_device net; required_device mo; optional_device fdc; // 040 only + optional_device floppy0; // 040 only uint32_t screen_update(screen_device &screen, bitmap_rgb32 &bitmap, const rectangle &cliprect); diff --git a/src/mame/machine/inder_vid.cpp b/src/mame/machine/inder_vid.cpp index c993a03b010..de434e7ffb3 100644 --- a/src/mame/machine/inder_vid.cpp +++ b/src/mame/machine/inder_vid.cpp @@ -24,14 +24,14 @@ inder_vid_device::inder_vid_device(const machine_config &mconfig, const char *ta void inder_vid_device::megaphx_tms_map(address_map &map) { - map(0x00000000, 0x003fffff).ram().share("vram"); // vram? + map(0x00000000, 0x003fffff).ram().share(m_vram); // vram? map(0x04000000, 0x0400000f).w("ramdac", FUNC(ramdac_device::index_w)).umask16(0x00ff); map(0x04000010, 0x0400001f).rw("ramdac", FUNC(ramdac_device::pal_r), FUNC(ramdac_device::pal_w)).umask16(0x00ff); map(0x04000030, 0x0400003f).w("ramdac", FUNC(ramdac_device::index_r_w)).umask16(0x00ff); map(0x04000090, 0x0400009f).nopw(); map(0x7fc00000, 0x7fffffff).ram().mirror(0x80000000); - map(0xc0000000, 0xc00001ff).rw("tms", FUNC(tms34010_device::io_register_r), FUNC(tms34010_device::io_register_w)); + map(0xc0000000, 0xc00001ff).rw(m_tms, FUNC(tms34010_device::io_register_r), FUNC(tms34010_device::io_register_w)); } @@ -92,27 +92,19 @@ TMS340X0_FROM_SHIFTREG_CB_MEMBER(inder_vid_device::from_shiftreg) m_shiftfull = 0; } -WRITE_LINE_MEMBER(inder_vid_device::m68k_gen_int) -{ - cpu_device *maincpu = (cpu_device*)machine().device("maincpu"); - if (state) maincpu->set_input_line(4, ASSERT_LINE); - else maincpu->set_input_line(4, CLEAR_LINE); -} - - void inder_vid_device::ramdac_map(address_map &map) { map(0x000, 0x3ff).rw("ramdac", FUNC(ramdac_device::ramdac_pal_r), FUNC(ramdac_device::ramdac_rgb888_w)); } MACHINE_CONFIG_START(inder_vid_device::device_add_mconfig) - MCFG_DEVICE_ADD("tms", TMS34010, XTAL(40'000'000)) + MCFG_DEVICE_ADD(m_tms, TMS34010, XTAL(40'000'000)) MCFG_DEVICE_PROGRAM_MAP(megaphx_tms_map) MCFG_TMS340X0_HALT_ON_RESET(true) /* halt on reset */ MCFG_TMS340X0_PIXEL_CLOCK(XTAL(40'000'000)/12) /* pixel clock */ MCFG_TMS340X0_PIXELS_PER_CLOCK(2) /* pixels per clock */ MCFG_TMS340X0_SCANLINE_RGB32_CB(inder_vid_device, scanline) /* scanline updater (RGB32) */ - MCFG_TMS340X0_OUTPUT_INT_CB(WRITELINE(*this, inder_vid_device, m68k_gen_int)) + MCFG_TMS340X0_OUTPUT_INT_CB(INPUTLINE(":maincpu", 4)) MCFG_TMS340X0_TO_SHIFTREG_CB(inder_vid_device, to_shiftreg) /* write to shiftreg function */ MCFG_TMS340X0_FROM_SHIFTREG_CB(inder_vid_device, from_shiftreg) /* read from shiftreg function */ @@ -120,7 +112,7 @@ MACHINE_CONFIG_START(inder_vid_device::device_add_mconfig) MCFG_SCREEN_RAW_PARAMS(XTAL(40'000'000)/12, 424, 0, 338-1, 262, 0, 246-1) MCFG_SCREEN_UPDATE_DEVICE("tms", tms34010_device, tms340x0_rgb32) - MCFG_PALETTE_ADD("palette", 256) + MCFG_PALETTE_ADD(m_palette, 256) MCFG_RAMDAC_ADD("ramdac", ramdac_map, "palette") MCFG_RAMDAC_SPLIT_READ(1) @@ -130,6 +122,7 @@ MACHINE_CONFIG_END void inder_vid_device::device_start() { + save_item(NAME(m_shiftfull)); } void inder_vid_device::device_reset() diff --git a/src/mame/machine/inder_vid.h b/src/mame/machine/inder_vid.h index 9f6080a0c03..4e55570bb2d 100644 --- a/src/mame/machine/inder_vid.h +++ b/src/mame/machine/inder_vid.h @@ -49,8 +49,6 @@ private: int m_shiftfull; // this might be a driver specific hack for a TMS bug. - DECLARE_WRITE_LINE_MEMBER(m68k_gen_int); - TMS340X0_TO_SHIFTREG_CB_MEMBER(to_shiftreg); TMS340X0_FROM_SHIFTREG_CB_MEMBER(from_shiftreg); TMS340X0_SCANLINE_RGB32_CB_MEMBER(scanline); -- cgit v1.2.3