Hey Steve,
Steve Judd wrote:
> The reason I go through all this is twofold: 1) if the frequency is zero,
> the pulse will never toggle between low and hi, and 2) you want a duty
> cycle of 100%, not 4095/4096%.
Both the PRG and Mapping claim that pulse width=(register value/40.95)%,
so that setting the pulse width to 4095 would get a duty cycle of 100%.
It wouldn't be the first time they were wrong, of course...
Thanks for all the suggestions - they gave me a good start on getting this
thing working, which I finally did during lunch today (I didn't get around
to eating, unfortunately :).
This trick really does give a very noticeable volume boost to the
digis. The really neat thing (I believe Levente hinted at it) is
that you can get a cumulative effect from each channel - set all
3 channels to pulse (if you can spare them, and I can in this case)
and you get a really big volume boost.
Also, it seems that you can use zero as the frequency - it doesn't
appear to matter what frequency you use at all, but perhaps more
experimentation will change my view.
Here's my current code:
;close all gates (this seemed necessary during experimentation -
;if I ran the code repeatedly, it would not make any sound unless I
;closed the gates. Do all SIDs behave this way?
lda #$40
sta $d404
sta $d40b
sta $d412
;volume to max
lda #$0f
sta $d418
;set low then high frequency registers (zero seems to work fine)
lda #$00
sta $d400
sta $d407
sta $d40e
lda #$00
sta $d401
sta $d408
sta $d40f
;set pulse widths to $fff
lda #$ff
sta $d402
sta $d409
sta $d410
lda #$0f
sta $d403
sta $d40a
sta $d411
;set attack/decay/release to zero, sustain to $f
lda #$00
sta $d405
sta $d40c
sta $d413
lda #$f0
sta $d406
sta $d40d
sta $d414
;gate pulse on all channels
lda #$41
sta $d404
sta $d40b
sta $d412
--
Robin Harbron macbeth@psw.nu
http://www.tbaytel.net/macbeth
http://www.psw.nu/
-
This message was sent through the cbm-hackers mailing list.
To unsubscribe: echo unsubscribe | mail cbm-hackers-request@dot.tcm.hut.fi.
Archive generated by hypermail 2.1.1.