summaryrefslogtreecommitdiffstatshomepage
diff options
context:
space:
mode:
author Dirk Best <mail@dirk-best.de>2015-06-23 10:02:31 +0200
committer Dirk Best <mail@dirk-best.de>2015-06-23 10:02:31 +0200
commit5bce2574a94f4b3bcf94c7324c7fd8fd825ce144 (patch)
tree412256fc59cf9b11ad158ae00fbcd00da504d656
parent782d37b6c7847dc49e12fb640d0f599a2d7d5f98 (diff)
mc6845: only apply the interlace adjust to the apricot since it causes
issues with other systems. really need proper interlace support.
-rw-r--r--src/emu/video/mc6845.c8
-rw-r--r--src/emu/video/mc6845.h5
-rw-r--r--src/mess/drivers/apricot.c1
3 files changed, 9 insertions, 5 deletions
diff --git a/src/emu/video/mc6845.c b/src/emu/video/mc6845.c
index 7b9f0b1fc1f..60f98535aa0 100644
--- a/src/emu/video/mc6845.c
+++ b/src/emu/video/mc6845.c
@@ -92,6 +92,7 @@ mc6845_device::mc6845_device(const machine_config &mconfig, device_type type, co
: device_t(mconfig, type, name, tag, owner, clock, shortname, source),
device_video_interface(mconfig, *this, false),
m_show_border_area(true),
+ m_interlace_adjust(0),
m_visarea_adjust_min_x(0),
m_visarea_adjust_max_x(0),
m_visarea_adjust_min_y(0),
@@ -108,6 +109,7 @@ mc6845_device::mc6845_device(const machine_config &mconfig, const char *tag, dev
: device_t(mconfig, MC6845, "MC6845 CRTC", tag, owner, clock, "mc6845", __FILE__),
device_video_interface(mconfig, *this, false),
m_show_border_area(true),
+ m_interlace_adjust(0),
m_visarea_adjust_min_x(0),
m_visarea_adjust_max_x(0),
m_visarea_adjust_min_y(0),
@@ -218,7 +220,7 @@ WRITE8_MEMBER( mc6845_device::register_w )
case 0x06: m_vert_disp = data & 0x7f; break;
case 0x07: m_vert_sync_pos = data & 0x7f; break;
case 0x08: m_mode_control = data & 0xff; break;
- case 0x09: m_max_ras_addr = data & 0x1f; break;
+ case 0x09: m_max_ras_addr = data & 0x1f; if (MODE_INTERLACE_AND_VIDEO) m_max_ras_addr += m_interlace_adjust; break;
case 0x0a: m_cursor_start_ras = data & 0x7f; break;
case 0x0b: m_cursor_end_ras = data & 0x1f; break;
case 0x0c: m_disp_start_addr = ((data & 0x3f) << 8) | (m_disp_start_addr & 0x00ff); break;
@@ -454,10 +456,6 @@ void mc6845_device::recompute_parameters(bool postload)
{
UINT16 hsync_on_pos, hsync_off_pos, vsync_on_pos, vsync_off_pos;
- // needed for the apricot, correct?
- if (MODE_INTERLACE_AND_VIDEO)
- m_max_ras_addr |= 1;
-
UINT16 video_char_height = m_max_ras_addr + 1; // fix garbage at the bottom of the screen (eg victor9k)
// Would be useful for 'interlace and video' mode support...
// UINT16 frame_char_height = (MODE_INTERLACE_AND_VIDEO ? m_max_ras_addr / 2 : m_max_ras_addr) + 1;
diff --git a/src/emu/video/mc6845.h b/src/emu/video/mc6845.h
index db7e80f84a5..053c2b9491e 100644
--- a/src/emu/video/mc6845.h
+++ b/src/emu/video/mc6845.h
@@ -30,6 +30,9 @@
#define MCFG_MC6845_SHOW_BORDER_AREA(_show) \
mc6845_device::set_show_border_area(*device, _show);
+#define MCFG_MC6845_INTERLACE_ADJUST(_value) \
+ mc6845_device::set_interlace_adjust(*device, _value);
+
#define MCFG_MC6845_VISAREA_ADJUST(_minx, _maxx, _miny, _maxy) \
mc6845_device::set_visarea_adjust(*device, _minx, _maxx, _miny, _maxy);
@@ -96,6 +99,7 @@ public:
mc6845_device(const machine_config &mconfig, device_type type, const char *name, const char *tag, device_t *owner, UINT32 clock, const char *shortname, const char *source);
static void set_show_border_area(device_t &device, bool show) { downcast<mc6845_device &>(device).m_show_border_area = show; }
+ static void set_interlace_adjust(device_t &device, int value) { downcast<mc6845_device &>(device).m_interlace_adjust = value; }
static void set_visarea_adjust(device_t &device, int min_x, int max_x, int min_y, int max_y)
{
mc6845_device &dev = downcast<mc6845_device &>(device);
@@ -272,6 +276,7 @@ protected:
************************/
bool m_show_border_area; /* visible screen area (false) active display (true) active display + blanking */
+ int m_interlace_adjust; /* adjust max ras in interlace mode */
/* visible screen area adjustment */
int m_visarea_adjust_min_x;
diff --git a/src/mess/drivers/apricot.c b/src/mess/drivers/apricot.c
index 15f5f1d5982..0f11ca0d635 100644
--- a/src/mess/drivers/apricot.c
+++ b/src/mess/drivers/apricot.c
@@ -401,6 +401,7 @@ static MACHINE_CONFIG_START( apricot, apricot_state )
MCFG_PALETTE_ADD_MONOCHROME_GREEN_HIGHLIGHT("palette")
MCFG_MC6845_ADD("ic30", MC6845, "screen", XTAL_15MHz / 10)
+ MCFG_MC6845_INTERLACE_ADJUST(1)
MCFG_MC6845_SHOW_BORDER_AREA(false)
MCFG_MC6845_CHAR_WIDTH(10)
MCFG_MC6845_UPDATE_ROW_CB(apricot_state, crtc_update_row)