| 1454 |
} |
} |
| 1455 |
page0 = s->vram_offset + (addr & TARGET_PAGE_MASK); |
page0 = s->vram_offset + (addr & TARGET_PAGE_MASK); |
| 1456 |
page1 = s->vram_offset + ((addr + bwidth - 1) & TARGET_PAGE_MASK); |
page1 = s->vram_offset + ((addr + bwidth - 1) & TARGET_PAGE_MASK); |
| 1457 |
update = full_update | cpu_physical_memory_is_dirty(page0) | |
update = full_update | |
| 1458 |
cpu_physical_memory_is_dirty(page1); |
cpu_physical_memory_get_dirty(page0, VGA_DIRTY_FLAG) | |
| 1459 |
|
cpu_physical_memory_get_dirty(page1, VGA_DIRTY_FLAG); |
| 1460 |
if ((page1 - page0) > TARGET_PAGE_SIZE) { |
if ((page1 - page0) > TARGET_PAGE_SIZE) { |
| 1461 |
/* if wide line, can use another page */ |
/* if wide line, can use another page */ |
| 1462 |
update |= cpu_physical_memory_is_dirty(page0 + TARGET_PAGE_SIZE); |
update |= cpu_physical_memory_get_dirty(page0 + TARGET_PAGE_SIZE, |
| 1463 |
|
VGA_DIRTY_FLAG); |
| 1464 |
} |
} |
| 1465 |
/* explicit invalidation for the hardware cursor */ |
/* explicit invalidation for the hardware cursor */ |
| 1466 |
update |= (s->invalidated_y_table[y >> 5] >> (y & 0x1f)) & 1; |
update |= (s->invalidated_y_table[y >> 5] >> (y & 0x1f)) & 1; |
| 1503 |
} |
} |
| 1504 |
/* reset modified pages */ |
/* reset modified pages */ |
| 1505 |
if (page_max != -1) { |
if (page_max != -1) { |
| 1506 |
cpu_physical_memory_reset_dirty(page_min, page_max + TARGET_PAGE_SIZE); |
cpu_physical_memory_reset_dirty(page_min, page_max + TARGET_PAGE_SIZE, |
| 1507 |
|
VGA_DIRTY_FLAG); |
| 1508 |
} |
} |
| 1509 |
memset(s->invalidated_y_table, 0, ((height + 31) >> 5) * 4); |
memset(s->invalidated_y_table, 0, ((height + 31) >> 5) * 4); |
| 1510 |
} |
} |