summaryrefslogtreecommitdiffstatshomepage
path: root/src/devices/video/dp8350.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/devices/video/dp8350.cpp')
-rw-r--r--src/devices/video/dp8350.cpp44
1 files changed, 14 insertions, 30 deletions
diff --git a/src/devices/video/dp8350.cpp b/src/devices/video/dp8350.cpp
index bf77c913f89..19789ac4222 100644
--- a/src/devices/video/dp8350.cpp
+++ b/src/devices/video/dp8350.cpp
@@ -44,7 +44,8 @@
**********************************************************************/
#include "emu.h"
-#include "video/dp8350.h"
+#include "dp8350.h"
+
#include "screen.h"
//#define VERBOSE 1
@@ -98,6 +99,7 @@ dp835x_device::dp835x_device(const machine_config &mconfig, device_type type, co
, m_dots_per_line(char_width * chars_per_line)
, m_dots_per_row(char_width * chars_per_row)
, m_video_scan_lines(char_height * rows_per_frame)
+ , m_half_shift(false)
, m_lrc_callback(*this)
, m_clc_callback(*this)
, m_lc_callback(*this)
@@ -193,34 +195,16 @@ void dp835x_device::device_config_complete()
//-------------------------------------------------
-// device_resolve_objects - resolve objects that
-// may be needed for other devices to set
-// initial conditions at start time
-//-------------------------------------------------
-
-void dp835x_device::device_resolve_objects()
-{
- m_lrc_callback.resolve_safe();
- m_clc_callback.resolve_safe();
- m_lc_callback.resolve_safe();
- m_lbre_callback.resolve_safe();
- m_hsync_callback.resolve_safe();
- m_vsync_callback.resolve_safe();
- m_vblank_callback.resolve_safe();
-}
-
-
-//-------------------------------------------------
// device_start - device-specific startup
//-------------------------------------------------
void dp835x_device::device_start()
{
// create timers
- m_hblank_start_timer = machine().scheduler().timer_alloc(timer_expired_delegate(FUNC(dp835x_device::hblank_start), this));
- m_hblank_near_end_timer = machine().scheduler().timer_alloc(timer_expired_delegate(FUNC(dp835x_device::hblank_near_end), this));
- m_hsync_on_timer = machine().scheduler().timer_alloc(timer_expired_delegate(FUNC(dp835x_device::hsync_update), this));
- m_hsync_off_timer = machine().scheduler().timer_alloc(timer_expired_delegate(FUNC(dp835x_device::hsync_update), this));
+ m_hblank_start_timer = timer_alloc(FUNC(dp835x_device::hblank_start), this);
+ m_hblank_near_end_timer = timer_alloc(FUNC(dp835x_device::hblank_near_end), this);
+ m_hsync_on_timer = timer_alloc(FUNC(dp835x_device::hsync_update), this);
+ m_hsync_off_timer = timer_alloc(FUNC(dp835x_device::hsync_update), this);
// save state
save_item(NAME(m_60hz_refresh));
@@ -328,7 +312,7 @@ void dp835x_device::reconfigure_screen()
// field refresh rates (f1 = 60 Hz, f0 = 50 Hz)
//-------------------------------------------------
-WRITE_LINE_MEMBER(dp835x_device::refresh_control)
+void dp835x_device::refresh_control(int state)
{
if (m_60hz_refresh != bool(state))
{
@@ -348,7 +332,7 @@ WRITE_LINE_MEMBER(dp835x_device::refresh_control)
// loaded on scan line 0
//-------------------------------------------------
-WRITE_LINE_MEMBER(dp835x_device::character_generator_program)
+void dp835x_device::character_generator_program(int state)
{
m_cgpi = bool(state);
}
@@ -403,7 +387,7 @@ void dp835x_device::register_load(u8 rs, u16 addr)
// lrc_r - poll line rate clock state
//-------------------------------------------------
-READ_LINE_MEMBER(dp835x_device::lrc_r)
+int dp835x_device::lrc_r()
{
if (m_hblank_start_timer->remaining() > m_hblank_near_end_timer->remaining())
return 0;
@@ -417,7 +401,7 @@ READ_LINE_MEMBER(dp835x_device::lrc_r)
// state
//-------------------------------------------------
-READ_LINE_MEMBER(dp835x_device::lbre_r)
+int dp835x_device::lbre_r()
{
if (m_lc == (m_cgpi ? 0 : m_char_height - 1))
return 0;
@@ -431,7 +415,7 @@ READ_LINE_MEMBER(dp835x_device::lbre_r)
// hsync_r - poll horizontal sync state
//-------------------------------------------------
-READ_LINE_MEMBER(dp835x_device::hsync_r)
+int dp835x_device::hsync_r()
{
if (m_hsync_on_timer->remaining() > m_hsync_off_timer->remaining())
return m_hsync_active;
@@ -444,7 +428,7 @@ READ_LINE_MEMBER(dp835x_device::hsync_r)
// vsync_r - poll vertical sync state
//-------------------------------------------------
-READ_LINE_MEMBER(dp835x_device::vsync_r)
+int dp835x_device::vsync_r()
{
int vsync_begin = m_video_scan_lines + m_vsync_delay[m_60hz_refresh ? 1 : 0];
int vsync_end = vsync_begin + m_vsync_width[m_60hz_refresh ? 1 : 0];
@@ -456,7 +440,7 @@ READ_LINE_MEMBER(dp835x_device::vsync_r)
// vblank_r - poll vertical blanking state
//-------------------------------------------------
-READ_LINE_MEMBER(dp835x_device::vblank_r)
+int dp835x_device::vblank_r()
{
int vblank_end = m_video_scan_lines + m_vblank_interval[m_60hz_refresh ? 1 : 0] - m_vblank_stop;
return (m_line >= m_video_scan_lines && m_line < vblank_end) ? m_vblank_active : !m_vblank_active;