Previous 15994 Revisions Next

r5404 Tuesday 11th August, 2009 at 17:13:31 UTC by Angelo Salese
[SNES]: Fixed the x scrolling wrap around bug when hscroll == 0
[src/mame/video]snes.c

src/mame/video/snes.c
r5403r5404
411411   UINT8 color_shift = 0;
412412   UINT8 color_planes = 2;
413413   UINT8 tile_divider = 1;
414   UINT8 wrap_around_x; //helper for wrap-around
414415
415416#ifdef MAME_DEBUG
416417   if (debug_options.bg_disabled[layer])
r5403r5404
478479         break;
479480   }
480481
482   wrap_around_x = 1;
483
481484   for (ii = 0; ii < (66*(hires+1) >> tile_size); ii += 2)
482485   {
483486      /* 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)))
485488      {
486489         tmap = basevmap + table_hscroll[snes_ppu.layer[layer].map_size & 3][((hscroll >> 5) + 1) & 3];
487490         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 */
489492      }
490493      if (tmap > 0x10000)
491494         tmap %= 0x10000;

Previous 15994 Revisions Next


© 1998-2018 The MESS Team