diff --git a/src/ints/int10_char.cpp b/src/ints/int10_char.cpp index 9915b787..415a0589 100644 --- a/src/ints/int10_char.cpp +++ b/src/ints/int10_char.cpp @@ -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); } } diff --git a/src/ints/int10_modes.cpp b/src/ints/int10_modes.cpp index 4c8d4609..e27a4e31 100644 --- a/src/ints/int10_modes.cpp +++ b/src/ints/int10_modes.cpp @@ -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); }