SPC700 help
Moderator: Moderators
Forum rules
- For making cartridges of your Super NES games, see Reproduction.
-
wiiqwertyuiop
- Posts: 19
- Joined: Tue Apr 17, 2012 8:30 am
-
wiiqwertyuiop
- Posts: 19
- Joined: Tue Apr 17, 2012 8:30 am
Yes I read it now and it helped me very much, thank you.
Ok I got the sound effect to stop after a certain amount of frames and everything seems to work fine.... but now the sound effect plays too quietly and im not sure why. I have the master volume (left and right) set to #$7f and the volume for the voice at #$7f as well yet I can barely hear it. Here is my current code.
Ok I got the sound effect to stop after a certain amount of frames and everything seems to work fine.... but now the sound effect plays too quietly and im not sure why. I have the master volume (left and right) set to #$7f and the volume for the voice at #$7f as well yet I can barely hear it. Here is my current code.
I think it's a problem with the enveloppe. It looks like you write 0, 0, 0 to enveloppe regs which should normally not work (in fact its weird if you hear sound with this settings, this should result in silence !)
You should write 0xFF to ADSR1 and 0xE0 to ADSR2 to have no enveloppe (sustain at max value forever). In this setting the value in GAIN have no effect.
Alternatifely you could write 0x00 to ADSR1, and 0x7F to GAIN, to directly force the enveloppe to 0x7F. Both should be completely equivalent.
You should write 0xFF to ADSR1 and 0xE0 to ADSR2 to have no enveloppe (sustain at max value forever). In this setting the value in GAIN have no effect.
Alternatifely you could write 0x00 to ADSR1, and 0x7F to GAIN, to directly force the enveloppe to 0x7F. Both should be completely equivalent.
Useless, lumbering half-wits don't scare us.
-
wiiqwertyuiop
- Posts: 19
- Joined: Tue Apr 17, 2012 8:30 am
Er.. sorry for all the questions... but now channel 3 seems to cut in and out when I activate it for some reason. None of the other channels seem to do this and I have all the channels set the same way. Here is my current code. Thanks!
-
wiiqwertyuiop
- Posts: 19
- Joined: Tue Apr 17, 2012 8:30 am
Yes, all im doing is making the channel stay active for as long as im holding a button, but for some reason when I hold up (which activates channel 3) it cuts in and out while the other ones don't.mic_ wrote:I don't see anything in your SPC code that prevents processing the same command over and over. Does your code on the 65816 side write zero to the communication port a while after sending a "START CHANNEL X" command?
-
KungFuFurby
- Posts: 264
- Joined: Wed Jul 09, 2008 8:46 pm
-
wiiqwertyuiop
- Posts: 19
- Joined: Tue Apr 17, 2012 8:30 am
Um... sorry if this is considered a bad bump...
After taking a break from this for a while and working on some other things I decided to try to make a functional sound engine, I first wanted to start off with just playing sound effects so I wrote this:
http://www.pastebay.net/1069545
and when i try to play it in snes9x it makes some short sounds but never plays the whole things, and i get nothing in bsnes! Getting rid of the second:
plays the whole thing but only once and still nothing in bsnes! So yeah any help would be great!
After taking a break from this for a while and working on some other things I decided to try to make a functional sound engine, I first wanted to start off with just playing sound effects so I wrote this:
http://www.pastebay.net/1069545
and when i try to play it in snes9x it makes some short sounds but never plays the whole things, and i get nothing in bsnes! Getting rid of the second:
Code: Select all
mov $f2, #$4c ;\
mov $f3, #$00 ; | Turn off all voices
mov $f2, #$5c ; |
mov $f3, #$FF ;/A channel that has KOFF=1 (and does not play any sound yet) is effectively muted and will be put into release state immediately after it has been turned on; try clearing the KOFF bit for channel 0 before toggling KON.
Furthermore, you don't need to write 1 to KOFF at all; writing $FF to KOFF once at startup puts all channels into release state.
Furthermore, you don't need to write 1 to KOFF at all; writing $FF to KOFF once at startup puts all channels into release state.
-
wiiqwertyuiop
- Posts: 19
- Joined: Tue Apr 17, 2012 8:30 am
Ok thanks, i think im getting closer now. The sounds play correctly in snes9x, but in bsnes I get this loud beeping sound and I don't know why. Here is the code im using:
http://www.pastebay.net/1069601
http://www.pastebay.net/1069601
-
wiiqwertyuiop
- Posts: 19
- Joined: Tue Apr 17, 2012 8:30 am
Re: SPC700 help
Does anyone have any ideas?...
If not, does anyone know of a working SPC engine I can study (Preferably one with comments
)?
If not, does anyone know of a working SPC engine I can study (Preferably one with comments
Re: SPC700 help
You can check out my engine from Christmas Craze sources (spc700.asm).