diff --git a/dither4.s b/dither4.s index 3bded70..32557d6 100644 --- a/dither4.s +++ b/dither4.s @@ -131,28 +131,30 @@ wait_loop: each_scanline: ; it'll fire on unused lines, but harmlessly - jmp fake - ; audio sample; low nybble - ldx #0 - lda (sample_ptr,x) - sta temp2 + .macro fake1 + jmp fake + ; audio sample; low nybble + ldx #0 + lda (sample_ptr,x) + sta temp2 - ; high nybble - lsr a - lsr a - lsr a - lsr a - ; set the volume-only bit - ora #$10 - pha + ; high nybble + lsr a + lsr a + lsr a + lsr a + ; set the volume-only bit + ora #$10 + pha - ; low nybble - lda temp2 - and #$0f - ; set the volume-only bit - ora #$10 - lda #0 - pha + ; low nybble + lda temp2 + and #$0f + ; set the volume-only bit + ora #$10 + lda #0 + pha + .endmacro fake: lda #18 @@ -187,24 +189,26 @@ each_scanline: inner_scanline - ; Increment sample ptr - jmp audio_cont - inc sample_ptrl - bne audio_cont - inc sample_ptrh + .macro audio_inc + ; Increment sample ptr + jmp audio_cont + inc sample_ptrl + bne audio_cont + inc sample_ptrh - lda sample_ptrh - cmp #.hibyte(audio_samples_end) - bne audio_cont + lda sample_ptrh + cmp #.hibyte(audio_samples_end) + bne audio_cont - lda sample_ptrl - cmp #.lobyte(audio_samples_end) - bne audio_cont + lda sample_ptrl + cmp #.lobyte(audio_samples_end) + bne audio_cont - lda #.lobyte(audio_samples) - sta sample_ptrl - lda #.hibyte(audio_samples) - sta sample_ptrh + lda #.lobyte(audio_samples) + sta sample_ptrl + lda #.hibyte(audio_samples) + sta sample_ptrh + .endmacro audio_cont: @@ -212,11 +216,11 @@ audio_cont: lda VCOUNT cmp #130 ;#130 - ;bne each_scanline - bne foo + bne each_scanline + ;bne foo jmp wait_start - foo: - jmp each_scanline + ;foo: + ;jmp each_scanline .endproc