tepples wrote:
How fast is it going? One screenwidth per 4 seconds is one pixel per vblank. One screenwidth per half second is one tile per vblank. Could you paste the parts of your program that write to $2000, $2005, and $2006?
sure thing ... all I'm doing is reading the controller and if the user presses
left or right then I either increment / deincrement scrollPos (inside NMI)
Code:
.zp
scrollPos = $00
......
main:
sei
cld
lda #$00
sta <scrollPos
.......
nmi:
jsr controlStrobe ; read controller
jsr dmatrans ; where I do my spr dma stuff
lda #$0
sta $2000
lda #%10001000
sta $2000
lda scrollPos
ldx #$00
sta $2005
stx $2005
int:
rti
controlStrobe:
lda #$01
sta $4016
lda #$00
sta $4016
lda $4016 ; A button .. nothing for now
lda $4016 ; B button ...
lda $4016 ; Select
lda $4016 ; Start
lda $4016 ; Up
lda $4016 ; down
lda $4016 ; Left
and #1
beq Right_Press
dec scrollPos
Right_Press:
lda $4016 ; Right
and #1
beq stop_rts
inc scrollPos
stop_rts:
rts
.....
"..." is, of course, removed code to save space. I'm sure what I did
is really basic but is my first attempt at scrolling. Thanks Tepples.