Previous 15994 Revisions Next

r5501 Wednesday 26th August, 2009 at 08:41:03 UTC by Curt Coder
[MC6847] Fixed semigraphics mode 6.
[src/mess/video]m6847.c

src/mess/video/m6847.c
r5500r5501
147147   /* saved palette; used with CoCo 3 */
148148   UINT32 saved_palette[16];
149149
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];
152152
153153   /* 2^7 modes, 128 characters, 12 scanlines */
154   UINT8 fontdata[128][128][12];
154   UINT8 fontdata[128][256][12];
155155};
156156
157157
r5500r5501
11971197
11981198      attr_index = attr_index_from_attribute(attr);
11991199
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]);
12021202     
12031203      if( (!m6847->has_lowercase) && (attr & M6847_INTEXT) && !(attr & M6847_AS)) {
12041204         if (m6847->get_char_rom) {
r5500r5501
12071207            char_data = 0xff;
12081208         }
12091209      } else {
1210         char_data = m6847->fontdata[attr_index][byte & 0x7F][scanline % 12];
1210         char_data = m6847->fontdata[attr_index][byte][scanline % 12];
12111211      }
12121212
12131213      line[x*8+0] = (char_data & 0x80) ? fg_color : bg_color;
r5500r5501
17881788{
17891789   int attr_index, row;
17901790   int fg, bg;
1791   UINT8 byte, attr;
1791   int byte;
17921792   const UINT8 *char_data;
17931793
17941794   for (attr_index = 0; attr_index < sizeof(m6847->fontdata) / sizeof(m6847->fontdata[0]); attr_index++)
17951795   {
1796      attr = attribute_from_attr_index(attr_index);
1796      UINT8 attr = attribute_from_attr_index(attr_index);
17971797
1798      for (byte = 0; byte < 128; byte++)
1798      for (byte = 0; byte < 256; byte++)
17991799      {
18001800         char_data = find_char(v, byte, attr, &fg, &bg);
18011801

Previous 15994 Revisions Next


© 1998-2018 The MESS Team