Question regarding .FDS expansion audio data within NES ROM

This is an archive of a topic from NESdev BBS, taken in mid-October 2019 before a server upgrade.
View original topic
Question regarding .FDS expansion audio data within NES ROM
by on (#194445)
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
by on (#194454)
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
by on (#194458)
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
by on (#194462)
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
by on (#194463)
... 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
by on (#194464)
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
by on (#194472)
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
by on (#194493)
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
by on (#194609)
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
by on (#194666)
Is it possible to convert the .fds to either PCM data, or Pulse data?
Re: Question regarding .FDS expansion audio data within NES
by on (#194673)
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
by on (#194679)
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
by on (#194692)
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
by on (#194952)
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
by on (#195008)
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.
Re: Question regarding .FDS expansion audio data within NES
by on (#195009)
Audio or no audio, it needs to be able to do the required bank switching. And because it's a multicart, it needs to be able to switch PRG ROM $E000-$FFFF.