9fans - fans of the OS Plan 9 from Bell Labs
 help / color / mirror / Atom feed
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	[thread overview]
Message-ID: <003b01c02731$8823c420$0301a8c0@freeze> (raw)

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 20:45 UTC|newest]

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

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='003b01c02731$8823c420$0301a8c0@freeze' \
    --to=matt@proweb.co.uk \
    --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).