trunk/src/emu/video/voodoo.c
r18115 | r18116 | |
4756 | 4756 | break; |
4757 | 4757 | |
4758 | 4758 | 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]); |
4762 | 4759 | if (data & 0xfff) |
4763 | 4760 | v->fbi.width = data & 0xfff; |
4764 | 4761 | if (data & 0xfff000) |
4765 | 4762 | 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 | |
4767 | 4781 | adjust_vblank_timer(v); |
4768 | 4782 | if (LOG_REGISTERS) |
4769 | 4783 | logerror("%s:banshee_io_w(%s) = %08X & %08X\n", device->machine().describe_context(), banshee_io_reg_name[offset], data, mem_mask); |
4770 | 4784 | break; |
| 4785 | } |
4771 | 4786 | |
4772 | 4787 | case io_lfbMemoryConfig: |
4773 | 4788 | v->fbi.lfb_base = (data & 0x1fff) << 10; |