Dead Hackers Society
Other BBSes »
 
 
Demoscene  Coding  CT60  Buy/sell

Atari coding BBS
 
Re: Scroll text techniques
Posted by: earx Oct,24.2007-20:27 

it depends. if you do 8 pixel/vbl scrolling you need no shift at all.. just copying bytes. if you want more precision you can do 4, 8 or even 16 shifts per 16 pixels.

indeed, as you say, pre-shifting is a good option.

the way to paint a pre-shifted char is (assuming 16x16 pixel 4 plane font):

char_loop:
...

; input:
; a0: screen
; a1: pre-shifted character (8 words x 16 lines)
rept 16
move.l (a1)+,d0 ; $0LLL0LLL (plane 0,1)
or.l d0,(a0)+ ; combine with right part of previous char
move.l (a1)+,d0 ; $0LLL0LLL (plane 2,3)
or.l d0,(a0)+ ; combine with right part of previous char
move.l (a1)+,d0 ; $R000R000 (plane 0,1)
move.l d0,(a0)+ ; put fresh right part of current char on screen
move.l (a1)+,d0 ; $R000R000 (plane 2,3)
move.l d0,(a0)+ ; put fresh right part of current char on screen
lea 160-16(a0),a0 ; next line
endr
; set a0 to next char on screen in current row
lea 8-8*160(a0),a0
....
dbf d7,char_loop

i just wrote this from the top of my head (not checked). not that a special initialisation case is required for the left-most part of the screen but you should be able to figure that out (only paint right half of the first char in most cases). it's also possible to optimise with movem.l










[All messages in this thread]    [Start new thread]

Topic Posted by  Date 
Scroll text techniques Vincent Riviere Oct,24.2007-20:03
  Re: Scroll text techniques earx Oct,24.2007-20:09
    Re: Scroll text techniques earx Oct,24.2007-20:27
      Re: Scroll text techniques earx Oct,24.2007-20:31
        Re: Scroll text techniques earx Oct,24.2007-20:32
      Re: Scroll text techniques Vincent Riviere Oct,24.2007-22:33
        Re: Scroll text techniques earx Oct,25.2007-09:49
  Re: Scroll text techniques ggn Oct,25.2007-11:23
    Re: Scroll text techniques Bod/STAX Oct,25.2007-17:55
  Re: Scroll text techniques evil Oct,27.2007-17:50
    Re: Scroll text techniques earx Oct,27.2007-19:01
    Re: Scroll text techniques Bod/STAX Oct,27.2007-19:18
      Re: Scroll text techniques gloky Nov,25.2007-13:22
        Re: Scroll text techniques Bod/STAX Nov,25.2007-21:26
          Re: Scroll text techniques gloky Dec,10.2007-22:15
            Re: Scroll text techniques gloky Jan,04.2008-15:10


Reply to this message
Name:
Topic:
Anti-troll code:

Message:

What's the anti-troll code?
That's your personal code to be able to add comments and messages on the dhs.nu site.
Don't have a code or forgot it? Fix it here.
© 1994-2024 Dead Hackers Society Contact: Anders Eriksson