A fix for the timer to work by making it start with value 1. It do not increment from 0!

This commit is contained in:
hugova 2025-03-05 01:27:37 +01:00
parent 89c2b42bfe
commit 982b6c7ea6
2 changed files with 8 additions and 2 deletions

View file

@ -2,6 +2,12 @@
.macro time_start .macro time_start
PHA PHA
LDA $DC08 ; Bit 0..3: Tenth seconds in BCD-format, others may be 0 or 1 LDA $DC08 ; Bit 0..3: Tenth seconds in BCD-format, others may be 0 or 1
;;;;Clear all time data and set time =1.
AND #%11110000
STA $DC08
INC $DC08
LDA $DC08
;;Time is only at bit 0 ..3
AND #%00001111 AND #%00001111
STA $f1 STA $f1
PLA PLA

View file

@ -19,7 +19,7 @@
;; Short test for timing ;; Short test for timing
time_start time_start
@loop: @loop:;; mem f1
LDA Y_pos_ LDA Y_pos_
STA Y_pos STA Y_pos
LDA X_pos_ LDA X_pos_
@ -28,7 +28,7 @@ time_start
jsr line jsr line
INC Y_end INC Y_end
LDA Y_end LDA Y_end
CMP #$30 CMP #$90
BEQ end__ BEQ end__
jmp @loop jmp @loop
end__: end__: