Previous 199869 Revisions Next

r18116 Monday 24th September, 2012 at 15:32:45 UTC by Ville Linde
voodoo.c: Implemented Voodoo 3 overlay scaling
[src/emu/video]voodoo.c

trunk/src/emu/video/voodoo.c
r18115r18116
47564756         break;
47574757
47584758      case io_vidScreenSize:
4759         /* warning: this is a hack for now! We should really compute the screen size */
4760         /* from the CRTC registers */
4761         COMBINE_DATA(&v->banshee.io[offset]);
47624759         if (data & 0xfff)
47634760            v->fbi.width = data & 0xfff;
47644761         if (data & 0xfff000)
47654762            v->fbi.height = (data >> 12) & 0xfff;
4766         v->screen->set_visible_area(0, v->fbi.width - 1, 0, v->fbi.height - 1);
4763         /* fall through */
4764      case io_vidOverlayDudx:
4765      case io_vidOverlayDvdy:
4766      {
4767         /* warning: this is a hack for now! We should really compute the screen size */
4768         /* from the CRTC registers */
4769         COMBINE_DATA(&v->banshee.io[offset]);
4770
4771         int width = v->fbi.width;
4772         int height = v->fbi.height;
4773
4774         if (v->banshee.io[io_vidOverlayDudx] != 0)
4775            width = (v->fbi.width * v->banshee.io[io_vidOverlayDudx]) / 1048576;
4776         if (v->banshee.io[io_vidOverlayDvdy] != 0)
4777            height = (v->fbi.height * v->banshee.io[io_vidOverlayDvdy]) / 1048576;
4778
4779         v->screen->set_visible_area(0, width - 1, 0, height - 1);
4780
47674781         adjust_vblank_timer(v);
47684782         if (LOG_REGISTERS)
47694783            logerror("%s:banshee_io_w(%s) = %08X & %08X\n", device->machine().describe_context(), banshee_io_reg_name[offset], data, mem_mask);
47704784         break;
4785      }
47714786
47724787      case io_lfbMemoryConfig:
47734788         v->fbi.lfb_base = (data & 0x1fff) << 10;

Previous 199869 Revisions Next


© 1997-2024 The MAME Team