diff options
Diffstat (limited to 'src/devices/bus/isa/cga.cpp')
-rw-r--r-- | src/devices/bus/isa/cga.cpp | 72 |
1 files changed, 30 insertions, 42 deletions
diff --git a/src/devices/bus/isa/cga.cpp b/src/devices/bus/isa/cga.cpp index f44cdfb5900..c20fc47f403 100644 --- a/src/devices/bus/isa/cga.cpp +++ b/src/devices/bus/isa/cga.cpp @@ -273,7 +273,7 @@ ROM_END // GLOBAL VARIABLES //************************************************************************** -const device_type ISA8_CGA = device_creator<isa8_cga_device>; +DEFINE_DEVICE_TYPE(ISA8_CGA, isa8_cga_device, "cga", "IBM Color/Graphics Monitor Adapter") //------------------------------------------------- // machine_config_additions - device-specific @@ -305,29 +305,18 @@ const tiny_rom_entry *isa8_cga_device::device_rom_region() const //------------------------------------------------- isa8_cga_device::isa8_cga_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) : - device_t(mconfig, ISA8_CGA, "IBM Color/Graphics Monitor Adapter", tag, owner, clock, "cga", __FILE__), - device_isa8_card_interface(mconfig, *this), - m_cga_config(*this, "cga_config"), m_framecnt(0), m_mode_control(0), m_color_select(0), - m_update_row_type(-1), m_y(0), m_chr_gen_base(nullptr), m_chr_gen(nullptr), m_vsync(0), m_hsync(0), - m_vram_size( 0x4000 ), m_plantronics(0), - m_palette(*this, "palette"), - m_screen(*this, "screen") + isa8_cga_device(mconfig, ISA8_CGA, tag, owner, clock) { - m_chr_gen_offset[0] = m_chr_gen_offset[2] = 0x1800; - m_chr_gen_offset[1] = m_chr_gen_offset[3] = 0x1000; - m_font_selection_mask = 0x01; - m_start_offset = 0; - m_superimpose = false; } -isa8_cga_device::isa8_cga_device(const machine_config &mconfig, device_type type, const char *name, const char *tag, device_t *owner, uint32_t clock, const char *shortname, const char *source) : - device_t(mconfig, type, name, tag, owner, clock, shortname, source), - device_isa8_card_interface(mconfig, *this), - m_cga_config(*this, "cga_config"), m_framecnt(0), m_mode_control(0), m_color_select(0), - m_update_row_type(-1), m_y(0), m_chr_gen_base(nullptr), m_chr_gen(nullptr), m_vsync(0), m_hsync(0), - m_vram_size( 0x4000 ), m_plantronics(0), - m_palette(*this, "palette"), - m_screen(*this, "screen") +isa8_cga_device::isa8_cga_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, uint32_t clock) : + device_t(mconfig, type, tag, owner, clock), + device_isa8_card_interface(mconfig, *this), + m_cga_config(*this, "cga_config"), m_framecnt(0), m_mode_control(0), m_color_select(0), + m_update_row_type(-1), m_y(0), m_chr_gen_base(nullptr), m_chr_gen(nullptr), m_vsync(0), m_hsync(0), + m_vram_size( 0x4000 ), m_plantronics(0), + m_palette(*this, "palette"), + m_screen(*this, "screen") { m_chr_gen_offset[0] = m_chr_gen_offset[2] = 0x1800; m_chr_gen_offset[1] = m_chr_gen_offset[3] = 0x1000; @@ -439,14 +428,14 @@ uint32_t isa8_cga_device::screen_update(screen_device &screen, bitmap_rgb32 &bit } -const device_type ISA8_CGA_POISK2 = device_creator<isa8_cga_poisk2_device>; +DEFINE_DEVICE_TYPE(ISA8_CGA_POISK2, isa8_cga_poisk2_device, "cga_poisk2", "ISA8_CGA_POISK2") //------------------------------------------------- // isa8_cga_poisk2_device - constructor //------------------------------------------------- isa8_cga_poisk2_device::isa8_cga_poisk2_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) : - isa8_cga_device( mconfig, ISA8_CGA_POISK2, "ISA8_CGA_POISK2", tag, owner, clock, "cga_poisk2", __FILE__) + isa8_cga_device(mconfig, ISA8_CGA_POISK2, tag, owner, clock) { m_chr_gen_offset[0] = 0x0000; m_chr_gen_offset[1] = 0x0800; @@ -468,20 +457,19 @@ const tiny_rom_entry *isa8_cga_poisk2_device::device_rom_region() const /* for superimposing CGA over a different source video (i.e. tetriskr) */ -const device_type ISA8_CGA_SUPERIMPOSE = device_creator<isa8_cga_superimpose_device>; +DEFINE_DEVICE_TYPE(ISA8_CGA_SUPERIMPOSE, isa8_cga_superimpose_device, "cga_superimpose", "ISA8_CGA_SUPERIMPOSE") //------------------------------------------------- // isa8_cga_superimpose_device - constructor //------------------------------------------------- isa8_cga_superimpose_device::isa8_cga_superimpose_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) : - isa8_cga_device( mconfig, ISA8_CGA_SUPERIMPOSE, "ISA8_CGA_SUPERIMPOSE", tag, owner, clock, "cga_superimpose", __FILE__) + isa8_cga_superimpose_device(mconfig, ISA8_CGA_SUPERIMPOSE, tag, owner, clock) { - m_superimpose = true; } -isa8_cga_superimpose_device::isa8_cga_superimpose_device(const machine_config &mconfig, device_type type, const char *name, const char *tag, device_t *owner, uint32_t clock, const char *shortname, const char *source) : - isa8_cga_device( mconfig, type, name, tag, owner, clock, shortname, source) +isa8_cga_superimpose_device::isa8_cga_superimpose_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, uint32_t clock) : + isa8_cga_device(mconfig, type, tag, owner, clock) { m_superimpose = true; } @@ -1538,7 +1526,7 @@ WRITE8_MEMBER( isa8_cga_pc1512_device::vram_w ) } -const device_type ISA8_CGA_PC1512 = device_creator<isa8_cga_pc1512_device>; +DEFINE_DEVICE_TYPE(ISA8_CGA_PC1512, isa8_cga_pc1512_device, "cga_pc1512", "ISA8_CGA_PC1512") const offs_t isa8_cga_pc1512_device::vram_offset[4]= { 0x0000, 0x4000, 0x8000, 0xC000 }; const uint8_t isa8_cga_pc1512_device::mc6845_writeonce_register[31] = @@ -1551,7 +1539,7 @@ const uint8_t isa8_cga_pc1512_device::mc6845_writeonce_register[31] = //------------------------------------------------- isa8_cga_pc1512_device::isa8_cga_pc1512_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) : - isa8_cga_device( mconfig, ISA8_CGA_PC1512, "ISA8_CGA_PC1512", tag, owner, clock, "cga_pc1512", __FILE__), m_write(0), m_read(0), m_mc6845_address(0) + isa8_cga_device(mconfig, ISA8_CGA_PC1512, tag, owner, clock), m_write(0), m_read(0), m_mc6845_address(0) { m_vram_size = 0x10000; m_chr_gen_offset[0] = 0x0000; @@ -1673,7 +1661,7 @@ READ8_MEMBER( isa8_wyse700_device::io_read ) } -const device_type ISA8_WYSE700 = device_creator<isa8_wyse700_device>; +DEFINE_DEVICE_TYPE(ISA8_WYSE700, isa8_wyse700_device, "wyse700", "Wyse 700") //------------------------------------------------- @@ -1681,7 +1669,7 @@ const device_type ISA8_WYSE700 = device_creator<isa8_wyse700_device>; //------------------------------------------------- isa8_wyse700_device::isa8_wyse700_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) : - isa8_cga_device( mconfig, ISA8_WYSE700, "Wyse 700", tag, owner, clock, "wyse700", __FILE__), m_bank_offset(0), m_bank_base(0), m_control(0) + isa8_cga_device(mconfig, ISA8_WYSE700, tag, owner, clock), m_bank_offset(0), m_bank_base(0), m_control(0) { m_vram_size = 0x20000; m_start_offset = 0x18000; @@ -1762,14 +1750,14 @@ uint32_t isa8_wyse700_device::screen_update(screen_device &screen, bitmap_rgb32 } -const device_type ISA8_EC1841_0002 = device_creator<isa8_ec1841_0002_device>; +DEFINE_DEVICE_TYPE(ISA8_EC1841_0002, isa8_ec1841_0002_device, "ec1841_0002", "EC 1841.0002 (CGA)") //------------------------------------------------- // isa8_ec1841_0002_device - constructor //------------------------------------------------- isa8_ec1841_0002_device::isa8_ec1841_0002_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) : - isa8_cga_device( mconfig, ISA8_EC1841_0002, "EC 1841.0002 (CGA)", tag, owner, clock, "ec1841_0002", __FILE__), m_p3df(0) + isa8_cga_device(mconfig, ISA8_EC1841_0002, tag, owner, clock), m_p3df(0) { } @@ -1848,14 +1836,14 @@ READ8_MEMBER( isa8_ec1841_0002_device::io_read ) return data; } -const device_type ISA8_CGA_MC1502 = device_creator<isa8_cga_mc1502_device>; +DEFINE_DEVICE_TYPE(ISA8_CGA_MC1502, isa8_cga_mc1502_device, "cga_mc1502", "MC1502 CGA") //------------------------------------------------- // isa8_cga_mc1502_device - constructor //------------------------------------------------- isa8_cga_mc1502_device::isa8_cga_mc1502_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) : - isa8_cga_device( mconfig, ISA8_CGA_MC1502, "MC1502 CGA", tag, owner, clock, "cga_mc1502", __FILE__) + isa8_cga_device(mconfig, ISA8_CGA_MC1502, tag, owner, clock) { m_vram_size = 0x8000; m_chr_gen_offset[0] = 0x0000; @@ -1877,14 +1865,14 @@ const tiny_rom_entry *isa8_cga_iskr1031_device::device_rom_region() const return ROM_NAME( cga_iskr1031 ); } -const device_type ISA8_CGA_ISKR1031 = device_creator<isa8_cga_iskr1031_device>; +DEFINE_DEVICE_TYPE(ISA8_CGA_ISKR1031, isa8_cga_iskr1031_device, "cga_iskr1031", "Iskra-1031 CGA") //------------------------------------------------- // isa8_cga_iskr1031_device - constructor //------------------------------------------------- isa8_cga_iskr1031_device::isa8_cga_iskr1031_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) : - isa8_cga_device( mconfig, ISA8_CGA_ISKR1031, "Iskra-1031 CGA", tag, owner, clock, "cga_iskr1031", __FILE__) + isa8_cga_device(mconfig, ISA8_CGA_ISKR1031, tag, owner, clock) { } @@ -1902,14 +1890,14 @@ const tiny_rom_entry *isa8_cga_iskr1030m_device::device_rom_region() const return ROM_NAME( cga_iskr1030m ); } -const device_type ISA8_CGA_ISKR1030M = device_creator<isa8_cga_iskr1030m_device>; +DEFINE_DEVICE_TYPE(ISA8_CGA_ISKR1030M, isa8_cga_iskr1030m_device, "cga_iskr1030m", "Iskra-1030M CGA") //------------------------------------------------- // isa8_cga_iskr1030m_device - constructor //------------------------------------------------- isa8_cga_iskr1030m_device::isa8_cga_iskr1030m_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) : - isa8_cga_device( mconfig, ISA8_CGA_ISKR1030M, "Iskra-1030M CGA", tag, owner, clock, "cga_iskr1030m", __FILE__) + isa8_cga_device(mconfig, ISA8_CGA_ISKR1030M, tag, owner, clock) { } @@ -1926,7 +1914,7 @@ const tiny_rom_entry *isa8_cga_mc1502_device::device_rom_region() const return ROM_NAME( mc1502 ); } -const device_type ISA8_CGA_M24 = device_creator<isa8_cga_m24_device>; +DEFINE_DEVICE_TYPE(ISA8_CGA_M24, isa8_cga_m24_device, "cga_m24", "Olivetti M24 CGA") static MACHINE_CONFIG_DERIVED( m24, cga ) MCFG_DEVICE_MODIFY(CGA_SCREEN_NAME) @@ -1940,7 +1928,7 @@ machine_config_constructor isa8_cga_m24_device::device_mconfig_additions() const return MACHINE_CONFIG_NAME( m24 ); } isa8_cga_m24_device::isa8_cga_m24_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) : - isa8_cga_device( mconfig, ISA8_CGA_M24, "Olivetti M24 CGA", tag, owner, clock, "cga_m24", __FILE__), m_mode2(0), m_index(0) + isa8_cga_device(mconfig, ISA8_CGA_M24, tag, owner, clock), m_mode2(0), m_index(0) { m_vram_size = 0x8000; } |