From ea1acec6a2579b732b2db1b21e2e6b584b2db6fe Mon Sep 17 00:00:00 2001 From: Zorchenhimer Date: Sat, 22 Jun 2019 13:49:11 -0400 Subject: [PATCH] Disable song loading Disabled the loading of the demo song, but not the engine itself. --- Makefile | 5 ----- sound.asm | 28 +++++++++++++++++++++------- sound_bss.asm | 2 ++ 3 files changed, 23 insertions(+), 12 deletions(-) diff --git a/Makefile b/Makefile index 0552615..e5bc9ea 100644 --- a/Makefile +++ b/Makefile @@ -81,8 +81,3 @@ bin/$(NAME).nes: bin/$(NAME).o $(NESCFG) credits_data.i: $(GENCRED) ./$(GENCRED) -x zorchenhimer -o credits_data.i -i subscriber-list.csv -music_data.asm: music-convert/music-convert.exe - #-music-convert/music-convert.exe RunnJumper_music.txt > music_data.asm - -music-convert/music-convert.exe: music-convert/*.go - #-cd music-convert && go build diff --git a/sound.asm b/sound.asm index c57df34..20ffec0 100644 --- a/sound.asm +++ b/sound.asm @@ -28,6 +28,9 @@ Sound_Init: sta Noise_Period sta Noise_Length + sta SndBeatCount + sta SndBeatCount+1 + ; DMC channel. Unused, just turn everything off. sta $4010 sta $4011 @@ -156,10 +159,14 @@ Sound_WriteBuffers: Sound_RunFrame: ; TODO: remove this + jmp @topOfBeat lda #BUTTON_SELECT jsr ButtonPressedP1 beq @topOfBeat + lda #$FF + sta SndSongRunning + jsr LoadSong @topOfBeat: @@ -193,6 +200,13 @@ RunBeat: ldy #0 sty TmpY + bit SndSongRunning + bpl :+ + inc SndBeatCount + bne :+ + inc SndBeatCount+1 +: + @seqDecodeLoop: lda SndSeq_Active, y beq @notActive @@ -556,13 +570,13 @@ DecodeWait: ldx TmpChanOffset lda (SndPointer_Sequence, X) and #$0F - sec - sbc #1 - - ; Check for underflow - bpl :+ - lda #0 -: +; sec +; sbc #1 +; +; ; Check for underflow +; bpl :+ +; lda #0 +;: ldy TmpChanId sta SndSeq_Waiting, y jmp IncrSequencePointer diff --git a/sound_bss.asm b/sound_bss.asm index 3158382..d7768e5 100644 --- a/sound_bss.asm +++ b/sound_bss.asm @@ -24,3 +24,5 @@ SndSeq_Waiting: .res 5 ; Wait command countdown (noting between notes) SndOrder_Index: .res 4 SndRerunBeat: .res 1 +SndBeatCount: .res 2 +SndSongRunning: .res 1