From: tlb1144@gmx.net
To: qemu-devel@nongnu.org
Subject: [Qemu-devel] [Patch] Cirrus_vga: More than 1024 lines
Date: Tue, 03 Aug 2010 23:39:37 +0200 [thread overview]
Message-ID: <20100803213937.157260@gmx.net> (raw)
Cirrus VGA implementation supports 10 bits to set the number of scanlines which results in a maximum of 1024 pixel for vertical resolution. For large monitors (e.g. portrait monitor) it would be nice to have more lines.
According to Cirrus technical documentation in gd5446trm.pdf (can be found e.g. here: http://www.tjd.phlegethon.org/gd5446trm.pdf.gz) page 4-55 chapter 4.44, CRTC Mode Control (CR17) bit 2 supports "Multiply Vertical Registers by Two: If this bit is '1', the scanline counter is clocked with HSYNC divided by two. This allows the number of scanlines to be doubled to 2048."
This can be used in hw/cirrus_vga.c in functions cirrus_get_offsets() and cirrus_get_resolution(). With this patch and a patch for vgabios (described in 2nd mail), I was able to create a mode 1024x1536 (from 1024x768) which I use in qemu-0.12.5 with a portrait monitor.
diff -r -u a/hw/cirrus_vga.c b/hw/cirrus_vga.c
--- a/hw/cirrus_vga.c 2010-07-22 14:39:04.000000000 +0200
+++ b/hw/cirrus_vga.c 2010-07-31 22:17:57.000000000 +0200
@@ -1062,6 +1062,13 @@
line_compare = s->vga.cr[0x18] |
((s->vga.cr[0x07] & 0x10) << 4) |
((s->vga.cr[0x09] & 0x40) << 3);
+
+ /* Multiply Vertical Registers by Two */
+ if ((s->vga.cr[0x17] & 0x04))
+ {
+ line_compare = line_compare * 2;
+ }
+
*pline_compare = line_compare;
}
@@ -1134,6 +1141,13 @@
((s->cr[0x07] & 0x02) << 7) |
((s->cr[0x07] & 0x40) << 3);
height = (height + 1);
+
+ /* Multiply Vertical Registers by Two */
+ if ((s->cr[0x17] & 0x04))
+ {
+ height = height * 2;
+ }
+
/* interlace support */
if (s->cr[0x1a] & 0x01)
height = height * 2;
--
GRATIS für alle GMX-Mitglieder: Die maxdome Movie-FLAT!
Jetzt freischalten unter http://portal.gmx.net/de/go/maxdome01
reply other threads:[~2010-08-03 21:39 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20100803213937.157260@gmx.net \
--to=tlb1144@gmx.net \
--cc=qemu-devel@nongnu.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).