cointimer

by lineprinter

Game:

Description: coins decrease the timer

!freeram = $7E17BB
!coins = $7E0DBF
!timer_hundreds = $7E0F31
!timer_tens = $7E0F32
!timer_ones = $7E0F33

LDA $100 ; \ only run in gamemode 14
EOR #$14 ; |
ORA $9D  ; | and when the game isn't paused
BEQ +    ; |
lda !coins
sta !freeram
RTL      ; |
+        ; /

lda !freeram
cmp !coins
bne +
lda !coins
sta !freeram
rtl
+

lda !timer_tens
cmp #$00
beq +
lda !timer_tens
dec
sta !timer_tens
lda !coins
sta !freeram
rtl
+

lda !timer_hundreds
cmp #$00
beq +
lda #$9
sta !timer_tens
lda !timer_hundreds
dec
sta !timer_hundreds
lda !coins
sta !freeram
rtl
+

lda #$01
sta !timer_ones
lda !coins
sta !freeram
rtl
back to listings