Famitracker http://famitracker.shoodot.net/ is a tracker running on Windows emulating the NES audio chip. You can create your own instruments and compose within the limitation of the real hardware. Then you can either export it as .nsf (nintendo sound format, readable by the origininal NES) or as a .wav.
An alternative to this is "magical 8 bit plugin" developed by YMCK, a famous 8-bit Jazz band from Japan. You can d/l it for free on http://www.ymck.net/english/download/index.html
Eventually, you can go the hardcore way. Buy a Gameboy for 8$ and a USB Cartdrige for around 40$ and then load LSDJ on it. LSDJ is a 4-channel tracker running on the Gameboy.
There are tons of software running on old machines, I could speak about this for pages and pages. But if I can give you one advice, use Famitracker, it is the quickest and cheapest way to get 8-bit sounds really close to the original and sounding the way you want it to sound. The last version of the soft is really more user-friendly than before. If you have troubles getting sounds out of it you can shoot me an email