From 527a505d9531e8d2c796f901b9dc267eb6b60378 Mon Sep 17 00:00:00 2001 From: Alan Cox Date: Sat, 18 Aug 2018 20:16:37 +0100 Subject: [PATCH] sam: Fix scrolling --- Kernel/platform-sam/sam_vt.s | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/Kernel/platform-sam/sam_vt.s b/Kernel/platform-sam/sam_vt.s index e1292124..334852b2 100644 --- a/Kernel/platform-sam/sam_vt.s +++ b/Kernel/platform-sam/sam_vt.s @@ -66,9 +66,9 @@ _scroll_up: call ___hard_di push af call map_video - ld hl,#128 + ld hl,#1024 ld de,#0 - ld bc,#24576-128 + ld bc,#24576-1024 ldir_pop: ldir pop_unmap: @@ -82,10 +82,9 @@ _scroll_down: call ___hard_di push af call map_video - ld hl,#24576 - ld de,#24576-128 - ld b,d - ld c,e + ld hl,#24575-1024 + ld de,#24575 + ld bc,#24576 lddr jr pop_unmap @@ -111,6 +110,7 @@ _plot_char: ld bc,#0x04FF ; it gets decremented by DJNZ while the FF ; ensures the ldi never decrements B plot_loop: + ; FIXME: this trick doesn't work on the last row - need a better way ldi ; copy expanded char ldi dec e -- 2.34.1