bsnes icon indicating copy to clipboard operation
bsnes copied to clipboard

(Feature Request) Support SNES Classic/Virtual Console rom files with PCM audio data

Open HeroponRikiBestest opened this issue 5 years ago • 3 comments

All of the super Nintendo roms that Nintendo has rereleased have been modified to use PCM audio data, and as a result, only work properly on their emulators. I think it would be nice to see these properly supported in bsnes.

HeroponRikiBestest avatar Sep 16 '20 17:09 HeroponRikiBestest

At a first guess, I expect this would be like emulating a SNES-like console with entirely different audio hardware. That could be a lot of work, and if all it gets us is the ability to play games we could already play, I'm not sure if it would be worth it. On the other hand, if it were really easy to do, and there are re-released games with bonus content or quality-of-life additions, it would easily be worth it.

We need to know more about the differences between original and PCM-patched SNES games are (hopefully somebody already has documentation) and about the structure of the bsnes code.

Screwtapello avatar Nov 04 '20 05:11 Screwtapello

http://darkakuma.z-net.us/p/sfromtool.html seems to give some hints.

HeroponRikiBestest avatar Dec 14 '20 15:12 HeroponRikiBestest

Hello. I was just emailed about this topic, did a search and seems I found the origin of the inquiry.

That first guess would be wrong. But you are right about the need to know the differences regarding PCM patching. NERDs pcm patching absolutely destroys the audio of the ROM unless your emu properly processes it and the sfrom format itself. The actual PCM data itself is just 16bit signed waveform data converted from BRR by NERD back in the days of the original Wii. Though I personally don't know the code of BSNES or other SNES emus, I'd assume they could process it easily enough. It may even be similar to what the emus themselves do to the audio internally, as all that canoe does is convert BRR to PCM for normal ROMs. NERDs PCM patching seems to have just been done to save CPU time (is my best guess to date).

Anyway. I have been, and still am working on documenting the .sfrom format(s) fully. And the PCM audio patching is the last thing on my list. And I just made significant headway on that to the point that I may be ready to both submit my findings for inclusion of support for the complete .sfrom format in emus, as well as having the tools ready for users to convert between the format. SFROM Tool itself already supports Switch, SNES Classic, and 3DS sfroms (excluding PCM audio). I just need to get it, or another tool managing the audio conversion too.

And FYI, since its in the title of this thread. NSO .sfrom do NOT use PCM audio patching anymore. Only Wii, WiiU, 3DS and SNESClassic. NERD simply cut and pasted their old work over from VC to VC over the years, and only with Switch did they finally make significant effort to emulate ROMs without special patching.

As I told whoever emailed me. Whoever wants to work on it, keep in contact with me directly and hopefully I'll have the data ready for you to add support soon! This aligns with my own goals! =)

Dark-Akuma avatar Dec 15 '20 17:12 Dark-Akuma