screen.h: Fix have_screen_update(), which was broken and returned false under any valid configuration, and rename the function has_screen_update(). This fixes regressions in granny and other drivers using custom update functions with CDP1861, CDP1864 and TMS992x VDPs.

tms9928a: Eliminate the clock validity check, which has fulfilled its purpose (nw)
This commit is contained in:
AJR 2018-08-22 18:21:06 -04:00
parent 471d123fd6
commit 56ee4e784c
5 changed files with 4 additions and 11 deletions

View File

@ -94,7 +94,7 @@ void cdp1864_device::device_config_complete()
if (!screen().refresh_attoseconds())
screen().set_raw(clock(), SCREEN_WIDTH, HBLANK_END, HBLANK_START, TOTAL_SCANLINES, SCANLINE_VBLANK_END, SCANLINE_VBLANK_START);
if (!screen().have_screen_update())
if (!screen().has_screen_update())
screen().set_screen_update(screen_update_rgb32_delegate(FUNC(cdp1864_device::screen_update), this));
}

View File

@ -68,7 +68,7 @@ void cdp1861_device::device_config_complete()
if (!screen().refresh_attoseconds())
screen().set_raw(clock(), SCREEN_WIDTH, HBLANK_END, HBLANK_START, TOTAL_SCANLINES, SCANLINE_VBLANK_END, SCANLINE_VBLANK_START);
if (!screen().have_screen_update())
if (!screen().has_screen_update())
screen().set_screen_update(screen_update_rgb32_delegate(FUNC(cdp1861_device::screen_update), this));
}

View File

@ -75,7 +75,7 @@ void tms9928a_device::device_config_complete()
if (!has_screen())
return;
if (!screen().have_screen_update())
if (!screen().has_screen_update())
screen().set_screen_update(screen_update_rgb32_delegate(FUNC(tms9928a_device::screen_update), this));
if (!screen().refresh_attoseconds())
@ -130,12 +130,6 @@ tms9929a_device::tms9929a_device(const machine_config &mconfig, const char *tag,
{
}
void tms9928a_device::device_validity_check(validity_checker &valid) const
{
if (clock() < 6'000'000)
osd_printf_error("%d Hz clock is too slow!\n", clock());
}
device_memory_interface::space_config_vector tms9928a_device::memory_space_config() const
{
return space_config_vector {

View File

@ -97,7 +97,6 @@ protected:
// device-level overrides
virtual void device_config_complete() override;
virtual void device_validity_check(validity_checker &valid) const override;
virtual void device_start() override;
virtual void device_reset() override;
virtual void device_timer(emu_timer &timer, device_timer_id id, int param, void *ptr) override;

View File

@ -195,7 +195,7 @@ public:
float yoffset() const { return m_yoffset; }
float xscale() const { return m_xscale; }
float yscale() const { return m_yscale; }
bool have_screen_update() const { return !m_screen_update_ind16.isnull() && !m_screen_update_rgb32.isnull(); }
bool has_screen_update() const { return !m_screen_update_ind16.isnull() || !m_screen_update_rgb32.isnull(); }
// inline configuration helpers
void set_type(screen_type_enum type) { assert(!configured()); m_type = type; }