From 502197b9c80b5f384dccc939fc93e1dbd6bf90c1 Mon Sep 17 00:00:00 2001 From: Ivan Vangelista Date: Mon, 11 Feb 2019 18:18:45 +0100 Subject: screen.h: adddedconstructor for monochrom screens and removed MCFG_SCREEN_ADD_MONOCHROME and MCFG_SCREEN_COLOR (nw) misc MACHINE_CONFIG removal (nw) started work on voltage_regulator_device macros removal (nw) --- src/devices/bus/isa/cga.cpp | 29 +++++++++++++++-------------- 1 file changed, 15 insertions(+), 14 deletions(-) (limited to 'src/devices/bus/isa/cga.cpp') diff --git a/src/devices/bus/isa/cga.cpp b/src/devices/bus/isa/cga.cpp index f5fb8f185d7..9ebb3e9bdd3 100644 --- a/src/devices/bus/isa/cga.cpp +++ b/src/devices/bus/isa/cga.cpp @@ -261,12 +261,13 @@ DEFINE_DEVICE_TYPE(ISA8_CGA, isa8_cga_device, "cga", "IBM Color/Graphics Monitor // device_add_mconfig - add device configuration //------------------------------------------------- -MACHINE_CONFIG_START(isa8_cga_device::device_add_mconfig) - MCFG_SCREEN_ADD(CGA_SCREEN_NAME, RASTER) - MCFG_SCREEN_RAW_PARAMS(XTAL(14'318'181),912,0,640,262,0,200) - MCFG_SCREEN_UPDATE_DEVICE( DEVICE_SELF, isa8_cga_device, screen_update ) +void isa8_cga_device::device_add_mconfig(machine_config &config) +{ + screen_device &screen(SCREEN(config, CGA_SCREEN_NAME, SCREEN_TYPE_RASTER)); + screen.set_raw(XTAL(14'318'181), 912, 0, 640, 262, 0, 200); + screen.set_screen_update(FUNC(isa8_cga_device::screen_update)); - MCFG_PALETTE_ADD("palette", /* CGA_PALETTE_SETS * 16*/ 65536 ) + PALETTE(config, m_palette).set_entries(/* CGA_PALETTE_SETS * 16*/ 65536); MC6845(config, m_crtc, XTAL(14'318'181)/16); m_crtc->set_screen(nullptr); @@ -276,7 +277,7 @@ MACHINE_CONFIG_START(isa8_cga_device::device_add_mconfig) m_crtc->out_hsync_callback().set(FUNC(isa8_cga_device::hsync_changed)); m_crtc->out_vsync_callback().set(FUNC(isa8_cga_device::vsync_changed)); m_crtc->set_reconfigure_callback(FUNC(isa8_cga_device::reconfigure), this); -MACHINE_CONFIG_END +} ioport_constructor isa8_cga_device::device_input_ports() const { @@ -1693,13 +1694,13 @@ const tiny_rom_entry *isa8_cga_mc1502_device::device_rom_region() const DEFINE_DEVICE_TYPE(ISA8_CGA_M24, isa8_cga_m24_device, "cga_m24", "Olivetti M24 CGA") -MACHINE_CONFIG_START(isa8_cga_m24_device::device_add_mconfig) +void isa8_cga_m24_device::device_add_mconfig(machine_config &config) +{ isa8_cga_device::device_add_mconfig(config); - MCFG_DEVICE_MODIFY(CGA_SCREEN_NAME) - MCFG_SCREEN_RAW_PARAMS(XTAL(14'318'181),912,0,640,462,0,400) + subdevice(CGA_SCREEN_NAME)->set_raw(XTAL(14'318'181), 912, 0, 640, 462, 0, 400); m_crtc->set_reconfigure_callback(FUNC(isa8_cga_m24_device::reconfigure), this); -MACHINE_CONFIG_END +} isa8_cga_m24_device::isa8_cga_m24_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) : isa8_cga_m24_device(mconfig, ISA8_CGA_M24, tag, owner, clock) @@ -1886,12 +1887,12 @@ MC6845_UPDATE_ROW( isa8_cga_m24_device::m24_gfx_1bpp_m24_update_row ) DEFINE_DEVICE_TYPE(ISA8_CGA_CPORTIII, isa8_cga_cportiii_device, "cga_cportiii", "Compaq Portable III CGA") -MACHINE_CONFIG_START(isa8_cga_cportiii_device::device_add_mconfig) +void isa8_cga_cportiii_device::device_add_mconfig(machine_config &config) +{ isa8_cga_m24_device::device_add_mconfig(config); - MCFG_DEVICE_MODIFY(CGA_SCREEN_NAME) - MCFG_SCREEN_COLOR(rgb_t(255, 125, 0)) -MACHINE_CONFIG_END + subdevice(CGA_SCREEN_NAME)->set_color(rgb_t(255, 125, 0)); +} isa8_cga_cportiii_device::isa8_cga_cportiii_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) : isa8_cga_m24_device(mconfig, ISA8_CGA_CPORTIII, tag, owner, clock) -- cgit v1.2.3