9fans - fans of the OS Plan 9 from Bell Labs
 help / color / mirror / Atom feed
From: nigel@9fs.org
To: 9fans@cse.psu.edu
Subject: Re: [9fans] any vga driver gurus about?
Date: Mon, 25 Sep 2000 22:05:12 +0100	[thread overview]
Message-ID: <E13dfR9-000E2q-0Y@anchor-post-34.mail.demon.net> (raw)

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

The in memory version is maintained as 16 bits to allow
some overflow in calculations, such as horizontal counts.

The original 6845 core was extended in the design of the
vga to allow the generation of wider displays. The original
width register was too small, so bits in other registers were
borrowed to extend the basic register.

By using a 16 bit in-memory register, the standard
calculation could be done, and then the overflow bits
copied to the right place.

This explains what you are seeing.

If you have not done this before, I strongly recommend
getting a working system you can play with. This is not
known as vga Hell for nothing. You should also read a
good book on the history of the vga to understand the
full horror.

Which chip is it that is not supported? I would have thought
all the Cirrus CL-GD chips were supported.


[-- Attachment #2: Type: message/rfc822, Size: 3038 bytes --]

From: "Matt" <matt@proweb.co.uk>
To: "9fans" <9fans@cse.psu.edu>
Subject: [9fans] any vga driver gurus about?
Date: Mon, 25 Sep 2000 21:45:18 +0100
Message-ID: <003b01c02731$8823c420$0301a8c0@freeze>

Hi,

Okay I've ended up having to try and write a vga driver for my laptop
a challenge to which I have never risen before
It's partiularly intriguing as I've not even got a running plan9 to compile
it with

I'm reading through stuff and I've come across something I don't understand

in http://offworld.fac.cs.cmu.edu/plan9/source/src/cmd/aux/vga/vga.h

the crt registers are defined as ushorts

125 typedef struct Vga {
129         ushort  crt[256];

in my cl-gd52x manual

the CRT registers are 8 bits

in http://offworld.fac.cs.cmu.edu/plan9/source/src/cmd/aux/vga/clgd542x.c
which is the driver file I'm studying

there is some stuff like this :

248         if(vga->crt[0x16] & 0x100)
249                 vga->crt[0x1A] |= 0x40;
250         if(vga->crt[0x16] & 0x200)
251                 vga->crt[0x1A] |= 0x80;
these set the vertical blank end overflows (whatever they are :)


253         if(vga->crt[0x13] & 0x100)
254                 vga->crt[0x1B] |= 0x10;
this sets the blanking control to 1 which enables the blanking set in CR1A

so what use is & ing an 8bit value with a 16bit value?

Matt


             reply	other threads:[~2000-09-25 21:05 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2000-09-25 21:05 nigel [this message]
2000-09-25 21:10 ` Boyd Roberts
2000-09-25 21:25 ` Matt
2000-09-25 22:24 ` FODEMESI Gergely
  -- strict thread matches above, loose matches on Subject: below --
2000-09-26  6:31 nigel
2000-09-26  6:15 nigel
2000-09-25 20:51 Russ Cox
2000-09-25 21:19 ` Matt
2000-09-25 20:45 Matt

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=E13dfR9-000E2q-0Y@anchor-post-34.mail.demon.net \
    --to=nigel@9fs.org \
    --cc=9fans@cse.psu.edu \
    /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).