View Single Post
Old 26 September 2014, 14:42   #7
phx
Natteravn

phx's Avatar
 
Join Date: Nov 2009
Location: Herford / Germany
Posts: 1,908
There are several problems in the scroller code.

The logo seems to be at least 150 lines high, but for some reason you work with a single-plane buffer of 290 lines, although there may be only 100 left for the scroll text.
Code:
Picture                 DCB.B (290*46),0
The BPL1PT initialization for the scroller has two problems:
Code:
        MOVE.L   #Planes,A0                     Bpl OF SCROLL...?
        MOVE.L   #Picture,D0                    Picture Block
        MOVE.L   D0,Offset                      Save Screen Start Address
        ADD.L    #(200*46)-1,Offset             ;Pointer for Scroller POSICION
PlLp    MOVE.W   D0,6(A0)                       Load Low Word
        SWAP     D0                             Swap Words
        MOVE.W   D0,2(A0)                       Load High Word
1. An offset of 200 lines will be far below the bottom screen border. You won't see any manipulation there.
2. -1 is bad, as graphics pointers always have to be word-aligned.

The Blitter is used in Scroller to copy a region of 16 lines 4 pixels to the left. This is done by setting the destination one word left of the source and using a shift of 12. But it needs the descending mode of the Blitter, which you don't enable here in BLTCON1:
Code:
Scroller
        BTST    #$0A,$DFF016                    Test Right Mouse
        BNE.S   Nxt                             If Not Equal Carry on
        RTS                                     Else Pause!
Nxt     MOVE.L  #$C9F00000,$DFF040              A=D,12 bits Shift
        MOVE.L  #$00000000,$DFF064              Mod
        MOVE.L  #$FFFFFFFF,$DFF044              Masks
        MOVE.L  Offset,$DFF050                  Source
        MOVE.L  Offset,A1         
        SUBQ.L  #1,A1                           Subtract 16 Pxls
        MOVE.L  A1,$DFF054                      Destination
        MOVE.W  #23+64*16,$DFF058               BLTSIZE
The next bug is subtracting 1. One word left would be two bytes.

Also some problems when blitting the next character:
Code:
Blit    MOVE.W  #$09F0,$DFF040                  A = D Miniterm
        MOVE.L  Offset,A1                       Scroller pos on screen
        MOVE.L  #Font,A0                        Font
        ADD.L   D0,A0                           Add CharPos
        MOVE.L  A0,$DFF050                      A
        ADD.L   #44,A1                          Display in Modulo border
        MOVE.L  A1,$DFF054                      D
Assuming you would correctly enable the descending mode while scrolling you have to switch to ascending mode here again.
The character will appear at Offset, which is the last word in the last line of the scroller region. You better blit it to the last word of the first line.
phx is offline  
 
Page generated in 0.04922 seconds with 11 queries