aboutsummaryrefslogtreecommitdiff
path: root/hw/display
diff options
context:
space:
mode:
authorHelge Deller <deller@gmx.de>2022-05-11 11:49:02 +0200
committerHelge Deller <deller@gmx.de>2022-05-16 15:58:22 +0200
commit482afe020b558d36d3b863970ad1672981b22d48 (patch)
treeca8aeb088d7c011ecf002fbd46d4be7a3e212a17 /hw/display
parente9683fbc3738ebbf9b4058413ffc53e086da95fc (diff)
downloadqemu-482afe020b558d36d3b863970ad1672981b22d48.zip
qemu-482afe020b558d36d3b863970ad1672981b22d48.tar.gz
qemu-482afe020b558d36d3b863970ad1672981b22d48.tar.bz2
artist: Fix vertical X11 cursor position in HP-UX
Drop the hard-coded value of 1146 lines which seems to work with HP-UX 11, but not with HP-UX 10. Instead encode the screen height in byte 0 of active_lines_low and byte 3 of misc_video as it's expected by the Xorg X11 graphics driver. This potentially allows for higher vertical screen resolutions than 1280x1024 with X11. Signed-off-by: Helge Deller <deller@gmx.de> Acked-by: Mark Cave-Ayland <mark.cave-ayland@ilande.co.uk>
Diffstat (limited to 'hw/display')
-rw-r--r--hw/display/artist.c14
1 files changed, 9 insertions, 5 deletions
diff --git a/hw/display/artist.c b/hw/display/artist.c
index c8b261a..780cb15 100644
--- a/hw/display/artist.c
+++ b/hw/display/artist.c
@@ -337,10 +337,11 @@ static void artist_get_cursor_pos(ARTISTState *s, int *x, int *y)
}
*x = (lx - offset) / 2;
- *y = 1146 - artist_get_y(s->cursor_pos);
-
/* subtract cursor offset from cursor control register */
*x -= (s->cursor_cntrl & 0xf0) >> 4;
+
+ /* height minus nOffscreenScanlines is stored in cursor control register */
+ *y = s->height - artist_get_y(s->cursor_pos);
*y -= (s->cursor_cntrl & 0x0f);
if (*x > s->width) {
@@ -1158,14 +1159,17 @@ static uint64_t artist_reg_read(void *opaque, hwaddr addr, unsigned size)
case ACTIVE_LINES_LOW:
val = s->active_lines_low;
/* activeLinesLo for cursor is in reg20.b.b0 */
- val |= ((s->height - 1) & 0xff);
+ val &= ~(0xff << 24);
+ val |= (s->height & 0xff) << 24;
break;
case MISC_VIDEO:
/* emulate V-blank */
- val = s->misc_video ^ 0x00040000;
+ s->misc_video ^= 0x00040000;
/* activeLinesHi for cursor is in reg21.b.b2 */
- val |= ((s->height - 1) & 0xff00);
+ val = s->misc_video;
+ val &= ~0xff00UL;
+ val |= (s->height & 0xff00);
break;
case MISC_CTRL: