urk, maybe no cycles free ;)
This commit is contained in:
parent
7dfa1dfb26
commit
019422e6e5
1 changed files with 43 additions and 39 deletions
82
dither4.s
82
dither4.s
|
@ -131,28 +131,30 @@ wait_loop:
|
||||||
each_scanline:
|
each_scanline:
|
||||||
; it'll fire on unused lines, but harmlessly
|
; it'll fire on unused lines, but harmlessly
|
||||||
|
|
||||||
jmp fake
|
.macro fake1
|
||||||
; audio sample; low nybble
|
jmp fake
|
||||||
ldx #0
|
; audio sample; low nybble
|
||||||
lda (sample_ptr,x)
|
ldx #0
|
||||||
sta temp2
|
lda (sample_ptr,x)
|
||||||
|
sta temp2
|
||||||
|
|
||||||
; high nybble
|
; high nybble
|
||||||
lsr a
|
lsr a
|
||||||
lsr a
|
lsr a
|
||||||
lsr a
|
lsr a
|
||||||
lsr a
|
lsr a
|
||||||
; set the volume-only bit
|
; set the volume-only bit
|
||||||
ora #$10
|
ora #$10
|
||||||
pha
|
pha
|
||||||
|
|
||||||
; low nybble
|
; low nybble
|
||||||
lda temp2
|
lda temp2
|
||||||
and #$0f
|
and #$0f
|
||||||
; set the volume-only bit
|
; set the volume-only bit
|
||||||
ora #$10
|
ora #$10
|
||||||
lda #0
|
lda #0
|
||||||
pha
|
pha
|
||||||
|
.endmacro
|
||||||
|
|
||||||
fake:
|
fake:
|
||||||
lda #18
|
lda #18
|
||||||
|
@ -187,24 +189,26 @@ each_scanline:
|
||||||
|
|
||||||
inner_scanline
|
inner_scanline
|
||||||
|
|
||||||
; Increment sample ptr
|
.macro audio_inc
|
||||||
jmp audio_cont
|
; Increment sample ptr
|
||||||
inc sample_ptrl
|
jmp audio_cont
|
||||||
bne audio_cont
|
inc sample_ptrl
|
||||||
inc sample_ptrh
|
bne audio_cont
|
||||||
|
inc sample_ptrh
|
||||||
|
|
||||||
lda sample_ptrh
|
lda sample_ptrh
|
||||||
cmp #.hibyte(audio_samples_end)
|
cmp #.hibyte(audio_samples_end)
|
||||||
bne audio_cont
|
bne audio_cont
|
||||||
|
|
||||||
lda sample_ptrl
|
lda sample_ptrl
|
||||||
cmp #.lobyte(audio_samples_end)
|
cmp #.lobyte(audio_samples_end)
|
||||||
bne audio_cont
|
bne audio_cont
|
||||||
|
|
||||||
lda #.lobyte(audio_samples)
|
lda #.lobyte(audio_samples)
|
||||||
sta sample_ptrl
|
sta sample_ptrl
|
||||||
lda #.hibyte(audio_samples)
|
lda #.hibyte(audio_samples)
|
||||||
sta sample_ptrh
|
sta sample_ptrh
|
||||||
|
.endmacro
|
||||||
|
|
||||||
audio_cont:
|
audio_cont:
|
||||||
|
|
||||||
|
@ -212,11 +216,11 @@ audio_cont:
|
||||||
|
|
||||||
lda VCOUNT
|
lda VCOUNT
|
||||||
cmp #130 ;#130
|
cmp #130 ;#130
|
||||||
;bne each_scanline
|
bne each_scanline
|
||||||
bne foo
|
;bne foo
|
||||||
jmp wait_start
|
jmp wait_start
|
||||||
foo:
|
;foo:
|
||||||
jmp each_scanline
|
;jmp each_scanline
|
||||||
|
|
||||||
.endproc
|
.endproc
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue