The noise channel is channel number 4 and outputs, well, a "noisy" sound. As with all the sound stuff I talk about here, the info comes from The NES Sound Doc.
The technical description of what the "noise" is, is random frequencies. The reason this isn't described with the other sound channels is for 3 reasons:
The features of the noise channel are as follows:
On to the registers!
The Noise Channel registers are at $400C-$400F; the noise channel is enabled with (setting to 1) bit #3 of $4015. Let's see what they do! :)
Register $400C is the same as $4000, except bits #6-7 are unused.
Register $400D is totally unused.
Register $400E controls how fast the frequency goes from random frequency to random frequency or something like that, I'm not sure. The sound doc describes it as "playback sample rate". The bits are:
Register $400F is the same as $4003 (except first 3 bits are unused), I just write whatever to it. You can still write #$AB to it if you want, I guess.
If you really want to know, I'm not sure what it means, but bits #3-7 are the "length counter load value". This may or may not have something to do with the frequency.
To enable the Noise Channel, set bit #3 in $4015. Like so:
lda #%00001000
sta $4015
Again, I'll make a full code listing just because I'm way too much of a nice guy. Here it is:
;;---CODE START---;;
.inesprg 1
.inesmap 0
.inesmir 1
.ineschr 0 ; note that we have no CHR-ROM bank in this code
.bank 1
.org $FFFA
.dw 0 ; no VBlank routine
.dw Start
.dw 0 ; we'll get to this at a later time
.bank 0
.org $8000
; note that I just copy/pasted code from the register sections
Start:
lda #$FF ; Like $4000 we just write all 1s 'cause
sta $400C ; we don't mind all the stuff in there being "on".
lda #$50 ; play rate of 5 (5), lower sounding mode (0)
sta $400E
lda #$AB
sta $400F
lda #%00001000 ; enable Noise Channel
sta $4015
infinite:
jmp infinite
;;--- END OF CODE FILE ---;;
Assemble and Listen! That code is just a modified version of the previous code file in Day 14. This code sounds like static, I realize thats what the Noise Channel does, but I mean this really sounds like radio or TV static (sorta). It could also be water if you stretch your imagination a little.
Hope you liked that, The DMC Channel will happen when I figure it out. So there. Hope you have fun with that! :)
Also, be sure to read through the sound doc for all the complete tech info.
Happy listenings (again!),
-Mike H a.k.a GbaGuy