atarionline.pl Smooth scrolling of text in Turbo basic. - Forum Atarum

Jeśli chcesz wziąć udział w dyskusjach na forum - zaloguj się. Jeżeli nie masz loginu - poproś o członkostwo.

  • :
  • :

Vanilla 1.1.4 jest produktem Lussumo. Więcej informacji: Dokumentacja, Forum.

    • 1:
       
      CommentAuthoriggy1981
    • CommentTime8 Oct 2012
     
    Hi there. I have one small question. It was some time that I was programming in TB XL, and I have a question if it is possible to make a text scroller, something like can be seen in games from activision (Pitfall 2, Pastfinder) ?
    Any help will be welcomed. Thanks.
    • 2:
       
      CommentAuthorMaW
    • CommentTime8 Oct 2012
     
    Hi, scrolling (something like these) was in polish newspaper "Bajtek" in series of articles "Nie bój się przerwań" ("Don't be afraid of interrupts", 1987, 1988 /?/). These yearbooks are in archive AtariOnline ("Biblioteczka").
    • 3: CommentAuthorbob_er
    • CommentTime8 Oct 2012
     
    it's also possible in pure tbxl without any ml. i did it some years ago :).
    • 4:
       
      CommentAuthorpirx
    • CommentTime8 Oct 2012
     
    Hi Iggy,

    Wanna horizontal or vertical scroll?
    • 5:
       
      CommentAuthoriggy1981
    • CommentTime9 Oct 2012
     
    Horizontal, it have to be from right to left. As can be seen in the attached picture :)
    • 6:
       
      CommentAuthorpirx
    • CommentTime10 Oct 2012
     
    Horizontal is a tad more difficult, but everything depends on the map you have - if it is small, it might be quite doable.
    Basically you can do it in TB, but the same way you would do it in assembler - just dpokes and moves. If you have no idea how to do it, start with De Re Atari (http://www.atariarchives.org/dere/chapt06.php#H6_1) to understand the concept.
    • 7: CommentAuthors2325
    • CommentTime31 May 2015
     
    • 8:
       
      CommentAuthorjhusak
    • CommentTime1 Jun 2015 zmieniony
     
    if you unroll the line with text (which has to be kept somewhere anyway) then the scrolling is relatively simple:
    you change HSCROLL (poke) every time and additionally increase (dpoke) start address of line every 8 times. Just remember to keep it from 4kB boundary and no longer than 4kB (ex: $7000-$7fff)

    Some glitches may appear, it would be good to wait for vblank before scroll manipulation.

    The Scroll may be not so smooth as let you ml/interrupt inserts.

    The true is that in ml you increase one counter, store it in HSCROLL, compare with "8" and then increase word in memory. It is not complicated at all and gives you smooth scrolling regardless what's happening on display.