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

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

Moderators: B00daW, Moderators

Post Reply
sdm
Posts: 293
Joined: Tue Apr 11, 2006 4:08 am
Location: Poland

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

Post by sdm » Mon Jul 09, 2007 1:56 am

I and my friend try connect AY-3-8910 to FME-7 cartridge (Batman Return of The Joker). First we write Gimmick! Sunsoft5B ROM on FME-7 cartridge,
Gimmick! work on it, but without hearing additional sound channels. Our idea is connect AY-3 sound chip external to FME-7 board to recieve Sunsoft 5B function.

We try use common ZX Spectrum informations from net, but nothing work :/

Maybe that project is impossible to realize, but maybe not? ;) :)

Image
Image
Image
Image
Image
Last edited by sdm on Tue Oct 09, 2007 2:39 am, edited 1 time in total.

User avatar
kevtris
Posts: 504
Joined: Sat Oct 29, 2005 2:09 am
Location: Indianapolis
Contact:

Post by kevtris » Mon Jul 09, 2007 3:29 am

it SHOULD work... you might want to post a schematic of your circuit. I only see a single quad NAND gate connected to your AY-3-8910 chip... I don't know if that would be enough to decode C000 and E000h.

You will need to decode C000-DFFF and E000-FFFF for writing... a 74138 would do this for you, connected to R/W, A13, A14, and /CE.

Some other logic (be sure to look at the datasheet for the AY-3-8910) may be required to interface to its funky decoding scheme, which shared the address and data lines. This is good in this case, since C000's data selects which register to write to.
/* this is a comment */

sdm
Posts: 293
Joined: Tue Apr 11, 2006 4:08 am
Location: Poland

Post by sdm » Mon Jul 09, 2007 1:03 pm

Schematics of that cart:
http://img77.imageshack.us/my.php?image=1001711ji3.jpg


I'm curious which Sunsoft 5B pin is AUDIO OUT?? Someone have Gimmick! famicom cartridge??? :roll:

User avatar
kyuusaku
Posts: 1665
Joined: Mon Sep 27, 2004 2:13 pm

Post by kyuusaku » Mon Jul 09, 2007 2:45 pm

It uses a 6.4MHz RC clock? Not Phi2?

User avatar
kevtris
Posts: 504
Joined: Sat Oct 29, 2005 2:09 am
Location: Indianapolis
Contact:

Post by kevtris » Mon Jul 09, 2007 4:00 pm

sdm wrote:Schematics of that cart:
http://img77.imageshack.us/my.php?image=1001711ji3.jpg


I'm curious which Sunsoft 5B pin is AUDIO OUT?? Someone have Gimmick! famicom cartridge??? :roll:
OK I see some things..

Right off the bat, you should clock the AY-3-8910 off of M2 (aka "phi 2") on the NES. Do not use an external oscillator.

I drew up a circuit that "should" work with the AY-3-8910. There's no reason it won't work (crosses fingers). It uses two chips, a 74139 dual 2 to 4 line decoder, and 7402 quad NOR gate. It should work fine. You cannot read from the AY-3-891x chip but this is fine- you'd get a bus conflict if you tried with the ROM anyways.

http://tripoint.org/kevtris/mappers/inc ... ksound.jpg

Stuff marked "NES" connects to the NES cart. The setup is pretty simple- the 74139 decodes WRITES to C000-FFFF using the first half of the chip, then the second half decodes C000-DFFF and E000-FFFF sections.

The NOR gates then converts the enables into a form the AY-3-891x likes. And that's about it.

The 1uF cap and diode form a power-on reset circuit (the capacitor value might have to be lowered... say 0.1 uf or even 0.01uf depending on how fast the game decides to write to the chip after powerup. 1uF is safe in any event, tho you may have to hit reset once or twice on your NES.

If all goes well, you need to connect the following to the NES cart board:

D0-D7, R/W, M2, /CE (for PRG ROM), A13, A14, 5 volts, and ground.

If anyone else makes one of these, I suggest using an AY-3-8912 if you have it, simply because it's 28 pins instead of 40. Most of the pins aren't used since they are two 8 bit I/O ports.

audio resistors.... I am not sure what values to use. The original poster used what looks like 1K? resistors between all the audio outputs, and then a 3K resistor to 5V. For an audio coupling cap, .1 uf to 10uF is fine.
/* this is a comment */

sdm
Posts: 293
Joined: Tue Apr 11, 2006 4:08 am
Location: Poland

Post by sdm » Tue Jul 10, 2007 12:16 pm

Ok. My friend test it, but it doesn't work corectly, he hear some of sound, like jump and star throw. He try verify cart, maybe make something faulty.

edit: He verifi cart, maybe AY-3 is damaged, or something wrong in schematics? :?

Computolio
Posts: 30
Joined: Tue Jan 24, 2006 1:03 pm

Post by Computolio » Fri Jul 20, 2007 1:52 am

Maybe he somehow accidentally used the PAL program ROM? Because that's exactly how the PAL ROM behaves in emulators- the music no longer touches the AY chip, but some of the sound effects still do.

User avatar
Senshu
Posts: 11
Joined: Sun May 20, 2007 11:33 pm
Location: Beyond Coast

Post by Senshu » Fri Jul 20, 2007 6:03 am

There is no PAL game with a Sunsoft5B.
Last edited by Senshu on Fri Aug 31, 2007 2:59 pm, edited 1 time in total.

User avatar
kevtris
Posts: 504
Joined: Sat Oct 29, 2005 2:09 am
Location: Indianapolis
Contact:

Post by kevtris » Thu Aug 30, 2007 6:17 pm

Well, I went and hooked an AY-3-8910 up to a RoTJ board, and dumped the japanese gimmick .NES onto it using some EPROMs.

Long story short, I got it working. So yes it IS possible. I only used one 74HC139 in addition to the AY-3-8910.

I will post pics + schematic when I get my digicam's memory card dumper working.

I used a different circuit compared to the one I posted previously, since I figured out how to get rid of one chip. One odd thing about it, was I had to ground the TEST2 pin (which the datasheet says to leave floating, giggle.) When I didn't ground it, the chip would "glitch" and make odd noises vaguely following the music. When I touched this pin with my finger, I found it would fix it and play correctly. Measuring with the meter showed it riding at around 0.042V. I connected it to ground and it worked. The datasheet unfortunately does not tell me what TEST2 is, so I have no clue.

I suspect though it was picking up a signal coupled by the chip near it... not much I could do about that. Connecting a capacitor to this pin to ground fixes the problem as well (and the voltage still runs around 0.042V)... just touching the pin with a finger or meter probe would make it operate correct, so I'm pretty sure it was getting false triggers. Pulling it to 5V makes writes to the chip cease, so it could be some kind of chip enable.
/* this is a comment */

User avatar
kevtris
Posts: 504
Joined: Sat Oct 29, 2005 2:09 am
Location: Indianapolis
Contact:

Post by kevtris » Thu Aug 30, 2007 11:27 pm

Followup: You have to divide M2 by 2 for this to be the same. I used a 4040, but you could use a 7474. Anything to divide it by 2 will work.

The other option is you could use a YM2149 which is the Yamaha version of the AY-3-8910, and has a divide by 2 enable on it.

I highly suspect that the core inside the real Sunsoft chip is a YM2149 since this is a japanese made cart (and Yamaha is of course japanese) Also, it was fairly late, and I don't think GI was even making AY-3-8910's any more... Around this time is when GI sold their chip assets to Arizona Microchip... and this Microchip was born :-)


I got the pics dumped off my camera, and I made some wave files of the real cart (yeah I got one for testing) and my repro with and without the divider. Once tripoint is back up, I will post those and put links here.
/* this is a comment */

User avatar
kevtris
Posts: 504
Joined: Sat Oct 29, 2005 2:09 am
Location: Indianapolis
Contact:

Post by kevtris » Sat Sep 01, 2007 3:55 pm

Well here's the pics of the operation, and example MP3s. Enjoy.


schematic of what I did (note: put a divide by two in the M2 line to the AY-3-8910. I do not show this. sorry. Use a 7474 dual flipflop and use one section, or use a 4040 binary counter which is what I did.):

http://tripoint.org/kevtris/mappers/inc ... mmick5.jpg


perfboard add-on:

http://tripoint.org/kevtris/mappers/inc ... mmick3.jpg
http://tripoint.org/kevtris/mappers/inc ... mmick4.jpg

and with the cart put together:

http://tripoint.org/kevtris/mappers/inc ... mmick1.jpg
http://tripoint.org/kevtris/mappers/inc ... mmick2.jpg

I added a small RCA jack to the wire end later on, but didn't take a picture of it.


And here's the MP3 samples.

The REAL cart, playing through a real famicom. The relative channel levels are correct since this is direct from the real deal.

http://tripoint.org/kevtris/mappers/inc ... _real2.mp3

And then here's my cart I made, above:

http://tripoint.org/kevtris/mappers/inc ... _cart2.mp3
/* this is a comment */

sdm
Posts: 293
Joined: Tue Apr 11, 2006 4:08 am
Location: Poland

Post by sdm » Sun Sep 02, 2007 3:25 pm

hehe good :)

thanks
kevtris wrote: schematic of what I did (note: put a divide by two in the M2 line to the AY-3-8910. I do not show this. sorry. Use a 7474 dual flipflop and use one section, or use a 4040 binary counter which is what I did.):

http://tripoint.org/kevtris/mappers/inc ... mmick5.jpg
Can you mark changes on schematic? ;)

User avatar
Senshu
Posts: 11
Joined: Sun May 20, 2007 11:33 pm
Location: Beyond Coast

Post by Senshu » Sun Sep 02, 2007 3:59 pm

Thank you for that :) At first the whole idea might have sounded strange even impossible...and now you have it, custom made sunsoft5b. Indeed, one of the best projects in a long time imho.

edit:

About dividing M2 by 2 using 7474, could you please tell me if I am understanding it correctly ? here is how I want to do it:

7474s "D" and "/Q" connected together,
M2 connected to 7474s "CLOCK",
my output is "Q", conected to AY CLOCK,
both "CLR" on 7474 on high (+5V).

User avatar
kevtris
Posts: 504
Joined: Sat Oct 29, 2005 2:09 am
Location: Indianapolis
Contact:

Post by kevtris » Sun Sep 02, 2007 4:18 pm

Senshu wrote:Thank you for that :) At first the whole idea might have sounded strange even impossible...and now you have it, custom made sunsoft5b. Indeed, one of the best projects in a long time imho.

edit:

About dividing M2 by 2 using 7474, could you please tell me if I am understanding it correctly ? here is how I want to do it:

7474s "D" and "/Q" connected together,
M2 connected to 7474s "CLOCK",
my output is "Q", conected to AY CLOCK,
both "CLR" on 7474 on high (+5V).
That is exactly it. Have fun :-)
/* this is a comment */

sdm
Posts: 293
Joined: Tue Apr 11, 2006 4:08 am
Location: Poland

Post by sdm » Sat Oct 06, 2007 10:32 am

I cannot see detailed info on your schematics:
?
Image



Almost finished, i must only connect it to fme7 cart :)
Image
Image
Last edited by sdm on Sun Oct 07, 2007 5:31 am, edited 1 time in total.

Post Reply