src/mess/video/x68k.c
| r15046 | r15047 | |
| 731 | 731 | switch(offset) |
| 732 | 732 | { |
| 733 | 733 | case 0x400: |
| 734 | | state->m_bg0_8->set_scrollx(0,(data - state->m_crtc.hbegin) & 0x3ff); |
| 735 | | state->m_bg0_16->set_scrollx(0,(data - state->m_crtc.hbegin) & 0x3ff); |
| 734 | state->m_bg0_8->set_scrollx(0,(data - state->m_crtc.hbegin + state->m_crtc.bg_hshift) & 0x3ff); |
| 735 | state->m_bg0_16->set_scrollx(0,(data - state->m_crtc.hbegin + state->m_crtc.bg_hshift) & 0x3ff); |
| 736 | 736 | break; |
| 737 | 737 | case 0x401: |
| 738 | 738 | state->m_bg0_8->set_scrolly(0,(data - state->m_crtc.vbegin) & 0x3ff); |
| 739 | 739 | state->m_bg0_16->set_scrolly(0,(data - state->m_crtc.vbegin) & 0x3ff); |
| 740 | 740 | break; |
| 741 | 741 | case 0x402: |
| 742 | | state->m_bg1_8->set_scrollx(0,(data - state->m_crtc.hbegin) & 0x3ff); |
| 743 | | state->m_bg1_16->set_scrollx(0,(data - state->m_crtc.hbegin) & 0x3ff); |
| 742 | state->m_bg1_8->set_scrollx(0,(data - state->m_crtc.hbegin + state->m_crtc.bg_hshift) & 0x3ff); |
| 743 | state->m_bg1_16->set_scrollx(0,(data - state->m_crtc.hbegin + state->m_crtc.bg_hshift) & 0x3ff); |
| 744 | 744 | break; |
| 745 | 745 | case 0x403: |
| 746 | 746 | state->m_bg1_8->set_scrolly(0,(data - state->m_crtc.vbegin) & 0x3ff); |
| 747 | 747 | state->m_bg1_16->set_scrolly(0,(data - state->m_crtc.vbegin) & 0x3ff); |
| 748 | 748 | break; |
| 749 | | case 0x405: // BG H-DISP (like CRTC reg 2) |
| 749 | case 0x406: // BG H-DISP (normally equals CRTC reg 2 value + 4) |
| 750 | 750 | if(data != 0x00ff) |
| 751 | 751 | { |
| 752 | 752 | state->m_crtc.bg_visible_width = (state->m_crtc.reg[3] - ((data & 0x003f) - 4)) * 8; |
| 753 | | state->m_crtc.bg_hshift = (state->m_crtc.width - state->m_crtc.bg_visible_width) / 2; |
| 753 | state->m_crtc.bg_hshift = ((data - (state->m_crtc.reg[2]+4)) * 8); |
| 754 | 754 | } |
| 755 | | else |
| 756 | | state->m_crtc.bg_hshift = state->m_crtc.hshift; |
| 757 | 755 | break; |
| 758 | | case 0x406: // BG V-DISP (like CRTC reg 6) |
| 756 | case 0x407: // BG V-DISP (like CRTC reg 6) |
| 759 | 757 | state->m_crtc.bg_vshift = state->m_crtc.vshift; |
| 760 | 758 | break; |
| 761 | 759 | } |
| r15046 | r15047 | |
| 1034 | 1032 | rect.max_x=rect.min_x + state->m_crtc.visible_width-1; |
| 1035 | 1033 | rect.max_y=rect.min_y + state->m_crtc.visible_height-1; |
| 1036 | 1034 | |
| 1035 | sx += state->m_crtc.bg_hshift; |
| 1037 | 1036 | sx += state->m_sprite_shift; |
| 1038 | 1037 | |
| 1039 | 1038 | if(state->m_crtc.interlace != 0) |