- Timestamp:
- Jun 6, 2007 12:09:15 PM (18 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Devices/Graphics/DevVGA.cpp
r2981 r3064 892 892 ret = s->vram_ptr[((addr & ~1) << 1) | plane]; 893 893 #else /* VBOX */ 894 ret = s->CTXSUFF(vram_ptr)[((addr & ~1) << 1) | plane]; 894 /* See the comment for a similar line in vga_mem_writeb. */ 895 ret = s->CTXSUFF(vram_ptr)[((addr & ~1) << 2) | plane]; 895 896 #endif /* VBOX */ 896 897 } else { … … 1022 1023 mask = (1 << plane); 1023 1024 if (s->sr[2] & mask) { 1025 #ifndef VBOX 1024 1026 addr = ((addr & ~1) << 1) | plane; 1027 #else 1028 /* 'addr' is offset in a plane, bit 0 select the plane. 1029 * Mask the bit 0, convert plane index to vram offset, 1030 * that is multiply by the number of planes, 1031 * and select the plane byte in the vram offset. 1032 */ 1033 addr = ((addr & ~1) << 2) | plane; 1034 #endif /* VBOX */ 1025 1035 #ifndef VBOX 1026 1036 s->vram_ptr[addr] = val; … … 1316 1326 line_offset = s->cr[0x13]; 1317 1327 line_offset <<= 3; 1328 #ifdef VBOX 1329 if ((s->gr[0x06] & 1) == 0) 1330 { 1331 /* Text mode. Every second byte of a plane is used. */ 1332 line_offset *= 2; 1333 } 1334 #endif /* VBOX */ 1318 1335 1319 1336 /* starting address */ … … 1546 1563 depth_index = get_depth_index(s->ds->depth); 1547 1564 #else /* VBOX */ 1548 cursor_ptr = s->CTXSUFF(vram_ptr) + (s->start_addr + cursor_offset) * 4;1565 cursor_ptr = s->CTXSUFF(vram_ptr) + (s->start_addr + cursor_offset) * 8; 1549 1566 depth_index = get_depth_index(s->pDrv->cBits); 1550 1567 #endif /* VBOX */ … … 1621 1638 } 1622 1639 d1 += x_incr; 1640 #ifndef VBOX 1623 1641 src += 4; 1642 #else 1643 src += 8; /* Every second byte of a plane is used in text mode. */ 1644 #endif 1645 1624 1646 ch_attr_ptr++; 1625 1647 }
Note:
See TracChangeset
for help on using the changeset viewer.