From 58a149deec7179e914c2d6788a3f388f752e910d Mon Sep 17 00:00:00 2001 From: ripsaw8080 Date: Tue, 6 Jan 2015 17:33:39 +0000 Subject: [PATCH] Don't count trailing spaces when checking if path is too long. Enable all write planes in the EGA FillRow function. Fixes crash and glitched graphics in Quest Maker 2 and derived adventure games (House of No Doors, Hot Rod Harry, et al). Imported-from: https://svn.code.sf.net/p/dosbox/code-0/dosbox/trunk@3881 --- src/dos/dos_files.cpp | 1 + src/ints/int10_char.cpp | 2 ++ 2 files changed, 3 insertions(+) diff --git a/src/dos/dos_files.cpp b/src/dos/dos_files.cpp index 11294937..c5bfa0a9 100644 --- a/src/dos/dos_files.cpp +++ b/src/dos/dos_files.cpp @@ -101,6 +101,7 @@ bool DOS_MakeName(char const * const name,char * const fullname,Bit8u * drive) { break; } } + while (r>0 && name_int[r-1]==' ') r--; if (r>=DOS_PATHLENGTH) { DOS_SetError(DOSERR_PATH_NOT_FOUND);return false; } upname[w]=0; /* Now parse the new file name to make the final filename */ diff --git a/src/ints/int10_char.cpp b/src/ints/int10_char.cpp index 9c4efb42..a672d2ba 100644 --- a/src/ints/int10_char.cpp +++ b/src/ints/int10_char.cpp @@ -155,6 +155,8 @@ static void EGA16_FillRow(Bit8u cleft,Bit8u cright,Bit8u row,PhysPt base,Bit8u a IO_Write(0x3ce,0x8);IO_Write(0x3cf,0xff); IO_Write(0x3ce,0x0);IO_Write(0x3cf,attr); IO_Write(0x3ce,0x1);IO_Write(0x3cf,0xf); + /* Enable all Write planes */ + IO_Write(0x3c4,2);IO_Write(0x3c5,0xf); /* Write some bytes */ Bit8u cheight = real_readb(BIOSMEM_SEG,BIOSMEM_CHAR_HEIGHT); PhysPt dest=base+(CurMode->twidth*row)*cheight+cleft;