-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathroutine.asm
85 lines (77 loc) · 1.58 KB
/
routine.asm
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
; Generic routine
wait_routine
VBLANKWAITLOW
lda $d011
bpl VBLANKWAITLOW
VBLANKWAITHIGH
lda $d011
bmi VBLANKWAITHIGH
rts
generator_max byte $00
get_random_number
lda $d012
eor $dc04
sbc $dc05
cmp generator_max
bcs get_random_number
rts
;write_debug_current_frame_frog
; lda current_frame_frog
; cmp #0
; beq current_frame_frog_not_0
; lda #$31
; sta $0440
; lda #$00
; sta $D840
; rts
;current_frame_frog_not_0
; lda #$30
; sta $0440
; rts
;write_debug_is_jumping
; lda is_jumping
; cmp #0
; beq is_jumping_not_0
; lda #$31
; sta $0400
; lda #$00
; sta $D800
; rts
;is_jumping_not_0
; lda #$30
; sta $0400
; rts
;write_debug_is_falling
; lda is_falling
; cmp #0
; beq is_falling_not_0
; lda #$31
; sta $0428
; lda #$00
; sta $D828
; rts
;is_falling_not_0
; lda #$30
; sta $0428
; rts
;write_debug_fly_position_on_map
; lda fly_position_on_map
; adc #$30
; sta $042A
; lda #$00
; sta $D82A
; rts
;write_debug_current_fly_frame
; lda current_fly_frame
; adc #$30
; sta $042C
; lda #$00
; sta $D82C
; rts
;write_debug_x_reg
; txa
; adc #$30
; sta $0428
; lda #$00
; sta $D828
; rts