Previous 15994 Revisions Next

r5431 Friday 14th August, 2009 at 16:09:59 UTC by Angelo Salese
[SNES]: Fixed a potential bug with direct colors
[src/mame/video]snes.c

src/mame/video/snes.c
r5430r5431
278278            {
279279               /* format is  0 | BBb00 | GGGg0 | RRRr0, HW confirms that the data is zero padded. */
280280               c = ((colour & 0x07) << 2) | ((colour & 0x38) << 4) | ((colour & 0xc0) << 7);
281               c |= ((pal & 0x01) << 1) | ((pal & 0x02) << 5) | ((pal & 0x4) << 10);
281               c |= ((pal & 0x04) >> 1) | ((pal & 0x08) << 3) | ((pal & 0x10) << 8);
282282            }
283283            else
284284               c = snes_cgram[pal + colour];
r5430r5431
498498         tmap -= ii;
499499         wrap_around_x = 0;   /* Make sure we don't do this again */
500500      }
501      //if (tmap > 0x10000) //<- causes corrupt tiles in places, needed?
501      //if (tmap > 0x10000)
502502      //   tmap %= 0x10000;
503503
504504      vflip = snes_vram[tmap + ii + 1] & 0x80;
505505      hflip = snes_vram[tmap + ii + 1] & 0x40;
506506      priority = ((snes_vram[tmap + ii + 1] & 0x20) >> 5) ? priority_b : priority_a;
507      pal = (color_depth == SNES_COLOR_DEPTH_8BPP) ? 0 : (snes_vram[tmap + ii + 1] & 0x1c) << color_shift;      /* 8 palettes of (4 * color_shift) colours */
507      pal = (color_depth == SNES_COLOR_DEPTH_8BPP && direct_colors == 0) ? 0 : (snes_vram[tmap + ii + 1] & 0x1c) << color_shift;      /* 8 palettes of (4 * color_shift) colours */
508508      tile = (snes_vram[tmap + ii + 1] & 0x3) << 8;
509509      tile |= snes_vram[tmap + ii] & 0xff;
510510

Previous 15994 Revisions Next


© 1998-2018 The MESS Team