Skip to content

Commit ea1acec

Browse files
committed
Disable song loading
Disabled the loading of the demo song, but not the engine itself.
1 parent 6d5c6f1 commit ea1acec

File tree

3 files changed

+23
-12
lines changed

3 files changed

+23
-12
lines changed

Makefile

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -81,8 +81,3 @@ bin/$(NAME).nes: bin/$(NAME).o $(NESCFG)
8181
credits_data.i: $(GENCRED)
8282
./$(GENCRED) -x zorchenhimer -o credits_data.i -i subscriber-list.csv
8383

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

sound.asm

Lines changed: 21 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,9 @@ Sound_Init:
2828
sta Noise_Period
2929
sta Noise_Length
3030

31+
sta SndBeatCount
32+
sta SndBeatCount+1
33+
3134
; DMC channel. Unused, just turn everything off.
3235
sta $4010
3336
sta $4011
@@ -156,10 +159,14 @@ Sound_WriteBuffers:
156159

157160
Sound_RunFrame:
158161
; TODO: remove this
162+
jmp @topOfBeat
159163
lda #BUTTON_SELECT
160164
jsr ButtonPressedP1
161165
beq @topOfBeat
162166

167+
lda #$FF
168+
sta SndSongRunning
169+
163170
jsr LoadSong
164171

165172
@topOfBeat:
@@ -193,6 +200,13 @@ RunBeat:
193200
ldy #0
194201
sty TmpY
195202

203+
bit SndSongRunning
204+
bpl :+
205+
inc SndBeatCount
206+
bne :+
207+
inc SndBeatCount+1
208+
:
209+
196210
@seqDecodeLoop:
197211
lda SndSeq_Active, y
198212
beq @notActive
@@ -556,13 +570,13 @@ DecodeWait:
556570
ldx TmpChanOffset
557571
lda (SndPointer_Sequence, X)
558572
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+
;:
566580
ldy TmpChanId
567581
sta SndSeq_Waiting, y
568582
jmp IncrSequencePointer

sound_bss.asm

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -24,3 +24,5 @@ SndSeq_Waiting: .res 5 ; Wait command countdown (noting between notes)
2424
SndOrder_Index: .res 4
2525

2626
SndRerunBeat: .res 1
27+
SndBeatCount: .res 2
28+
SndSongRunning: .res 1

0 commit comments

Comments
 (0)