src/mess/video/isa_ega.c
| r15231 | r15232 | |
| 773 | 773 | UINT16 offset = ( ma + i ) << 1; |
| 774 | 774 | UINT8 chr = ega->m_videoram[ offset ]; |
| 775 | 775 | 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 ]; |
| 779 | 779 | |
| 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 ) |
| 781 | 782 | { |
| 782 | | data = 0xFF; |
| 783 | /* intensity selector */ |
| 784 | data = ega->m_charB[ chr * 32 + ra ]; |
| 785 | fg += ( attr & 0x08 ) ? 0x38 : 0x00; |
| 783 | 786 | } |
| 787 | else |
| 788 | { |
| 789 | /* character set selector */ |
| 790 | data = ( attr & 0x08 ) ? ega->m_charA[ chr * 32 + ra ] : ega->m_charB[ chr * 32 + ra ]; |
| 791 | } |
| 784 | 792 | |
| 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 | |
| 785 | 808 | *p = ( data & 0x80 ) ? fg : bg; p++; |
| 786 | 809 | *p = ( data & 0x40 ) ? fg : bg; p++; |
| 787 | 810 | *p = ( data & 0x20 ) ? fg : bg; p++; |