What the NES Would Sound Like if it Were an Atari 2600

Discuss NSF files, FamiTracker, MML tools, or anything else related to NES music.

Moderator: Moderators

tepples
Posts: 22345
Joined: Sun Sep 19, 2004 11:12 pm
Location: NE Indiana, USA (NTSC)
Contact:

Post by tepples »

If "false pitch dividers" is what I think you mean, then yes, as was explained to me on IRC.
User avatar
kevtris
Posts: 504
Joined: Sat Oct 29, 2005 2:09 am
Location: Indianapolis
Contact:

Post by kevtris »

Well due to popular demand here's more! This time I did a proper job and produced single tracks each having 1 song, with clean ends and no sfx or other interruptions.

* Boulderdash
* Castlevania (3 tracks)
* Megaman
* Caesar's Palace
* Metroid
* Silver Surfer
* SMB3 (4 different distortions)

http://blog.kevtris.org/blogfiles/nes%20tia/


To answer the question earlier from b00d about if I am using "false dividers", kinda. It's all on my FPGA right now so I get some more latitude in what normally could be done.

It's "stock" TIA channels, but the clock for them is being fed from my dividers for the NES channels. This means that the divider that generates the square waves/triangle is being used to clock the TIA. A "real" TIA cannot natively produce the tonal range I am getting. For my divider, I run it off the 1.78MHz directly, divided by the NES pitch register value, then feed it directly into the TIA block.

1.78MHz -> NES pitch divider -> TIA divider -> TIA shift registers

However, you COULD run a few TIA's off a PIC micro or similar CPU and run its clock line off one of the microcontroller's timers to do the same thing. On the TIA, the audio clock generation (via the 3.579MHz input) is separate from the CPU input clock (M2) so doing this is not a problem.

I then just write to my TIA channel registers manually through my debugger while the music plays which are mapped into NES address space at 2600h and up. Figured putting them there would be appropriate. I can change distortion, pitch (via the TIA's 5 bit divider) to "tune" channels a bit, and then I can turn the channel on or off and finally select the triangle channel's TIA volume (since otherwise it'd be overpoweringly loud).

If anyone wants to reproduce what I did the register mappings I used were:

2600-2602: select distortion #
2603-2605: select divider
2606-2608: select mode
2609: TIA triangle channel volume

the registers above are arranged in sets of three. The first register of a group is for square 0, the second register is square 1, and the third is triangle.

2600-2602 selects one of the 16 TIA "distortions" for the channel (low 4 bits)

2603-2605 selects the divider on the TIA (5 bits) which divides the incoming clock before sending it to the shifters that make the sound

2606-2608 selects if this particular channel will be NES or TIA. When bit 0 is clear, the regular stock NES audio comes out of the channel. when set, TIA audio comes out.

2609 sets the volume for the triangle channel in TIA mode only. Since the NES cannot control the volume of the triangle, it is required for the TIA, otherwise it overpowers the other 2 channels. The lower 4 bits were used for volume.


I found that using a divider of 0fh for the squares and 1fh for the triangle worked pretty nice for most things. distortion #5, 7, 9, A, B "go together" pretty well.... #6 does too but it's a quieter more "musical" sounding one. You have to adjust the triangle volume a bit though to make it match the squares if this is done.

Distortions 3 and f sound really interesting but are hard to use since the apparent pitch moves up and down as it plays, kind of an "Eeeoooeeeooo" sound. 2 and e are very low pitch and you have to crank up the pitch using the divider at 0 or 1, and then it's hard to "tune" the squares to it unless you use 2 or e for them also.

divider values of 3, 7, F, and 1F seem to work the best since they are multiples of each other. (reload is N-1, so that means the division ratios are 4, 8, 10, and 20h). I didn't try any "odd" ratios like 3, 6, 12, 24 or whatever... maybe I should. The 3/7/f/1f set sounded the best musically so far.

Sorry for a bit of rambling but that's pretty much all there is to know about how I did it and how to implement it on an emulator if someone wanted to give it a shot. It shouldn't be very hard to add.
/* this is a comment */
User avatar
RLError
Posts: 48
Joined: Sat Jul 25, 2009 8:45 am

Post by RLError »

Thanks for sharing these, I really like them. Are you going to do more? Would you consider giving the treatment to any tunes from Wizards and Warriors 1-3?
User avatar
Zepper
Formerly Fx3
Posts: 3264
Joined: Fri Nov 12, 2004 4:59 pm
Location: Brazil
Contact:

Post by Zepper »

*ahem*

- Could someone answer me if such sound could be reproduced by an emulator?
User avatar
tokumaru
Posts: 12106
Joined: Sat Feb 12, 2005 9:43 pm
Location: Rio de Janeiro - Brazil

Post by tokumaru »

Zepper wrote:- Could someone answer me if such sound could be reproduced by an emulator?
It probably could, if you can write code to emulate the sound part of the TIA. I still haven't understood exactly how kevtris "glued" it all up, but maybe he can give tips on how to make this in software...
User avatar
clueless
Posts: 496
Joined: Sun Sep 07, 2008 7:27 am
Location: Seatlle, WA, USA

Post by clueless »

User avatar
Hamtaro126
Posts: 786
Joined: Thu Jan 19, 2006 5:08 pm

Post by Hamtaro126 »

The emulator project should be called Project:Tiger

If someone can do TIA for NSF and NES emulators, That's Grrrrrreat!!!

If so, NSFs with TIA can be accessed with unused bit 6 or 7

(This post, really has no relation to, but mocks Tony the tiger.)
AKA SmilyMZX/AtariHacker.
User avatar
Memblers
Site Admin
Posts: 3902
Joined: Mon Sep 20, 2004 6:04 am
Location: Indianapolis
Contact:

Post by Memblers »

This is sounding really cool. On my Squeedo synth (on a PIC18 originally, so yeah a PIC can do something like this) I want to get some sound like this too, the wavetable synth will include some 2600 and POKEY waveforms. I've got the waveforms already, but haven't resampled them to the right size yet. It doesn't have an NSF player as part of it, but it probably could be hooked up to use the same format kevtris used for similar output. It won't sound identical to this though, the tuning would be different.

Since my newer synth is written in C, the hope is that it could be supported on any emulators by using a DLL I'll build of it. So in theory, it should sound identical to the hardware version, no matter how strange the algorithms get.
User avatar
kevtris
Posts: 504
Joined: Sat Oct 29, 2005 2:09 am
Location: Indianapolis
Contact:

Post by kevtris »

BUT WAIT, THERE'S MORE! If you order right now, you'll also receive these 10 great new tracks!

Well not really, but I did make 10 more tracks!

I took a few suggestions and gave it a whirl and this is what I added tonight:

* Linus Spacehead (three tracks, using some of the weirder waveforms)
* Faxanadu (two tracks)
* Wizards and Warriors 1 (2 tracks)
* Wizards and Warriors 2
* Ducktales (the moon)
* Adventure Island

http://blog.kevtris.org/blogfiles/nes%20tia/

enjoy.
/* this is a comment */
User avatar
RLError
Posts: 48
Joined: Sat Jul 25, 2009 8:45 am

Post by RLError »

kevtris wrote:enjoy.
Thank you so much! These are so cool!

edit:Are you familiar with Conquest of the Crystal Palace? I think there might be one or two good tracks from that game for this.
User avatar
Zepper
Formerly Fx3
Posts: 3264
Joined: Fri Nov 12, 2004 4:59 pm
Location: Brazil
Contact:

Post by Zepper »

- kev: care to record some boss music, like from MegaMan games? ^_^;;
User avatar
RLError
Posts: 48
Joined: Sat Jul 25, 2009 8:45 am

Post by RLError »

I wish I knew why this music sounds so good to my ears. I never had an Atari 2600. I've been listening to it a lot. Maybe it is the creativity that I am appreciating? Anyway, it's good stuff. Thanks again.
User avatar
kevtris
Posts: 504
Joined: Sat Oct 29, 2005 2:09 am
Location: Indianapolis
Contact:

Post by kevtris »

Ask and ye shall receive. I have done a few more tracks including some requests.


This time I have added:

* Megaman 2 boss music
* Memblers' Chipography (3 tracks)
* abadidea's Her Courage
* GI Joe track 7
* Novayoshi's "life2.nsf"

Also, I have added a single archive with all the tracks in it for easy leechage.

http://blog.kevtris.org/blogfiles/nes%20tia/

Enjoy!
/* this is a comment */
User avatar
Zepper
Formerly Fx3
Posts: 3264
Joined: Fri Nov 12, 2004 4:59 pm
Location: Brazil
Contact:

Post by Zepper »

- Awesome, thanks a lot for the MM2 boss music! :)
User avatar
Hamtaro126
Posts: 786
Joined: Thu Jan 19, 2006 5:08 pm

Post by Hamtaro126 »

Hebereke Music Everyone???

Also, Wagyan Land and Yo! Noid
AKA SmilyMZX/AtariHacker.
Post Reply