Re: [stella] My very first

Subject: Re: [stella] My very first
From: Christopher Tumber <christophertumber@xxxxxxxxxx>
Date: Thu, 02 Jan 2003 01:41:57 -0500
>Can anybody spot any cheap ways to gain some cycles?

Chris' advice to split up the table into 6 parts is a good one and will give you a good result immediately.

Also, why are you switching to ldx Maze,y for the second half of the screen? If you stuck with lda Maze,y throughout, you can use X as your loop counter without having to store it to RAM. This will save you 6 cycles in the MazeRowLoop and 3 cycles in MazeRow:

[My notes is ()]


MazeRow
        ldx #$0C           ; cycles 2 
;        stx tmp2           ; cycles 3 == 5  (eliminate use of tmp2)

        lda #$00   ;(Use A so as not to overwrite X)
        sta GRP0

        ; draw player
        lda myrow
        eor man
        bne label1

        lda #$FF   ;(Use A so as not to overwrite X)
        sta GRP0
label1

MazeRowLoop
        ldy myrow          ; cycles 3
        sta WSYNC          ; cycles 3 (Changed for personal preference)

        lda Maze1,Y         ; cycles 4
        sta PF0            ; cycles 3
;        iny                ; cycles 2 (Eliminate this)
        lda Maze2,Y         ; cycles 4
        sta PF1            ; cycles 3
;        iny                ; cycles 2  (Eliminate this)
        lda Maze3,Y         ; cycles 4
        sta PF2            ; cycles 3 == 25

;(You will probably need some NOPs in here)

;        iny                ; cycles 2  (Eliminate this)
        lda Maze4,Y         ; cycles 4 (Use A instead of X)
        sta PF0            ; cycles 3
;        iny                ; cycles 2  (Eliminate this)
        lda Maze5,Y         ; cycles 4
        sta PF1            ; cycles 3
;        iny                ; cycles 2  (Eliminate this)
        lda Maze6,Y         ; cycles 4
        sta PF2            ; cycles 3 == 27

         iny ; (INY consolidated into one instance)
;        ldx tmp2  ; (Elminate this)
        dex
;        stx tmp2   ; (Elminate this)

        bne MazeRowLoop





----------------------------------------------------------------------------------------------
Archives (includes files) at http://www.biglist.com/lists/stella/archives/
Unsub & more at http://www.biglist.com/lists/stella/


Current Thread