
Untested on real hardware and VICE spoils the show probably due to a missing low-pass filter.
Rock'n rumble!
Moderator: Moderators
Awesomest!armypavarmy wrote:Hello,
Tested on my real vic20 PAL and NTSC
WORK OK....No Problem
Armando
Code: Select all
restart:
lda #<sample
sta @(+ 1 +l)
lda #>sample
sta @(+ 2 +l)
ldx #0
l: ldy sample,x
nop
lda vals0,y
sta $900e
inx
beq +n
nop
bit $ea
lda vals3,y
sta $900e
cpy #$00
beq -restart
nop
bit $ea
lda vals1,y
sta $900e
inc $900f
bit $ea
lda vals2,y
sta $900e
jmp -l
n: nop
nop
lda vals3,y
sta $900e
cpy #$fe
beq -restart
nop
bit $ea
lda vals1,y
sta $900e
inc @(+ 2 -l)
bit $ea
lda vals2,y
sta $900e
jmp -l
mkval:
tya
beq +r
cmp #16
bcs +l
ldy #0
rts
l: sec
sbc #16
tay
lda #15
r: rts
; fill @(- 256 (mod *pc* 256))
main:
sei
lda #$7f
sta $912e ; Disable and acknowledge interrupts.
sta $912d
sta $911e ; Disable restore key NMIs.
lda #0
sta $9002
lda #<generated_code
sta ptr_code
lda #>generated_code
sta @(++ ptr_code)
fast6:
jsr audio_boost
ldx #0
l: txa
lsr
lsr
tay
jsr mkval
sta vals0,x
jsr mkval
sta vals1,x
jsr mkval
sta vals2,x
jsr mkval
sta vals3,x
inx
bne -l
jmp -restart
fill @(- 256 (mod *pc* 256))
sample:
@(@ [? (== 0 _) 1 _] (@ #'char-code (string-list (subseq (fetch-file "amen.wav") 44 (* 26 1024)))))
$00
fill @(- 256 (mod *pc* 256))
vals0: fill 256
vals1: fill 256
vals2: fill 256
vals3: fill 256
Well… https://github.com/SvenMichaelKlose/bender It sucks. Not sure why I'm using it.groepaz wrote:what funky assembler is that?
Lovely!Tom wrote:I used it to fix a bug in my emulator; my low-pass filter wasn't actually taking effect due to a two-line error. So this is how it'll sound in the next release, and I think it's probably accurate.
So: Youtube link.
It's very quiet though, as mentioned above. Turn your speakers up.
Which emulator is it, BTW?Tom wrote:I used it to fix a bug in my emulator; my low-pass filter wasn't actually taking effect due to a two-line error. So this is how it'll sound in the next release, and I think it's probably accurate.
So: Youtube link.
It's very quiet though, as mentioned above. Turn your speakers up.
Four pulses for each sample which add up. Doesn't give you 6 bits with 64 values really but more like 61 values. Close enough.