1
0
Fork 0

Use current address instead of (current page * page size) for the scroll window base. This is the implementation in S3 and IBM VGA. Tseng BIOSes have the previous, incompatible implementation. Fixes an advertisement program and possibly others I don't remember. Patch by ripsaw.

Imported-from: https://svn.code.sf.net/p/dosbox/code-0/dosbox/trunk@3815
This commit is contained in:
Ralf Grillenberger 2013-01-27 18:27:36 +00:00
parent 556ff13f87
commit 2c8adb2660

View file

@ -201,9 +201,11 @@ void INT10_ScrollWindow(Bit8u rul,Bit8u cul,Bit8u rlr,Bit8u clr,Bit8s nlines,Bit
if(clr>=ncols) clr=(Bit8u)ncols-1;
clr++;
/* Get the correct page */
if(page==0xFF) page=real_readb(BIOSMEM_SEG,BIOSMEM_CURRENT_PAGE);
PhysPt base=CurMode->pstart+page*real_readw(BIOSMEM_SEG,BIOSMEM_PAGE_SIZE);
/* Get the correct page: current start address for current page (0xFF),
otherwise calculate from page number and page size */
PhysPt base=CurMode->pstart;
if (page==0xff) base+=real_readw(BIOSMEM_SEG,BIOSMEM_CURRENT_START);
else base+=page*real_readw(BIOSMEM_SEG,BIOSMEM_PAGE_SIZE);
if (GCC_UNLIKELY(machine==MCH_PCJR)) {
if (real_readb(BIOSMEM_SEG, BIOSMEM_CURRENT_MODE) >= 9) {