From b73ac1e9a06efae133643c5c216a89a4551420a6 Mon Sep 17 00:00:00 2001 From: Dirk Best Date: Sun, 29 Nov 2015 18:37:53 +0100 Subject: [PATCH] apricot: use hd6845, cleanup mc6845 --- src/devices/video/mc6845.h | 4 ---- src/mame/drivers/apricot.cpp | 13 ++++++------- 2 files changed, 6 insertions(+), 11 deletions(-) diff --git a/src/devices/video/mc6845.h b/src/devices/video/mc6845.h index 5fc1a72d89d..3d39d449a4e 100644 --- a/src/devices/video/mc6845.h +++ b/src/devices/video/mc6845.h @@ -30,9 +30,6 @@ #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); @@ -106,7 +103,6 @@ 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(device).m_show_border_area = show; } - static void set_interlace_adjust(device_t &device, int value) { downcast(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(device); diff --git a/src/mame/drivers/apricot.cpp b/src/mame/drivers/apricot.cpp index dc9565e8641..f06dd418037 100644 --- a/src/mame/drivers/apricot.cpp +++ b/src/mame/drivers/apricot.cpp @@ -80,7 +80,7 @@ public: DECLARE_WRITE_LINE_MEMBER(write_centronics_fault); DECLARE_WRITE_LINE_MEMBER(write_centronics_perror); - DECLARE_WRITE_LINE_MEMBER(apricot_mc6845_de) { m_display_enabled = state; }; + DECLARE_WRITE_LINE_MEMBER(apricot_hd6845_de) { m_display_enabled = state; }; DECLARE_WRITE_LINE_MEMBER(data_selector_dtr_w) { m_data_selector_dtr = state; }; DECLARE_WRITE_LINE_MEMBER(data_selector_rts_w) { m_data_selector_rts = state; }; @@ -95,7 +95,7 @@ private: required_device m_cpu; required_device m_iop; required_device m_ram; - required_device m_crtc; + required_device m_crtc; required_device m_ppi; required_device m_pic; required_device m_pit; @@ -359,8 +359,8 @@ static ADDRESS_MAP_START( apricot_io, AS_IO, 16, apricot_state ) AM_RANGE(0x62, 0x63) AM_READ8(sio_ca_r, 0x00ff) AM_DEVWRITE8("ic15", z80sio0_device, ca_w, 0x00ff) AM_RANGE(0x64, 0x65) AM_READ8(sio_db_r, 0x00ff) AM_DEVWRITE8("ic15", z80sio0_device, db_w, 0x00ff) AM_RANGE(0x66, 0x67) AM_READ8(sio_cb_r, 0x00ff) AM_DEVWRITE8("ic15", z80sio0_device, cb_w, 0x00ff) - AM_RANGE(0x68, 0x69) AM_MIRROR(0x04) AM_DEVWRITE8("ic30", mc6845_device, address_w, 0x00ff) - AM_RANGE(0x6a, 0x6b) AM_MIRROR(0x04) AM_DEVREADWRITE8("ic30", mc6845_device, register_r, register_w, 0x00ff) + AM_RANGE(0x68, 0x69) AM_MIRROR(0x04) AM_DEVWRITE8("ic30", hd6845_device, address_w, 0x00ff) + AM_RANGE(0x6a, 0x6b) AM_MIRROR(0x04) AM_DEVREADWRITE8("ic30", hd6845_device, register_r, register_w, 0x00ff) AM_RANGE(0x70, 0x71) AM_MIRROR(0x04) AM_WRITE8(i8089_ca1_w, 0x00ff) AM_RANGE(0x72, 0x73) AM_MIRROR(0x04) AM_WRITE8(i8089_ca2_w, 0x00ff) AM_RANGE(0x78, 0x7f) AM_NOP // unavailable @@ -400,12 +400,11 @@ 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(2) + MCFG_MC6845_ADD("ic30", HD6845, "screen", XTAL_15MHz / 10) MCFG_MC6845_SHOW_BORDER_AREA(false) MCFG_MC6845_CHAR_WIDTH(10) MCFG_MC6845_UPDATE_ROW_CB(apricot_state, crtc_update_row) - MCFG_MC6845_OUT_DE_CB(WRITELINE(apricot_state, apricot_mc6845_de)) + MCFG_MC6845_OUT_DE_CB(WRITELINE(apricot_state, apricot_hd6845_de)) // sound hardware MCFG_SPEAKER_STANDARD_MONO("mono")