Can you port NES music to SNES remakes of NES games?

Discuss technical or other issues relating to programming the Nintendo Entertainment System, Famicom, or compatible systems. See the NESdev wiki for more information.

Moderator: Moderators

psycopathicteen
Posts: 3140
Joined: Wed May 19, 2010 6:12 pm

Re: Can you port NES music to SNES remakes of NES games?

Post by psycopathicteen »

On the other hand, it would be faster if the SPC700 generated square waves by decrementing a register by a certain amount until it went negative, then add another value back to the negative number and updated the sample for the channel. It would be unpredictable how much CPU it will take, so it should draw it to a BRR sample.
Last edited by psycopathicteen on Sat Dec 02, 2017 5:49 pm, edited 1 time in total.
tepples
Posts: 22708
Joined: Sun Sep 19, 2004 11:12 pm
Location: NE Indiana, USA (NTSC)
Contact:

Re: Can you port NES music to SNES remakes of NES games?

Post by tepples »

You could probably get away with mip-mapping them. Pre-generate a bunch of BRR waveforms of the form 7666...66679AAA...AAA9 and filter 0, one for each combination of octave and duty. (The 7 and 9 are pre-emphasis to fool the Gaussian interpolation into behaving more like cubic spline interpolation.) Then switch each channel's loop point among them based on the octave and duty in effect at any given time. This would cause a "phase reset" of sorts when crossing octaves, but the 2A03 APU has those anyway.
psycopathicteen
Posts: 3140
Joined: Wed May 19, 2010 6:12 pm

Re: Can you port NES music to SNES remakes of NES games?

Post by psycopathicteen »

It's a matter on memory vs speed. Though using "speed" method you'll get an extra crispy square wave.
tepples
Posts: 22708
Joined: Sun Sep 19, 2004 11:12 pm
Location: NE Indiana, USA (NTSC)
Contact:

Re: Can you port NES music to SNES remakes of NES games?

Post by tepples »

But you've got plenty of memory on hand. Generate square waves of lengths 16, 32, 64, 128, 256, and 512 for the three audibly distinct duty cycles the NES APU can produce, for a total of 1008 samples or 1008 * 9/16 = 567 bytes per channel. Round that up to 768 to account for padding consideration when switching among waveforms, and you're still only up to 2.25 KiB out of the 64 KiB that the APU has. Then have the player tweak each pulse channel's loop point to switch among them.
lazygecko
Posts: 18
Joined: Fri Nov 24, 2017 7:03 am

Re: Can you port NES music to SNES remakes of NES games?

Post by lazygecko »

Doesn't the faux retro jingle from the intro of Donkey Kong Country bypass the filtering somehow and preserve the aliased sound of the triangle?
tepples
Posts: 22708
Joined: Sun Sep 19, 2004 11:12 pm
Location: NE Indiana, USA (NTSC)
Contact:

Re: Can you port NES music to SNES remakes of NES games?

Post by tepples »

lazygecko wrote:Doesn't the faux retro jingle from the intro of Donkey Kong Country bypass the filtering
No. I just put my DKC cartridge in my Super NES, listened to the first six measures of the intro, and couldn't hear the telltale 31st and 33rd harmonics, which are supposed to be in the 4K-8K band for the notes being played. It's also unrealistic in that the triangle channel has smooth volume control.
psycopathicteen
Posts: 3140
Joined: Wed May 19, 2010 6:12 pm

Re: Can you port NES music to SNES remakes of NES games?

Post by psycopathicteen »

I thought of a way to do it through software. Calculate the slope of the output for each channel combined, and then recursively add the output of the previous sample.
Post Reply