[TI-ASM] Autoscroll + inverted characters bug

Got questions? Got answers? Go here for both.

Moderator: MaxCoderz Staff

Post Reply
User avatar
benryves
Maxcoderz Staff
Posts: 3087
Joined: Thu 16 Dec, 2004 10:06 pm
Location: Croydon, England
Contact:

[TI-ASM] Autoscroll + inverted characters bug

Post by benryves »

If you have an inverted character on the home screen, the black fill spreads under the character.
Now, if you have set it to autoscroll, the screen scrolls when you write a character past the end of the display. This is good. However, it doesn't scroll the entire screen - I guess some speed optimisation only moves up lines which characters can be in, not taking into consideration the single row of pixels between characters - which has that black fill in it. So, you end up with ugly artefacts... is there a way of preventing this? Some clever system flag?
User avatar
Saibot84
New Member
Posts: 38
Joined: Fri 17 Feb, 2006 9:14 pm
Location: Jersey City, NJ

Post by Saibot84 »

off the top of my head, i remember there being a flag by the name of drawunder or something like that that was used to determine whether the line under a letter, when writing it, would be cleared or not... but I'm not sure if it applies to screen scrolling :(
User avatar
benryves
Maxcoderz Staff
Posts: 3087
Joined: Thu 16 Dec, 2004 10:06 pm
Location: Croydon, England
Contact:

Post by benryves »

Saibot84 wrote:off the top of my head, i remember there being a flag by the name of drawunder or something like that that was used to determine whether the line under a letter, when writing it, would be cleared or not... but I'm not sure if it applies to screen scrolling :(
I was under the impression that applied to the small font on the graph screen - but I could be wrong. I'll give it a shot.
King Harold
Calc King
Posts: 1513
Joined: Sat 05 Aug, 2006 7:22 am

Post by King Harold »

the sysroutines documentation says its only for small-font..
how about scrolling with the inverted flag reset and then setting it again when you write something?
User avatar
Saibot84
New Member
Posts: 38
Joined: Fri 17 Feb, 2006 9:14 pm
Location: Jersey City, NJ

Post by Saibot84 »

sorry, about that. :oops:
User avatar
benryves
Maxcoderz Staff
Posts: 3087
Joined: Thu 16 Dec, 2004 10:06 pm
Location: Croydon, England
Contact:

Post by benryves »

Well, I couldn't find a flag-based solution so just wrote my own scroller. It seemed easier.

Code: Select all

; You must reset appAutoScroll,(iy+appFlags).

.global
SafeNewLine
    bcall(_NewLine)
    jr SafeCheckScroll
SafePutC
    bcall(_PutC)

SafeCheckScroll
    push af
    ld a,(curRow)
    cp 8
    jr z,{+}
    pop af
    ret
+
    ld a,7
    ld (curRow),a
    di

    push bc
    push hl
    
    ld c,$20
    ld b,12
    
--  push bc
    
    ld a,c
    call $B
    out ($10),a
    
    
    ld b,64-8
    ld c,$80

-   ld a,c
    add a,8
    call $B
    out ($10),a
    call $B
    in a,($11)
    call $B
    in a,($11)
    ld l,a
    
    ld a,c
    call $B
    out ($10),a
    call $B
    ld a,l
    out ($11),a
    inc c
    djnz {-}
    
    ld b,8
    xor a
-   call $B
    out ($11),a
    djnz {-}
    
    pop bc
    inc c
    djnz {--}
    
    pop hl
    pop bc
    
    pop af
    
    ei
    ret
.endglobal
SafeNewLine and SafePutC do what they say :) - it should be easy to adapt to other scrolling routines.
King Harold
Calc King
Posts: 1513
Joined: Sat 05 Aug, 2006 7:22 am

Post by King Harold »

A bit late, but would

Code: Select all

set preClrForMode, (IY + newDispF)
help you?
Post Reply