if (vga_passthrough && pci_dev->devfn == 0x00) //Host Bridge
{
+ val = 0;
+
if (config_addr == 0x52) // GMCH
val = pt_pci_host_read_word(0, 0, 0, 0x52);
-/* if (config_addr == 0xa0) // Top Memory addrress
- val = pt_pci_host_read_word(0, 0, 0, 0xa0);*/
- if (config_addr == 0x02) // Device ID
- val = pt_pci_host_read_byte(0, 0, 0, 0x02);
+ if (config_addr == 0xa0) // Top Memory addrress
+ val = pt_pci_host_read_byte(0, 0, 0, 0xa0);
+/* if (config_addr == 0x02) // Device ID
+ val = pt_pci_host_read_byte(0, 0, 0, 0x02);*/
}
else
val = pci_dev->config_read(pci_dev, config_addr, len);
buff = (unsigned char *)(intel_mem + intel_get_reg(REG_DR_DSPASURF));
- /* Copy the lines 0-3-4-7 */
+ /* Copy the solid lines */
toffset = intel_get_tiled_offset(x, y);
offset = intel_get_offset(ds, x * TileW, y * TileH);
for (i = 0; i < 4; i++)
memcpy(&buff[to], &ds->data[o], TileW * 4);
}
- /* Copy the lines 1-2-5-6 */
+ /* Copy the dashed lines */
toffset = to = intel_get_tiled_offset(x, y);
offset = o = intel_get_offset(ds, x * TileW, y * TileH);
for (i = 0; i < 4; i++)
for (i = yt; i < ht; i++)
for (j = xt; j < wt; j++)
- if (j >= 0 && j < 8 && i >= 0 && i < 96)
+ if (j >= 0 && j < 8 && i >= 0 && i < 96 &&
+ (i * TileH) < ds->height && (j * TileW) < ds->width)
intel_blit_tile(ds, j, i);
}
static void intel_update(DisplayState *ds, int x, int y, int w, int h)
{
- // if (intel_get_reg(REG_DR_DSPACNTR) & 0xA)
- intel_update_tiled(ds, x, y, w, h);
-/* else
- {
- unsigned char *buff = (unsigned char*)(intel_mem + intel_get_reg(REG_DR_DSPASURF));
- INTEL_DEBUG("change ds->data %p\n", buff);
- ds->data = buff;
- }*/
+ intel_update_tiled(ds, x, y, w, h);
}
static void intel_resize(DisplayState *ds, int w, int h)
ds->linesize = w * 4;
ds->width = w;
ds->height = h;
-// if (intel_get_reg(REG_DR_DSPASURF) & 0xA)
- {
- INTEL_DEBUG("%d,%d tiled mode\n", w, h);
- ds->data = realloc(ds->data, 1024 * ds->linesize);
- memset(ds->data, 0, 1024* ds->linesize);
- }
-/* else
- {
- unsigned char *buff = (unsigned char*)(intel_mem + intel_get_reg(REG_DR_DSPASURF));
- INTEL_DEBUG("%d,%d linear mode\n", w, h);
- INTEL_DEBUG("change ds->data %p\n", buff);
- ds->data = buff;
- }*/
+
+ ds->data = realloc(ds->data, w * ds->linesize);
+ memset(ds->data, 0, w * ds->linesize);
}
static void intel_refresh(DisplayState *ds)