Changeset 67766 in vbox
- Timestamp:
- Jul 4, 2017 8:04:57 AM (8 years ago)
- Location:
- trunk/src/VBox/Devices/Graphics
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Devices/Graphics/DevVGA.cpp
r67624 r67766 2487 2487 linesize = pDrv->cbScanline; 2488 2488 2489 if (!(pThis->vbe_regs[VBE_DISPI_INDEX_ENABLE] & VBE_DISPI_ENABLED)) 2490 pThis->vga_addr_mask = 0x3ffff; 2491 else 2492 pThis->vga_addr_mask = UINT32_MAX; 2493 2489 2494 y1 = 0; 2490 2495 y2 = pThis->cr[0x09] & 0x1F; /* starting row scan count */ … … 2500 2505 addr = (addr & ~(1 << 16)) | ((y1 & 2) << 15); 2501 2506 } 2507 addr &= pThis->vga_addr_mask; 2502 2508 page0 = addr & ~PAGE_OFFSET_MASK; 2503 2509 page1 = (addr + bwidth - 1) & ~PAGE_OFFSET_MASK; -
trunk/src/VBox/Devices/Graphics/DevVGA.h
r65381 r67766 255 255 uint8_t padding1[2]; 256 256 uint32_t line_offset; 257 uint32_t vga_addr_mask; 258 uint32_t padding1a; 257 259 uint32_t line_compare; 258 260 uint32_t start_addr; -
trunk/src/VBox/Devices/Graphics/DevVGATmpl.h
r62514 r67766 263 263 const uint8_t *s, int width) 264 264 { 265 uint32_t plane_mask, data, v, *palette ;265 uint32_t plane_mask, data, v, *palette, vram_ofs; 266 266 int x; 267 267 268 vram_ofs = s - s1->vram_ptrR3; 268 269 palette = s1->last_palette; 269 270 plane_mask = mask16[s1->ar[0x12] & 0xf]; 270 271 width >>= 3; 271 272 for(x = 0; x < width; x++) { 273 s = s1->vram_ptrR3 + (vram_ofs & s1->vga_addr_mask); 272 274 data = ((uint32_t *)s)[0]; 273 275 data &= plane_mask; … … 285 287 ((PIXEL_TYPE *)d)[7] = palette[(v >> 0) & 0xf]; 286 288 d += BPP * 8; 287 s += 4;289 vram_ofs += 4; 288 290 } 289 291 }
Note:
See TracChangeset
for help on using the changeset viewer.