diff options
Diffstat (limited to 'src/devices/bus/isa/ega.cpp')
-rw-r--r-- | src/devices/bus/isa/ega.cpp | 76 |
1 files changed, 38 insertions, 38 deletions
diff --git a/src/devices/bus/isa/ega.cpp b/src/devices/bus/isa/ega.cpp index 1c0a4e78be9..e782c18573b 100644 --- a/src/devices/bus/isa/ega.cpp +++ b/src/devices/bus/isa/ega.cpp @@ -570,7 +570,7 @@ ioport_constructor isa8_ega_device::device_input_ports() const // isa8_ega_device - constructor //------------------------------------------------- -isa8_ega_device::isa8_ega_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock) : +isa8_ega_device::isa8_ega_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) : device_t(mconfig, ISA8_EGA, "IBM Enhanced Graphics Adapter", tag, owner, clock, "ega", __FILE__), device_isa8_card_interface(mconfig, *this), m_crtc_ega(nullptr), m_vram(nullptr), m_videoram(nullptr), m_charA(nullptr), m_charB(nullptr), m_misc_output(0), m_feature_control(0), m_frame_cnt(0), m_hsync(0), m_vsync(0), m_vblank(0), m_display_enable(0), m_video_mode(0), @@ -578,7 +578,7 @@ isa8_ega_device::isa8_ega_device(const machine_config &mconfig, const char *tag, { } -isa8_ega_device::isa8_ega_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) : +isa8_ega_device::isa8_ega_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_crtc_ega(nullptr), m_vram(nullptr), m_videoram(nullptr), m_charA(nullptr), m_charB(nullptr), m_misc_output(0), m_feature_control(0), m_frame_cnt(0), m_hsync(0), m_vsync(0), m_vblank(0), m_display_enable(0), m_video_mode(0), @@ -599,17 +599,17 @@ void isa8_ega_device::device_start() for (int i = 0; i < 64; i++ ) { - UINT8 r = ( ( i & 0x04 ) ? 0xAA : 0x00 ) + ( ( i & 0x20 ) ? 0x55 : 0x00 ); - UINT8 g = ( ( i & 0x02 ) ? 0xAA : 0x00 ) + ( ( i & 0x10 ) ? 0x55 : 0x00 ); - UINT8 b = ( ( i & 0x01 ) ? 0xAA : 0x00 ) + ( ( i & 0x08 ) ? 0x55 : 0x00 ); + uint8_t r = ( ( i & 0x04 ) ? 0xAA : 0x00 ) + ( ( i & 0x20 ) ? 0x55 : 0x00 ); + uint8_t g = ( ( i & 0x02 ) ? 0xAA : 0x00 ) + ( ( i & 0x10 ) ? 0x55 : 0x00 ); + uint8_t b = ( ( i & 0x01 ) ? 0xAA : 0x00 ) + ( ( i & 0x08 ) ? 0x55 : 0x00 ); m_palette->set_pen_color( i, r, g, b ); } if(m_default_bios_tag != "iskr3104") { - UINT8 *dst = memregion(subtag("user2").c_str())->base() + 0x0000; - UINT8 *src = memregion(subtag("user1").c_str())->base() + 0x3fff; + uint8_t *dst = memregion(subtag("user2").c_str())->base() + 0x0000; + uint8_t *src = memregion(subtag("user1").c_str())->base() + 0x3fff; int i; /* Perform the EGA bios address line swaps */ @@ -626,13 +626,13 @@ void isa8_ega_device::device_start() m_videoram = m_vram->base(); m_plane[0] = m_videoram + 0x00000; - memset(m_plane[0], 0, sizeof(UINT8) * 0x10000); + memset(m_plane[0], 0, sizeof(uint8_t) * 0x10000); m_plane[1] = m_videoram + 0x10000; - memset(m_plane[1], 0, sizeof(UINT8) * 0x10000); + memset(m_plane[1], 0, sizeof(uint8_t) * 0x10000); m_plane[2] = m_videoram + 0x20000; - memset(m_plane[2], 0, sizeof(UINT8) * 0x10000); + memset(m_plane[2], 0, sizeof(uint8_t) * 0x10000); m_plane[3] = m_videoram + 0x30000; - memset(m_plane[3], 0, sizeof(UINT8) * 0x10000); + memset(m_plane[3], 0, sizeof(uint8_t) * 0x10000); m_crtc_ega = subdevice<crtc_ega_device>(EGA_CRTC_NAME); @@ -783,7 +783,7 @@ WRITE_LINE_MEMBER( isa8_ega_device::vblank_changed ) CRTC_EGA_ROW_UPDATE( isa8_ega_device::pc_ega_graphics ) { - UINT16 *p = &bitmap.pix16(y); + uint16_t *p = &bitmap.pix16(y); // logerror( "pc_ega_graphics: y = %d, x_count = %d, ma = %d, ra = %d\n", y, x_count, ma, ra ); @@ -793,8 +793,8 @@ CRTC_EGA_ROW_UPDATE( isa8_ega_device::pc_ega_graphics ) for ( int i = 0; i < x_count; i++ ) { - UINT16 offset = ( ( ma + i ) & 0x1fff ) | ( ( y & 1 ) << 12 ); - UINT8 data = m_plane[0][offset]; + uint16_t offset = ( ( ma + i ) & 0x1fff ) | ( ( y & 1 ) << 12 ); + uint8_t data = m_plane[0][offset]; *p = m_attribute.data[ ( data >> 6 ) ]; p++; *p = m_attribute.data[ ( data >> 4 ) & 0x03 ]; p++; @@ -813,19 +813,19 @@ CRTC_EGA_ROW_UPDATE( isa8_ega_device::pc_ega_graphics ) { // EGA mode - UINT8 mask = m_attribute.data[0x12] & 0x0f; + uint8_t mask = m_attribute.data[0x12] & 0x0f; for ( int i = 0; i < x_count; i++ ) { - UINT16 offset = ma + i; - UINT16 data0 = m_plane[0][offset]; - UINT16 data1 = m_plane[1][offset] << 1; - UINT16 data2 = m_plane[2][offset] << 2; - UINT16 data3 = m_plane[3][offset] << 3; + uint16_t offset = ma + i; + uint16_t data0 = m_plane[0][offset]; + uint16_t data1 = m_plane[1][offset] << 1; + uint16_t data2 = m_plane[2][offset] << 2; + uint16_t data3 = m_plane[3][offset] << 3; for ( int j = 7; j >= 0; j-- ) { - UINT16 col = ( data0 & 0x01 ) | ( data1 & 0x02 ) | ( data2 & 0x04 ) | ( data3 & 0x08 ); + uint16_t col = ( data0 & 0x01 ) | ( data1 & 0x02 ) | ( data2 & 0x04 ) | ( data3 & 0x08 ); col &= mask; @@ -844,19 +844,19 @@ CRTC_EGA_ROW_UPDATE( isa8_ega_device::pc_ega_graphics ) CRTC_EGA_ROW_UPDATE( isa8_ega_device::pc_ega_text ) { - UINT16 *p = &bitmap.pix16(y); + uint16_t *p = &bitmap.pix16(y); int i; // logerror( "pc_ega_text: y = %d, x_count = %d, ma = %d, ra = %d\n", y, x_count, ma, ra ); for ( i = 0; i < x_count; i++ ) { - UINT16 offset = ma + i; - UINT8 chr = m_plane[0][ offset ]; - UINT8 attr = m_plane[1][ offset ]; - UINT8 data; - UINT16 fg = m_attribute.data[ attr & 0x07 ]; - UINT16 bg = m_attribute.data[ ( attr >> 4 ) & 0x07 ]; + uint16_t offset = ma + i; + uint8_t chr = m_plane[0][ offset ]; + uint8_t attr = m_plane[1][ offset ]; + uint8_t data; + uint16_t fg = m_attribute.data[ attr & 0x07 ]; + uint16_t bg = m_attribute.data[ ( attr >> 4 ) & 0x07 ]; /* If character set A and B are equal attribute bit 3 is used as intensity */ if ( m_charA == m_charB ) @@ -961,7 +961,7 @@ void isa8_ega_device::change_mode() READ8_MEMBER( isa8_ega_device::read ) { - UINT8 data = 0xFF; + uint8_t data = 0xFF; if ( !space.debugger_access() && ! ( m_sequencer.data[4] & 0x04 ) ) { @@ -997,9 +997,9 @@ READ8_MEMBER( isa8_ega_device::read ) } -UINT8 isa8_ega_device::alu_op( UINT8 data, UINT8 latch_data ) +uint8_t isa8_ega_device::alu_op( uint8_t data, uint8_t latch_data ) { - UINT8 mask = m_graphics_controller.data[8]; + uint8_t mask = m_graphics_controller.data[8]; switch( m_graphics_controller.data[3] & 0x18 ) { @@ -1021,9 +1021,9 @@ UINT8 isa8_ega_device::alu_op( UINT8 data, UINT8 latch_data ) WRITE8_MEMBER( isa8_ega_device::write ) { - UINT8 d[4]; - UINT8 alu[4]; - UINT8 target_mask = m_graphics_controller.data[8]; + uint8_t d[4]; + uint8_t alu[4]; + uint8_t target_mask = m_graphics_controller.data[8]; alu[0] =alu[1] = alu[2] = alu[3] = 0; @@ -1286,7 +1286,7 @@ READ8_MEMBER(isa8_ega_device::pc_ega8_3c0_r ) /* Feature Read */ case 2: { - UINT8 dips = ioport("config")->read(); + uint8_t dips = ioport("config")->read(); data = ( data & 0x0f ); data |= ( ( m_feature_control & 0x03 ) << 5 ); @@ -1313,18 +1313,18 @@ READ8_MEMBER(isa8_ega_device::pc_ega8_3c0_r ) WRITE8_MEMBER(isa8_ega_device::pc_ega8_3c0_w ) { - static const UINT8 ar_reg_mask[0x20] = + static const uint8_t ar_reg_mask[0x20] = { 0x3F, 0x3F, 0x3F, 0x3F, 0x3F, 0x3F, 0x3F, 0x3F, 0x3F, 0x3F, 0x3F, 0x3F, 0x3F, 0x3F, 0x3F, 0x3F, 0x7F, 0x3F, 0x3F, 0x0F, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 }; - static const UINT8 sr_reg_mask[0x08] = + static const uint8_t sr_reg_mask[0x08] = { 0x03, 0x0F, 0x0F, 0x0F, 0x07, 0x00, 0x00, 0x00 }; - static const UINT8 gr_reg_mask[0x10] = + static const uint8_t gr_reg_mask[0x10] = { 0x0F, 0x0F, 0x0F, 0x1F, 0x07, 0x3F, 0x0F, 0x0F, 0xFF, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 |