mirror of
https://github.com/Pecusx/scorch_src.git
synced 2026-05-20 22:33:43 +02:00
zero page loading elimination
This commit is contained in:
+19
-16
@@ -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
Binary file not shown.
Reference in New Issue
Block a user