Nes ROM with 5b sound

Discuss NSF files, FamiTracker, MML tools, or anything else related to NES music.

Moderator: Moderators

lidnariq
Posts: 11429
Joined: Sun Apr 13, 2008 11:12 am

Re: Nes ROM with 5b sound

Post by lidnariq »

Perkka wrote:I were also planning to not use the RCA outputs on the NES for sound but to have 2 of the on the expansion module, mainly because then i could reroute sound trough famicom cartridges the correct way which i guess would help with having sound levels the way it was intended. i guess it will make a difference at least.
That would require significant rework of the console. The two signals on the expansion port are "input to NES: mix audio in" and "output from NES: final mix" - there's no place for the Famicom's "amplified audio from 2A03" or "audio input to RF modulator" for a cartridge to stick its audio hardware in the middle.

If you compare the Famicom and NES schematic, "output from NES: final mix" is almost the same as "amplified audio from 2A03", but that's not useful without a place to re-inject audio afterwards.
Perkka
Posts: 20
Joined: Fri Jul 05, 2019 2:29 am

Re: Nes ROM with 5b sound

Post by Perkka »

lidnariq wrote:
Perkka wrote:I were also planning to not use the RCA outputs on the NES for sound but to have 2 of the on the expansion module, mainly because then i could reroute sound trough famicom cartridges the correct way which i guess would help with having sound levels the way it was intended. i guess it will make a difference at least.
That would require significant rework of the console. The two signals on the expansion port are "input to NES: mix audio in" and "output from NES: final mix" - there's no place for the Famicom's "amplified audio from 2A03" or "audio input to RF modulator" for a cartridge to stick its audio hardware in the middle.

If you compare the Famicom and NES schematic, "output from NES: final mix" is almost the same as "amplified audio from 2A03", but that's not useful without a place to re-inject audio afterwards.
Wouldnt that mean:
"output from nes: final mix" ->exp port reroute -> famicom cartridge -> exp port rca connector (possible with amp circuit) -> TV/Aplifier
be more or less like on a famicom?
lidnariq
Posts: 11429
Joined: Sun Apr 13, 2008 11:12 am

Re: Nes ROM with 5b sound

Post by lidnariq »

Er. Yes.

How are you handling carts that haven't been modified for this, though?
Perkka
Posts: 20
Joined: Fri Jul 05, 2019 2:29 am

Re: Nes ROM with 5b sound

Post by Perkka »

lidnariq wrote:Er. Yes.

How are you handling carts that haven't been modified for this, though?
Possibly a switch that i can use when playing famicom games and when im not.

so ill be able to switch between
"output from nes: final mix" -> exp port reroute -> famicom cartridge -> exp port rca connector (possible with amp circuit) -> TV/Aplifier
and
"output from nes: final mix" -> exp port rca connector (possible with amp circuit) -> TV/Aplifier

Dunno if i could make something sense if the famicom adapter is connected and then have a relay switch between the two routes.


Because wouldn't this way of outputting famicom sound be more correct then the 47ohm resistor mod most people do?
lidnariq
Posts: 11429
Joined: Sun Apr 13, 2008 11:12 am

Re: Nes ROM with 5b sound

Post by lidnariq »

Perkka wrote:Wouldn't this way of outputting famicom sound be more correct then the 47ohm resistor mod most people do?
47 kiloohm.

But meh? It doesn't really matter how the audio is mixed as long as the balance is close enough to correct: you're unlikely to hear a difference between a properly set mixing resistor and recapitulating the Famicom's audio pathway. There's only one exception I can think of – it seems that one game that uses Namco's 163 puts a lowpass filter in the cartridge. This filter would also affect the 2A03's audio in a Famicom, but would only affect the 163's sound in a modified NES. But this pedantic increase in accuracy would sound muddier: subjectively worse.

Speaking of recapitulating the Famicom's audio pathway, the original Famicom is RF-only, and RF-modulated TV audio has so-called "75µs preemphasis", which requires deemphasis hardware (a lowpass filter at 2kHz) inside the TV. I believe I don't see anything to add this preemphasis inside reverse-engineered schematics of the RF modulator, so audio via an RF stage will be muddier than audio via the front-loader's RCA output.
Perkka
Posts: 20
Joined: Fri Jul 05, 2019 2:29 am

Re: Nes ROM with 5b sound

Post by Perkka »

lidnariq wrote:
Perkka wrote:Wouldn't this way of outputting famicom sound be more correct then the 47ohm resistor mod most people do?
47 kiloohm.

But meh? It doesn't really matter how the audio is mixed as long as the balance is close enough to correct: you're unlikely to hear a difference between a properly set mixing resistor and recapitulating the Famicom's audio pathway. There's only one exception I can think of – it seems that one game that uses Namco's 163 puts a lowpass filter in the cartridge. This filter would also affect the 2A03's audio in a Famicom, but would only affect the 163's sound in a modified NES. But this pedantic increase in accuracy would sound muddier: subjectively worse.

Speaking of recapitulating the Famicom's audio pathway, the original Famicom is RF-only, and RF-modulated TV audio has so-called "75µs preemphasis", which requires deemphasis hardware (a lowpass filter at 2kHz) inside the TV. I believe I don't see anything to add this preemphasis inside reverse-engineered schematics of the RF modulator, so audio via an RF stage will be muddier than audio via the front-loader's RCA output.

Ok, i thought there was more issues with the mixing and different volumes, but maybe that was only faulted by the everdrive being bad at reproducing it and not an issue with real carts?
Just know there is some people adding a potentiometer instead so they can tune the volume per game basis because of different volumes, and i thought that was because of the way it was mixed was not as its intended.
User avatar
rainwarrior
Posts: 8731
Joined: Sun Jan 22, 2012 12:03 pm
Location: Canada
Contact:

Re: Nes ROM with 5b sound

Post by rainwarrior »

Well, expansion audio via modded NES needs a configurable volume. Period. Otherwise there will be mismatched mix levels. (Edit: Mismatched when using different cartridges, I mean.)

The 47k fixed resistor was an idea from years ago, at a time when we had a lot less information than we do now about expansion audio. (A maybe naive assumption that the problem could be dealt with at the mapper implementation level... which did not work out, in the end.)

Everdrive and HD-NES both have software level adjustments at this point. PowerPak doesn't have one, but it hasn't been revised/updated in about a decade. In the absence of a software control, you can install a pot instead of a fixed resistor. Solves the same problem, just at a different point in the chain.


If you're building new hardware to support your new mapper idea, for the most widely compatible results I guess you want to build a device that will have the proper mix when a 47k resistor is applied.
Last edited by rainwarrior on Wed Jul 17, 2019 11:03 pm, edited 1 time in total.
lidnariq
Posts: 11429
Joined: Sun Apr 13, 2008 11:12 am

Re: Nes ROM with 5b sound

Post by lidnariq »

rainwarrior wrote:Well, expansion audio via modded NES needs a configurable volume. Period. Otherwise there will be mismatched mix levels.
But that's the entire point of his idea. Recapitulate the mix circuit at the point where they differ (namely: in the original Famicom, cartridge pin 45 is almost identical to the original NES's expansion port pin 22), and export it out the bottom instead of trying to re-inject it.

Or if the NES's use of a 74HCU04 produces too much of a volume difference relative to the 40H368 in the Famicom, maybe instead tap NES expansion port pin 3 instead and rebuild the 40H368-based amplifier instead.

Then again, we already have the problem that the first- and second- party Famicom models from the original runs have different mix levels anyway, so maybe this is still doomed. But I don't have enough domain knowledge to say.
Perkka
Posts: 20
Joined: Fri Jul 05, 2019 2:29 am

Re: Nes ROM with 5b sound

Post by Perkka »

lidnariq wrote:
rainwarrior wrote:Well, expansion audio via modded NES needs a configurable volume. Period. Otherwise there will be mismatched mix levels.
But that's the entire point of his idea. Recapitulate the mix circuit at the point where they differ (namely: in the original Famicom, cartridge pin 45 is almost identical to the original NES's expansion port pin 22), and export it out the bottom instead of trying to re-inject it.

Or if the NES's use of a 74HCU04 produces too much of a volume difference relative to the 40H368 in the Famicom, maybe instead tap NES expansion port pin 3 instead and rebuild the 40H368-based amplifier instead.

Then again, we already have the problem that the first- and second- party Famicom models from the original runs have different mix levels anyway, so maybe this is still doomed. But I don't have enough domain knowledge to say.
Exactly :)
because i believe the first Famicom at least should have correct volume matching, would be quite sad if it didn't.
I have another issue and that is creating a working expo port connector, but that's a whole different story :P

I believe this project with all parts involved will take quite a long time :) (not to talk about my other NES projects)
sdm2
Posts: 46
Joined: Wed Feb 05, 2020 12:59 pm
Location: Poland

Re: Nes ROM with 5b sound

Post by sdm2 »

I have not followed the topic, but maybe something has changed lately: Has anyone tried to convert AY-3-8910 / AY-3-8912 music files, e.g.. PT3 (Pro Tracker v3.xx for the ZX Spectrum) so that they can be played on mapper 69 (Sunsoft 5B)? Or any music format from computers based on the AY3 sound system.
User avatar
rainwarrior
Posts: 8731
Joined: Sun Jan 22, 2012 12:03 pm
Location: Canada
Contact:

Re: Nes ROM with 5b sound

Post by rainwarrior »

Years ago I converted some Atari ST music to 5B NSF when I needed stuff to test that wasn't just Gimmick.

What is the aim of the question though?
sdm2
Posts: 46
Joined: Wed Feb 05, 2020 12:59 pm
Location: Poland

Re: Nes ROM with 5b sound

Post by sdm2 »

Ability to listen to music from ZX to NES.
Perkka
Posts: 20
Joined: Fri Jul 05, 2019 2:29 am

Re: Nes ROM with 5b sound

Post by Perkka »

Would it be hard to convert some PC-98 tunes for the NES? And could someone maybe help me with that? I have started to take another approach on this project.
Instead of adding a YM2149 to the expansion port I plan to add a YM2608. Just don't know how to get POC music for it.

It would also be nice to have it compatible with as many mappers as possible but addressing and conflicts is an issue.


I were planning the need to route some address lines and what else is needed down the exp headers in the cart to the exp port.

EXP 0 : Used by CopyNES in its cartridge reprogramming mode. <- Might be able to use this pin
EXP 1 : Unused
EXP 2 : Used by some Famicom to NES converters as audio input <- feels like it might be a bad idea to use
EXP 3 : Unused
EXP 4 : Unused
EXP 5 : Used by MMC5 cartridges as an open emitter input to the cartridge. <- Can't use this
EXP 6 : Used by the PowerPak and by MMC5 cartridges for expansion audio. <- can't use this
EXP 7 : Unused
EXP 8 : Unused
EXP 9 : Used for exp audio on topLoaders <- Can't use this

That leaves me with 5, possibly 7 lines to use.
i will need atleast
R/W, A14, A13
But I were also planning to route audio to the cartridge to be able to get proper famicom expansion audio mixing.

That makes it 4 of the possible lines used.
It would also be needed to route another one to be able to address FM channel 4-6 and ADPCM on the chip.
Which makes it 5.

I were thinking about using the $4016 OUT1 and OUT2 + data to control wheter the chip is enabled or not sort of the same way @lidnariq had the idea of sending the actual audio data to the chip. but i guess sending audio data that way would take way too much processing power to be viable in practice.
Post Reply