zero page loading elimination

This commit is contained in:
2022-07-09 08:31:48 -04:00
parent e307f1a14a
commit 48bfd3824d
2 changed files with 19 additions and 16 deletions
+19 -16
View File
@@ -23,17 +23,8 @@ bptr .ds 2
cur_pos .ds 1 cur_pos .ds 1
chn_bits .ds 1 chn_bits .ds 1
bit_data .byte 1 bit_data .ds 1
.proc get_byte
lda song_data+1
inc song_ptr
bne skip
inc song_ptr+1
skip
rts
.endp
song_ptr = get_byte + 1
fcnt .ds 2 fcnt .ds 2
@@ -86,6 +77,8 @@ buffers
; ;
.proc init_song .proc init_song
mva #1 bit_data
; Example: here initializes song pointer: ; Example: here initializes song pointer:
;mwa #song_data song_ptr ;mwa #song_data song_ptr
@@ -182,18 +175,28 @@ skip_chn:
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
; Check for ending of song and jump to the next frame ; Check for ending of song and jump to the next frame
; ;
.proc check_end_song
lda song_ptr + 1 ; not checking really so the tune gets funky :)))
cmp #>song_end ;lda song_ptr + 1
;cmp #>song_end
;bne wait_frame ;bne wait_frame
lda song_ptr ;lda song_ptr
cmp #<song_end ;cmp #<song_end
;bne wait_frame ;bne wait_frame
.endp
end_loop end_loop
rts rts
song_ptr = get_byte + 1
.proc get_byte
lda song_data+1
inc song_ptr
bne skip
inc song_ptr+1
skip
rts
.endp
main main
jsr init_song jsr init_song
BIN
View File
Binary file not shown.