16-bit stereo 32 kHz streaming success

Discussion of hardware and software development for Super NES and Super Famicom.

Moderator: Moderators

Forum rules
  • For making cartridges of your Super NES games, see Reproduction.
johannesmutlu
Posts: 26
Joined: Fri Mar 11, 2011 2:22 pm

Compremises has to be made

Post by johannesmutlu » Wed Mar 16, 2011 6:34 am

While the snes is able to stream 16bit sound!!??,but that will eat all the availible ram inside the snes,so sadly l,despites the soundchip has it's own proccesor,theres no room for proccesing any game logic or FMV data.
Maybe if we reduce those samples down to 8bit,then there will be room for game data etc,,,
But if you want a game with non-stop near cd quality,you need to stick an external soundchip inside your homebrewed game.
While the sega genesis has 1 8bit dac,the Z80 can control it so there will be no hit in porfomance , the genesis also has a psg chip were you can trickery simulate 1bit pcm,so even digital stereo sound is also possible on the genesis(!).
Trough the snes can somehow interpolate or decompress those 4bit brr samples back to 16bit along with gaessian noise filtering etc,, all without taking a porfomance hit on the main cpu.
Last edited by johannesmutlu on Wed May 04, 2016 8:23 am, edited 2 times in total.

gamax92
Posts: 27
Joined: Sun Apr 10, 2011 12:05 pm
Location: Earth
Contact:

Post by gamax92 » Sun Apr 10, 2011 2:05 pm

for the snes9x it does crackle and pop and sound really bad but go to
Sound > Playback Rate > 35KHz
or
Sound > Playback Rate > 48KHz

Those are the two that made it sound better.

dext3r
Posts: 14
Joined: Fri May 06, 2011 1:03 pm

Post by dext3r » Fri May 13, 2011 8:27 am

wow this is awesome! sounded ok for me on snes9x with directsound.

just awesome!

johannesmutlu
Posts: 26
Joined: Fri Mar 11, 2011 2:22 pm

Re: 15 or 16bit audio???

Post by johannesmutlu » Wed May 04, 2016 8:07 am

blargg wrote:I noticed that the DSP configuration I used wasn't as loud as it could be, and thus wasn't using the full DAC precision. Here's an updated one: blargg_near_cd_quality2.7z (mirror). I've also updated the link in the original message.

Before I had a single FIR constant of $3F (49%) and evol of $7F (99%). I had used the $3F because I was getting what sounded like overdriving when I was first developing the technique. I tried again yesterday and couldn't hear any of that, so I changed the FIR constant to $80 (-100%) and evol to $80 (-100%). Combined these give exactly 100%, i.e. no change in volume. There's no way to get +100%, so I used the two negatives to cancel each other out. This still technically only gives 15 bits per sample, due to the DSP always clearing the low bit during echo calculation, but there's no way around that.
Huh,what,are you saying that those streamed samples are not 16bit but 15bit? Are those ADPCM samples in snes titles also just only 15bit??
Well ,if the snes can only stream 15bit sound,then it makes no sense to put 2 16bit DAC's inside a snes,in this can as a snes fan,i will feel myself soooo misleaded after all these years being dissappointed,but maybe am wrong maybe it could still generate 16bit but maybe at only 22 or 11 khz.
I don't know,i hope i have it wrong,maybe 15bit was just a typo,but if this is not generating 16bit,then it should,ve been called 15bit.
But again,i suppose it should be able to generate 16bit audion,hence those 2 16bit dacs!!??
THX.

tepples
Posts: 22052
Joined: Sun Sep 19, 2004 11:12 pm
Location: NE Indiana, USA (NTSC)
Contact:

Re: 16-bit stereo 32 kHz streaming success

Post by tepples » Wed May 04, 2016 8:09 am

A 15-bit stereo DAC is still a heck of a lot better than the 8-bit mono DAC (plus hard-panned FM and PSG channels) on the Genesis.

BRR is 4-bit, but it has emphasis filters and volume companding (the "shift") to improve dynamic range. And in a practical composition, different channels mask other channels' noise to an extent. Remind me when I get home and I might make an example showing exactly how lossy BRR doesn't sound.

AWJ
Posts: 433
Joined: Mon Nov 10, 2008 3:09 pm

Re: 15 or 16bit audio???

Post by AWJ » Wed May 04, 2016 11:57 am

johannesmutlu wrote:Huh,what,are you saying that those streamed samples are not 16bit but 15bit? Are those ADPCM samples in snes titles also just only 15bit??
Well ,if the snes can only stream 15bit sound,then it makes no sense to put 2 16bit DAC's inside a snes,in this can as a snes fan,i will feel myself soooo misleaded after all these years being dissappointed,but maybe am wrong maybe it could still generate 16bit but maybe at only 22 or 11 khz.
I don't know,i hope i have it wrong,maybe 15bit was just a typo,but if this is not generating 16bit,then it should,ve been called 15bit.
But again,i suppose it should be able to generate 16bit audion,hence those 2 16bit dacs!!??
THX.
If I understand things correctly, it's only the echo buffer that's effectively 15-bit. This streaming technique bypasses most of the DSP hardware (which is designed to play compressed samples, not to stream raw PCM) It's the audio equivalent of the DMA bitmap trick.

magno
Posts: 193
Joined: Tue Aug 15, 2006 5:23 am
Location: Spain
Contact:

Re: 16-bit stereo 32 kHz streaming success

Post by magno » Tue Jan 24, 2017 2:33 am

Sorry to re-float such an old thread, but I'm researching about SNES audio sub-system and its maximum usable bandwidth and watched a youtube video about this same blargg's ROM. I would like to have a look to the code, but both download links are broken.
Is there any other mirror where I can download the ROM?

Thanks!

KungFuFurby
Posts: 262
Joined: Wed Jul 09, 2008 8:46 pm

Re: 16-bit stereo 32 kHz streaming success

Post by KungFuFurby » Tue Jan 24, 2017 6:29 am

I have the ROM (or at least its most recent version). :D
Attachments
blargg_near_cd_quality2.smc
(4 MiB) Downloaded 246 times

magno
Posts: 193
Joined: Tue Aug 15, 2006 5:23 am
Location: Spain
Contact:

Re: 16-bit stereo 32 kHz streaming success

Post by magno » Wed Jan 25, 2017 1:46 am

KungFuFurby wrote:I have the ROM (or at least its most recent version). :D
Thanks!! I would like to do some test with audio programming in SNES, streaming samples to APU using HDMA... blargg's code for the SPC-700 could be useful because reduces at maximum acknowledge of samples in register $2140, so I can use HDMA without caring about SPC-700 getting the samples on time.

Post Reply