aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorVolker Ruppert <info@vruppert.de>2003-11-03 20:57:01 +0000
committerVolker Ruppert <info@vruppert.de>2003-11-03 20:57:01 +0000
commitc2e70f829e7b3d3c5936bc904363b0da3e80f3ab (patch)
tree415ba434bde42c95f3708620f7bd3ddd5856021c
parentc584bcf2f0caa4064e3c026b8c5d8e72783b9cf2 (diff)
downloadvgabios-c2e70f829e7b3d3c5936bc904363b0da3e80f3ab.tar.gz
- the 'noclearmem' flag is not stored in the 'current video mode' register (0040h:0049h)
- VBE also stores the 'noclear' flag in the 'video control' register (0040h:0087h)
-rw-r--r--vbe.c3
-rw-r--r--vgabios.c7
2 files changed, 6 insertions, 4 deletions
diff --git a/vbe.c b/vbe.c
index bc59ad6..ae2e4c1 100644
--- a/vbe.c
+++ b/vbe.c
@@ -644,7 +644,8 @@ Bit16u *AX;Bit16u BX; Bit16u ES;Bit16u DI;
dispi_set_enable(VBE_DISPI_ENABLED | no_clear | lfb_flag);
write_word(BIOSMEM_SEG,BIOSMEM_VBE_MODE,BX);
-
+ write_byte(BIOSMEM_SEG,BIOSMEM_VIDEO_CTL,(0x60 | no_clear));
+
result = 0x4f;
}
else
diff --git a/vgabios.c b/vgabios.c
index 0315c50..54e2145 100644
--- a/vgabios.c
+++ b/vgabios.c
@@ -933,7 +933,7 @@ static void biosfn_set_video_mode(mode) Bit8u mode;
}
// Set the BIOS mem
- write_byte(BIOSMEM_SEG,BIOSMEM_CURRENT_MODE,mode|noclearmem);
+ write_byte(BIOSMEM_SEG,BIOSMEM_CURRENT_MODE,mode);
write_word(BIOSMEM_SEG,BIOSMEM_NB_COLS,twidth);
write_word(BIOSMEM_SEG,BIOSMEM_PAGE_SIZE,vga_modes[line].slength);
write_word(BIOSMEM_SEG,BIOSMEM_CRTC_ADDRESS,crtc_addr);
@@ -1524,14 +1524,15 @@ Bit8u car;Bit8u page;Bit8u attr;Bit8u flag;
static void biosfn_get_video_mode (AX,BX)
Bit16u *AX;Bit16u *BX;
{Bit16u ss=get_SS();
- Bit8u mode,page;
+ Bit8u mode,noclear,page;
Bit16u nbcars;
page=read_byte(BIOSMEM_SEG,BIOSMEM_CURRENT_PAGE);
mode=read_byte(BIOSMEM_SEG,BIOSMEM_CURRENT_MODE);
+ noclear=read_byte(BIOSMEM_SEG,BIOSMEM_VIDEO_CTL) & 0x80;
nbcars=read_word(BIOSMEM_SEG,BIOSMEM_NB_COLS);
- write_word(ss,AX,(nbcars<<8)+mode);
+ write_word(ss,AX,(nbcars<<8)+mode|noclear);
write_word(ss,BX,((Bit16u)page)<<8);
}