NESDev and Strangulation Records messageboards
Forum Index | FAQ | New User | Login | Search

Previous ThreadView All ThreadsNext Thread*Show in Threaded Mode


SubjectRandom generator new  
Posted bybeneficii
Posted on8/4/03 01:05 AM
From IP68.18.197.89  



I know that in 400E, there is a random generator, but how would it be implemented? Is it even widely used? I remember hearing that you write to the last bit of it, and it somehow provides a number. Tell me, how would this work?






SubjectRe: Random generator new  
Posted byDisch
Posted on8/4/03 01:25 AM
From IP66.127.105.177  



I think the Random Number Generator you're thinking of is part of the Noise channel hardware (it's an internal 15-bit register). AFAIK it's only used to determine the noise channel's output and isn't used in any games or anything (I don't even think there's any way for the games to read the contents of the register)

If you want the details on it... the doc is here:
http://nesdev.parodius.com/NESSOUND.txt

The random number generator is at the very bottom.


Writing to 400E doesn't change the contents of the 15-bit register.. it just slightly changes the method of the generated numbers, and changes the wavelength (pitch) of the of the played sound.

Reading from 400E is technically illegal since it's a write-only register... so if you try it you might get garbage (the doc says $40 will probably be returned)




SubjectRe: Random generator new  
Posted byMemblers
Posted on8/4/03 02:26 AM
From IP68.58.99.218  



Yeah, $40 will always be returned because it was last value on the data bus. It was the high byte of $400E.

That effect shows up when reading $4016, too. It returns $4x.




SubjectRe: Random generator  
Posted bybeneficii
Posted on8/4/03 04:18 AM
From IP68.18.197.89  



Okay, because I remember the nessound.txt doc saying that it is a pseudo-random number generator. I couldn't understand what he was talking about, so I brought it here.






SubjectRe: Random generator new  
Posted byTimW
Posted on8/4/03 06:47 AM
From IP209.178.188.250  



the generator is used on the noise channel for crappy sounding effects. you know when you have the tv on channel 3 and it sounds like "ppsssss" that's what it does, it's sound with random amplitude. and thats what the generator is for, I've been using nnesster or something like that to test my emulators sound because it lets you turn on and off the individual sound channels. use that if you want to know if a game uses the noise channel, from what I see a lot do.




SubjectRe: Random generator new  
Posted byreapersms
Posted on8/4/03 7:39 PM
From IP66.153.56.194  



Random pedantic pickiness:

The NES noise channel is not a signal with random amplitude, it's a signal with random durations of amplitude. When the output bit of the noise generator is high, the NES sends out the volume setting for the channel either from the volume reg or the output of the enveloping. When it's low, the NES sends out 0.

It's a safe bet to say that most games use it, as it's handy for any sort of explosion or swishy wind sound.




SubjectRe: Random generator new  
Posted bybeneficii
Posted on8/5/03 00:29 AM
From IP198.146.142.168  



Okay. In that case in our project it would probably be used for sound effects.






SubjectRe: Random generator new  
Posted byDisch
Posted on8/5/03 00:56 AM
From IP66.127.105.177  



It's also commonly used in music for snare-drums, cymbals, etc. In fact... most songs that lack usage of the Noise channel sound empty (imo anyway).




SubjectRe: Random generator new  
Posted byMemblers
Posted on8/5/03 9:16 PM
From IP68.58.99.218  



The Dragon Warrior series on NES never used noise in it's music (except for one song in DW3), I think it managed to get by pretty well. But generally, yeah, music will sound sorta thin without any noise.




SubjectRe: Random generator new  
Posted byDisch
Posted on8/5/03 9:42 PM
From IP66.127.105.177  



Utlima: Exodus got away with it too. The second song on the NSF (the song played when you form your party) is one of my all-time favorite NES songs. Does it with just 3 channels o_O




SubjectRe: Random generator new  
Posted bybeneficii
Posted on8/6/03 06:03 AM
From IP68.18.197.89  



Didn't Final Fantasy also get away without using it? I remember in Nobuo Uematsu's interviews, in which he said there were only 3 sound channels. He also said that he didn't start synthesizing instruments until Final Fantasy games started coming out for the SFC/SNES. I interpret that to mean that he had no use for the noise channel. Correct me if I'm wrong, but that's what I remember.






SubjectRe: Random generator new  
Posted byDisch
Posted on8/6/03 06:11 AM
From IP66.127.105.177  



I don't think any of the NES FF's used the Noise channel... except for maybe 2 or 3 songs on FF3.

I'm not thrilled about FF1's music though =P. The battle theme is good though.




Previous ThreadView All ThreadsNext Thread*Show in Threaded Mode
Jump to

Memblers' homepage             Contact Me

Forums powered by WWWThreads Demo