|
Post by C128Man on Oct 16, 2017 15:57:34 GMT
Hi guys,
I'm trying to program a routine to move a character on the VIC screen. Here is the code:
. 00c30 a9 00 lda #$00 . 00c32 85 80 sta $80 . 00c34 a9 04 lda #$04 . 00c36 85 81 sta $81 . 00c38 a0 00 ldy #$00 . 00c3a a9 20 lda #$20 . 00c3c 91 80 sta ($80),y . 00c3e c8 iny . 00c3f a9 51 lda #$51 . 00c41 91 80 sta ($80),y . 00c43 c0 fb cpy #$fb . 00c45 d0 f3 bne $0c3a . 00c47 18 clc . 00c48 a5 80 lda $80 . 00c4a 69 fa adc #$fa . 00c4c 85 80 sta $80 . 00c4e 90 e8 bcc $0c38 . 00c50 18 clc . 00c51 a5 81 lda $81 . 00c53 69 01 adc #$01 . 00c55 85 81 sta $81 . 00c57 c9 07 cmp #$07 . 00c59 d0 dd bne $0c38 . 00c5b 4c 30 0c jmp $0c30
But, The program is too fast. I don't really see the character moving. I only see flash.
Do not hesitate to give me some tips also. I don't find the "$81=$81+1" very smart
Thanks
C128Man
|
|
|
Post by Wagner on Oct 19, 2017 1:49:22 GMT
Try inserting a LDX #1, JSR jiffies in your code just before the cpy #$fb.
jiffies lda $a2 l0 cmp $a2 beq l0 dex bne jiffy rts
|
|
|
Post by C128Man on Oct 19, 2017 5:50:53 GMT
Hi,
Thanks for your message.
But, this is a loop. I'll try to sync with the VIC screen refresh
|
|