src/mame/video/snes.c
| r5427 | r5428 | |
| 276 | 276 | { |
| 277 | 277 | if(direct_colors) |
| 278 | 278 | { |
| 279 | | /* format is | BBb00 | GGGg0 | RRRr0, most significant data gets repeated on the least significant bytes */ |
| 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 | 281 | c |= ((pal & 0x01) << 1) | ((pal & 0x02) << 5) | ((pal & 0x4) << 10); |
| 282 | | c |= (colour & 0x01) | (colour & 0x20) | ((colour & 0x80) << 4); |
| 283 | 282 | } |
| 284 | 283 | else |
| 285 | 284 | c = snes_cgram[pal + colour]; |
| r5427 | r5428 | |
| 705 | 704 | /* Direct select, but only outside EXTBG! */ |
| 706 | 705 | if (snes_ppu.direct_color && layer == 0) |
| 707 | 706 | { |
| 708 | | /* 0 | BBbbb | GGGgg | RRRrr */ |
| 707 | /* 0 | BB000 | GGG00 | RRR00, HW confirms that the data is zero padded. */ |
| 709 | 708 | clr = ((colour & 0x07) << 2) | ((colour & 0x38) << 4) | ((colour & 0xc0) << 7); |
| 710 | | clr|= (colour & 0x03) | ((colour & 0x30) << 1) | ((colour & 0xc0) << 5) | ((colour & 0x80) << 3); |
| 711 | 709 | } |
| 712 | 710 | else |
| 713 | 711 | clr = snes_cgram[colour]; |