Connect AY-3-8910 sound chip to FME-7 board

Discuss hardware-related topics, such as development cartridges, CopyNES, PowerPak, EPROMs, or whatever.

Moderator: Moderators

User avatar
infiniteneslives
Posts: 2104
Joined: Mon Apr 04, 2011 11:49 am
Location: WhereverIparkIt, USA
Contact:

Re: Connect AY-3-8910 sound chip to FME-7 board

Post by infiniteneslives »

jpx72 wrote:Dic-sc7 made a new schematic for connecting the yamaha chip:
http://www.forum.emunes.pl/index.php/to ... l#msg47858
Yeah that mess of an opamp and dozen or so resistors really negates the clock selecting advantages of the YM...

Good to hear the word is the 8912 won't suffer the same volume issues.

Thanks for pointing out the reset thing l_oliveira, I wondered how necessary it really was but never took the time to look into it.
If you're gonna play the Game Boy, you gotta learn to play it right. -Kenny Rogers
80sFREAK
Posts: 275
Joined: Sat Sep 03, 2011 11:40 pm

Re: Connect AY-3-8910 sound chip to FME-7 board

Post by 80sFREAK »

jpx72 wrote:Dic-sc7 made a new schematic for connecting the yamaha chip:
http://www.forum.emunes.pl/index.php/to ... l#msg47858
A bit weird way to use electronic parts :?
User avatar
elseyf
Posts: 72
Joined: Sat Dec 01, 2012 4:10 am

Re: Connect AY-3-8910 sound chip to FME-7 board

Post by elseyf »

I am getting frustrated :(
I am trying to apply this mod to my spare FME-7 cart, but I don't get the extra sounds out of this thing.
I hooked the AY-3 8910 up as the schematics show and also connected the '139 and '74 (i used 74hc74 instead of 74ls74, but that shouldn't matter) chips properly.
I am trying to output the sound through cinch to hook the sounds up directly to the TV's Audio In (I saw this method somewhere with CV3 in order to not have to mod the expansion connector of the Nes).

Might be neccessary information: I am using a PAL Nes (original Nintendo model, not a clone) and I applied changes to my gimmick! dump in order to have the sprites properly shown when playing on PAL console. The emulator I used to test before burning the Eprom played the sounds just fine, so I think something is up with my AY-3 8910?

Thanks in advance
lidnariq
Posts: 11432
Joined: Sun Apr 13, 2008 11:12 am

Re: Connect AY-3-8910 sound chip to FME-7 board

Post by lidnariq »

Do you have an oscilloscope? If not, you should be able to do the debugging just using your ears (touch them, through >10kΩ resistor, to an amplifier). (Touch the signals and make sure you can see them on a scope / hear them in the audio)
Do 'D' and 'E' in the schematic do anything? If you listen to the AY's direct outputs, do you hear anything? Is your divider working (try bypassing it)?
User avatar
elseyf
Posts: 72
Joined: Sat Dec 01, 2012 4:10 am

Re: Connect AY-3-8910 sound chip to FME-7 board

Post by elseyf »

Unfortunately, I don't have an oscilloscope. Therefore I tried the other method you suggested. I hoked the Audio in of the TV directly to the E and D points of the schematic. If I connect it, I can hear some scratching noise, which has, if I am not mistaken, some kind of rythm. It does not resemble the actual audio in any way.
With direct output you mean the Analog A,B and C? If so, I do not hear anything out of these if I connect the Audio in to these.

I forgot to mention: Is it neccessary to have the exact values for the capacitors (like the unpolarized 1mF capacitor or the 82nF cap, because I only have some electrolyt 1mF caps, the ones with + and - and I did not hook up any 82nF caps).
lidnariq
Posts: 11432
Joined: Sun Apr 13, 2008 11:12 am

Re: Connect AY-3-8910 sound chip to FME-7 board

Post by lidnariq »

You need some capacitor where the 82nF caps are, but they don't need to be that size. I think you should be fine with anything you have lying around that's larger than 90pF and not electrolytic.

I think you should hear a quiet 50Hz (PAL PPU; 60Hz otherwise) buzz on D and E, as I think Gimmick! writes to those registers every vblank. If you don't, check your connections to /ROMSEL, A14 and R/W.
User avatar
elseyf
Posts: 72
Joined: Sat Dec 01, 2012 4:10 am

Re: Connect AY-3-8910 sound chip to FME-7 board

Post by elseyf »

lidnariq wrote:You need some capacitor where the 82nF caps are, but they don't need to be that size. I think you should be fine with anything you have lying around that's larger than 90pF and not electrolytic.

I think you should hear a quiet 50Hz (PAL PPU; 60Hz otherwise) buzz on D and E, as I think Gimmick! writes to those registers every vblank. If you don't, check your connections to /ROMSEL, A14 and R/W.
There is a buzz on E and D and it should be the 50Hz buzz you mean(at least it is very fast).
I read that wires should not be too thin, I think that could be the reason that nothing is happening. I used awg32 wires from an IDE cable, I checked all the traces but there were no shorts nor any wire falsely connected. I will try thicker wires and look what happens
User avatar
l_oliveira
Posts: 409
Joined: Wed Jul 13, 2011 6:51 am
Location: Brasilia, Brazil

Re: Connect AY-3-8910 sound chip to FME-7 board

Post by l_oliveira »

Isn't the CPU clock frequency on the PAL NES different than that of a NTSC NES ? how that would affect anything tied to the M2 signal ?
User avatar
rainwarrior
Posts: 8734
Joined: Sun Jan 22, 2012 12:03 pm
Location: Canada
Contact:

Re: Connect AY-3-8910 sound chip to FME-7 board

Post by rainwarrior »

If all the music data was copied from the NTSC ROM then the square channels on the AY should detune the same way the squares on the PAL CPU do, but sadly the DPCM won't. The basslines are going to be out of tune because the DPCM tuning tables are different on the PAL CPU. Because the DPCM tuning tables are part of the chip and you can't change them, to compensate for this you'll need to find the game's software tuning tables used for the square channels and retune those.
User avatar
elseyf
Posts: 72
Joined: Sat Dec 01, 2012 4:10 am

Re: Connect AY-3-8910 sound chip to FME-7 board

Post by elseyf »

I tried my dump on an acurate emulator (fceux and nestopia) and i listened to the music and it seemed to me like it plays it just as it should, but slower because of the clock frequence. I also thought of something like the game's music would not playback correctly on pal, but after the test i thought it is just as it should and frequence of clock does not affect the music.
And i also don't think a clone improves compatibility of cpu for playing back either PAL or NTSC games, so it should be the same and the threadstarter used a clone which, if i am not mistaken, uses PAL clock frequence and it plays back the music like it should sound on pal
tepples
Posts: 22708
Joined: Sun Sep 19, 2004 11:12 pm
Location: NE Indiana, USA (NTSC)
Contact:

Re: Connect AY-3-8910 sound chip to FME-7 board

Post by tepples »

There are several issues involved.
  1. Expansion audio: You want the ratio of M2 cycles to synthesizer cycles to be the same. A synth clocked by M2 is fine. A synth clocked by its own oscillator may have problems.
  2. Tonal DMC samples (aka "Sunsoft bass"): You want the ratio of CPU cycles to DMC fetches to be the same.
  3. Raster effects: You want the ratio of PPU dots to CPU cycles to be the same, and in some cases (VRC IRQ and the cycle-timed NMI handlers of Balloon Fight and Battletoads), you want the time from NMI to start of picture to be the same.
  4. DMC IRQ-assisted raster effects: You want the ratio of PPU dots to DMC fetches to be the same.
  5. Total frame length: Most music engines use NMI as a time base for counting tempo.
An AY-3-8910 clone clocked by M2 was used in Sunsoft games that use Sunsoft bass. This means A is OK, and the limiting factor to keeping a music engine in tune on PAL NES is condition B.

The Dendy, a PAL famiclone, uses a divide-by-15 counter on the CPU, and it put the extra 50 lines of a 50 Hz TV system before NMI. This ensures condition C, and because the pitches stay almost the same, the cloner didn't have to modify the DPCM table, ensuring B, which is why Sunsoft bass should work on Dendy. Ensuring B and C ensures D, which mostly concerns compatibility with games like Time Lord and Fire Hawk.

A PAL NES, on the other hand, fails condition C because of the 2A07's divide-by-16, and to compensate, it also fails B. This means the pitch tables have to be modified to keep the rest of the music from being way flat compared to the bass. I have no access to a PAL NES and thus no way to see to what extent the changes to B and C canceled out with respect to D.

E just makes the music slower or faster. It doesn't knock things out of tune, though it might knock repeating rhythmic patterns on DMC out of sync.
User avatar
elseyf
Posts: 72
Joined: Sat Dec 01, 2012 4:10 am

Re: Connect AY-3-8910 sound chip to FME-7 board

Post by elseyf »

So is it normal that there is no sound coming out of the AY-3 8910 because of these tuning tables?
Or, as i have understood, there should be the music playing back, but some channels out of sync which would be the channels coming out of the AY-3-8910?
lidnariq
Posts: 11432
Joined: Sun Apr 13, 2008 11:12 am

Re: Connect AY-3-8910 sound chip to FME-7 board

Post by lidnariq »

The pitches should be wrong, in the sense of what you get if you try playing the japanese ROM in an emulator set to PAL.
If you're not getting any audio at all, that's not what's wrong.

The 50 Hz buzz should sound like a pitch, not a clicking. something like this:
50hz-impulse-train.mp3
(3.09 KiB) Downloaded 237 times
User avatar
elseyf
Posts: 72
Joined: Sat Dec 01, 2012 4:10 am

Re: Connect AY-3-8910 sound chip to FME-7 board

Post by elseyf »

lidnariq wrote:The pitches should be wrong, in the sense of what you get if you try playing the japanese ROM in an emulator set to PAL.
If you're not getting any audio at all, that's not what's wrong.

The 50 Hz buzz should sound like a pitch, not a clicking. something like this:
50hz-impulse-train.mp3
The sound at Point D and E just sound like the sample you provided.
I don't care for the pitch of the sound as long as I can hear all the sounds.
I rewired the chips with thicker wires, but did not change anything.
It would help if there was a way to test the sound chip and the other chips
so that i can assure myself that the chip are all working.
User avatar
elseyf
Posts: 72
Joined: Sat Dec 01, 2012 4:10 am

Re: Connect AY-3-8910 sound chip to FME-7 board

Post by elseyf »

Solved it
Post Reply