src/mame/video/snes.c
| r5430 | r5431 | |
| 278 | 278 | { |
| 279 | 279 | /* format is 0 | BBb00 | GGGg0 | RRRr0, HW confirms that the data is zero padded. */ |
| 280 | 280 | 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); |
| 282 | 282 | } |
| 283 | 283 | else |
| 284 | 284 | c = snes_cgram[pal + colour]; |
| r5430 | r5431 | |
| 498 | 498 | tmap -= ii; |
| 499 | 499 | wrap_around_x = 0; /* Make sure we don't do this again */ |
| 500 | 500 | } |
| 501 | | //if (tmap > 0x10000) //<- causes corrupt tiles in places, needed? |
| 501 | //if (tmap > 0x10000) |
| 502 | 502 | // tmap %= 0x10000; |
| 503 | 503 | |
| 504 | 504 | vflip = snes_vram[tmap + ii + 1] & 0x80; |
| 505 | 505 | hflip = snes_vram[tmap + ii + 1] & 0x40; |
| 506 | 506 | 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 */ |
| 508 | 508 | tile = (snes_vram[tmap + ii + 1] & 0x3) << 8; |
| 509 | 509 | tile |= snes_vram[tmap + ii] & 0xff; |
| 510 | 510 | |