Worked on feedback provided by Gyurco. There were a few bugs in the previous version, which are corrected now:
dB table was made using 10log instead of 20log, so there was too much attenuation
Noise channel frequency was implemented in a wrong way. Fixed now.
Low pass filter for output was dropping 1 bit because of rounding up and that made some sounds disappear
PSG and FM mix volume was not correct. I have verified it now with Streets of Rage original recordings
Overall you should feel a better sound with this new PSG, particularly when there is a sweep in volume as volume scaling in old PSG is not linear in dB with a 2dB step, as it should be.
I may release an update of jt89 if I come up with a nice DC-removal filter that can be synthesized without much FPGA resources.
Worked on feedback provided by Gyurco. There were a few bugs in the previous version, which are corrected now:
Overall you should feel a better sound with this new PSG, particularly when there is a sweep in volume as volume scaling in old PSG is not linear in dB with a 2dB step, as it should be.
I may release an update of jt89 if I come up with a nice DC-removal filter that can be synthesized without much FPGA resources.
Please review and merge this version.