File tree Expand file tree Collapse file tree 3 files changed +23
-12
lines changed Expand file tree Collapse file tree 3 files changed +23
-12
lines changed Original file line number Diff line number Diff line change @@ -81,8 +81,3 @@ bin/$(NAME).nes: bin/$(NAME).o $(NESCFG)
81
81
credits_data.i : $(GENCRED )
82
82
./$(GENCRED ) -x zorchenhimer -o credits_data.i -i subscriber-list.csv
83
83
84
- music_data.asm : music-convert/music-convert.exe
85
- # -music-convert/music-convert.exe RunnJumper_music.txt > music_data.asm
86
-
87
- music-convert/music-convert.exe : music-convert/* .go
88
- # -cd music-convert && go build
Original file line number Diff line number Diff line change @@ -28,6 +28,9 @@ Sound_Init:
28
28
sta Noise_Period
29
29
sta Noise_Length
30
30
31
+ sta SndBeatCount
32
+ sta SndBeatCount+1
33
+
31
34
; DMC channel. Unused, just turn everything off.
32
35
sta $4010
33
36
sta $4011
@@ -156,10 +159,14 @@ Sound_WriteBuffers:
156
159
157
160
Sound_RunFrame:
158
161
; TODO: remove this
162
+ jmp @topOfBeat
159
163
lda #BUTTON_SELECT
160
164
jsr ButtonPressedP1
161
165
beq @topOfBeat
162
166
167
+ lda #$FF
168
+ sta SndSongRunning
169
+
163
170
jsr LoadSong
164
171
165
172
@topOfBeat:
@@ -193,6 +200,13 @@ RunBeat:
193
200
ldy #0
194
201
sty TmpY
195
202
203
+ bit SndSongRunning
204
+ bpl :+
205
+ inc SndBeatCount
206
+ bne :+
207
+ inc SndBeatCount+1
208
+ :
209
+
196
210
@seqDecodeLoop:
197
211
lda SndSeq_Active, y
198
212
beq @notActive
@@ -556,13 +570,13 @@ DecodeWait:
556
570
ldx TmpChanOffset
557
571
lda (SndPointer_Sequence, X)
558
572
and #$0F
559
- sec
560
- sbc #1
561
-
562
- ; Check for underflow
563
- bpl :+
564
- lda #0
565
- :
573
+ ; sec
574
+ ; sbc #1
575
+ ;
576
+ ; ; Check for underflow
577
+ ; bpl :+
578
+ ; lda #0
579
+ ; :
566
580
ldy TmpChanId
567
581
sta SndSeq_Waiting, y
568
582
jmp IncrSequencePointer
Original file line number Diff line number Diff line change @@ -24,3 +24,5 @@ SndSeq_Waiting: .res 5 ; Wait command countdown (noting between notes)
24
24
SndOrder_Index: .res 4
25
25
26
26
SndRerunBe at : .res 1
27
+ SndBeatCount: .res 2
28
+ SndSongRunning: .res 1
You can’t perform that action at this time.
0 commit comments