Miscellaneous changes from Bill Paul:

- /sys/i386/isa/if_ed.c doesn't quite know how to deal with SMC EtherEZ
  ethernet cards. The EtherEZ looks just like the Elite Ultra, except it
  has only 8K of shared memory. The only way to have it properly detected
  is to zero and test a few bytes of memory just about the first 8K region.
  If it clears properly, it's an Elite Ultra, otherwise it's an EtherEZ.

  I've also got an EtherEZ patch for netboot (Makefile, ether.c and ether.h).

- /sys/i386/isa/syscons.c wraps at the next to the last column rather than
  the last column, like it should. You don't really notice this unless you
  use certain programs that write all the way out to, say, the 80th column,
  like VMSmail. Along with a one-line fix for this are some changes to
  implement a non-blinking cursor. Put 'options "NOBLINK_CURSOR"' in your
  config file and give it a try. :)

Submitted by:	wpaul
This commit is contained in:
Jordan K. Hubbard 1994-12-31 17:09:58 +00:00
parent 19bc776351
commit 63c5d14d1b
Notes: svn2git 2020-12-20 02:59:44 +00:00
svn path=/head/; revision=5320
5 changed files with 237 additions and 27 deletions

View File

@ -13,7 +13,7 @@
* the SMC Elite Ultra (8216), the 3Com 3c503, the NE1000 and NE2000,
* and a variety of similar clones.
*
* $Id: if_ed.c,v 1.58 1994/11/26 10:51:49 davidg Exp $
* $Id: if_ed.c,v 1.59 1994/12/22 21:56:03 wollman Exp $
*/
#include "ed.h"
@ -367,15 +367,27 @@ ed_probe_WD80x3(isa_dev)
memsize = 16384;
isa16bit = 1;
break;
case ED_TYPE_SMC8216C:
sc->type_str = "SMC8216/SMC8216C";
memsize = 16384;
case ED_TYPE_SMC8216C: /* 8216 has 16K shared mem -- 8416 has 8K */
(unsigned int) *(isa_dev->id_maddr+8192) = (unsigned int)0;
if ((unsigned int) *(isa_dev->id_maddr+8192)) {
sc->type_str = "SMC8416C/SMC8416BT";
memsize = 8192;
} else {
sc->type_str = "SMC8216/SMC8216C";
memsize = 16384;
}
isa16bit = 1;
sc->is790 = 1;
break;
case ED_TYPE_SMC8216T:
sc->type_str = "SMC8216T";
memsize = 16384;
(unsigned int) *(isa_dev->id_maddr+8192) = (unsigned int)0;
if ((unsigned int) *(isa_dev->id_maddr+8192)) {
sc->type_str = "SMC8416T";
memsize = 8192;
} else {
sc->type_str = "SMC8216T";
memsize = 16384;
}
isa16bit = 1;
sc->is790 = 1;
break;

View File

@ -35,7 +35,7 @@
* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
* SUCH DAMAGE.
*
* $Id: syscons.c,v 1.84 1994/12/26 17:50:18 ats Exp $
* $Id: syscons.c,v 1.85 1994/12/27 08:43:06 davidg Exp $
*/
#include "sc.h"
@ -69,6 +69,10 @@
#include <i386/isa/kbdtables.h>
#include <i386/i386/cons.h>
#if defined(NOBLINK_CURSOR)
#undef FAT_CURSOR
#endif
#if !defined(NCONS)
#define NCONS 12
#endif
@ -145,6 +149,9 @@ typedef struct scr_stat {
u_short *crt_base; /* address of screen memory */
u_short *scr_buf; /* buffer when off screen */
u_short *crtat; /* cursor address */
#if defined(NOBLINK_CURSOR)
u_short cur_cursor_attr; /* cursor attributes */
#endif
int xpos; /* current X position */
int ypos; /* current Y position */
int xsize; /* X size */
@ -194,7 +201,9 @@ static char *font_8 = NULL, *font_14 = NULL, *font_16 = NULL;
static int fonts_loaded = 0;
static char palette[3*256];
static const u_int n_fkey_tab = sizeof(fkey_tab) / sizeof(*fkey_tab);
#if !defined(NOBLINK_CURSOR)
static int cur_cursor_pos = -1;
#endif
static char in_putc = 0;
static char polling = 0;
#if ASYNCH
@ -1221,6 +1230,7 @@ pccnputc(dev_t dev, char c)
if (c == '\n')
scput('\r');
scput(c);
#if !defined(NOBLINK_CURSOR)
if (cur_console == &console[0]) {
int pos = cur_console->crtat - cur_console->crt_base;
if (pos != cur_cursor_pos) {
@ -1231,6 +1241,7 @@ pccnputc(dev_t dev, char c)
outb(crtc_addr+1,pos&0xff);
}
}
#endif
}
int
@ -1367,7 +1378,9 @@ star_saver(int test)
else {
if (scrn_blanked) {
bcopy(scp->scr_buf, Crtat, scp->xsize*scp->ysize*2);
#if !defined(NOBLINK_CURSOR)
cur_cursor_pos = -1;
#endif
set_border(scp->border);
scrn_blanked = 0;
}
@ -1427,7 +1440,9 @@ snake_saver(int test)
if (scrn_blanked) {
bcopy(scp->scr_buf, Crtat,
scp->xsize * scp->ysize * 2);
#if !defined(NOBLINK_CURSOR)
cur_cursor_pos = -1;
#endif
set_border(scp->border);
scrn_blanked = 0;
}
@ -1463,6 +1478,7 @@ cursor_pos(int force)
return;
if (scrn_blank_time && (time.tv_sec > scrn_time_stamp+scrn_blank_time))
SCRN_SAVER(1);
#if !defined(NOBLINK_CURSOR)
pos = cur_console->crtat - cur_console->crt_base;
if (force || (!scrn_blanked && pos != cur_cursor_pos)) {
cur_cursor_pos = pos;
@ -1471,6 +1487,7 @@ cursor_pos(int force)
outb(crtc_addr, 15);
outb(crtc_addr+1, pos&0xff);
}
#endif
timeout((timeout_t)cursor_pos, 0, hz/20);
}
@ -1988,11 +2005,13 @@ scan_esc(scr_stat *scp, u_char c)
case 'C': /* set cursor shape (start & end line) */
if (scp->term.num_param == 2) {
#if !defined(NOBLINK_CURSOR)
scp->cursor_start = scp->term.param[0] & 0x1F;
scp->cursor_end = scp->term.param[1] & 0x1F;
if (scp == cur_console)
cursor_shape(scp->cursor_start,
scp->cursor_end);
#endif
}
break;
@ -2033,7 +2052,10 @@ ansi_put(scr_stat *scp, u_char c)
{
if (scp->status & UNKNOWN_MODE)
return;
#if defined(NOBLINK_CURSOR)
/* undraw cursor */
*scp->crtat = scp->cur_cursor_attr;
#endif
/* make screensaver happy */
if (scp == cur_console) {
scrn_time_stamp = time.tv_sec;
@ -2081,7 +2103,11 @@ ansi_put(scr_stat *scp, u_char c)
/* Print only printables */
*scp->crtat = (scp->term.cur_attr | scr_map[c]);
scp->crtat++;
if (++scp->xpos >= scp->xsize) {
/*
* Wrap at the *LAST* column, not the last column
* minus one!!!! Arrrghhh!!!
*/
if (++scp->xpos > /* = */ scp->xsize) {
scp->xpos = 0;
scp->ypos++;
}
@ -2096,6 +2122,29 @@ ansi_put(scr_stat *scp, u_char c)
scp->crtat -= scp->xsize;
scp->ypos--;
}
#if defined(NOBLINK_CURSOR)
/*
* draw a non-blinking cursor
* We generally want a white cursor, but we have to do some
* sanity checks to avoid stupid combinations like these:
* - white cursor, white background
* - black cursor, black background
* - white cursor, white foreground
* - black cursor, black foreground
* (Okay, so I used raw hex values as bitmasks. Wanna fight
* over it?)
*/
scp->cur_cursor_attr = *scp->crtat;
if ((*scp->crtat & 0x7000) == 0x7000) {
*scp->crtat &= 0x8FFF;
if(!(*scp->crtat & 0x0700))
*scp->crtat |= 0x0700;
} else {
*scp->crtat |= 0x7000;
if ((*scp->crtat & 0x0F00) == 0x0700)
*scp->crtat &= 0xF8FF;
}
#endif
in_putc--;
if (delayed_next_scr)
switch_scr(delayed_next_scr - 1);
@ -2157,12 +2206,16 @@ scinit(void)
if (ISMAPPED(pa, 64))
video_mode_ptr = (char *)pa_to_va(pa);
}
#if defined(NOBLINK_CURSOR)
cursor_shape(start, end);
#else
#if defined(FAT_CURSOR)
start = 0;
end = 18;
cursor_shape(start, end);
#else
get_cursor_shape(&start, &end);
#endif
#endif
}
current_default = &user_default;
@ -2698,9 +2751,13 @@ set_mode(scr_stat *scp)
/* mode change only on VGA's */
if (!crtc_vga || video_mode_ptr == NULL) {
#if !defined(NOBLINK_CURSOR)
/* (re)activate cursor */
untimeout((timeout_t)cursor_pos, 0);
cursor_pos(1);
#else
cursor_shape (-1, -1);
#endif
return;
}
@ -2747,6 +2804,7 @@ set_mode(scr_stat *scp)
setup_mode:
set_vgaregs(modetable);
font_size = *(modetable + 2);
#if !defined(NOBLINK_CURSOR)
/* change cursor type if set */
if (scp->cursor_start != -1 && scp->cursor_end != -1)
cursor_shape(
@ -2756,7 +2814,7 @@ setup_mode:
(scp->cursor_end >= font_size)
? font_size - 1
: scp->cursor_end);
#endif
/* set font type (size) */
switch (font_size) {
case 0x08:
@ -2771,10 +2829,14 @@ setup_mode:
default:
outb(TSIDX, 0x03); outb(TSREG, 0x05); /* font 1 */
}
#if !defined(NOBLINK_CURSOR)
/* (re)activate cursor */
untimeout((timeout_t)cursor_pos, 0);
cursor_pos(1);
#else
cursor_shape (-1,-1);
#endif
break;
case M_BG320: case M_CG320: case M_BG640:

View File

@ -13,7 +13,7 @@
* the SMC Elite Ultra (8216), the 3Com 3c503, the NE1000 and NE2000,
* and a variety of similar clones.
*
* $Id: if_ed.c,v 1.58 1994/11/26 10:51:49 davidg Exp $
* $Id: if_ed.c,v 1.59 1994/12/22 21:56:03 wollman Exp $
*/
#include "ed.h"
@ -367,15 +367,27 @@ ed_probe_WD80x3(isa_dev)
memsize = 16384;
isa16bit = 1;
break;
case ED_TYPE_SMC8216C:
sc->type_str = "SMC8216/SMC8216C";
memsize = 16384;
case ED_TYPE_SMC8216C: /* 8216 has 16K shared mem -- 8416 has 8K */
(unsigned int) *(isa_dev->id_maddr+8192) = (unsigned int)0;
if ((unsigned int) *(isa_dev->id_maddr+8192)) {
sc->type_str = "SMC8416C/SMC8416BT";
memsize = 8192;
} else {
sc->type_str = "SMC8216/SMC8216C";
memsize = 16384;
}
isa16bit = 1;
sc->is790 = 1;
break;
case ED_TYPE_SMC8216T:
sc->type_str = "SMC8216T";
memsize = 16384;
(unsigned int) *(isa_dev->id_maddr+8192) = (unsigned int)0;
if ((unsigned int) *(isa_dev->id_maddr+8192)) {
sc->type_str = "SMC8416T";
memsize = 8192;
} else {
sc->type_str = "SMC8216T";
memsize = 16384;
}
isa16bit = 1;
sc->is790 = 1;
break;

View File

@ -35,7 +35,7 @@
* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
* SUCH DAMAGE.
*
* $Id: syscons.c,v 1.84 1994/12/26 17:50:18 ats Exp $
* $Id: syscons.c,v 1.85 1994/12/27 08:43:06 davidg Exp $
*/
#include "sc.h"
@ -69,6 +69,10 @@
#include <i386/isa/kbdtables.h>
#include <i386/i386/cons.h>
#if defined(NOBLINK_CURSOR)
#undef FAT_CURSOR
#endif
#if !defined(NCONS)
#define NCONS 12
#endif
@ -145,6 +149,9 @@ typedef struct scr_stat {
u_short *crt_base; /* address of screen memory */
u_short *scr_buf; /* buffer when off screen */
u_short *crtat; /* cursor address */
#if defined(NOBLINK_CURSOR)
u_short cur_cursor_attr; /* cursor attributes */
#endif
int xpos; /* current X position */
int ypos; /* current Y position */
int xsize; /* X size */
@ -194,7 +201,9 @@ static char *font_8 = NULL, *font_14 = NULL, *font_16 = NULL;
static int fonts_loaded = 0;
static char palette[3*256];
static const u_int n_fkey_tab = sizeof(fkey_tab) / sizeof(*fkey_tab);
#if !defined(NOBLINK_CURSOR)
static int cur_cursor_pos = -1;
#endif
static char in_putc = 0;
static char polling = 0;
#if ASYNCH
@ -1221,6 +1230,7 @@ pccnputc(dev_t dev, char c)
if (c == '\n')
scput('\r');
scput(c);
#if !defined(NOBLINK_CURSOR)
if (cur_console == &console[0]) {
int pos = cur_console->crtat - cur_console->crt_base;
if (pos != cur_cursor_pos) {
@ -1231,6 +1241,7 @@ pccnputc(dev_t dev, char c)
outb(crtc_addr+1,pos&0xff);
}
}
#endif
}
int
@ -1367,7 +1378,9 @@ star_saver(int test)
else {
if (scrn_blanked) {
bcopy(scp->scr_buf, Crtat, scp->xsize*scp->ysize*2);
#if !defined(NOBLINK_CURSOR)
cur_cursor_pos = -1;
#endif
set_border(scp->border);
scrn_blanked = 0;
}
@ -1427,7 +1440,9 @@ snake_saver(int test)
if (scrn_blanked) {
bcopy(scp->scr_buf, Crtat,
scp->xsize * scp->ysize * 2);
#if !defined(NOBLINK_CURSOR)
cur_cursor_pos = -1;
#endif
set_border(scp->border);
scrn_blanked = 0;
}
@ -1463,6 +1478,7 @@ cursor_pos(int force)
return;
if (scrn_blank_time && (time.tv_sec > scrn_time_stamp+scrn_blank_time))
SCRN_SAVER(1);
#if !defined(NOBLINK_CURSOR)
pos = cur_console->crtat - cur_console->crt_base;
if (force || (!scrn_blanked && pos != cur_cursor_pos)) {
cur_cursor_pos = pos;
@ -1471,6 +1487,7 @@ cursor_pos(int force)
outb(crtc_addr, 15);
outb(crtc_addr+1, pos&0xff);
}
#endif
timeout((timeout_t)cursor_pos, 0, hz/20);
}
@ -1988,11 +2005,13 @@ scan_esc(scr_stat *scp, u_char c)
case 'C': /* set cursor shape (start & end line) */
if (scp->term.num_param == 2) {
#if !defined(NOBLINK_CURSOR)
scp->cursor_start = scp->term.param[0] & 0x1F;
scp->cursor_end = scp->term.param[1] & 0x1F;
if (scp == cur_console)
cursor_shape(scp->cursor_start,
scp->cursor_end);
#endif
}
break;
@ -2033,7 +2052,10 @@ ansi_put(scr_stat *scp, u_char c)
{
if (scp->status & UNKNOWN_MODE)
return;
#if defined(NOBLINK_CURSOR)
/* undraw cursor */
*scp->crtat = scp->cur_cursor_attr;
#endif
/* make screensaver happy */
if (scp == cur_console) {
scrn_time_stamp = time.tv_sec;
@ -2081,7 +2103,11 @@ ansi_put(scr_stat *scp, u_char c)
/* Print only printables */
*scp->crtat = (scp->term.cur_attr | scr_map[c]);
scp->crtat++;
if (++scp->xpos >= scp->xsize) {
/*
* Wrap at the *LAST* column, not the last column
* minus one!!!! Arrrghhh!!!
*/
if (++scp->xpos > /* = */ scp->xsize) {
scp->xpos = 0;
scp->ypos++;
}
@ -2096,6 +2122,29 @@ ansi_put(scr_stat *scp, u_char c)
scp->crtat -= scp->xsize;
scp->ypos--;
}
#if defined(NOBLINK_CURSOR)
/*
* draw a non-blinking cursor
* We generally want a white cursor, but we have to do some
* sanity checks to avoid stupid combinations like these:
* - white cursor, white background
* - black cursor, black background
* - white cursor, white foreground
* - black cursor, black foreground
* (Okay, so I used raw hex values as bitmasks. Wanna fight
* over it?)
*/
scp->cur_cursor_attr = *scp->crtat;
if ((*scp->crtat & 0x7000) == 0x7000) {
*scp->crtat &= 0x8FFF;
if(!(*scp->crtat & 0x0700))
*scp->crtat |= 0x0700;
} else {
*scp->crtat |= 0x7000;
if ((*scp->crtat & 0x0F00) == 0x0700)
*scp->crtat &= 0xF8FF;
}
#endif
in_putc--;
if (delayed_next_scr)
switch_scr(delayed_next_scr - 1);
@ -2157,12 +2206,16 @@ scinit(void)
if (ISMAPPED(pa, 64))
video_mode_ptr = (char *)pa_to_va(pa);
}
#if defined(NOBLINK_CURSOR)
cursor_shape(start, end);
#else
#if defined(FAT_CURSOR)
start = 0;
end = 18;
cursor_shape(start, end);
#else
get_cursor_shape(&start, &end);
#endif
#endif
}
current_default = &user_default;
@ -2698,9 +2751,13 @@ set_mode(scr_stat *scp)
/* mode change only on VGA's */
if (!crtc_vga || video_mode_ptr == NULL) {
#if !defined(NOBLINK_CURSOR)
/* (re)activate cursor */
untimeout((timeout_t)cursor_pos, 0);
cursor_pos(1);
#else
cursor_shape (-1, -1);
#endif
return;
}
@ -2747,6 +2804,7 @@ set_mode(scr_stat *scp)
setup_mode:
set_vgaregs(modetable);
font_size = *(modetable + 2);
#if !defined(NOBLINK_CURSOR)
/* change cursor type if set */
if (scp->cursor_start != -1 && scp->cursor_end != -1)
cursor_shape(
@ -2756,7 +2814,7 @@ setup_mode:
(scp->cursor_end >= font_size)
? font_size - 1
: scp->cursor_end);
#endif
/* set font type (size) */
switch (font_size) {
case 0x08:
@ -2771,10 +2829,14 @@ setup_mode:
default:
outb(TSIDX, 0x03); outb(TSREG, 0x05); /* font 1 */
}
#if !defined(NOBLINK_CURSOR)
/* (re)activate cursor */
untimeout((timeout_t)cursor_pos, 0);
cursor_pos(1);
#else
cursor_shape (-1,-1);
#endif
break;
case M_BG320: case M_CG320: case M_BG640:

View File

@ -35,7 +35,7 @@
* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
* SUCH DAMAGE.
*
* $Id: syscons.c,v 1.84 1994/12/26 17:50:18 ats Exp $
* $Id: syscons.c,v 1.85 1994/12/27 08:43:06 davidg Exp $
*/
#include "sc.h"
@ -69,6 +69,10 @@
#include <i386/isa/kbdtables.h>
#include <i386/i386/cons.h>
#if defined(NOBLINK_CURSOR)
#undef FAT_CURSOR
#endif
#if !defined(NCONS)
#define NCONS 12
#endif
@ -145,6 +149,9 @@ typedef struct scr_stat {
u_short *crt_base; /* address of screen memory */
u_short *scr_buf; /* buffer when off screen */
u_short *crtat; /* cursor address */
#if defined(NOBLINK_CURSOR)
u_short cur_cursor_attr; /* cursor attributes */
#endif
int xpos; /* current X position */
int ypos; /* current Y position */
int xsize; /* X size */
@ -194,7 +201,9 @@ static char *font_8 = NULL, *font_14 = NULL, *font_16 = NULL;
static int fonts_loaded = 0;
static char palette[3*256];
static const u_int n_fkey_tab = sizeof(fkey_tab) / sizeof(*fkey_tab);
#if !defined(NOBLINK_CURSOR)
static int cur_cursor_pos = -1;
#endif
static char in_putc = 0;
static char polling = 0;
#if ASYNCH
@ -1221,6 +1230,7 @@ pccnputc(dev_t dev, char c)
if (c == '\n')
scput('\r');
scput(c);
#if !defined(NOBLINK_CURSOR)
if (cur_console == &console[0]) {
int pos = cur_console->crtat - cur_console->crt_base;
if (pos != cur_cursor_pos) {
@ -1231,6 +1241,7 @@ pccnputc(dev_t dev, char c)
outb(crtc_addr+1,pos&0xff);
}
}
#endif
}
int
@ -1367,7 +1378,9 @@ star_saver(int test)
else {
if (scrn_blanked) {
bcopy(scp->scr_buf, Crtat, scp->xsize*scp->ysize*2);
#if !defined(NOBLINK_CURSOR)
cur_cursor_pos = -1;
#endif
set_border(scp->border);
scrn_blanked = 0;
}
@ -1427,7 +1440,9 @@ snake_saver(int test)
if (scrn_blanked) {
bcopy(scp->scr_buf, Crtat,
scp->xsize * scp->ysize * 2);
#if !defined(NOBLINK_CURSOR)
cur_cursor_pos = -1;
#endif
set_border(scp->border);
scrn_blanked = 0;
}
@ -1463,6 +1478,7 @@ cursor_pos(int force)
return;
if (scrn_blank_time && (time.tv_sec > scrn_time_stamp+scrn_blank_time))
SCRN_SAVER(1);
#if !defined(NOBLINK_CURSOR)
pos = cur_console->crtat - cur_console->crt_base;
if (force || (!scrn_blanked && pos != cur_cursor_pos)) {
cur_cursor_pos = pos;
@ -1471,6 +1487,7 @@ cursor_pos(int force)
outb(crtc_addr, 15);
outb(crtc_addr+1, pos&0xff);
}
#endif
timeout((timeout_t)cursor_pos, 0, hz/20);
}
@ -1988,11 +2005,13 @@ scan_esc(scr_stat *scp, u_char c)
case 'C': /* set cursor shape (start & end line) */
if (scp->term.num_param == 2) {
#if !defined(NOBLINK_CURSOR)
scp->cursor_start = scp->term.param[0] & 0x1F;
scp->cursor_end = scp->term.param[1] & 0x1F;
if (scp == cur_console)
cursor_shape(scp->cursor_start,
scp->cursor_end);
#endif
}
break;
@ -2033,7 +2052,10 @@ ansi_put(scr_stat *scp, u_char c)
{
if (scp->status & UNKNOWN_MODE)
return;
#if defined(NOBLINK_CURSOR)
/* undraw cursor */
*scp->crtat = scp->cur_cursor_attr;
#endif
/* make screensaver happy */
if (scp == cur_console) {
scrn_time_stamp = time.tv_sec;
@ -2081,7 +2103,11 @@ ansi_put(scr_stat *scp, u_char c)
/* Print only printables */
*scp->crtat = (scp->term.cur_attr | scr_map[c]);
scp->crtat++;
if (++scp->xpos >= scp->xsize) {
/*
* Wrap at the *LAST* column, not the last column
* minus one!!!! Arrrghhh!!!
*/
if (++scp->xpos > /* = */ scp->xsize) {
scp->xpos = 0;
scp->ypos++;
}
@ -2096,6 +2122,29 @@ ansi_put(scr_stat *scp, u_char c)
scp->crtat -= scp->xsize;
scp->ypos--;
}
#if defined(NOBLINK_CURSOR)
/*
* draw a non-blinking cursor
* We generally want a white cursor, but we have to do some
* sanity checks to avoid stupid combinations like these:
* - white cursor, white background
* - black cursor, black background
* - white cursor, white foreground
* - black cursor, black foreground
* (Okay, so I used raw hex values as bitmasks. Wanna fight
* over it?)
*/
scp->cur_cursor_attr = *scp->crtat;
if ((*scp->crtat & 0x7000) == 0x7000) {
*scp->crtat &= 0x8FFF;
if(!(*scp->crtat & 0x0700))
*scp->crtat |= 0x0700;
} else {
*scp->crtat |= 0x7000;
if ((*scp->crtat & 0x0F00) == 0x0700)
*scp->crtat &= 0xF8FF;
}
#endif
in_putc--;
if (delayed_next_scr)
switch_scr(delayed_next_scr - 1);
@ -2157,12 +2206,16 @@ scinit(void)
if (ISMAPPED(pa, 64))
video_mode_ptr = (char *)pa_to_va(pa);
}
#if defined(NOBLINK_CURSOR)
cursor_shape(start, end);
#else
#if defined(FAT_CURSOR)
start = 0;
end = 18;
cursor_shape(start, end);
#else
get_cursor_shape(&start, &end);
#endif
#endif
}
current_default = &user_default;
@ -2698,9 +2751,13 @@ set_mode(scr_stat *scp)
/* mode change only on VGA's */
if (!crtc_vga || video_mode_ptr == NULL) {
#if !defined(NOBLINK_CURSOR)
/* (re)activate cursor */
untimeout((timeout_t)cursor_pos, 0);
cursor_pos(1);
#else
cursor_shape (-1, -1);
#endif
return;
}
@ -2747,6 +2804,7 @@ set_mode(scr_stat *scp)
setup_mode:
set_vgaregs(modetable);
font_size = *(modetable + 2);
#if !defined(NOBLINK_CURSOR)
/* change cursor type if set */
if (scp->cursor_start != -1 && scp->cursor_end != -1)
cursor_shape(
@ -2756,7 +2814,7 @@ setup_mode:
(scp->cursor_end >= font_size)
? font_size - 1
: scp->cursor_end);
#endif
/* set font type (size) */
switch (font_size) {
case 0x08:
@ -2771,10 +2829,14 @@ setup_mode:
default:
outb(TSIDX, 0x03); outb(TSREG, 0x05); /* font 1 */
}
#if !defined(NOBLINK_CURSOR)
/* (re)activate cursor */
untimeout((timeout_t)cursor_pos, 0);
cursor_pos(1);
#else
cursor_shape (-1,-1);
#endif
break;
case M_BG320: case M_CG320: case M_BG640: