From mboxrd@z Thu Jan 1 00:00:00 1970 Message-ID: <003b01c02731$8823c420$0301a8c0@freeze> From: "Matt" To: "9fans" <9fans@cse.psu.edu> Date: Mon, 25 Sep 2000 21:45:18 +0100 MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit Subject: [9fans] any vga driver gurus about? Topicbox-Message-UUID: 0dc32344-eac9-11e9-9e20-41e7f4b1d025 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