Hi I've had issues with a console program not clearing the screen when it's supposed to. I've traced the problem down to dlls/winedos/int10.c function DOSVM_Int10Handler() with and AH reg of 0x0b.
I've added code for clearing the screen with the specified color, as well as added a method for doing a total clearscreen to vga.c and vga.h. It's only tested for textmode and propably won't work for anything else so I think the fixme should be left for anyone who's up for the task. A patch is attached, please feel free to comment before i submit to wine-patches. Regards Ulrik
? =wine-20030115 ? dataflex-working-clearscreen.diff ? tribes-dinput-patch1.diff ? tribes-opengl-patch1.diff ? programs/winetest/Makefile ? programs/winhelp/y.tab.c ? programs/winhelp/y.tab.h Index: dlls/winedos/int10.c =================================================================== RCS file: /home/wine/wine/dlls/winedos/int10.c,v retrieving revision 1.26 diff -u -3 -p -r1.26 int10.c --- dlls/winedos/int10.c 11 Feb 2003 22:18:11 -0000 1.26 +++ dlls/winedos/int10.c 11 Feb 2003 23:54:00 -0000 @@ -814,6 +814,9 @@ void WINAPI DOSVM_Int10Handler( CONTEXT8 apparently, the foreground or attribute of the background with this call, so we should check first to see what the foreground already is... FIXME */ + /* Maybe http://www.clipx.net/ng/progref/ng50c40.php can help + to finish the implementation */ + VGA_ClearTextScreen( BL_reg(context) << 4 ); FIXME("Set Background/Border Color: %d/%d\n", BH_reg(context), BL_reg(context)); break; Index: dlls/winedos/vga.c =================================================================== RCS file: /home/wine/wine/dlls/winedos/vga.c,v retrieving revision 1.30 diff -u -3 -p -r1.30 vga.c --- dlls/winedos/vga.c 11 Feb 2003 22:19:27 -0000 1.30 +++ dlls/winedos/vga.c 11 Feb 2003 23:54:00 -0000 @@ -794,6 +794,13 @@ void VGA_ClearText(unsigned row1, unsign LeaveCriticalSection(&vga_lock); } +void VGA_ClearTextScreen(BYTE attr) +{ + VGA_ClearText(0, 0, + vga_text_height - 1, vga_text_width - 1, + attr); +} + void VGA_ScrollUpText(unsigned row1, unsigned col1, unsigned row2, unsigned col2, unsigned lines, BYTE attr) Index: dlls/winedos/vga.h =================================================================== RCS file: /home/wine/wine/dlls/winedos/vga.h,v retrieving revision 1.13 diff -u -3 -p -r1.13 vga.h --- dlls/winedos/vga.h 24 Nov 2002 22:15:56 -0000 1.13 +++ dlls/winedos/vga.h 11 Feb 2003 23:54:00 -0000 @@ -51,6 +51,7 @@ void VGA_SetTextAttribute(BYTE attr); void VGA_ClearText(unsigned row1, unsigned col1, unsigned row2, unsigned col2, BYTE attr); +void VGA_ClearTextScreen(BYTE attr); void VGA_ScrollUpText(unsigned row1, unsigned col1, unsigned row2, unsigned col2, unsigned lines, BYTE attr);