I'm trying to play a wave sample from ROM on the Moonsound but I cannot seem to get any sound out of it.
This is what I'm trying to do:
- Enable wave register of the moonsound
- set toneheader to 100b
- set a wave (tried a couply of different values 0,1,2 18, 300)
- set octave (1) and fnum (0)
- set volume
- key on
- key off
I've also tried it without the key off. But this gives me no sound at all. Is my logic correct or am I missing something?
; Init Moonsound ; Enable the wave register and extra status bit ld a, 5 ld b, 3 call MS_WRITE_FM2_REG ; Use instruments from ROM ?? ld a, 2 ld b, 00010000b call MS_WRITE_WAVE ; Set wave 300 on channel 0 ld a, 20h ld b, 1 call MS_WRITE_WAVE ld a, 08h ld b, 44 call MS_WRITE_WAVE ; set octave 1, fnum 0 (aka 44.1Khz) + wave 1 on channel 1 ld a,38h ld b, 00010000b ; 4 bits octave, 4 bits fnum call MS_WRITE_WAVE ; Set volume ld a, 50h ld b, (2 << 1) | 1 call MS_WRITE_WAVE ; Key on (1), damp off (1) , reset LFO (1), output to channel (1), panning (4) ld a, 68h ld b, 10010000b; call MS_WRITE_WAVE ; Key off (1), damp off (1) , reset LFO (1), output to channel (1), panning (4) ld a, 68h ld b, 00010000b call MS_WRITE_WAVE ret
Login or register to post comments