Use PCJr specific method to clear the video RAM. Also don't scroll at unspecified video page. Fixes issues with KQ1 and KQ2.
Imported-from: https://svn.code.sf.net/p/dosbox/code-0/dosbox/trunk@3860
This commit is contained in:
parent
7f00bd4b34
commit
bb807af8c7
2 changed files with 12 additions and 2 deletions
|
@ -215,7 +215,8 @@ void INT10_ScrollWindow(Bit8u rul,Bit8u cul,Bit8u rlr,Bit8u clr,Bit8s nlines,Bit
|
|||
(real_readb(BIOSMEM_SEG, BIOSMEM_CRTCPU_PAGE) >> 3) & 0x7;
|
||||
|
||||
base = cpupage << 14;
|
||||
base += page*real_readw(BIOSMEM_SEG,BIOSMEM_PAGE_SIZE);
|
||||
if (page!=0xff)
|
||||
base += page*real_readw(BIOSMEM_SEG,BIOSMEM_PAGE_SIZE);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -385,9 +385,18 @@ static void FinishSetMode(bool clearmem) {
|
|||
/* Clear video memory if needs be */
|
||||
if (clearmem) {
|
||||
switch (CurMode->type) {
|
||||
case M_TANDY16:
|
||||
if ((machine==MCH_PCJR) && (CurMode->mode >= 9)) {
|
||||
// PCJR cannot access the full 32k at 0xb800
|
||||
for (Bit16u ct=0;ct<16*1024;ct++) {
|
||||
// 0x1800 is the last 32k block in 128k, as set in the CRTCPU_PAGE register
|
||||
real_writew(0x1800,ct*2,0x0000);
|
||||
}
|
||||
break;
|
||||
}
|
||||
// fall-through
|
||||
case M_CGA4:
|
||||
case M_CGA2:
|
||||
case M_TANDY16:
|
||||
for (Bit16u ct=0;ct<16*1024;ct++) {
|
||||
real_writew( 0xb800,ct*2,0x0000);
|
||||
}
|
||||
|
|
Loading…
Add table
Reference in a new issue