Permalink
Browse files

DOS CON: It turns out there are proprietary NEC PC-98 ANSI codes to c…

…lear the screen, and some games use them. This fixes problems with leftover text on the text layer in "Rusty"
  • Loading branch information...
joncampbell123 committed Mar 9, 2018
1 parent 194669b commit 8b7f76a2fe31ae40959a5162edbc1fc1e63f37f9
Showing with 16 additions and 0 deletions.
  1. +16 −0 src/dos/dev_con.h
View
@@ -502,6 +502,18 @@ bool device_CON::Write(Bit8u * data,Bit16u * size) {
case '8': /* restore this (Wonder if this is actually used) */
case 'D':/* scrolling DOWN*/
case 'M':/* scrolling UP*/
case '*':/* PC-98: clear screen */
if (IS_PC98_ARCH) {
Bit8u page = real_readb(BIOSMEM_SEG,BIOSMEM_CURRENT_PAGE);
INT10_ScrollWindow(0,0,255,255,0,ansi.attr,page);
Real_INT10_SetCursorPos(0,0,page);
ClearAnsi();
break;
}
else {
/* fall through */
}
default:
LOG(LOG_IOCTL,LOG_NORMAL)("ANSI: unknown char %c after a esc",data[count]); /*prob () */
ClearAnsi();
@@ -531,6 +543,10 @@ bool device_CON::Write(Bit8u * data,Bit16u * size) {
void update_pc98_function_row(bool enable);
update_pc98_function_row(data[count] == 'l');
break;
case 3: // clear screen (doesn't matter if l or h)
INT10_ScrollWindow(0,0,255,255,0,ansi.attr,page);
Real_INT10_SetCursorPos(0,0,page);
break;
case 5: // show/hide cursor
void PC98_show_cursor(bool show);
PC98_show_cursor(data[count] == 'l');

0 comments on commit 8b7f76a

Please sign in to comment.