from NES CPU pin 1, can we extract both squares individually

This is an archive of a topic from NESdev BBS, taken in mid-October 2019 before a server upgrade.
View original topic
from NES CPU pin 1, can we extract both squares individually
by on (#241140)
or can it only be extracted as both squares? the same could be asked about pin 2. would it be possible to extract all 3 channels individually?
Re: from NES CPU pin 1, can we extract both squares individu
by on (#241141)
Not possible, without actually hacking the game ROM.
Re: from NES CPU pin 1, can we extract both squares individu
by on (#241142)
If you're trying to make a stereo mod: don't. None of the music was composed/mixed with such in mind. Mono -- deal with it.

NSF players (on Windows, etc.) are a different matter. You can certainly extract individual channels there, if you wish to do so. But this is obviously not using the NES CPU/hardware.
Re: from NES CPU pin 1, can we extract both squares individu
by on (#241143)
ccovell wrote:
Not possible, without actually hacking the game ROM.

I see. thank you for letting me know.

koitsu wrote:
If you're trying to make a stereo mod: don't. None of the music was composed/mixed with such in mind. Mono -- deal with it.

NSF players (on Windows, etc.) are a different matter. You can certainly extract individual channels there, if you wish to do so. But this is obviously not using the NES CPU/hardware.


lol i never said that I was going to do a stereo mod.
Re: from NES CPU pin 1, can we extract both squares individu
by on (#241144)
Pretty sure I started my line with the word if... :-)

But you're effectively wanting the same thing as what stereo modders always seem to want but can't get: to isolate all 5 channels for use in one way or another: viewtopic.php?p=241137#p241137

So with the NES itself, no, can't be done. But if you're wanting NES music split up on a per-channel basis, an NSF of the game(s) you like + an NSF player can do that. A Rasberry Pi with some added circuitry (since it only has digital output via GPIO pins, and you probably want analog?) + slightly modified NSF player code (to send each channel's data to a separate pin) should work. I mention this because your other thread already is discussing use of hardware (re: pots, which are just variable resistors).
Re: from NES CPU pin 1, can we extract both squares individu
by on (#241146)
The math to identify exactly two pulse waves, out of a very limited set of volumes, duty cycle, and pitch, is actually really straightforward.

But it's also completely ridiculous. It would be computationally cheaper to emulate the NES than to do this math.
Re: from NES CPU pin 1, can we extract both squares individu
by on (#241165)
I remember to have seem sometime ago a video of a guy that claimed to have done just that.
Unfortunately the video was removed, maybe it was fake?

I think the Retrousb AVS can do that, but it seems to be a NES on a FPGA.
Maybe if someone implements a full NES CPU on FPGA each channel can have it's own output pin, but it doesn't seems much practical nor straight forward.

Edit: Just in case someone is interested in the thread I posted the (now broken) link: https://forums.nesdev.com/viewtopic.php?f=6&t=16477
Re: from NES CPU pin 1, can we extract both squares individu
by on (#241195)
koitsu wrote:
If you're trying to make a stereo mod: don't. None of the music was composed/mixed with such in mind.

Wholeheartedly agree with this statement. It is one of those things that seems like a cool idea but it just doesn't work. The last version of RockNES by Richard Bannister on the Mac forced stereo, it wasn't even an option to go back to mono, and it really, really sucked.
Re: from NES CPU pin 1, can we extract both squares individu
by on (#241212)
ReverendSA wrote:
ccovell wrote:
Not possible, without actually hacking the game ROM.

I see. thank you for letting me know.


It depends on the game, but I think in a lot of cases the hack might be fairly easy. I think many (most?) games only write to $4015 (channel enable) in a couple places. Games using DPCM might be different case though. But they'll write zero to it at reset, then $0F when enabling the audio. You could then make a Game Genie code to change that $0F, and enable/disable whichever channels you want. If you want to do it with an original cart.