Subject: RE: Non-blinking, block cursor
To: Chris Baird <port-i386@netbsd.org>
From: Prasad V Nuli <pnuli@mediaone.net>
List: port-i386
Date: 12/13/2000 08:04:32
I can use your help. I am running 1.5.x netbsd on NEC Image Risc Station. I
was able to see blinking cursor until 1.4.U and all of a suddedn under 1.5.x
I am unable to see any cursor at all on the screen. It is quite frustrating
to do any development with out a cursor to tell me where I am on the screen.
Can any one give some ideas where I could look for the problem, so I can fix
it.

Thanks
Prasad Nuli

-----Original Message-----
From: port-i386-owner@netbsd.org [mailto:port-i386-owner@netbsd.org]On
Behalf Of Chris Baird
Sent: Wednesday, December 13, 2000 7:26 AM
To: port-i386@netbsd.org
Cc: Andrew Gillham
Subject: Re: Non-blinking, block cursor


>> How do I get a non-blinking, block cursor at the text console
>> starting from a default install of NetBSD 1.4.2 (GENERIC kernel)?

 > I don't believe you can under 1.4.2, you will need 1.5. Under 1.4.2
 > the 'pcvt' driver has cursor support, but only hardware (AFAICT) so
 > you'll still blink. :)

If using wscons, and blinking is acceptable, I was using the following
code for the old FAT_CURSOR effect:
--
Chris Baird,, <cjb@brushtail.apana.org.au>


/* compile with: cc -o fatcursor fatcursor.c -lm -li386
 * add "-static" to the above if calling from early in /etc/rc
 */
#include <sys/types.h>
#include <machine/sysarch.h>
#include <stdio.h>

void enableperm (short bit)
{
  unsigned long iomap[32], word, shift, mask;

  if (i386_get_ioperm(iomap))
    errx (1, "i386_get_ioperm failed");
  word = bit >> 5;
  shift = bit & 31;
  mask = 1L << shift;
  iomap[word] &= ~mask;
  if (i386_set_ioperm(iomap))
    errx (1, "i386_set_ioperm failed");
}

inline void outb (unsigned short port, unsigned char value)
{
  asm ("outb %0,%1" ::"a" (value),"d" (port));
}

int main(int argc, char *argv[])
{
  short iobase = 0x3D4;

  enableperm (iobase);
  enableperm (iobase+1);
  outb (iobase, 10);
  outb (iobase+1, 0);
  outb (iobase, 11);
  outb (iobase+1, 31);

  return 0;
}