mirror of
https://github.com/qemu/qemu.git
synced 2025-08-09 01:50:43 +00:00
multiscan/doublescan fix (malc)
git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@396 c046a42c-6fe2-441c-8c8c-71466251a162
This commit is contained in:
parent
01e3b763a6
commit
a07cf92aed
17
hw/vga.c
17
hw/vga.c
@ -1109,7 +1109,7 @@ static void vga_draw_graphic(VGAState *s, int full_update)
|
|||||||
{
|
{
|
||||||
int y1, y, update, page_min, page_max, linesize, y_start, double_scan, mask;
|
int y1, y, update, page_min, page_max, linesize, y_start, double_scan, mask;
|
||||||
int width, height, shift_control, line_offset, page0, page1, bwidth;
|
int width, height, shift_control, line_offset, page0, page1, bwidth;
|
||||||
int disp_width;
|
int disp_width, multi_scan, multi_run;
|
||||||
uint8_t *d;
|
uint8_t *d;
|
||||||
uint32_t v, addr1, addr;
|
uint32_t v, addr1, addr;
|
||||||
vga_draw_line_func *vga_draw_line;
|
vga_draw_line_func *vga_draw_line;
|
||||||
@ -1124,10 +1124,13 @@ static void vga_draw_graphic(VGAState *s, int full_update)
|
|||||||
disp_width = width;
|
disp_width = width;
|
||||||
|
|
||||||
shift_control = (s->gr[0x05] >> 5) & 3;
|
shift_control = (s->gr[0x05] >> 5) & 3;
|
||||||
if (shift_control > 1)
|
|
||||||
double_scan = ((s->cr[0x09] & 0x1f) != 0);
|
|
||||||
else
|
|
||||||
double_scan = (s->cr[0x09] & 0x80);
|
double_scan = (s->cr[0x09] & 0x80);
|
||||||
|
if (shift_control > 1) {
|
||||||
|
multi_scan = (s->cr[0x09] & 0x1f);
|
||||||
|
} else {
|
||||||
|
multi_scan = 0;
|
||||||
|
}
|
||||||
|
multi_run = multi_scan;
|
||||||
if (shift_control != s->shift_control ||
|
if (shift_control != s->shift_control ||
|
||||||
double_scan != s->double_scan) {
|
double_scan != s->double_scan) {
|
||||||
full_update = 1;
|
full_update = 1;
|
||||||
@ -1212,6 +1215,7 @@ static void vga_draw_graphic(VGAState *s, int full_update)
|
|||||||
y_start = -1;
|
y_start = -1;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
if (!multi_run) {
|
||||||
if (!double_scan || (y & 1) != 0) {
|
if (!double_scan || (y & 1) != 0) {
|
||||||
if (y1 == s->line_compare) {
|
if (y1 == s->line_compare) {
|
||||||
addr1 = 0;
|
addr1 = 0;
|
||||||
@ -1222,6 +1226,11 @@ static void vga_draw_graphic(VGAState *s, int full_update)
|
|||||||
}
|
}
|
||||||
y1++;
|
y1++;
|
||||||
}
|
}
|
||||||
|
multi_run = multi_scan;
|
||||||
|
} else {
|
||||||
|
multi_run--;
|
||||||
|
y1++;
|
||||||
|
}
|
||||||
d += linesize;
|
d += linesize;
|
||||||
}
|
}
|
||||||
if (y_start >= 0) {
|
if (y_start >= 0) {
|
||||||
|
Loading…
Reference in New Issue
Block a user