qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: Michael L Torrie <torriem@chem.byu.edu>
To: qemu-devel@nongnu.org
Subject: Re: [Qemu-devel] Fix for bochs vbe issues
Date: Thu, 29 Apr 2004 10:03:53 -0600	[thread overview]
Message-ID: <1083254633.32696.36.camel@isengard> (raw)
In-Reply-To: <4090335C.2010108@bellard.org>

[-- Attachment #1: Type: text/plain, Size: 3517 bytes --]

On Wed, 2004-04-28 at 16:42, Fabrice Bellard wrote:
> Hi,
> 
> I just commited a slightly different patch. Tell me if it works.

I updated from CVS this morning, but unfortunately it doens't completely
work.  The screen looks all garbled.  The interesting thing is that if I
install VNC server, the exported screen is all garbled also.

Attached is a screenshot.

It could be the whole install is scrambled.  Or I have the wrong driver.

Michael

> 
> Fabrice
> 
> Matthew Mastracci wrote:
> > I found a way to fix the bochs VBE issues in Windows 2000.  It looks 
> > really good in 16+ bit color.  The changes in this patch are:
> > 
> > - Use linear (chain-4) mode for all VBE_DISPI_ENABLED modes
> > - Add ff80 and ff81 as valid ioport registers (these are the old ports, 
> > still used by the driver)
> > 
> > Some of the issues with the patch:
> > 
> > - There are black lines that appear on the screen at what appear to be 
> > lines that span a display bank.  This only seems to happen in 8- or 
> > 24-bit.  Puzzling!
> > - The shutdown screen in windows 2000 is corrupted.
> > 
> > A better patch might tweak some of the sequence controller and bank 
> > select registers to set the chain-4 mode, but I haven't tried that yet.
> > 
> > diff -u -r ./hw/vga.c ../../qemu-0.5.4/hw/vga.c
> > --- ./hw/vga.c  2004-04-26 15:17:28.000000000 -0600
> > +++ ../../qemu-0.5.4/hw/vga.c   2004-04-27 21:46:20.828796000 -0600
> > @@ -678,7 +678,10 @@
> >         break;
> >     }
> > 
> > -    if (s->sr[4] & 0x08) {
> > +       if (s->vbe_regs[VBE_DISPI_INDEX_ENABLE] & VBE_DISPI_ENABLED) {
> > +        /* VBE mode : simplest access */
> > +        ret = s->vram_ptr[addr];
> > +       } else if (s->sr[4] & 0x08) {
> >         /* chain 4 mode : simplest access */
> >         ret = s->vram_ptr[addr];
> >     } else if (s->gr[5] & 0x10) {
> > @@ -756,7 +759,17 @@
> >         break;
> >     }
> > 
> > -    if (s->sr[4] & 0x08) {
> > +       if (s->vbe_regs[VBE_DISPI_INDEX_ENABLE] & VBE_DISPI_ENABLED) {
> > +        /* VBE mode : simplest access */
> > +        plane = (s->gr[4] & 2) | (addr & 1);
> > +        if (s->sr[2] & (1 << plane)) {
> > +            s->vram_ptr[addr] = val;
> > +#ifdef DEBUG_VGA_MEM
> > +            printf("vga: VBE: [0x%x]\n", addr);
> > +#endif
> > +            cpu_physical_memory_set_dirty(s->vram_offset + addr);
> > +        }
> > +       } else if (s->sr[4] & 0x08) {
> >         /* chain 4 mode : simplest access */
> >         plane = addr & 3;
> >         if (s->sr[2] & (1 << plane)) {
> > @@ -1768,6 +1781,11 @@
> > 
> >     register_ioport_write(0x1ce, 1, 2, vbe_ioport_write, s);
> >     register_ioport_write(0x1cf, 1, 2, vbe_ioport_write, s);
> > +    register_ioport_read(0xff80, 1, 2, vbe_ioport_read, s);
> > +    register_ioport_read(0xff81, 1, 2, vbe_ioport_read, s);
> > +
> > +    register_ioport_write(0xff80, 1, 2, vbe_ioport_write, s);
> > +    register_ioport_write(0xff81, 1, 2, vbe_ioport_write, s);
> > #endif
> > 
> >     vga_io_memory = cpu_register_io_memory(0, vga_mem_read, vga_mem_write);
> > 
> > 
> > ------------------------------------------------------------------------
> > 
> > _______________________________________________
> > Qemu-devel mailing list
> > Qemu-devel@nongnu.org
> > http://mail.nongnu.org/mailman/listinfo/qemu-devel
> 
> 
> 
> 
> _______________________________________________
> Qemu-devel mailing list
> Qemu-devel@nongnu.org
> http://mail.nongnu.org/mailman/listinfo/qemu-devel
-- 
Michael L Torrie <torriem@chem.byu.edu>

[-- Attachment #2: Screenshot-qemu.png --]
[-- Type: image/png, Size: 22204 bytes --]

  parent reply	other threads:[~2004-04-29 16:19 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2004-04-28 21:34 [Qemu-devel] Fix for bochs vbe issues Matthew Mastracci
2004-04-28 22:42 ` Fabrice Bellard
2004-04-29  2:17   ` Matthew Mastracci
2004-04-29  2:32     ` Matthew Mastracci
2004-04-29 16:03   ` Michael L Torrie [this message]
2004-04-29 19:51     ` [Qemu-devel] " Matthew Mastracci
2004-04-29 20:12       ` Lionel Ulmer
2004-04-29 20:24         ` Matthew Mastracci
2004-04-29 20:36         ` Jean-Michel POURE

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=1083254633.32696.36.camel@isengard \
    --to=torriem@chem.byu.edu \
    --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).