textmode address handling updated (hal)
Imported-from: https://svn.code.sf.net/p/dosbox/code-0/dosbox/trunk@3443
This commit is contained in:
parent
a55cf50692
commit
655b7caa71
5 changed files with 45 additions and 21 deletions
|
@ -16,7 +16,7 @@
|
|||
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
|
||||
*/
|
||||
|
||||
/* $Id: int10.h,v 1.39 2009-05-27 09:15:42 qbix79 Exp $ */
|
||||
/* $Id: int10.h,v 1.40 2009-07-11 10:25:25 c2woody Exp $ */
|
||||
|
||||
#include "vga.h"
|
||||
|
||||
|
@ -95,7 +95,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)+1;
|
||||
#define BIOS_NROWS Bit16u nrows=(Bit16u)real_readb(BIOSMEM_SEG,BIOSMEM_NB_ROWS)+1;
|
||||
|
||||
extern Bit8u int10_font_08[256 * 8];
|
||||
extern Bit8u int10_font_14[256 * 14];
|
||||
|
|
|
@ -16,7 +16,7 @@
|
|||
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
|
||||
*/
|
||||
|
||||
/* $Id: int10_char.cpp,v 1.58 2009-05-27 09:15:42 qbix79 Exp $ */
|
||||
/* $Id: int10_char.cpp,v 1.59 2009-07-11 10:25:25 c2woody Exp $ */
|
||||
|
||||
/* Character displaying moving functions */
|
||||
|
||||
|
@ -272,12 +272,19 @@ filling:
|
|||
|
||||
void INT10_SetActivePage(Bit8u page) {
|
||||
Bit16u mem_address;
|
||||
|
||||
if (page>7) LOG(LOG_INT10,LOG_ERROR)("INT10_SetActivePage page %d",page);
|
||||
|
||||
if (IS_EGAVGA_ARCH && (svgaCard==SVGA_S3Trio)) page &= 7;
|
||||
|
||||
mem_address=page*real_readw(BIOSMEM_SEG,BIOSMEM_PAGE_SIZE);
|
||||
/* Write the new page start */
|
||||
real_writew(BIOSMEM_SEG,BIOSMEM_CURRENT_START,mem_address);
|
||||
if (IS_EGAVGA_ARCH && CurMode->mode<0x8) mem_address>>=1;
|
||||
if (IS_EGAVGA_ARCH) {
|
||||
if (CurMode->mode<8) mem_address>>=1;
|
||||
// rare alternative: if (CurMode->type==M_TEXT) mem_address>>=1;
|
||||
} else {
|
||||
mem_address>>=1;
|
||||
}
|
||||
/* Write the new start address in vgahardware */
|
||||
Bit16u base=real_readw(BIOSMEM_SEG,BIOSMEM_CRTC_ADDRESS);
|
||||
IO_Write(base,0x0c);
|
||||
|
@ -587,7 +594,7 @@ static void INT10_TeletypeOutputAttr(Bit8u chr,Bit8u attr,bool useattr,Bit8u pag
|
|||
if(cur_row==nrows) {
|
||||
//Fill with black on non-text modes and with 0x7 on textmode
|
||||
Bit8u fill = (CurMode->type == M_TEXT)?0x7:0;
|
||||
INT10_ScrollWindow(0,0,nrows-1,ncols-1,-1,fill,page);
|
||||
INT10_ScrollWindow(0,0,(Bit8u)(nrows-1),ncols-1,-1,fill,page);
|
||||
cur_row--;
|
||||
}
|
||||
// Set the cursor for the page
|
||||
|
|
|
@ -16,7 +16,7 @@
|
|||
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
|
||||
*/
|
||||
|
||||
/* $Id: int10_modes.cpp,v 1.86 2009-06-28 14:56:14 c2woody Exp $ */
|
||||
/* $Id: int10_modes.cpp,v 1.87 2009-07-11 10:25:25 c2woody Exp $ */
|
||||
|
||||
#include <string.h>
|
||||
|
||||
|
@ -232,7 +232,7 @@ VideoModeBlock ModeList_OTHER[]={
|
|||
};
|
||||
|
||||
VideoModeBlock Hercules_Mode=
|
||||
{ 0x007 ,M_TEXT ,640 ,400 ,80 ,25 ,8 ,14 ,4 ,0xB0000 ,0x1000 ,97 ,25 ,80 ,25 ,0 };
|
||||
{ 0x007 ,M_TEXT ,640 ,400 ,80 ,25 ,8 ,14 ,1 ,0xB0000 ,0x1000 ,97 ,25 ,80 ,25 ,0 };
|
||||
|
||||
static Bit8u text_palette[64][3]=
|
||||
{
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue