src/mame/video/snes.c
| r7493 | r7494 | |
| 108 | 108 | { (96*32), (96*32)+32, (96*32)+64, (96*32)+96, (96*32)+128, (96*32)+160, (96*32)+192, (96*32)+224 }, |
| 109 | 109 | { (112*32), (112*32)+32, (112*32)+64, (112*32)+96, (112*32)+128, (112*32)+160, (112*32)+192, (112*32)+224 } |
| 110 | 110 | }; |
| 111 | | /* Scroll tables 32x32 64x32 32x64 64x64 */ |
| 112 | | static const UINT16 table_hscroll[4][4] = { {0,0,0,0}, {0,0x800,0,0x800}, {0,0,0,0}, {0,0x800,0,0x800} }; |
| 113 | | static const UINT16 table_vscroll[4][4] = { {0,0,0,0}, {0,0,0,0}, {0,0x800,0,0x800}, {0,0x1000,0,0x1000} }; |
| 114 | 111 | |
| 115 | 112 | struct SCANLINE |
| 116 | 113 | { |
| 117 | | UINT16 buffer[(SNES_SCR_WIDTH * 2) + 16]; |
| 118 | | UINT8 priority[(SNES_SCR_WIDTH * 2) + 16]; |
| 119 | | UINT8 layer[(SNES_SCR_WIDTH * 2) + 16]; |
| 120 | | UINT8 blend_exception[(SNES_SCR_WIDTH * 2) + 16]; |
| 114 | UINT16 buffer[(SNES_SCR_WIDTH * 2)]; |
| 115 | UINT8 priority[(SNES_SCR_WIDTH * 2)]; |
| 116 | UINT8 layer[(SNES_SCR_WIDTH * 2)]; |
| 117 | UINT8 blend_exception[(SNES_SCR_WIDTH * 2)]; |
| 121 | 118 | }; |
| 122 | 119 | |
| 123 | 120 | static struct SCANLINE scanlines[2]; |
| r7493 | r7494 | |
| 602 | 599 | tile_line <<= 1; |
| 603 | 600 | |
| 604 | 601 | /* below, only color_planes depends on color_depth */ |
| 605 | | if (tile_size) |
| 602 | if (hires) /* Hi-Res: 2bpp & 4bpp */ |
| 606 | 603 | { |
| 607 | | snes_draw_tile_x2(screen, color_planes, layer, charaddr + (tile * 8 * color_planes) + tile_line, ii, priority, hflip, pal, direct_colors, hires); |
| 608 | | ii += 16; |
| 604 | snes_draw_tile_x2(screen, color_planes, layer, charaddr + (tile * 8 * color_planes) + tile_line, ii * 2, priority, hflip, pal, direct_colors, hires); |
| 605 | ii += 8; |
| 609 | 606 | } |
| 610 | 607 | else /* tile_size = 0 */ |
| 611 | 608 | { |
| 612 | | if (hires) /* Hi-Res: 2bpp & 4bpp */ |
| 609 | if (tile_size) |
| 613 | 610 | { |
| 614 | 611 | snes_draw_tile_x2(screen, color_planes, layer, charaddr + (tile * 8 * color_planes) + tile_line, ii, priority, hflip, pal, direct_colors, hires); |
| 615 | 612 | ii += 16; |
| r7493 | r7494 | |
| 802 | 799 | return; |
| 803 | 800 | #endif /* SNES_LAYER_DEBUG */ |
| 804 | 801 | |
| 805 | | if (snes_ppu.mode == 5 || snes_ppu.mode == 6) |
| 806 | | widemode = 1; |
| 802 | // if (snes_ppu.mode == 5 || snes_ppu.mode == 6) |
| 803 | // widemode = 1; |
| 807 | 804 | |
| 808 | 805 | curline /= snes_ppu.interlace; |
| 809 | 806 | curline *= snes_ppu.obj_interlace; |
| r7493 | r7494 | |
| 1199 | 1196 | |
| 1200 | 1197 | for (x = 0; x < SNES_SCR_WIDTH * 2; x += 2) |
| 1201 | 1198 | { |
| 1202 | | if (snes_ppu.mode != 5 && snes_ppu.mode != 6) |
| 1199 | // if (snes_ppu.mode != 5 && snes_ppu.mode != 6) |
| 1203 | 1200 | { |
| 1204 | 1201 | int r, g, b; |
| 1205 | 1202 | c = scanline->buffer[x]; |
| r7493 | r7494 | |
| 1229 | 1226 | *BITMAP_ADDR32(bitmap, curline, (x + 1) * 2 + 1) = MAKE_RGB(pal5bit(r), pal5bit(g), pal5bit(b)); |
| 1230 | 1227 | |
| 1231 | 1228 | } |
| 1229 | #if 0 |
| 1232 | 1230 | else |
| 1233 | 1231 | { |
| 1234 | 1232 | int r, g, b; |
| r7493 | r7494 | |
| 1259 | 1257 | |
| 1260 | 1258 | *BITMAP_ADDR32(bitmap, curline, x + 1) = MAKE_RGB(pal5bit(r), pal5bit(g), pal5bit(b)); |
| 1261 | 1259 | } |
| 1260 | #endif |
| 1262 | 1261 | } |
| 1263 | 1262 | } |
| 1264 | 1263 | |