Received: from [140.186.70.92] (port=32890 helo=eggs.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1Oy6KG-00087i-Lo for qemu-devel@nongnu.org; Tue, 21 Sep 2010 13:08:18 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.69) (envelope-from ) id 1Oy6KE-0003nl-Vf for qemu-devel@nongnu.org; Tue, 21 Sep 2010 13:08:16 -0400 Received: from mx1.redhat.com ([209.132.183.28]:64005) by eggs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1Oy6KE-0003nV-LX for qemu-devel@nongnu.org; Tue, 21 Sep 2010 13:08:14 -0400 From: Gerd Hoffmann Date: Tue, 21 Sep 2010 19:07:58 +0200 Message-Id: <1285088885-10931-5-git-send-email-kraxel@redhat.com> In-Reply-To: <1285088885-10931-1-git-send-email-kraxel@redhat.com> References: <1285088885-10931-1-git-send-email-kraxel@redhat.com> Subject: [Qemu-devel] [VGABIOS PATCH 04/11] - biosfn_write_teletype: fixed attribute when scrolling in text mode List-Id: qemu-devel.nongnu.org List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: qemu-devel@nongnu.org Cc: Volker Ruppert , Gerd Hoffmann From: Volker Ruppert Signed-off-by: Gerd Hoffmann --- vgabios.c | 6 ++++-- 1 files changed, 4 insertions(+), 2 deletions(-) diff --git a/vgabios.c b/vgabios.c index fbc3588..ea3aae8 100644 --- a/vgabios.c +++ b/vgabios.c @@ -2039,7 +2039,9 @@ Bit8u car;Bit8u page;Bit8u attr;Bit8u flag; { if(vga_modes[line].class==TEXT) { - biosfn_scroll(0x01,0x07,0,0,nbrows-1,nbcols-1,page,SCROLL_UP); + address=SCREEN_MEM_START(nbcols,nbrows,page)+(xcurs+(ycurs-1)*nbcols)*2; + attr=read_byte(vga_modes[line].sstart,address+1); + biosfn_scroll(0x01,attr,0,0,nbrows-1,nbcols-1,page,SCROLL_UP); } else { @@ -2047,7 +2049,7 @@ Bit8u car;Bit8u page;Bit8u attr;Bit8u flag; } ycurs-=1; } - + // Set the cursor for the page cursor=ycurs; cursor<<=8; cursor+=xcurs; biosfn_set_cursor_pos(page,cursor); -- 1.7.1