src/mame/video/snes.c
| r5403 | r5404 | |
| 411 | 411 | UINT8 color_shift = 0; |
| 412 | 412 | UINT8 color_planes = 2; |
| 413 | 413 | UINT8 tile_divider = 1; |
| 414 | UINT8 wrap_around_x; //helper for wrap-around |
| 414 | 415 | |
| 415 | 416 | #ifdef MAME_DEBUG |
| 416 | 417 | if (debug_options.bg_disabled[layer]) |
| r5403 | r5404 | |
| 478 | 479 | break; |
| 479 | 480 | } |
| 480 | 481 | |
| 482 | wrap_around_x = 1; |
| 483 | |
| 481 | 484 | for (ii = 0; ii < (66*(hires+1) >> tile_size); ii += 2) |
| 482 | 485 | { |
| 483 | 486 | /* Have we scrolled into the next map? */ |
| 484 | | if (hscroll && ((ii >> 1) >= 32 - (hscroll & 0x1f))) |
| 487 | if (wrap_around_x && ((ii >> 1) >= 32 - (hscroll & 0x1f))) |
| 485 | 488 | { |
| 486 | 489 | tmap = basevmap + table_hscroll[snes_ppu.layer[layer].map_size & 3][((hscroll >> 5) + 1) & 3]; |
| 487 | 490 | tmap -= ii; |
| 488 | | hscroll = 0; /* Make sure we don't do this again */ |
| 491 | wrap_around_x = 0; /* Make sure we don't do this again */ |
| 489 | 492 | } |
| 490 | 493 | if (tmap > 0x10000) |
| 491 | 494 | tmap %= 0x10000; |