DMC channel

Are you new to 6502, NES, or even programming in general? Post any of your questions here. Remember - the only dumb question is the question that remains unasked.

Moderator: Moderators

atari2600a
Posts: 324
Joined: Fri Jun 29, 2007 10:25 pm
Location: Earth, Milkyway Galaxy, The Universe, M-Theory
Contact:

Post by atari2600a »

tepples wrote:
tokumaru wrote:
Disch wrote:spaced evenly
This would be the hard part, if you are doing anything besides playing the samples. But I guess this would allow for some sort of audio compression, if the decompression engine was simple enough and everything was very well timed.
I believe that's called Big Bird's Hide and Speak. I tried tracing through its audio decompression code. It has about eight "flavors" of compressed sample blocks; they take different amounts of time to decode so each byte just JSRs into a big NOP slide to kill time. Eventually, I said screw it, I'm just writing my own ADPCM playback engine.
Wait, aren't you the member I was able to find a Wiki article on saying you where a fan of Sesame St.? :P

Code: Select all

          *=$0000
loop      JMP loop
          .eof
atari2600a
Posts: 324
Joined: Fri Jun 29, 2007 10:25 pm
Location: Earth, Milkyway Galaxy, The Universe, M-Theory
Contact:

Post by atari2600a »

tepples wrote:
atari2600a wrote:Curious, has anyone ever tried converting an entire song & slapping it into a ROM?
I've done so. But 512 KiB for a <2 minute song is impractical. Better is to do it without DPCM.
I *finally* figured out what was wrong w/ FCEU on my linux distro so I finally got this working. Sounds decent, although it obvious why it sounds bad as it's trance/techno & therefore virtually depends on stereo effects...

Would you be willing to release the source to this? I have some mono-tastic oldskool (1930-ish to 60's) MP3's I'd like to try this out on...

Code: Select all

          *=$0000
loop      JMP loop
          .eof
User avatar
Bregalad
Posts: 8036
Joined: Fri Nov 12, 2004 2:49 pm
Location: Caen, France

Post by Bregalad »

I guess I will tell you my opinion about the DMC channel. You don't have to agreee, but I think this channel really, really suck. Any wav file converted to this format sounds absolutely terrible. Maybe the only game that made good use of it is Gradius II, wich has voices when you select "Speed Up", "Missile", "Laser", etc... Since those words are already written on the screen you know what the voice says, and since the music is playing quite loud you don't notice the terrible quality of the sound, so this sounds cool. Also the last boss says very slow "Speed Up Missile, etc.." when you reach it, and it looks like an weird scream.

Anyways, maybe some Bass Drum can sound decent on the DMC channel if used with other music to cover the hiss noise, but any other drums sounds terrible, not to mention melodic instruments. I'd stick with the noise channel to do drums, listen to Mega Man 6, it has awesome drum patters without any DMC, and maybe it's possible to do even better than this. Batman : Return of the Joker and some other Sunsoft games were able to play bass with DMC, that sounds allright, but it also sounds monotonous and boring, and you can perorm no effects such as slide, vibrato, and the sound is often detuned. Finally, Sunsoft used triangle for drums instead, so this didn't even add one voice, they should have redirected their bass on triangle, and make all drums with noise, this would have sounded better and taken much less space on the ROM.
So I really hate the DMC channel and I probably will never use it at all.

About the manual DMC channel I have nothing against it, but the fact doing anything freezes the CPU pretty much sets the facts. Maybe it could be used for Tales-of-Phantasia like voices, which may sound cool, and good since there wouldn't be this horrible hiss noise present on the automatic DMC channel.
User avatar
blargg
Posts: 3717
Joined: Mon Sep 27, 2004 8:33 am
Location: Central Texas, USA
Contact:

Post by blargg »

Celius wrote:I'm just wondering how that would be possible, because can't you only stick DMC data in $C000-$FFFF? Is the ROM 1024k? I think I may have heard that before actually...
Play more than one DMC sample back-to-back, bank switching your samples out. Also, the DMC can actually play samples from $8000-$FFFF, just the start address is limited to $C000-$FFC0 (it wraps from $FFFF to $8000).
I have to admit, the DMC address byte is a really stupid concept. It would have caused way less problems if they just made it like $2005/$2006, where you can do two writes to it. It's actually kind of dissapointing to know that there isn't that much flexibility with it.
That'd require more bits in the counter. Having only 10 significant bits means they can just hard-wire the low bits of the address to 0, reducing the number of transistors.
Last edited by blargg on Sun Nov 18, 2007 1:57 pm, edited 1 time in total.
Celius
Posts: 2159
Joined: Sun Jun 05, 2005 2:04 pm
Location: Minneapolis, Minnesota, United States
Contact:

Post by Celius »

I guess I wouldn't be able to have too many DMC samples in my games, because I usually just have the engine in $C000-$FFFF, and the game data in $8000-$BFFF. I obviously wouldn't want to bankswitch the engine out, that's like selling your car for gas money. Isn't there something where you can switch 8k at a time?

EDIT: Oh, and Bregalad, while the sound quality of the DMC channel may be low, there are some sounds that the NES just can't make without it. If you absolutely need someone screaming on a game or something, the DMC is the way to go in my mind.

And another question. Do you have to reset the start address every time you play a new sample? Because if you don't, that makes it a lot easier to play stuff from $8000-$BFFF.
tepples
Posts: 22345
Joined: Sun Sep 19, 2004 11:12 pm
Location: NE Indiana, USA (NTSC)
Contact:

Post by tepples »

Bregalad wrote:Anyways, maybe some Bass Drum can sound decent on the DMC channel if used with other music to cover the hiss noise, but any other drums sounds terrible, not to mention melodic instruments.
The drums in Super Mario Bros. 3 sounded OK.
Celius wrote:I guess I wouldn't be able to have too many DMC samples in my games, because I usually just have the engine in $C000-$FFFF, and the game data in $8000-$BFFF. I obviously wouldn't want to bankswitch the engine out, that's like selling your car for gas money. Isn't there something where you can switch 8k at a time?
Yeah. It's called MMC3, and SMB3 uses it.
And another question. Do you have to reset the start address every time you play a new sample? Because if you don't, that makes it a lot easier to play stuff from $8000-$BFFF.
But if you play $FFC0 through $8xx1, you also get garbage from the vectors.
Celius
Posts: 2159
Joined: Sun Jun 05, 2005 2:04 pm
Location: Minneapolis, Minnesota, United States
Contact:

Post by Celius »

I think the drum in Mario 3 sounded great. I always use that as an example when trying to explain the DMC channel to people who don't know anything about the NES.

I was also thinking about playing $FFC0-$FFFF. You would get garbage from the vectors, but it wouldn't be that noticable, would it? It's just 6 bytes... I tried to start a little later in my sample by making the start address higher by #$40, and you could barely even tell the difference. So I don't think 6 bytes would be that noticable. I could be wrong though.
User avatar
Bregalad
Posts: 8036
Joined: Fri Nov 12, 2004 2:49 pm
Location: Caen, France

Post by Bregalad »

I'd prefer have a scream made with a square wave that sounds fun that a laughable recorded scream that is made with DMC that sounds 2000% fuzzy and that will make people think "Am I supposed to be impressed by them making such a sound out of the NES ?".

And yes the drums in SMB 3 sounds almost decent, but they only play 2 notes that are detuned and that sounds horrible. I guess they chose a pitch that is a multiple of the frequency they converted to or something so that the conversion end up with better results. Anything I try to convert to DMC sounds just horrible. Exept for brown noise, wich is the only thing DMC can do. Kick drum is close enough to brown noise if it's a really short kick.
User avatar
Disch
Posts: 1848
Joined: Wed Nov 10, 2004 6:47 pm

Post by Disch »

I think your problem is you're expecting the DMC to sound like the original wav. It's not going to.

The DMC has a sound all its own. The second you start comparing it to other (superior) mediums you're dooming your opinion of it.
strangenesfreak
Posts: 155
Joined: Thu May 03, 2007 3:07 pm
Contact:

Post by strangenesfreak »

Could a game specialized for a PowerPak pop some sample bytes (either Raw PCM or DPCM) off of extra files on the CF card and rewrite the PRG chip's space for samples every frame? If such a game could pop off enough bytes at a decent speed - and the PowerPak's file loading routines and its mapper don't interfere with too much of the CPU space, I think it could be plausible. But even then, it'd be tricky - but wouldn't be too impossible - to limit the programming structure of such a game to support the routines.
NotTheCommonDose
Posts: 523
Joined: Thu Jun 29, 2006 7:44 pm
Location: lolz!

Post by NotTheCommonDose »

A good example of the DMC/PCM channel.
http://www.zophar.net/roms/files/nes/tmntdemo.zip :D :)
User avatar
Bregalad
Posts: 8036
Joined: Fri Nov 12, 2004 2:49 pm
Location: Caen, France

Post by Bregalad »

Disch wrote: The DMC has a sound all its own. The second you start comparing it to other (superior) mediums you're dooming your opinion of it.
Yes, and what I say is that it's own unique sound sound crappy to me.

So instead of considering the DMC channel as an ability to play sample, you consider it as a channel that can output a customiseable stream of fuzzy junk that is supposed to be usefull to the programmer (maximal sarcasm) ?

Note that this remembers me an older debate about the sound of the Genesis, some said it sounded good in some case, and some said it sucked.
User avatar
Disch
Posts: 1848
Joined: Wed Nov 10, 2004 6:47 pm

Post by Disch »

You must really hate the noise channel, then. =P
Celius
Posts: 2159
Joined: Sun Jun 05, 2005 2:04 pm
Location: Minneapolis, Minnesota, United States
Contact:

Post by Celius »

Actually, I have to say that I don't really care for the noise channel. It is what it is, and I guess I have to work with it, but I think it outputs really odd sounds, half of which I'll never use.
tepples
Posts: 22345
Joined: Sun Sep 19, 2004 11:12 pm
Location: NE Indiana, USA (NTSC)
Contact:

Post by tepples »

Bregalad wrote:So instead of considering the DMC channel as an ability to play sample, you consider it as a channel that can output a customiseable stream of fuzzy junk that is supposed to be usefull to the programmer (maximal sarcasm) ?
That or just a timer that can replace the scanline timer on a mapper. A couple Codemasters games do this.
Post Reply