mirror of
https://github.com/pkali/scorch_src.git
synced 2026-05-20 22:34:21 +02:00
zero page loading elimination
This commit is contained in:
+19
-16
@@ -23,17 +23,8 @@ bptr .ds 2
|
||||
cur_pos .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
|
||||
@@ -86,6 +77,8 @@ buffers
|
||||
;
|
||||
.proc init_song
|
||||
|
||||
mva #1 bit_data
|
||||
|
||||
; Example: here initializes song pointer:
|
||||
|
||||
;mwa #song_data song_ptr
|
||||
@@ -182,18 +175,28 @@ skip_chn:
|
||||
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
|
||||
; Check for ending of song and jump to the next frame
|
||||
;
|
||||
.proc check_end_song
|
||||
lda song_ptr + 1
|
||||
cmp #>song_end
|
||||
|
||||
; not checking really so the tune gets funky :)))
|
||||
;lda song_ptr + 1
|
||||
;cmp #>song_end
|
||||
;bne wait_frame
|
||||
lda song_ptr
|
||||
cmp #<song_end
|
||||
;lda song_ptr
|
||||
;cmp #<song_end
|
||||
;bne wait_frame
|
||||
.endp
|
||||
|
||||
end_loop
|
||||
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
|
||||
jsr init_song
|
||||
|
||||
BIN
Binary file not shown.
Reference in New Issue
Block a user