FPGA SPC Player Done

This is an archive of a topic from NESdev BBS, taken in mid-October 2019 before a server upgrade.
View original topic
FPGA SPC Player Done
by on (#89887)
Well after a few weeks of work, I managed to finish that FPGA SPC player I was working on and added a nice little user interface doo-dad. I posted a video of it if anyone wanted to see.

http://www.youtube.com/watch?v=maQffWS2_jQ

Everything's all original on it, I didn't reuse anyone's cores. They are all 100% verilog. There is a 6502 running a few minor parts of the visualization thing (the timer and it loads the scroller) but the rest is verilog.

I am hoping to make an FPGA SNES some time in the future and it needs sound, so that part is done :-)

by on (#89888)
That's so good I don't know where to start. :D Like always, hell of a job kev!

by on (#89892)
Is it possible to disable interpolation on it ?

by on (#89898)
Looks great !

Too bad your video doesn't demonstrate decoding of unstable BRR samples that caused so much problems to emulators (heard for example in "Musica Machina" from FF5).

by on (#89902)
MAD PROPS!

Looking forward to see some of this awesomeness released.

by on (#89952)
You go right on being awesome.

by on (#89953)
Bregalad wrote:
Too bad your video doesn't demonstrate decoding of unstable BRR samples that caused so much problems to emulators (heard for example in "Musica Machina" from FF5).


Maybe in older ones. Both anomie and blargg cracked 100.0% bit-perfect BRR decoding. blargg filled in 100% perfect timing onto everything else as well.

Any difference in sound at this point is caused by using a PC sound card and speakers instead of a TV with an RCA cable.

by on (#89958)
byuu wrote:
Any difference in sound at this point is caused by using a PC sound card and speakers instead of a TV with an RCA cable.

And even then the difference should be minimal if you have a home theater PC (i.e. PC using TV as monitor), no?

by on (#89967)
Bregalad wrote:
Looks great !

Too bad your video doesn't demonstrate decoding of unstable BRR samples that caused so much problems to emulators (heard for example in "Musica Machina" from FF5).


Those all work, however I do still seem to have a minor issue; the channel to channel modulation does not appear to work correctly; it seems that it needs to modulate more than the docs say.

I used the blargg documentation and checked out his library code to make sure it conformed to the documentation and it seems to.

This results in the wind effect on chrono trigger not sounding quite right: they modulate the channel playing the "unstable" BRR sample to cause its pitch to rise/fall. It works OK but the depth of the pitch change isn't enough.

Other than that I can find no issue decoding the samples. I use all fixed point decoding of course (like a real spc would), and having even one tiny error is enough to cause huge problems with most samples. Even something like one wrong carry on a low bit of one of the coefficients is plenty to cause some things to wrap which causes clipping.

I wonder if the earlier emulators that had problems were using floating point to calculate the IIR filtering after the BRR decoding or something. That would cause them to sound OK for normal samples, but to go pear shaped on anything that required bit precise wrapping behaviour.

by on (#89968)
infiniteneslives wrote:
MAD PROPS!

Looking forward to see some of this awesomeness released.


Thanks all for the kind words too. I am working on making an FPGA board I can sell, and was thinking of using kickstarter for this purpose once the board's designed. If anyone's interested in what the board will do and pricing and all that I guess I can post info about it; though the "other retro dev" forum would probably be a better place for it. So far I have 8 or 9 separate videogame consoles running on the same board and I will be adding more.

by on (#89969)
Mmh... testing the chanel - to - channel pitch modulation range should be easy to test on real hardware by playing a sample which is plain DC, and have it modulate a normal channel, then listen to at which pitch it changes.

That way it should be easy to verify if the docs are accurate or not.

Another common problem in emus is that whilte noise (not unstable samples but actual hardware noise) was not loud enough. This caused many sound effects which combines noise and normal samples to sound different on emulators. I think esepcially the SFX when enemies dies in Final Fantasy games and Chrono Trigger.
However again BSNES is not concerned by this (old) problem.

by on (#90140)
Packy and Marlon is the perfect SPC set to listen to that pitch modulation: it's strange, but it does use it. That is the best possible place I could think of, personally...

The tracks that I'm sure use pitch modulation are...
- Playground 2
- House 4
- Unknown Song 9

by on (#92950)
You have figure out the 12 sample ring buffer for decoding BRR data?
I don't know why they use 12 samples, because I saw the guassian part use at most 4, so why keep 8 more samples, can any one enlighten me in this ?