summaryrefslogtreecommitdiffstatshomepage
path: root/src/devices/bus/isa
diff options
context:
space:
mode:
Diffstat (limited to 'src/devices/bus/isa')
-rw-r--r--src/devices/bus/isa/cga.cpp388
-rw-r--r--src/devices/bus/isa/cga.h30
-rw-r--r--src/devices/bus/isa/isa.cpp9
-rw-r--r--src/devices/bus/isa/isa.h3
-rw-r--r--src/devices/bus/isa/isa_cards.cpp2
-rw-r--r--src/devices/bus/isa/omti8621.cpp2
6 files changed, 181 insertions, 253 deletions
diff --git a/src/devices/bus/isa/cga.cpp b/src/devices/bus/isa/cga.cpp
index 2f810bdafdb..91ee69d48b5 100644
--- a/src/devices/bus/isa/cga.cpp
+++ b/src/devices/bus/isa/cga.cpp
@@ -190,22 +190,22 @@ MC6845_UPDATE_ROW( isa8_cga_device::crtc_update_row )
switch (m_update_row_type)
{
case CGA_TEXT_INTEN:
- cga_text_inten_update_row(bitmap, cliprect, ma, ra, y, x_count, cursor_x, de, hbp, vbp);
+ cga_text<false, false, false, false, 8>(bitmap, cliprect, ma, ra, y, x_count, cursor_x, de, hbp, vbp);
break;
case CGA_TEXT_INTEN_ALT:
- cga_text_inten_alt_update_row(bitmap, cliprect, ma, ra, y, x_count, cursor_x, de, hbp, vbp);
+ cga_text<false, false, false, true, 8>(bitmap, cliprect, ma, ra, y, x_count, cursor_x, de, hbp, vbp);
break;
case CGA_TEXT_INTEN_CG:
- cga_text_inten_comp_grey_update_row(bitmap, cliprect, ma, ra, y, x_count, cursor_x, de, hbp, vbp);
+ cga_text<false, false, true, false, 8>(bitmap, cliprect, ma, ra, y, x_count, cursor_x, de, hbp, vbp);
break;
case CGA_TEXT_BLINK:
- cga_text_blink_update_row(bitmap, cliprect, ma, ra, y, x_count, cursor_x, de, hbp, vbp);
+ cga_text<true, false, false, false, 8>(bitmap, cliprect, ma, ra, y, x_count, cursor_x, de, hbp, vbp);
break;
case CGA_TEXT_BLINK_ALT:
- cga_text_blink_alt_update_row(bitmap, cliprect, ma, ra, y, x_count, cursor_x, de, hbp, vbp);
+ cga_text<true, false, false, true, 8>(bitmap, cliprect, ma, ra, y, x_count, cursor_x, de, hbp, vbp);
break;
case CGA_TEXT_BLINK_SI:
- cga_text_blink_update_row_si(bitmap, cliprect, ma, ra, y, x_count, cursor_x, de, hbp, vbp);
+ cga_text<true, true, false, false, 8>(bitmap, cliprect, ma, ra, y, x_count, cursor_x, de, hbp, vbp);
break;
case CGA_GFX_1BPP:
cga_gfx_1bpp_update_row(bitmap, cliprect, ma, ra, y, x_count, cursor_x, de, hbp, vbp);
@@ -467,200 +467,41 @@ isa8_cga_superimpose_device::isa8_cga_superimpose_device(const machine_config &m
m_superimpose = true;
}
-/***************************************************************************
- Draw text mode with 40x25 characters (default) with high intensity bg.
- The character cell size is 16x8
-***************************************************************************/
-
-MC6845_UPDATE_ROW( isa8_cga_device::cga_text_inten_update_row )
-{
- uint8_t *videoram = &m_vram[m_start_offset];
- uint32_t *p = &bitmap.pix32(y);
- const rgb_t *palette = m_palette->palette()->entry_list_raw();
- int i;
-
- if ( y == 0 ) CGA_LOG(1,"cga_text_inten_update_row",("\n"));
- for ( i = 0; i < x_count; i++ )
- {
- uint16_t offset = ( ( ma + i ) << 1 ) & 0x3fff;
- uint8_t chr = videoram[ offset ];
- uint8_t attr = videoram[ offset +1 ];
- uint8_t data = m_chr_gen[ chr * 8 + ra ];
- uint16_t fg = attr & 0x0F;
- uint16_t bg = attr >> 4;
-
- if ( i == cursor_x && ( m_framecnt & 0x08 ) )
- {
- data = 0xFF;
- }
-
- *p = palette[( data & 0x80 ) ? fg : bg]; p++;
- *p = palette[( data & 0x40 ) ? fg : bg]; p++;
- *p = palette[( data & 0x20 ) ? fg : bg]; p++;
- *p = palette[( data & 0x10 ) ? fg : bg]; p++;
- *p = palette[( data & 0x08 ) ? fg : bg]; p++;
- *p = palette[( data & 0x04 ) ? fg : bg]; p++;
- *p = palette[( data & 0x02 ) ? fg : bg]; p++;
- *p = palette[( data & 0x01 ) ? fg : bg]; p++;
- }
-}
-
-
-/***************************************************************************
- Draw text mode with 40x25 characters (default) with high intensity bg.
- The character cell size is 16x8. Composite monitor, greyscale.
-***************************************************************************/
-
-MC6845_UPDATE_ROW( isa8_cga_device::cga_text_inten_comp_grey_update_row )
-{
- uint8_t *videoram = &m_vram[m_start_offset];
- uint32_t *p = &bitmap.pix32(y);
- const rgb_t *palette = m_palette->palette()->entry_list_raw();
- int i;
-
- if ( y == 0 ) CGA_LOG(1,"cga_text_inten_comp_grey_update_row",("\n"));
- for ( i = 0; i < x_count; i++ )
- {
- uint16_t offset = ( ( ma + i ) << 1 ) & 0x3fff;
- uint8_t chr = videoram[ offset ];
- uint8_t attr = videoram[ offset +1 ];
- uint8_t data = m_chr_gen[ chr * 8 + ra ];
- uint16_t fg = 0x10 + ( attr & 0x0F );
- uint16_t bg = 0x10 + ( ( attr >> 4 ) & 0x07 );
-
- if ( i == cursor_x && ( m_framecnt & 0x08 ) )
- {
- data = 0xFF;
- }
-
- *p = palette[( data & 0x80 ) ? fg : bg]; p++;
- *p = palette[( data & 0x40 ) ? fg : bg]; p++;
- *p = palette[( data & 0x20 ) ? fg : bg]; p++;
- *p = palette[( data & 0x10 ) ? fg : bg]; p++;
- *p = palette[( data & 0x08 ) ? fg : bg]; p++;
- *p = palette[( data & 0x04 ) ? fg : bg]; p++;
- *p = palette[( data & 0x02 ) ? fg : bg]; p++;
- *p = palette[( data & 0x01 ) ? fg : bg]; p++;
- }
-}
-
-/***************************************************************************
- Draw text mode with 40x25 characters (default) with high intensity bg.
- The character cell size is 16x8
-***************************************************************************/
-
-MC6845_UPDATE_ROW( isa8_cga_device::cga_text_inten_alt_update_row )
-{
- uint8_t *videoram = &m_vram[m_start_offset];
- uint32_t *p = &bitmap.pix32(y);
- const rgb_t *palette = m_palette->palette()->entry_list_raw();
- int i;
-
- if ( y == 0 ) CGA_LOG(1,"cga_text_inten_alt_update_row",("\n"));
- for ( i = 0; i < x_count; i++ )
- {
- uint16_t offset = ( ( ma + i ) << 1 ) & 0x3fff;
- uint8_t chr = videoram[ offset ];
- uint8_t attr = videoram[ offset +1 ];
- uint8_t data = m_chr_gen[ chr * 8 + ra ];
- uint16_t fg = attr & 0x0F;
-
- if ( i == cursor_x && ( m_framecnt & 0x08 ) )
- {
- data = 0xFF;
- }
-
- *p = palette[( data & 0x80 ) ? fg : 0]; p++;
- *p = palette[( data & 0x40 ) ? fg : 0]; p++;
- *p = palette[( data & 0x20 ) ? fg : 0]; p++;
- *p = palette[( data & 0x10 ) ? fg : 0]; p++;
- *p = palette[( data & 0x08 ) ? fg : 0]; p++;
- *p = palette[( data & 0x04 ) ? fg : 0]; p++;
- *p = palette[( data & 0x02 ) ? fg : 0]; p++;
- *p = palette[( data & 0x01 ) ? fg : 0]; p++;
- }
-}
-
-
-/***************************************************************************
- Draw text mode with 40x25 characters (default) and blinking colors.
- The character cell size is 16x8
-***************************************************************************/
-
-MC6845_UPDATE_ROW( isa8_cga_device::cga_text_blink_update_row )
+template<bool blink, bool si, bool comp, bool alt, int width>
+MC6845_UPDATE_ROW( isa8_cga_device::cga_text )
{
uint8_t *videoram = &m_vram[m_start_offset];
uint32_t *p = &bitmap.pix32(y);
const rgb_t *palette = m_palette->palette()->entry_list_raw();
int i;
- if ( y == 0 ) CGA_LOG(1,"cga_text_blink_update_row",("\n"));
+ if ( y == 0 ) CGA_LOG(1,"cga_text_8",("\n"));
for ( i = 0; i < x_count; i++ )
{
uint16_t offset = ( ( ma + i ) << 1 ) & 0x3fff;
uint8_t chr = videoram[ offset ];
uint8_t attr = videoram[ offset +1 ];
- uint8_t data = m_chr_gen[ chr * 8 + ra ];
- uint16_t fg = attr & 0x0F;
- uint16_t bg = (attr >> 4) & 0x07;
+ uint8_t data = m_chr_gen[ chr * width + ra ];
+ uint16_t fg, bg;
+ uint8_t xi;
- if ( i == cursor_x )
+ if ( comp )
{
- if ( m_framecnt & 0x08 )
- {
- data = 0xFF;
- }
+ fg = 0x10 + ( attr & 0x0F );
+ bg = alt ? 0 : ( 0x10 + ( ( attr >> 4 ) & 0x07 ) );
}
else
{
- if ( ( attr & 0x80 ) && ( m_framecnt & 0x10 ) )
- {
- data = 0x00;
- }
+ fg = attr & 0x0F;
+ bg = alt ? 0 : ( ( attr >> 4 ) & ( blink ? 0x07 : 0x0f ) );
}
- *p = palette[( data & 0x80 ) ? fg : bg]; p++;
- *p = palette[( data & 0x40 ) ? fg : bg]; p++;
- *p = palette[( data & 0x20 ) ? fg : bg]; p++;
- *p = palette[( data & 0x10 ) ? fg : bg]; p++;
- *p = palette[( data & 0x08 ) ? fg : bg]; p++;
- *p = palette[( data & 0x04 ) ? fg : bg]; p++;
- *p = palette[( data & 0x02 ) ? fg : bg]; p++;
- *p = palette[( data & 0x01 ) ? fg : bg]; p++;
- }
-}
-
-MC6845_UPDATE_ROW( isa8_cga_device::cga_text_blink_update_row_si )
-{
- uint8_t *videoram = &m_vram[m_start_offset];
- uint32_t *p = &bitmap.pix32(y);
- const rgb_t *palette = m_palette->palette()->entry_list_raw();
- int i;
-
- if ( y == 0 ) CGA_LOG(1,"cga_text_blink_update_row_si",("\n"));
- for ( i = 0; i < x_count; i++ )
- {
- uint16_t offset = ( ( ma + i ) << 1 ) & 0x3fff;
- uint8_t chr = videoram[ offset ];
- uint8_t attr = videoram[ offset +1 ];
- uint8_t data = m_chr_gen[ chr * 8 + ra ];
- uint16_t fg = attr & 0x0F;
- uint16_t bg = (attr >> 4) & 0x07;
- uint8_t xi;
-
- if ( i == cursor_x )
- {
- if ( m_framecnt & 0x08 )
- {
- data = 0xFF;
- }
- }
- else
+ if ( ( i == cursor_x ) && ( m_framecnt & 0x08 ) )
+ data = 0xFF;
+ else if ( blink && ( attr & 0x80 ) && ( m_framecnt & 0x10 ) )
{
- if ( ( attr & 0x80 ) && ( m_framecnt & 0x10 ) )
- {
- data = 0x00;
- }
+ data = 0x00;
+ bg = ( attr >> 4 ) & 0x07;
}
for(xi=0;xi<8;xi++)
@@ -669,62 +510,13 @@ MC6845_UPDATE_ROW( isa8_cga_device::cga_text_blink_update_row_si )
dot = (data & (1 << (7-xi)));
pen_data = dot ? fg : bg;
- if(pen_data || dot)
+ if(!si || (pen_data || dot))
*p = palette[pen_data];
p++;
}
}
}
-/***************************************************************************
- Draw text mode with 40x25 characters (default) and blinking colors.
- The character cell size is 16x8
-***************************************************************************/
-
-MC6845_UPDATE_ROW( isa8_cga_device::cga_text_blink_alt_update_row )
-{
- uint8_t *videoram = &m_vram[m_start_offset];
- uint32_t *p = &bitmap.pix32(y);
- const rgb_t *palette = m_palette->palette()->entry_list_raw();
- int i;
-
- if ( y == 0 ) CGA_LOG(1,"cga_text_blink_alt_update_row",("\n"));
- for ( i = 0; i < x_count; i++ )
- {
- uint16_t offset = ( ( ma + i ) << 1 ) & 0x3fff;
- uint8_t chr = videoram[ offset ];
- uint8_t attr = videoram[ offset +1 ];
- uint8_t data = m_chr_gen[ chr * 8 + ra ];
- uint16_t fg = attr & 0x07;
- uint16_t bg = 0;
-
- if ( i == cursor_x )
- {
- if ( m_framecnt & 0x08 )
- {
- data = 0xFF;
- }
- }
- else
- {
- if ( ( attr & 0x80 ) && ( m_framecnt & 0x10 ) )
- {
- data = 0x00;
- bg = ( attr >> 4 ) & 0x07;
- }
- }
-
- *p = palette[( data & 0x80 ) ? fg : bg]; p++;
- *p = palette[( data & 0x40 ) ? fg : bg]; p++;
- *p = palette[( data & 0x20 ) ? fg : bg]; p++;
- *p = palette[( data & 0x10 ) ? fg : bg]; p++;
- *p = palette[( data & 0x08 ) ? fg : bg]; p++;
- *p = palette[( data & 0x04 ) ? fg : bg]; p++;
- *p = palette[( data & 0x02 ) ? fg : bg]; p++;
- *p = palette[( data & 0x01 ) ? fg : bg]; p++;
- }
-}
-
/* The lo-res (320x200) graphics mode on a colour composite monitor */
@@ -1919,16 +1711,36 @@ MACHINE_CONFIG_MEMBER( isa8_cga_m24_device::device_add_mconfig )
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_device(mconfig, ISA8_CGA_M24, tag, owner, clock), m_mode2(0), m_index(0)
+ isa8_cga_m24_device(mconfig, ISA8_CGA_M24, tag, owner, clock)
+{
+}
+
+isa8_cga_m24_device::isa8_cga_m24_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_mode2(0), m_index(0)
{
m_vram_size = 0x8000;
}
+ROM_START(cga_m24)
+ ROM_REGION(0x2000, "gfx1", 0)
+ ROM_LOAD("m24 graphics board go380 258 pqbq.bin", 0x00000, 0x1000, CRC(04495786) SHA1(ea34ee527c5632d049ec11a7ae0fde9e6dee545f))
+
+ ROM_REGION(0x1000, "crtc_prom", 0)
+ ROM_LOAD("m24 graphics board go380 gi 9433-0088.bin", 0x00000, 0x1000, CRC(5725e660) SHA1(634c2d165d401883a955e144a0abfa2078a47013))
+ROM_END
+
+const tiny_rom_entry *isa8_cga_m24_device::device_rom_region() const
+{
+ return ROM_NAME(cga_m24);
+}
+
void isa8_cga_m24_device::device_reset()
{
isa8_cga_device::device_reset();
m_mode2 = 0;
m_start_offset = 0;
+ m_chr_gen_offset[0] = m_chr_gen_offset[2] = 0x0000;
+ m_chr_gen_offset[1] = m_chr_gen_offset[3] = 0x0000;
}
MC6845_RECONFIGURE( isa8_cga_m24_device::reconfigure )
@@ -1997,12 +1809,50 @@ READ8_MEMBER( isa8_cga_m24_device::io_read )
return data;
}
-MC6845_UPDATE_ROW( isa8_cga_m24_device::crtc_update_row )
+
+MC6845_UPDATE_ROW(isa8_cga_m24_device::crtc_update_row)
{
if(m_mode2 & 1)
m24_gfx_1bpp_m24_update_row(bitmap, cliprect, ma, ra, y, x_count, cursor_x, de, hbp, vbp);
- else
- isa8_cga_device::crtc_update_row(bitmap, cliprect, ma, ra >> 1, y, x_count, cursor_x, de, hbp, vbp);
+
+ if (m_update_row_type == -1)
+ return;
+
+ y = m_y;
+ if(m_y >= bitmap.height())
+ return;
+
+ switch (m_update_row_type)
+ {
+ case CGA_TEXT_INTEN:
+ cga_text<false, false, false, false, 16>(bitmap, cliprect, ma, ra, y, x_count, cursor_x, de, hbp, vbp);
+ break;
+ case CGA_TEXT_INTEN_ALT:
+ cga_text<false, false, false, true, 16>(bitmap, cliprect, ma, ra, y, x_count, cursor_x, de, hbp, vbp);
+ break;
+ case CGA_TEXT_INTEN_CG: // this hardware doesn't support composite
+ break;
+ case CGA_TEXT_BLINK:
+ cga_text<true, false, false, false, 16>(bitmap, cliprect, ma, ra, y, x_count, cursor_x, de, hbp, vbp);
+ break;
+ case CGA_TEXT_BLINK_ALT:
+ cga_text<true, false, false, true, 16>(bitmap, cliprect, ma, ra, y, x_count, cursor_x, de, hbp, vbp);
+ break;
+ case CGA_TEXT_BLINK_SI:
+ break;
+ case CGA_GFX_1BPP:
+ cga_gfx_1bpp_update_row(bitmap, cliprect, ma, ra >> 1, y, x_count, cursor_x, de, hbp, vbp);
+ break;
+ case CGA_GFX_2BPP:
+ cga_gfx_2bpp_update_row(bitmap, cliprect, ma, ra >> 1, y, x_count, cursor_x, de, hbp, vbp);
+ break;
+ case CGA_GFX_4BPPL:
+ cga_gfx_4bppl_update_row(bitmap, cliprect, ma, ra >> 1, y, x_count, cursor_x, de, hbp, vbp);
+ break;
+ case CGA_GFX_4BPPH:
+ cga_gfx_4bpph_update_row(bitmap, cliprect, ma, ra >> 1, y, x_count, cursor_x, de, hbp, vbp);
+ break;
+ }
}
MC6845_UPDATE_ROW( isa8_cga_m24_device::m24_gfx_1bpp_m24_update_row )
@@ -2040,3 +1890,71 @@ MC6845_UPDATE_ROW( isa8_cga_m24_device::m24_gfx_1bpp_m24_update_row )
*p = palette[( data & 0x01 ) ? fg : 0]; p++;
}
}
+
+DEFINE_DEVICE_TYPE(ISA8_CGA_CPORTIII, isa8_cga_cportiii_device, "cga_cportiii", "Compaq Portable III CGA")
+
+MACHINE_CONFIG_MEMBER( isa8_cga_cportiii_device::device_add_mconfig )
+ 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
+
+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)
+{
+}
+
+ROM_START(cga_cportiii)
+ ROM_REGION(0x2000, "gfx1", 0)
+ ROM_FILL(0, 0x2000, 0)
+ROM_END
+
+const tiny_rom_entry *isa8_cga_cportiii_device::device_rom_region() const
+{
+ return ROM_NAME(cga_cportiii);
+}
+
+void isa8_cga_cportiii_device::device_reset()
+{
+ isa8_cga_m24_device::device_reset();
+ m_isa->install_device(0x13c6, 0x13c7, read8_delegate(FUNC(isa8_cga_cportiii_device::port_13c6_r), this), write8_delegate(FUNC(isa8_cga_cportiii_device::port_13c6_w), this));
+ m_isa->install_device(0x23c6, 0x23c7, read8_delegate(FUNC(isa8_cga_cportiii_device::port_23c6_r), this), write8_delegate(FUNC(isa8_cga_cportiii_device::port_23c6_w), this));
+ m_palette->set_pen_color(0, 100, 25, 0);
+ m_chr_gen_offset[0] = m_chr_gen_offset[2] = 0x0000;
+ m_chr_gen_offset[1] = m_chr_gen_offset[3] = 0x1000;
+}
+
+WRITE8_MEMBER(isa8_cga_cportiii_device::char_ram_write)
+{
+ m_chr_gen_base[offset] = data;
+}
+
+READ8_MEMBER(isa8_cga_cportiii_device::char_ram_read)
+{
+ return m_chr_gen_base[offset];
+}
+
+READ8_MEMBER(isa8_cga_cportiii_device::port_13c6_r)
+{
+ return 0x04;
+}
+
+WRITE8_MEMBER(isa8_cga_cportiii_device::port_13c6_w)
+{
+}
+
+READ8_MEMBER(isa8_cga_cportiii_device::port_23c6_r)
+{
+ return 0;
+}
+
+WRITE8_MEMBER(isa8_cga_cportiii_device::port_23c6_w)
+{
+ m_mode2 = data & 1;
+ if(BIT(data, 3))
+ m_isa->install_memory(0xb8000, 0xb9fff, read8_delegate(FUNC(isa8_cga_cportiii_device::char_ram_read), this), write8_delegate(FUNC(isa8_cga_cportiii_device::char_ram_write), this));
+ else
+ m_isa->install_bank(0xb8000, 0xb8000 + 0x8000 - 1, "bank_cga", &m_vram[0]);
+}
+
diff --git a/src/devices/bus/isa/cga.h b/src/devices/bus/isa/cga.h
index d482859fbb4..ca799d9b8cc 100644
--- a/src/devices/bus/isa/cga.h
+++ b/src/devices/bus/isa/cga.h
@@ -31,12 +31,7 @@ public:
isa8_cga_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock);
virtual MC6845_UPDATE_ROW( crtc_update_row );
- MC6845_UPDATE_ROW( cga_text_inten_update_row );
- MC6845_UPDATE_ROW( cga_text_inten_comp_grey_update_row );
- MC6845_UPDATE_ROW( cga_text_inten_alt_update_row );
- MC6845_UPDATE_ROW( cga_text_blink_update_row );
- MC6845_UPDATE_ROW( cga_text_blink_update_row_si );
- MC6845_UPDATE_ROW( cga_text_blink_alt_update_row );
+ template<bool blink, bool si, bool comp, bool alt, int width> MC6845_UPDATE_ROW( cga_text );
MC6845_UPDATE_ROW( cga_gfx_4bppl_update_row );
MC6845_UPDATE_ROW( cga_gfx_4bpph_update_row );
MC6845_UPDATE_ROW( cga_gfx_2bpp_update_row );
@@ -285,15 +280,34 @@ public:
MC6845_RECONFIGURE(reconfigure);
protected:
+ isa8_cga_m24_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, uint32_t clock);
virtual void device_reset() override;
// optional information overrides
virtual void device_add_mconfig(machine_config &config) override;
-
-private:
+ virtual const tiny_rom_entry *device_rom_region() const override;
uint8_t m_mode2, m_index;
};
// device type definition
DECLARE_DEVICE_TYPE(ISA8_CGA_M24, isa8_cga_m24_device)
+class isa8_cga_cportiii_device :
+ public isa8_cga_m24_device
+{
+public:
+ isa8_cga_cportiii_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock);
+ DECLARE_READ8_MEMBER(port_13c6_r);
+ DECLARE_WRITE8_MEMBER(port_13c6_w);
+ DECLARE_READ8_MEMBER(port_23c6_r);
+ DECLARE_WRITE8_MEMBER(port_23c6_w);
+ DECLARE_READ8_MEMBER(char_ram_read);
+ DECLARE_WRITE8_MEMBER(char_ram_write);
+protected:
+ virtual void device_reset() override;
+ virtual void device_add_mconfig(machine_config &config) override;
+ virtual const tiny_rom_entry *device_rom_region() const override;
+};
+
+DECLARE_DEVICE_TYPE(ISA8_CGA_CPORTIII, isa8_cga_cportiii_device)
+
#endif // MAME_BUS_ISA_CGA_H
diff --git a/src/devices/bus/isa/isa.cpp b/src/devices/bus/isa/isa.cpp
index bb7dc721d96..29acc810fd5 100644
--- a/src/devices/bus/isa/isa.cpp
+++ b/src/devices/bus/isa/isa.cpp
@@ -103,7 +103,7 @@ DEFINE_DEVICE_TYPE(ISA8, isa8_device, "isa8", "8-bit ISA bus")
void isa8_device::static_set_cputag(device_t &device, const char *tag)
{
isa8_device &isa = downcast<isa8_device &>(device);
- isa.m_cputag = tag;
+ isa.m_maincpu.set_tag(tag);
}
void isa8_device::static_set_custom_spaces(device_t &device)
@@ -133,7 +133,7 @@ isa8_device::isa8_device(const machine_config &mconfig, device_type type, const
m_io_config("ISA 8-bit I/O", ENDIANNESS_LITTLE, 8, 16, 0, nullptr),
m_mem16_config("ISA 16-bit mem", ENDIANNESS_LITTLE, 16, 24, 0, nullptr),
m_io16_config("ISA 16-bit I/O", ENDIANNESS_LITTLE, 16, 16, 0, nullptr),
- m_maincpu(nullptr),
+ m_maincpu(*this, finder_base::DUMMY_TAG),
m_iospace(nullptr),
m_memspace(nullptr),
m_out_irq2_cb(*this),
@@ -144,7 +144,7 @@ isa8_device::isa8_device(const machine_config &mconfig, device_type type, const
m_out_irq7_cb(*this),
m_out_drq1_cb(*this),
m_out_drq2_cb(*this),
- m_out_drq3_cb(*this), m_cputag(nullptr),
+ m_out_drq3_cb(*this),
m_write_iochck(*this)
{
for(int i=0;i<8;i++)
@@ -222,8 +222,6 @@ void isa8_device::device_start()
m_out_drq2_cb.resolve_safe();
m_out_drq3_cb.resolve_safe();
- m_maincpu = subdevice<cpu_device>(m_cputag);
-
if (m_allocspaces)
{
m_iospace = &space(AS_ISA_IO);
@@ -337,7 +335,6 @@ void isa8_device::unmap_rom(offs_t start, offs_t end)
bool isa8_device::is_option_rom_space_available(offs_t start, int size)
{
- m_maincpu = machine().device<cpu_device>(m_cputag);
for(int i = 0; i < size; i += 4096) // 4KB granularity should be enough
if(m_memspace->get_read_ptr(start + i)) return false;
return true;
diff --git a/src/devices/bus/isa/isa.h b/src/devices/bus/isa/isa.h
index 32b344fdbb3..e41e5cf07ec 100644
--- a/src/devices/bus/isa/isa.h
+++ b/src/devices/bus/isa/isa.h
@@ -269,7 +269,7 @@ protected:
virtual void device_reset() override;
// internal state
- cpu_device *m_maincpu;
+ required_device<cpu_device> m_maincpu;
// address spaces
address_space *m_iospace, *m_memspace;
@@ -288,7 +288,6 @@ protected:
device_isa8_card_interface *m_dma_device[8];
bool m_dma_eop[8];
- const char *m_cputag;
bool m_nmi_enabled;
private:
diff --git a/src/devices/bus/isa/isa_cards.cpp b/src/devices/bus/isa/isa_cards.cpp
index 218c0231baa..5f1e5243fd1 100644
--- a/src/devices/bus/isa/isa_cards.cpp
+++ b/src/devices/bus/isa/isa_cards.cpp
@@ -69,6 +69,7 @@ SLOT_INTERFACE_START( pc_isa8_cards )
SLOT_INTERFACE("cga_poisk2", ISA8_CGA_POISK2)
SLOT_INTERFACE("cga_mc1502", ISA8_CGA_MC1502)
SLOT_INTERFACE("cga_m24", ISA8_CGA_M24)
+ SLOT_INTERFACE("cga_cportiii", ISA8_CGA_CPORTIII)
SLOT_INTERFACE("aga", ISA8_AGA)
SLOT_INTERFACE("aga_pc200", ISA8_AGA_PC200)
SLOT_INTERFACE("ega", ISA8_EGA)
@@ -110,6 +111,7 @@ SLOT_INTERFACE_START( pc_isa16_cards )
// 8-bit
SLOT_INTERFACE("mda", ISA8_MDA)
SLOT_INTERFACE("cga", ISA8_CGA)
+ SLOT_INTERFACE("cga_cportiii", ISA8_CGA_CPORTIII)
SLOT_INTERFACE("wyse700", ISA8_WYSE700)
SLOT_INTERFACE("ega", ISA8_EGA)
SLOT_INTERFACE("pgc", ISA8_PGC)
diff --git a/src/devices/bus/isa/omti8621.cpp b/src/devices/bus/isa/omti8621.cpp
index ddffb43575e..3490b7ae7fe 100644
--- a/src/devices/bus/isa/omti8621.cpp
+++ b/src/devices/bus/isa/omti8621.cpp
@@ -64,8 +64,6 @@ public:
virtual bool is_reset_on_load() const override { return 0; }
virtual bool support_command_line_image_creation() const override { return 1; }
virtual const char *file_extensions() const override { return "awd"; }
- virtual const char *custom_instance_name() const override { return "disk"; }
- virtual const char *custom_brief_instance_name() const override { return "disk"; }
virtual image_init_result call_create(int format_type, util::option_resolution *format_options) override;
protected: