Previous 15994 Revisions Next

r15232 Saturday 19th May, 2012 at 19:50:47 UTC by Wilbert Pol
[ISA_EGA] Fixed several text mode issues identified by running AT diagnostics. [Wilbert Pol]
[src/mess/video]isa_ega.c

src/mess/video/isa_ega.c
r15231r15232
773773      UINT16   offset = ( ma + i ) << 1;
774774      UINT8   chr = ega->m_videoram[ offset ];
775775      UINT8   attr = ega->m_videoram[ offset + 1 ];
776      UINT8   data = ( attr & 0x08 ) ? ega->m_charA[ chr * 32 + ra ] : ega->m_charB[ chr * 32 + ra ];
777      UINT16   fg = ega->m_attribute.data[ attr & 0x0F ];
778      UINT16   bg = ega->m_attribute.data[ attr >> 4 ];
776      UINT8   data = 0;
777      UINT16   fg = ega->m_attribute.data[ attr & 0x07 ];
778      UINT16   bg = ega->m_attribute.data[ ( attr >> 4 ) & 0x07 ];
779779
780      if ( i == cursor_x && ega->m_frame_cnt & 0x08 )
780      /* Is attribute bit 3 used as intensity or as character set selector? */
781      if ( ega->m_attribute.data[ 0x12 ] & 0x08 )
781782      {
782         data = 0xFF;
783         /* intensity selector */
784         data = ega->m_charB[ chr * 32 + ra ];
785         fg += ( attr & 0x08 ) ? 0x38 : 0x00;
783786      }
787      else
788      {
789         /* character set selector */
790         data = ( attr & 0x08 ) ? ega->m_charA[ chr * 32 + ra ] : ega->m_charB[ chr * 32 + ra ];
791      }
784792
793      if ( i == cursor_x )
794      {
795         if ( ega->m_frame_cnt & 0x08 )
796         {
797            data = 0xFF;
798         }
799      }
800      else
801      {
802         if ( ( attr & 0x80 ) && ( ega->m_frame_cnt & 0x10 ) )
803         {
804            data = 0x00;
805         }
806      }
807
785808      *p = ( data & 0x80 ) ? fg : bg; p++;
786809      *p = ( data & 0x40 ) ? fg : bg; p++;
787810      *p = ( data & 0x20 ) ? fg : bg; p++;

Previous 15994 Revisions Next


© 1998-2018 The MESS Team