Getting Instruments From NES Games

This is an archive of a topic from NESdev BBS, taken in mid-October 2019 before a server upgrade.
View original topic
Getting Instruments From NES Games
by on (#83239)
Hey there,
There's a game I want the NSF to but since the NSF cannot be ripped, I decided to do a Famitracker cover. What I want to know is if there is a way to get the instruments from a game that hasn't had its NSF ripped? The game uses pretty simplistic square waves. I just need to know the volume of the instruments, the duty cycle (it's either 25% or 75%) and the volume the noise channel is playing. The game is Roundball 2-on-2 Challenge.
Thanks!

by on (#83240)
What does "can not be ripped" mean? All NSFs are rippable.

by on (#83241)
Gil can't rip it and he's not going go try anymore. Him and Memblers say the game's spaghetti coded. So basically I have no chance in getting the NSF for it unless I cover it in Famitracker.

by on (#83242)
Get the game to a music test or other area where sound effects are unlikely to be played, then log writes to $4000-$400F and $4015-$4017 in a debugging emulator. Finally, distill the logs to pick out the instruments.

by on (#83243)
@Tepples: The game doesn't have a music test but the title music plays all the way through without any sound effects. The title music doesn't loop though and after that it goes to the main menu. I know nothing about 6502 though. I know how to write breakpoints but that's it.

by on (#83251)
That game doesn't even have instruments.

by on (#83255)
Well, Gil is ripping it right now because I couldn't stop asking. Though this isn't the only game I want the instruments to. There are two more but they're not life support or anything, but these two games Gil said were possible NSF2 games. They're also spaghetti coded and developed by RSP.

by on (#83256)
Doommaster1994 wrote:
Well, Gil is ripping it right now because I couldn't stop asking. Though this isn't the only game I want the instruments to. There are two more but they're not life support or anything, but these two games Gil said were possible NSF2 games. They're also spaghetti coded and developed by RSP.


I really wish someone would describe to me what is meant by "instrument". I mean...I know what the hell an instrument is. But from the standpoint of a square channel, a triangle channel, and a noise channel I really can't equate the meaning of "instrument" with anything those channels produce. DPCM is of course another matter.

For the non-instrument channels I guess the only thing I can think of that is vaguely "instrument"-ish is the static configuration of the channel registers to produce a tone (one of a set of tones) with a specific "modulation" such as different duty cycle for the PCM. If it is that kind of "instrument" you're after, then there's a finite set of them available by the finite bit configurations possible in the channel registers for the same "tone". If, however, you mean the dynamic changing of a channel's registers to produce sequenced, possibly quickly-repeating changes (essentially time-division multiplexing different channel register configurations to produce an audible "instrument", then I would think there are an infinite set of those...and how the heck do you pick? It's like saying "I want *that* violin...not the one right next to it that was mass produced in the same factory at exactly the same time but by a different machine, from a different tree, etc..."

And yes I am aware that music trackers since the dawn of music trackers have referred to waveforms played on sound channels as "instruments". Perhaps it is just a legacy thing?

by on (#83257)
Instrument means Volume/Pitch/Duty envelope. This game just beeps, no envelopes here.

by on (#83261)
I know and the two other games I want the instruments from does that. I just needed the instruments to this game and I got them now.

by on (#83269)
In the case of unripped music, you can always record the emulated audio (each channel of it) to wave format, open the files in an audio editor, and use your eyes, ears, and an analysis plugin or two to decipher aspects of the audio. It's a fairly tedious process, but easier than ripping NSFs if you know nothing about 6502.

For instance, the duty of a square wave is instantly identifiable by waveform upswing and downswing. A 50% duty square wave will contain equal upswing and downswing, whereas a 25% square will contain 25% upswing and 75% downswing. A 75% square will contain the exact inverse. For a square with quickly-alternating duty (or quickly-alternating "anything"), you'll have to divide the audio into frames by using cue points.

Again, it's tedious but it works.