From a270f4d0bc3950deabb6fe398a67aa2929847c59 Mon Sep 17 00:00:00 2001 From: Peter Veenstra Date: Mon, 3 Oct 2005 14:03:49 +0000 Subject: [PATCH] Some small corrections to patch 1295927 Imported-from: https://svn.code.sf.net/p/dosbox/code-0/dosbox/trunk@2334 --- src/dos/dev_con.h | 4 ++-- src/ints/int10.h | 2 +- src/ints/int10_memory.cpp | 2 +- src/ints/int10_misc.cpp | 3 ++- src/ints/int10_modes.cpp | 2 +- 5 files changed, 7 insertions(+), 6 deletions(-) diff --git a/src/dos/dev_con.h b/src/dos/dev_con.h index 18daa012..0a27c73f 100644 --- a/src/dos/dev_con.h +++ b/src/dos/dev_con.h @@ -16,7 +16,7 @@ * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ -/* $Id: dev_con.h,v 1.21 2005-10-02 10:12:29 qbix79 Exp $ */ +/* $Id: dev_con.h,v 1.22 2005-10-03 14:03:49 qbix79 Exp $ */ #include "dos_inc.h" #include "../ints/int10.h" @@ -369,7 +369,7 @@ device_CON::device_CON() { ansi.enabled=false; ansi.attr=0x7; ansi.ncols=real_readw(BIOSMEM_SEG,BIOSMEM_NB_COLS); //should be updated once set/reset mode is implemented - ansi.nrows=real_readb(BIOSMEM_SEG,BIOSMEM_NB_ROWS); + ansi.nrows=real_readb(BIOSMEM_SEG,BIOSMEM_NB_ROWS) + 1; ansi.saverow=0; ansi.savecol=0; ClearAnsi(); diff --git a/src/ints/int10.h b/src/ints/int10.h index e7ae5c81..2db43333 100644 --- a/src/ints/int10.h +++ b/src/ints/int10.h @@ -92,7 +92,7 @@ #define VGAMEM_MTEXT 0xB000 #define BIOS_NCOLS Bit16u ncols=real_readw(BIOSMEM_SEG,BIOSMEM_NB_COLS); -#define BIOS_NROWS Bit16u nrows=real_readb(BIOSMEM_SEG,BIOSMEM_NB_ROWS); +#define BIOS_NROWS Bit16u nrows=real_readb(BIOSMEM_SEG,BIOSMEM_NB_ROWS)+1; extern Bit8u int10_font_08[256 * 8]; extern Bit8u int10_font_14[256 * 14]; diff --git a/src/ints/int10_memory.cpp b/src/ints/int10_memory.cpp index 9252e054..52f51a3d 100644 --- a/src/ints/int10_memory.cpp +++ b/src/ints/int10_memory.cpp @@ -66,7 +66,7 @@ void INT10_LoadFont(PhysPt font,bool reload,Bitu count,Bitu offset,Bitu map,Bitu IO_Write(base+1,(IO_Read(base+1) & 0xe0)|(height-1)); //Vertical display end bios says, but should stay the same? //Rows setting in bios segment - real_writeb(BIOSMEM_SEG,BIOSMEM_NB_ROWS,(CurMode->sheight/height)); + real_writeb(BIOSMEM_SEG,BIOSMEM_NB_ROWS,(CurMode->sheight/height)-1); real_writeb(BIOSMEM_SEG,BIOSMEM_CHAR_HEIGHT,height); //TODO Reprogram cursor size? } diff --git a/src/ints/int10_misc.cpp b/src/ints/int10_misc.cpp index 92d7fea5..cbcf578e 100644 --- a/src/ints/int10_misc.cpp +++ b/src/ints/int10_misc.cpp @@ -82,7 +82,8 @@ void INT10_GetFuncStateInformation(PhysPt save) { mem_writeb(save+0x4+i,real_readb(BIOSMEM_SEG,BIOSMEM_CURRENT_MODE+i)); } /* Second area */ - for (i=0;i<3;i++) { + mem_writeb(save+0x22,real_readb(BIOSMEM_SEG,BIOSMEM_NB_ROWS)+1); + for (i=1;i<3;i++) { mem_writeb(save+0x22+i,real_readb(BIOSMEM_SEG,BIOSMEM_NB_ROWS+i)); } /* Zero out rest of block */ diff --git a/src/ints/int10_modes.cpp b/src/ints/int10_modes.cpp index 5d96a40e..d527a8bf 100644 --- a/src/ints/int10_modes.cpp +++ b/src/ints/int10_modes.cpp @@ -223,7 +223,7 @@ static void FinishSetMode(bool clearmem) { real_writew(BIOSMEM_SEG,BIOSMEM_NB_COLS,CurMode->twidth); real_writew(BIOSMEM_SEG,BIOSMEM_PAGE_SIZE,CurMode->plength); real_writew(BIOSMEM_SEG,BIOSMEM_CRTC_ADDRESS,((CurMode->mode==7 )|| (CurMode->mode==0x0f)) ? 0x3b4 : 0x3d4); - real_writeb(BIOSMEM_SEG,BIOSMEM_NB_ROWS,CurMode->theight); + real_writeb(BIOSMEM_SEG,BIOSMEM_NB_ROWS,CurMode->theight-1); real_writew(BIOSMEM_SEG,BIOSMEM_CHAR_HEIGHT,CurMode->cheight); real_writeb(BIOSMEM_SEG,BIOSMEM_VIDEO_CTL,(0x60|(clearmem?0:0x80))); real_writeb(BIOSMEM_SEG,BIOSMEM_SWITCHES,0x09);