Deprecated: mysql_connect(): The mysql extension is deprecated and will be removed in the future: use mysqli or PDO instead in /storage/content/49/145849/famitracker.com/public_html/forum/classes/dbHandler.php on line 29 FamiTracker
Login:
Menu:
Post: Author:
FamiTracker > General > FamiTracker Talk > What is it that a sound chip does? Owner: Naff_Natty New post
Page 1 of 1 Sort:  
What is it that a sound chip does? Posted: 2012-07-25 18:22 Reply | Quote
Naff_Natty

Avatar

Member for: 3727 days
Location: Behind you
Status: Offline

#37208
Okay, so me and a friend who have very little knowledge of sound chips have been having a discussion and we're curious to learn more. Here's the crux of our confusion:

I'm told that the sound chip "produces" sounds in a console, but it doesn't actually physically make the sounds, the way a speaker would, does it? I seem to remember the sound coming out of the TV speakers when I had consoles back as a kid. This being so, how is a sound chip any different to a sound card/ computer processor, in a modern day PC, which I assume processes the sound data and sends it to the speakers? What are the actually logistics (in layman's terms, please) of this "production" of sound?

Enquiring minds need to know.

Posted: 2012-07-25 19:17 Reply | Quote
PaulMannIV

Avatar

Member for: 3661 days
Location: Louisville Ky
Status: Offline

#37209
I do know this about the Konami VRC6 Chip. It adds the three additional channels (2 Squares and a Sawtooth), but a lesser known, but useful function is the reduced lag. I've compared Castlevania 3 and Akumajou Densetsu side by side and the latter showed noticeably less lag than the Western Release.

The technology to use these chips were limited to the Famicom. Nintendo of America didn't want the chips to be used on the NES. Also, games that used any sound chips were far and few between because Nintendo wanted exclusive rights, etc.

Without the sound chip (if one is used), you'd only be able to hear the 2A03 channels, obviously. What it directly does, I'm not completely sure. Somebody else knows around here; probably the admin or moderator. They'd explain in much more detail.

_______________________
Smogon, Famitracker, YouTube...
So many places, so little creativity left...
Posted: 2012-07-25 20:21 Reply | Quote
jrlepage
Moderator

Avatar

Member for: 4983 days
Location: Canada
Status: Offline

#37211
I don't think that's the information Naff was looking for, Paul..

_______________________
Follow me on [url=https://twitter.com/jrlepage2a03]Twitter.
I record (some) NSFs on hardware. Feel free to [url=http://www.famitracker.com/forum/posts.php?id=3633]request a hardware render.
Posted: 2012-07-25 21:23  (Last Edited: 2012-07-25 21:25) Reply | Quote
zephemeros

Avatar

Member for: 3944 days
Location: Campbell River, British Columbia
Status: Offline

#37213
The best I could tell you is that the sounds are produced by a sort of "pulse" of electricity. For example:

A 50% duty square would look like this (0 = off, 1 = on)
1 1 1 1 0 0 0 0

A 25% duty pulse wave would look like this:
1 1 0 0 0 0 0 0

And a 12.5% duty pulse wave would look like this:
1 0 0 0 0 0 0 0

These relatively simple waveforms are then modified to produce more complex waveforms. Their amplitude is shaped by using "attack", "decay", "sustain" and "release" time periods.

That's pretty much all I could tell you, and it may be wrong (I wouldn't be surprised if it is, in one way or another.)


_______________________
| [url=http://www.youtube.com/zephemeros1]youtube | [url=http://www.soundcloud.com/zephemeros]soundcloud |
Posted: 2012-07-25 21:34  (Last Edited: 2012-07-25 21:35) Reply | Quote
jrlepage
Moderator

Avatar

Member for: 4983 days
Location: Canada
Status: Offline

#37214
The most I know is that the 2A03, just like any other 'sound chip' of the era, is more than just a sound chip. It always offers more functionality and "oh yeah it makes noise too", basically. The 2A03 is, first and foremost, the NES CPU - Nintendo just told Ricoh to squeeze in some sound capabilities in there so they didn't have to increase the cost of the machine further by including a separate chip just for sound (like Sega did with the MasterSystem and Genesis/MegaDrive systems).

The way I understand things is, the ROM sends data to the address that corresponds to the sound registers. Witchcraft happens. The signal goes through a Digital-to-Analog Converter (you weren't designed to decode an electrical signal so you have to transform it to something your ears can pick up).

People like jsr, rainwarrior, Jarhmander or anyone over at nesdev could explain it better than I ever could, but basically that's how it works.

Oh and before you ask, not all sound chips were CPU+APU combos. As PaulMannIV pointed out, the VRC6 - like all other Famicom sound expansions bar 2C33- is a mapper that divides memory into banks (I don't think the 'lag' has anything to do with the VRC6 being present or not). I'm not sure what the 2C33 did, but it's present in the Famicom Disk System's RAM chip, and it does something else as well as FM audio.

Again, if you wan technical answers, I recommend you go over to the NESDev forums (use your google-fu), or their IRC channel if you want live discussion.

_______________________
Follow me on [url=https://twitter.com/jrlepage2a03]Twitter.
I record (some) NSFs on hardware. Feel free to [url=http://www.famitracker.com/forum/posts.php?id=3633]request a hardware render.
Posted: 2012-07-25 21:48  (Last Edited: 2012-07-25 21:52) Reply | Quote
Roykeru

Avatar

Member for: 3777 days
Location: Milky Way
Status: Offline

#37216
Sound chips are generally a bunch of microscopic circuits and logic gates. Depending on the type of chip you are looking at they can contain oscillators, filters, samplers, and envelopes. All sound chips have oscillators which produce the sound, and this can be done in various ways like for a square wave it involves regulating voltage. After the sound is made in an oscillator it heads out to a filter, envelope or both in the chip then will head to your speaker.

Sound cards today are different than what you find in old systems in that they really don't and can't as far as I know make noise through the use of the hardware. Today soundcards just decodes and outputs the information that is sent to it from the computer into sound.

Different chips have different ways of making sound and can vary greatly like between a FM chip and just the nes.

Generally if you want more information your going to want to Google it. It can be quite complicated as I found when I did some research on it a few months ago.

Posted: 2012-07-25 22:21 Reply | Quote
rainwarrior

Avatar

Member for: 4150 days
Location: Canada
Status: Offline

#37217
It just outputs a voltage that is the sound signal.

Connect that voltage to a speaker circuit and the speaker moves back and forth as the voltage goes up and down.

Put that speaker in some air and the air gets compressed and decompressed as the speaker moves back and forth.

Put your ear in those air waves, and those compression waves resonate with hairs in your ear that cause your brain to percieve sound.

Posted: 2012-07-26 02:56  (Last Edited: 2012-07-26 02:57) Reply | Quote
TechEmporium

Avatar

Member for: 4485 days
Status: Offline

#37226
Roykeru, jrlepage & rainwarrior got it right.

A stand-alone sound chip is a function generator; it's a chip that generates a continuous digital pattern. When the voltage/current going into certain pins of the chip is varied, you get varying effects (such as duty cycle changes, amplitude/volume changes, frequency/tone changes, etc.).

One way to control the voltage & current is through pure hardware (i.e.: resistors, capacitors, capacitive/inductive filters, amplifiers, etc.). Another way is to use a microprocessor or a microcontroller as a replacement for such hardware (provided that it's programmed properly). This sums up jrlepage's words.

In an NES' case, the 2A03 is 2 chips in 1 (a microprocessor/CPU & a function generator). The cartridge has the programming instructions for the CPU to vary the voltage & current going into the function generator's pins. This sums up Roykeru's words.

And lastly, what rainwarrior said. Once the CPU controls the function generator, the resulting waveform is sent out of the 2A03 & sent into an amplifier, which is then sent to Audio Out. As long as it's hooked up to speakers, the waveform will be heard in the form that you're used to hearing. This is done when the waveform's changing voltage levels moves the coils of the speaker back & forth, which then causes the speaker's cone to compress/decompress the air in front of it, producing sound waves.

Technically, any continuous voltage output will produce some kind of a sound. If you plug a 9 V battery into a speaker, it will pop. If you were to hook up a transformer to a wall outlet to drop its voltage, you could put the output to a speaker & you'll hear a steady flat-line tone. If you were to hook up some 555 timers & capacitors into a circuit, you'll hear the same sound, but oscillating like a siren. If you were crazy enough, you could even hook up a blender's motor to speakers & have each different speed button play a different note. The point is that sound is produced through varying voltage & current (& this is done either through pure hardware, or through programmable hardware made to replicate this action).

_______________________
Technology: the one thing that's hated & cursed at by all engineers, technologists, scientists & technicians!

(Lousy modern technology! )
Posted: 2012-07-28 15:06 Reply | Quote
gyms



Member for: 4183 days
Status: Offline

#37371
+1 this thread
good answers to a good question : ))

Posted: 2012-07-28 22:50 Reply | Quote
Naff_Natty

Avatar

Member for: 3727 days
Location: Behind you
Status: Offline

#37384
Cheers guys. This has been very informative

Page 1 of 1 Sort: