src/mess/video/m6847.c
| r5500 | r5501 | |
| 147 | 147 | /* saved palette; used with CoCo 3 */ |
| 148 | 148 | UINT32 saved_palette[16]; |
| 149 | 149 | |
| 150 | | /* 2^7 modes, 128/16 character groups, background/foreground */ |
| 151 | | UINT8 colordata[128][128/16][2]; |
| 150 | /* 2^7 modes, 256/16 character groups, background/foreground */ |
| 151 | UINT8 colordata[128][256/16][2]; |
| 152 | 152 | |
| 153 | 153 | /* 2^7 modes, 128 characters, 12 scanlines */ |
| 154 | | UINT8 fontdata[128][128][12]; |
| 154 | UINT8 fontdata[128][256][12]; |
| 155 | 155 | }; |
| 156 | 156 | |
| 157 | 157 | |
| r5500 | r5501 | |
| 1197 | 1197 | |
| 1198 | 1198 | attr_index = attr_index_from_attribute(attr); |
| 1199 | 1199 | |
| 1200 | | bg_color = color(m6847->colordata[attr_index][(byte & 0x7F) / 16][0]); |
| 1201 | | fg_color = color(m6847->colordata[attr_index][(byte & 0x7F) / 16][1]); |
| 1200 | bg_color = color(m6847->colordata[attr_index][byte / 16][0]); |
| 1201 | fg_color = color(m6847->colordata[attr_index][byte / 16][1]); |
| 1202 | 1202 | |
| 1203 | 1203 | if( (!m6847->has_lowercase) && (attr & M6847_INTEXT) && !(attr & M6847_AS)) { |
| 1204 | 1204 | if (m6847->get_char_rom) { |
| r5500 | r5501 | |
| 1207 | 1207 | char_data = 0xff; |
| 1208 | 1208 | } |
| 1209 | 1209 | } else { |
| 1210 | | char_data = m6847->fontdata[attr_index][byte & 0x7F][scanline % 12]; |
| 1210 | char_data = m6847->fontdata[attr_index][byte][scanline % 12]; |
| 1211 | 1211 | } |
| 1212 | 1212 | |
| 1213 | 1213 | line[x*8+0] = (char_data & 0x80) ? fg_color : bg_color; |
| r5500 | r5501 | |
| 1788 | 1788 | { |
| 1789 | 1789 | int attr_index, row; |
| 1790 | 1790 | int fg, bg; |
| 1791 | | UINT8 byte, attr; |
| 1791 | int byte; |
| 1792 | 1792 | const UINT8 *char_data; |
| 1793 | 1793 | |
| 1794 | 1794 | for (attr_index = 0; attr_index < sizeof(m6847->fontdata) / sizeof(m6847->fontdata[0]); attr_index++) |
| 1795 | 1795 | { |
| 1796 | | attr = attribute_from_attr_index(attr_index); |
| 1796 | UINT8 attr = attribute_from_attr_index(attr_index); |
| 1797 | 1797 | |
| 1798 | | for (byte = 0; byte < 128; byte++) |
| 1798 | for (byte = 0; byte < 256; byte++) |
| 1799 | 1799 | { |
| 1800 | 1800 | char_data = find_char(v, byte, attr, &fg, &bg); |
| 1801 | 1801 | |