Does anyone use Linux with a CGA console? Scrollback support is easy.

David E A Wilson (david@cs.uow.edu.au)
Wed, 29 May 1996 21:06:53 +1000 (EST)


While attempting to write support for scrollback for HGA cards I discovered
the following error in linux/drivers/char/vga.c:

*** linux/drivers/char/vga.c Wed May 29 21:01:11 1996
--- linux/drivers/char/vga.c.dist Wed May 29 20:58:43 1996
***************
*** 217,223 ****
else
{
video_type = VIDEO_TYPE_CGA;
! video_mem_term = 0xbc000;
*display_desc = "*CGA";
request_region(0x3d4,2,"cga");
}
--- 217,223 ----
else
{
video_type = VIDEO_TYPE_CGA;
! video_mem_term = 0xba000;
*display_desc = "*CGA";
request_region(0x3d4,2,"cga");
}

as the CGA has 16KB rather than 8KB or RAM (currently this is of no consequence
as only the 1st 4KB is used). If we than make the following changes CGA cards
get faster scrolling, shift page up support and probably less screen hash when
scrolling as well.

*** linux/drivers/char/console.c Wed May 29 21:00:14 1996
--- linux/drivers/char/console.c.dist Wed May 29 20:58:54 1996
***************
*** 577,583 ****
static void set_origin(int currcons)
{
if (video_type != VIDEO_TYPE_EGAC && video_type != VIDEO_TYPE_VGAC
! && video_type != VIDEO_TYPE_EGAM && video_type != VIDEO_TYPE_CGA)
return;
if (currcons != fg_console || console_blanked || vcmode == KD_GRAPHICS)
return;
--- 577,583 ----
static void set_origin(int currcons)
{
if (video_type != VIDEO_TYPE_EGAC && video_type != VIDEO_TYPE_VGAC
! && video_type != VIDEO_TYPE_EGAM)
return;
if (currcons != fg_console || console_blanked || vcmode == KD_GRAPHICS)
return;
***************
*** 2031,2038 ****
hardscroll_enabled = (hardscroll_disabled_by_init ? 0 :
(video_type == VIDEO_TYPE_EGAC
|| video_type == VIDEO_TYPE_VGAC
! || video_type == VIDEO_TYPE_EGAM
! || video_type == VIDEO_TYPE_CGA));
has_wrapped = 0 ;

/* Due to kmalloc roundup allocating statically is more efficient -
--- 2031,2037 ----
hardscroll_enabled = (hardscroll_disabled_by_init ? 0 :
(video_type == VIDEO_TYPE_EGAC
|| video_type == VIDEO_TYPE_VGAC
! || video_type == VIDEO_TYPE_EGAM));
has_wrapped = 0 ;

/* Due to kmalloc roundup allocating statically is more efficient -

If anyone would like to try this out let me know how it works - similar patches
to 1.2.13 worked on my clone HGC/CGA card. I think I found all the changes -
I forgot to bring my patch in to work so this is recreated from scratch.

-- 
David Wilson	Dept CompSci Uni Wollongong Australia	david@cs.uow.edu.au