summaryrefslogtreecommitdiffstatshomepage
path: root/src/devices/video/mc6847.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/devices/video/mc6847.cpp')
-rw-r--r--src/devices/video/mc6847.cpp33
1 files changed, 29 insertions, 4 deletions
diff --git a/src/devices/video/mc6847.cpp b/src/devices/video/mc6847.cpp
index 84b48bc1526..4ef156632b0 100644
--- a/src/devices/video/mc6847.cpp
+++ b/src/devices/video/mc6847.cpp
@@ -132,14 +132,14 @@ const uint32_t mc6847_base_device::s_palette[mc6847_base_device::PALETTE_LENGTH]
mc6847_friend_device::mc6847_friend_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, uint32_t clock,
const uint8_t *fontdata, bool is_mc6847t1, double tpfs, int field_sync_falling_edge_scanline, int divider, bool supports_partial_body_scanlines)
: device_t(mconfig, type, tag, owner, clock)
+ , device_video_interface(mconfig, *this)
, m_write_hsync(*this)
, m_write_fsync(*this)
, m_character_map(fontdata, is_mc6847t1)
+ , m_tpfs(tpfs)
+ , m_divider(divider)
+ , m_supports_partial_body_scanlines(supports_partial_body_scanlines)
{
- m_tpfs = tpfs;
- m_divider = divider;
- m_supports_partial_body_scanlines = supports_partial_body_scanlines;
-
// The MC6847 and the GIME apply field sync on different scanlines
m_field_sync_falling_edge_scanline = field_sync_falling_edge_scanline;
}
@@ -577,6 +577,31 @@ void mc6847_base_device::setup_fixed_mode()
//-------------------------------------------------
+// device_config_complete - perform any
+// operations now that the configuration is
+// complete
+//-------------------------------------------------
+
+void mc6847_base_device::device_config_complete()
+{
+ if (!has_screen())
+ return;
+
+ if (!screen().refresh_attoseconds())
+ {
+ // FIXME: use correct raw parameters rather than this nonsense
+ screen().set_refresh_hz(m_tpfs > 310.0 ? 50 : 60);
+ screen().set_size(320, 243);
+ screen().set_visarea(0, 320-1, 1, 241-1);
+ screen().set_vblank_time(0);
+ }
+
+ if (!screen().has_screen_update())
+ screen().set_screen_update(screen_update_rgb32_delegate(FUNC(mc6847_base_device::screen_update), this));
+}
+
+
+//-------------------------------------------------
// device_start - device-specific startup
//-------------------------------------------------