diff --git a/src/devices/machine/s3c44b0.cpp b/src/devices/machine/s3c44b0.cpp index eceb1f5c92c..00d8ac91513 100644 --- a/src/devices/machine/s3c44b0.cpp +++ b/src/devices/machine/s3c44b0.cpp @@ -224,6 +224,7 @@ DEFINE_DEVICE_TYPE(S3C44B0, s3c44b0_device, "s3c44b0", "Samsung S3C44B0 SoC") s3c44b0_device::s3c44b0_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) : device_t(mconfig, S3C44B0, tag, owner, clock) + , device_video_interface(mconfig, *this) , m_cpu(nullptr) , m_port_r_cb(*this) , m_port_w_cb(*this) @@ -747,7 +748,6 @@ READ32_MEMBER( s3c44b0_device::lcd_r ) void s3c44b0_device::lcd_configure() { - screen_device *screen = machine().first_screen(); int dismode, clkval, lineval, wdly, hozval, lineblank, wlh, mclk; double vclk, framerate; int width, height; @@ -776,7 +776,7 @@ void s3c44b0_device::lcd_configure() height = lineval + 1; m_lcd.framerate = framerate; verboselog( *this, 3, "video_screen_configure %d %d %f\n", width, height, m_lcd.framerate); - screen->configure(screen->width(), screen->height(), screen->visible_area(), HZ_TO_ATTOSECONDS(m_lcd.framerate)); + screen().configure(screen().width(), screen().height(), screen().visible_area(), HZ_TO_ATTOSECONDS(m_lcd.framerate)); m_lcd.hpos_min = 25; m_lcd.hpos_max = 25 + width - 1; m_lcd.hpos_end = 25 + width - 1 + 25; @@ -800,13 +800,12 @@ void s3c44b0_device::lcd_configure() void s3c44b0_device::lcd_start() { - screen_device *screen = machine().first_screen(); verboselog( *this, 1, "LCD start\n"); lcd_configure(); lcd_dma_init(); m_lcd.vpos = m_lcd.vpos_min; m_lcd.hpos = m_lcd.hpos_min; - m_lcd.frame_time = screen->time_until_pos( 0, 0); + m_lcd.frame_time = screen().time_until_pos( 0, 0); m_lcd.timer->adjust(m_lcd.frame_time, 0); m_lcd.frame_time = machine().time() + m_lcd.frame_time; } diff --git a/src/devices/machine/s3c44b0.h b/src/devices/machine/s3c44b0.h index 00523b56a2b..601f1ccd395 100644 --- a/src/devices/machine/s3c44b0.h +++ b/src/devices/machine/s3c44b0.h @@ -111,7 +111,7 @@ enum }; -class s3c44b0_device : public device_t +class s3c44b0_device : public device_t, public device_video_interface { public: s3c44b0_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); diff --git a/src/devices/video/tms3556.cpp b/src/devices/video/tms3556.cpp index 383e63210f5..cd2bcc3085a 100644 --- a/src/devices/video/tms3556.cpp +++ b/src/devices/video/tms3556.cpp @@ -109,6 +109,7 @@ inline void tms3556_device::writebyte(offs_t address, uint8_t data) tms3556_device::tms3556_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) : device_t(mconfig, TMS3556, tag, owner, clock), device_memory_interface(mconfig, *this), + device_video_interface(mconfig, *this), m_space_config("videoram", ENDIANNESS_LITTLE, 8, 17, 0, address_map_constructor(), address_map_constructor(FUNC(tms3556_device::tms3556), this)), m_reg(0), m_reg2(0), m_reg_access_phase(0), @@ -159,7 +160,7 @@ void tms3556_device::device_start() save_item(NAME(m_char_line_counter)); save_item(NAME(m_dbl_h_phase)); - machine().first_screen()->register_screen_bitmap(m_bitmap); + screen().register_screen_bitmap(m_bitmap); } diff --git a/src/devices/video/tms3556.h b/src/devices/video/tms3556.h index 25b82787936..9111d0c26e9 100644 --- a/src/devices/video/tms3556.h +++ b/src/devices/video/tms3556.h @@ -33,8 +33,7 @@ // ======================> tms3556_device -class tms3556_device : public device_t, - public device_memory_interface +class tms3556_device : public device_t, public device_memory_interface, public device_video_interface { public: static constexpr unsigned TOP_BORDER = 1;