Page 1 of 2

Question regarding .FDS expansion audio data within NES ROM

Posted: Thu Apr 27, 2017 2:42 pm
by infidelity
Ive been using the converted Super Mario Bros. 2 Japan .fds, within my Super Mario All-Stars NES game. I believe that the .FDS wavetable is intact within the converted .fds to .nes game.

I used the emulator Nestopia, and used the cheat option to force me to star at 8-4 within the converted .fds to .nes rom. I defeated the game, and when you save Princess Toadstool it plays the ending theme. So I went to the sound option of the emulator, to shut off all the square, triangle, & noise channels. I left the .FDS expansion audio on.

Nothing was playing back.

I used FCEUX's code data logger, and ive noticed that what appears to be the wavetable data is being loaded. I also went to nesdev wiki, to make sure the master address used to enable the .FDS playback is enabled, and it is within my game.

Is there a reason as to why the .FDS audio is not playing within the emulator?

Re: Question regarding .FDS expansion audio data within NES

Posted: Thu Apr 27, 2017 4:18 pm
by lidnariq
FDS audio won't be played in random .NES files, any more than VRC7 audio will be played in not-mapper-85 files.

Re: Question regarding .FDS expansion audio data within NES

Posted: Thu Apr 27, 2017 4:34 pm
by rainwarrior
To slightly elaborate: only .FDS files will emulate FDS audio. The FDS works with disks, not cartridges.

Your MMC5 .NES will have MMC5 expansion audio available, though it probably won't help you here.

Re: Question regarding .FDS expansion audio data within NES

Posted: Thu Apr 27, 2017 5:02 pm
by infidelity
Thanks for the replies. I just assumed that the .FDS expansion audio would play on my HiDef front loader, since it enables the extra sound channel on my NES. So my confusion began with why the audio was not playing on emulators.

And I was also under the impression this would also work, because it's not a mapper based sound system, like what MMC5 uses, or Sunsoft, or Konami VRC6/7, etc.

So even with my HiDef front loader, and the .FDS expansion code running correctly, and my ability to make my system output .FDS, it wont play it?

Re: Question regarding .FDS expansion audio data within NES

Posted: Thu Apr 27, 2017 5:06 pm
by lidnariq
... Are you asking "why does it not work in Nestopia/FCEUX/&c" or are you asking "Why does it not work with the HDNES kit"?

We've answered the former, and the latter is a question for kevtris (but I think I remember reading that that's a menu option)
infidelity wrote:since it enables the extra sound channel on my NES
Just because it sounds like you might be confused: it emulates all the possible sound channels, it does not "enable" any.

Re: Question regarding .FDS expansion audio data within NES

Posted: Thu Apr 27, 2017 5:08 pm
by rainwarrior
infidelity wrote:Thanks for the replies. I just assumed that the .FDS expansion audio would play on my HiDef front loader, since it enables the extra sound channel on my NES. So my confusion began with why the audio was not playing on emulators.

And I was also under the impression this would also work, because it's not a mapper based sound system, like what MMC5 uses, or Sunsoft, or Konami VRC6/7, etc.

So even with my HiDef front loader, and the .FDS expansion code running correctly, and my ability to make my system output .FDS, it wont play it?
How does the "HiDef" select expansion audio? Do you have to manually choose which one to use, or is it automatic somehow?

(It's very possible that it can do FDS audio, since it probably doesn't know anything about what it's running?)

Re: Question regarding .FDS expansion audio data within NES

Posted: Thu Apr 27, 2017 7:30 pm
by tokumaru
infidelity wrote:And I was also under the impression this would also work, because it's not a mapper based sound system, like what MMC5 uses, or Sunsoft, or Konami VRC6/7, etc.
Actually, the FDS is essentially a cartridge, containing hardware enhancements just like normal cartridges. The main difference is that it doesn't have PRG-ROM, but RAM where to load programs from disc.

Re: Question regarding .FDS expansion audio data within NES

Posted: Fri Apr 28, 2017 3:39 am
by infidelity
Ahh, I see. I just "again" assumed it was a system thing, the .fds, since all I've been hearing is that the nes front loader can output that audio via modification. I didn't realize the famicom cartridges contain enhancements like Konami & Sunsoft. Although I'm perplexed again seeing the game I'm using was originally a DISK image and not from an actual famicom cartridge.

I appreciate your help everyone, thank you.

Oh with the HiDefNES. Yes there is a menu where you are able to turn on or off the different sound chips.

Re: Question regarding .FDS expansion audio data within NES

Posted: Sat Apr 29, 2017 2:23 pm
by Myask
infidelity wrote:Oh with the HiDefNES. Yes there is a menu where you are able to turn on or off the different sound chips.
Unless a cartridge has them, though, it would not have the registers for controlling them mapped, so the code would have no way to tell the expansion sound chips (here, emulated) If you're trying to use all the sound-chips at once, an NSF seems more your speed.

You may wish to try posting in the semi-official support topic for it.

Re: Question regarding .FDS expansion audio data within NES

Posted: Sun Apr 30, 2017 11:49 am
by infidelity
Is it possible to convert the .fds to either PCM data, or Pulse data?

Re: Question regarding .FDS expansion audio data within NES

Posted: Sun Apr 30, 2017 1:46 pm
by rainwarrior
Yes it's possible to simulate the sound with PCM, or even DPCM, I suppose. It is an MMC5 hack, right? You have all sorts of advantages of IRQ and extra space at your disposal.

I think probably the "easiest" thing would be to make DPCM samples, if you have space for them, and not have to worry about PCM timing.

Your initial question was why emulators don't play your FDS sound (and the answer was simply that it's not an .FDS) but then you mentioned the Hi Def NES. From the description of how it works, it sounds like it would play your FDS sound if you enabled that option on the Hi Def. (Did you try it?)

Re: Question regarding .FDS expansion audio data within NES

Posted: Sun Apr 30, 2017 2:58 pm
by infidelity
Yeah I kind of asked 2 questions within this thread I apologize. I understand what you all meant via the emulation aspect.

Just now however, I defeated smb2j, on my all-stars mmc5 cart. And to my surprise, my HDMI NES outputted the .FDS sound at the end of the game when you rescue Princess Toadstool. I was able to toggle it off and on during that scene. So that is awesome to find out for myself. So I guess I'll just leave my current setup the way it is.

Re: Question regarding .FDS expansion audio data within NES

Posted: Sun Apr 30, 2017 5:28 pm
by tepples
Would it be straightforward to hack the ending to use MMC5's tone generator instead of the FDS's? You lose fine control of timbre, but it should work as expected on Famicom, 60-pin clones, and emulators.

Re: Question regarding .FDS expansion audio data within NES

Posted: Wed May 03, 2017 10:38 am
by Dwedit
The only mapper which would make sense to add FDS audio in would be Mapper 42, used for a pirate cartridge conversion of Ai Senshi Nicol. The game still tries to write to the nonexistent FDS audio registers.

Re: Question regarding .FDS expansion audio data within NES

Posted: Wed May 03, 2017 7:50 pm
by B00daW
If we're thinking about expansion audio, why not use N163 for FDS? It's likely the closest analog with its abilities; and could probably be done with a mapper (registers) hack and not much more code or wavetable data conversion.