Changeset 97779 in vbox
- Timestamp:
- Dec 12, 2022 3:13:58 PM (2 years ago)
- svn:sync-xref-src-repo-rev:
- 154849
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Devices/Graphics/DevVGA.cpp
r97621 r97779 1816 1816 s_incr = pThis->cr[0x17] & 0x40 ? 4 : 8; 1817 1817 1818 unsigned addr_mask; 1819 if (!(pThis->cr[0x17] & 0x40) && !(pThis->cr[0x17] & 0x20)) 1820 addr_mask = 0xffff; /* Wrap at 64K, for CGA and 64K EGA compatibility. */ 1821 else 1822 addr_mask = 0x3ffff; /* Wrap at 256K, standard VGA. */ 1823 1818 1824 line_offset = pThis->line_offset; 1819 s1 = pThisCC->pbVRam + ( pThis->start_addr * s_incr);1825 s1 = pThisCC->pbVRam + ((pThis->start_addr * s_incr) & addr_mask); 1820 1826 1821 1827 /* double scanning - not for 9-wide modes */ … … 1881 1887 pThis->cursor_end = pThis->cr[0xb]; 1882 1888 } 1883 cursor_ptr = pThisCC->pbVRam + ( pThis->start_addr + cursor_offset) * s_incr;1889 cursor_ptr = pThisCC->pbVRam + (((pThis->start_addr + cursor_offset) * s_incr) & addr_mask); 1884 1890 depth_index = vgaR3GetDepthIndex(pDrv->cBits); 1885 1891 if (cw == 16) … … 2001 2007 d1 += x_incr; 2002 2008 src += s_incr; /* Even in text mode, word/byte mode matters. */ 2009 if (src > (pThisCC->pbVRam + addr_mask)) 2010 src = pThisCC->pbVRam; 2003 2011 ch_attr_ptr++; 2004 2012 } … … 2028 2036 if ((uint32_t)cy == (pThis->line_compare / cheight)) 2029 2037 s1 = pThisCC->pbVRam; 2038 2039 if (s1 > (pThisCC->pbVRam + addr_mask)) 2040 s1 = s1 - (addr_mask + 1); 2030 2041 } 2031 2042 if (cy_start >= 0) … … 4385 4396 uint32_t cbLine; 4386 4397 uint32_t offStart; 4398 uint32_t offCursr; 4387 4399 uint32_t uLineCompareIgn; 4388 4400 vgaR3GetOffsets(pThis, &cbLine, &offStart, &uLineCompareIgn); … … 4390 4402 cbLine = 80 * ch_stride; 4391 4403 offStart *= ch_stride; 4404 offCursr = ((pThis->cr[0x0e] << 8) | pThis->cr[0x0f]) * ch_stride; 4392 4405 pHlp->pfnPrintf(pHlp, "cbLine: %#x\n", cbLine); 4393 4406 pHlp->pfnPrintf(pHlp, "offStart: %#x (line %#x)\n", offStart, offStart / cbLine); 4407 pHlp->pfnPrintf(pHlp, "offCursr: %#x\n", offCursr); 4394 4408 } 4395 4409 if (pThis->fRealRetrace)
Note:
See TracChangeset
for help on using the changeset viewer.