AY 3 8912/8910 to Genny ?

For anything related to sound (YM2612, PSG, Z80, PCM...)

Moderator: BigEvilCorporation

Post Reply
KanedaFr
Administrateur
Posts: 1139
Joined: Tue Aug 29, 2006 10:56 am
Contact:

AY 3 8912/8910 to Genny ?

Post by KanedaFr » Sun Feb 23, 2014 12:07 am

Hi 'ryone,

I have some fx and tunes made for AY 8910 and 8912 I'd like to convert for Genny.
Some times ago, Shiru told it was easy to convert AY sound to Genny.

Could someone point me to the right way to do this ?
I have several projects on hold due to this

thanks

Charles MacDonald
Very interested
Posts: 292
Joined: Sat Apr 21, 2007 1:14 am

Re: AY 3 8912/8910 to Genny ?

Post by Charles MacDonald » Sun Feb 23, 2014 5:08 pm

I'd have thought it would be difficult since the YM2612 is the one FM chip that isn't AY8910/YM2149 compatible, almost all the others (YM2203, YM2610, YM2608, etc.) have AY8910/YM2149 PSG outputs.

Maybe using the SSG-EG envelopes makes the FM channels sound more like AY channels, and that's the trick? I'd love to know more myself.

Mask of Destiny
Very interested
Posts: 615
Joined: Thu Nov 30, 2006 6:30 am

Post by Mask of Destiny » Mon Feb 24, 2014 5:09 am

Could you just use the PSG and emulate the envelopes in software or is there not enough resolution in the attenuation registers for that?

Aly James
Very interested
Posts: 74
Joined: Sun Mar 31, 2013 11:34 pm
Location: FRANCE
Contact:

Post by Aly James » Tue Feb 25, 2014 3:17 am

It could be not that hard if it is only simple music..
(simple notes, no custom techniques).
First the AY frequency counter is 12-bit versus 10-bit on the PSG
which allows for a lower frequency range.
(ex: PSG lowest Tone FRQ possible = counter set to 1024 = 109.239044 Hz (NTSC clocked))
Secondly the AY might have a different Master Clock on the original system the music/Fx was made for.

Basically;
PSG frequency (Hz) = fMasterClock(hz)/32*(10-bit counter)
AY frequency (Hz) = fMasterClock(hz)/16*(12-bit counter)


Also,
the AY can mix its Noise channel with the Tone channels which PSG cannot.
The Noise frequency system on the AY is also different but lacks the wide frequency range the PSG has when controlled by its third tone channel...

Volume is the same :) , 4-bit, excepted that the AY has an optional hardware envelope mode...which is, by the way, the SSG part of the YM2612 :)
If it is in use, you can sort of emulate this (because the volume is also 4-bit)
knowing that the envelope period is 16-bit,
Envelope period frequency(Hz) = fMasterClock(hz)/256*(16-bit envelope period)
You also have to take in account the hardware envelope shape register, which will toggle the CONT, ATT, ALT and HOLD bits to form a looping (or not looping envelope) >>see the Nemesis SSG detail in the YM2612 sticky for further infos..

Last but not least, AY Music or (YM2149) might use custom techniques which will require a high resolution update rate, for example using the hardware looping envelope to produce saw tooth or triangle shaped bass notes, or Timer synced writes directly to the volume register to create modulation or custom waveforms at audio rates...

All of this can be emulated on the PSG (I did a lot of tests on hardware for my SPSG SN76489 VST) but some expansive things might not be easy with a game running at the same time :)

Hope that helps

Post Reply