Page 5 of 10
Re: The NES vs. its contemporary competition
Posted: Wed Sep 03, 2014 6:20 pm
by Movax12
The current direction of this discussion reminded me of:
viewtopic.php?t=7496
Also (further in that thread):
http://blog.kevtris.org/blogfiles/nes%20tia/
Re: The NES vs. its contemporary competition
Posted: Wed Sep 03, 2014 6:33 pm
by Dwedit
OneCrudeDude wrote:The C64 was a pinnacle of American Engineering. It could emulate almost any kind of sound you threw at it, when the NES needs expansion audio. On the flipside, as Rainwarrior said, it has an obscenely loud and harsh sound, and everything just sounds crude. Doesn't the C64 also suffer from some form of power parasitism? One of the components starves the SID of power (or vice versa), which might explain that sound.
Also, I read conflicting information about the Game Boy's audio. Some sources say that it had selectable sound channels not unlike the SID (at least, channel 3 could be either triangle or sawtooth while channel 4 could be either noise or DPCM), while many others say it actually used wavetable synthesis for channel 3. And could the original Game Boy play DPCM samples like the NES? I know there are some GBC games that make heavy use of DPCM, but only a handful of Game Boy games used the sample channel period. I think Pokemon Yellow is the most prominent example.
The GB wave channel is used by almost all games. 32 samples, 4 bits per sample. Some games just make it a square wave, but any tiny wave would fit in there.
Game boy games generally don't play long voice samples, since it takes so much CPU usage to keep feeding out 32 samples over and over again.
Re: The NES vs. its contemporary competition
Posted: Wed Sep 03, 2014 6:38 pm
by lidnariq
OneCrudeDude wrote:Also, I read conflicting information about the Game Boy's audio. [...] channel 3 could be either triangle or sawtooth [...] while many others say it actually used wavetable synthesis for channel 3
Channel 3 on the gameboy, is a single wavetable. Partially controllable volume (full, half, 1/4). Thirty-two four-bit samples in length. So it can be a triangle, just like the NES, or almost anything else chippy.
See the
pandocs.
while channel 4 could be either noise or DPCM).
Channel 4 is almost identical to the noise channel on the NES, although they chose a different short polynomial so when selected it's more nearly tonal. Maybe. It uses a 2^22 Hz master clock, so I don't know that the 1.02MHz÷63÷{0.5,1 though 7} tones come out any more enharmonic with Just Temperament than the NES's somewhat-arbitrary 1.79MHz÷93÷random numbers.
And could the original Game Boy play DPCM samples like the NES?
No compressed formats in hardware. It's possible to dynamically change the contents of the wavetable as it runs, though.
Re: The NES vs. its contemporary competition
Posted: Wed Sep 03, 2014 6:55 pm
by Shonumi
The GBC was much more amicable than the DMG to processing voice samples in Sound 3 (its wavetable) thanks to its double-speed mode (takes 1/2 the time to generate and update wavetable entries). Perfect Dark and Army Men II make great examples of it. Just about every sound effect in PD seems to use it (gunshots, footsteps, voiced dialog), but Rare always seemed to push the limits of whatever system it used. Except for voice samples that did not need tight timing (or when nothing else is going on) I do not recall Sound 3 being frequently used on the DMG for detailed, synthesized sounds. As mentioned above, Pokemon Yellow is the only one I can think of off the top of my head. If any one else has DMG examples, I would love to hear more about them

Re: The NES vs. its contemporary competition
Posted: Wed Sep 03, 2014 6:56 pm
by OneCrudeDude
Interesting, thanks for the info.
I've always wondered what kind of sound channels the 2600 used. They don't quite sound like square waves, but what else could they be?
@Shonumi: I know the Game Boy port of Joe and Mac has a dinosaur voice sample play before you fight the boss.
Re: The NES vs. its contemporary competition
Posted: Wed Sep 03, 2014 7:33 pm
by rainwarrior
OneCrudeDude wrote:The C64 was a pinnacle of American Engineering. It could emulate almost any kind of sound you threw at it, when the NES needs expansion audio. On the flipside, as Rainwarrior said, it has an obscenely loud and harsh sound, and everything just sounds crude. Doesn't the C64 also suffer from some form of power parasitism? One of the components starves the SID of power (or vice versa), which might explain that sound.
No, what I was referring to is that there is no per-channel volume control. Each channel has an ADSR, but this envelope always goes to full volume. There is a global volume control that will fade all three channels at once, and there is a filter which can be applied to any of the channels but it only has global settings, not per-channel (it also had poor consistency across machines, many composers avoided it because of this). As such, there is no easy way to make one channel quiet while another is loud. This is part of the reason why the triangle is more sparingly used on SID, it doesn't compete with the pulse or saw very well. Another trick is to release a note before the attack has finished, which can make a non-sustaining note that doesn't go to full volume. It's a limited technique, but it's enough to have a little bit of volume control. Of course, the ADSR is also fickle and sometime fails.
So, ultimately every way of trying to get per-channel volume on the SID is a bit of a pain. Use the dull timbre of triangle for "quiet" parts. Use the filter to make something quiet, and pray it works on most machines. Abuse the ADSR, usable only without sustain, and sometimes it will fail anyway and produce erratic loud notes. etc.
The parasitic power thing was merely a constant bias on the amplifier that (unintentionally) would let you use the global volume control as a 4-bit DAC under full CPU control. When they revised the SID, though, they used an amplifier with a much smaller bias, so it made things using this trick extremely quiet. So, this was fairly well known, and doesn't really have to do with making music on the chip. Mostly it was used for stuff like speech samples.
Re: The NES vs. its contemporary competition
Posted: Wed Sep 03, 2014 7:44 pm
by Shonumi
OneCrudeDude wrote:
@Shonumi: I know the Game Boy port of Joe and Mac has a dinosaur voice sample play before you fight the boss.
Hey, thanks for the heads up. Looked at a YouTube playthrough and I immediately saw what you were talking about. Impressive that you could still move around while the sample plays. There is no hit detection while it plays though? That'd save a lot of cycles necessary for it. Glad you brought that to my attention; it looks technically interesting at any rate.
Re: The NES vs. its contemporary competition
Posted: Wed Sep 03, 2014 7:51 pm
by lidnariq
OneCrudeDude wrote:I've always wondered what kind of sound channels the 2600 used. They don't quite sound like square waves, but what else could they be?
Weird binary with non-uniform on/off times.
nocash's documentation.
Re: The NES vs. its contemporary competition
Posted: Wed Sep 03, 2014 8:29 pm
by OneCrudeDude
Shonumi wrote:OneCrudeDude wrote:
@Shonumi: I know the Game Boy port of Joe and Mac has a dinosaur voice sample play before you fight the boss.
Hey, thanks for the heads up. Looked at a YouTube playthrough and I immediately saw what you were talking about. Impressive that you could still move around while the sample plays. There is no hit detection while it plays though? That'd save a lot of cycles necessary for it. Glad you brought that to my attention; it looks technically interesting at any rate.
It probably has to cut cycles from other areas while the sample plays, though I think hit detection might be on (player was able to collect something while the sample played). At the final boss, the heart does not start beating until the sample ends, and notice how the player does that surprised look, also right after the sample plays. If it was beating while the player got there, it probably would stop beating to play the sample, and then resume.
Re: The NES vs. its contemporary competition
Posted: Wed Sep 03, 2014 8:57 pm
by Memblers
OneCrudeDude wrote:Interesting, thanks for the info.
I've always wondered what kind of sound channels the 2600 used. They don't quite sound like square waves, but what else could they be?
It's basically an LFSR with a short period before it repeats, similar to the NES 'periodic noise'. POKEY chip uses that method too, I like it's sound. It was mentioned the POKEY has 8-bit frequency control, but it also has a combined mode where you only have 2 channels with 16-bit frequency. Atari must have liked it pretty well too, at one point they were making quad-core versions of it. I bought a cheap, broke-down Millipede arcade game, at first I was like WTF when I saw that it uses 2 POKEYs. It seems like every enemy type has a sound channel dedicated to it, and it's actually useful when the game starts getting intense.
Another sound chip that uses type of synthesis was in the Atari Lynx. It's LFSR, but for each channel it lets you select the taps and seed value, and I think that is a really cool idea. But I've played some Lynx games (not a lot of them), and I've only ever heard the music use square waves and noise.
Re: The NES vs. its contemporary competition
Posted: Thu Sep 04, 2014 5:01 am
by Bregalad
No, what I was referring to is that there is no per-channel volume control.
If I remember well, there was an easy trick that could be done to simulate per-channel volume, by tricking the ADSR enveloppe. I don't remember, but it was like, setting attack and decay to 0, and the sustain level to your volume. After that, whenever you wanted to change the volume, you had to send a key off and immediately a key on again.
At least I know I managed to pull that trick to completion back when I did some C64 experiments.
Re: The NES vs. its contemporary competition
Posted: Thu Sep 04, 2014 6:03 am
by tepples
I have programmed an audio engine for a GBA game. Apart from a pair of PCM channels, it's the same as that of the original Game Boy. And channel 3 (called triangle in my audio engine after the corresponding NES channel) is in fact 32-step 4-bit wavetable with a 3-position volume control implemented as bit shifting. Once I made a wavetable editor for the GBA in C; I wonder if I still have it.
lidnariq wrote:I don't know that the 1.02MHz÷63÷{0.5,1 though 7} tones come out any more enharmonic with Just Temperament than the NES's somewhat-arbitrary 1.79MHz÷93÷random numbers.
They're predictably C, D, F, G#, good for covering the underground theme in SMB2 or "Wish" by Nine Inch Nails. And I thought it was a 127-step sequence, not a 63-step sequence.
Re: The NES vs. its contemporary competition
Posted: Thu Sep 04, 2014 6:14 am
by Bregalad
I have programmed an audio engine for a GBA game. Apart from a pair of PCM channels, it's the same as that of the original Game Boy.
You forget to mention thast the PCM channels can be coupled easily with DMA1 and DMA2 in order to be refilled automatically, creating an easy way to stream arbitrary audio without monopolizing the CPU.
Re: The NES vs. its contemporary competition
Posted: Thu Sep 04, 2014 6:22 am
by Shonumi
The GBA wavetable could be banked as well, resulting in 64 4-bit samples if the programmer desired.
Re: The NES vs. its contemporary competition
Posted: Thu Sep 04, 2014 6:58 am
by ccovell
Memblers wrote:But I've played some Lynx games (not a lot of them), and I've only ever heard the music use square waves and noise.
(Since we're all over the place, topic-wise...)
Yeah, most games on the Lynx have simply terrible sound, but I recommend tracking down anything by Paul Tonge (Dracula, Jimmy Connors' Tennis, Malibu Volleyball, Battlezone...) as it's excellent, very Turbografx-like. Also Robotron is pretty good. The rest of the games... nah.