nfg.forums

NFG Forums => Audio Mods => Topic started by: Stefan_L on August 15, 2010, 09:03:13 AM

Title: Arcade game S/PDIF mods
Post by: Stefan_L on August 15, 2010, 09:03:13 AM
I have used the DIT4096 as i used for MU10 on a couple of arcade games.

Seibu SPI mobo... i'ts good this is cartridge based so only one PCB needs to be modified, most arcade games use unique PCB's for each game.
For the SPI did i use the exact same setup of DIT4096 as for MU10..see pic:

(http://www.ym2149.com/dit4096_setup.png)

Seibu SPI uses a Yamaha YMF271-F soundchip and a YAC513-M DAC.
LRCK is pin 7 (DAC)
Bitclock is pin 5  (DAC)
Data is pin 8 (DAC)
Masterclock is pin 44 (YMF271)

Here is a gameplay recording how it sounds when i play "Viper Phase 1"  :) http://www.ym2149.com/spdif/viperphase1_gameplay.mp3 (http://www.ym2149.com/spdif/viperphase1_gameplay.mp3)


I have an "Brave Blade" PCB also and tested this and it works perfect, the YMF271 on BB actually ouput 44.11 khz but that was no problem. BB only uses the YMF271 only for music and the soundeffects are coming from the playstation SPU (BB's is based on playstations hardware).

This setup should work on all arcade games using YMF271...  like other "Eighting / Raizing" games using the Brave Blade hardware and "Jaleco Megasystem 32" games.
Title: Re: Arcade game S/PDIF mods
Post by: l_oliveira on August 16, 2010, 12:28:04 PM
That works only for games with I2S compatible soundchips but I can suggest a lot which you could use your circuit with:

YMF-278B (OPL4)  Newer  Raizing/Psyko and other games with SH-2 CPU
YMF271 (as you were able to)
Any variations of other Yamaha sound chips using YAC513 or YAC516 DAC.
Some Konami games which use I2S output from custom sampler chips
Some modern 3D games from Konami using Ricoh samplers.

SEGA Titanvideo, NAOMI, Namco System 246/256...  Etc.


Great stuff. Excellent way to get rid of processing noise too... :)
Title: Re: Arcade game S/PDIF mods
Post by: Stefan_L on August 19, 2010, 02:29:35 PM
Yes i have some arcade games using YMF278B and have thought about testing this on them also  :)

I did S/PDIF mod "Taito F3" also... only Top Ranking Stars but it should work on all F3 games.
Two pins needs a change compared from the setup i posted earlier... that is "CLK0" to be connected to 5v and "FMT1" connected to ground... see pic:

(http://www.ym2149.com/taito_f3_dit4096.png)

F3 uses a TDA1543 DAC.

Bitclock is pin 1 (on DAC)
LRclock is pin 2 (on DAC)
Data is pin 3 (on DAC)
Masterclock is pin 34 (on 5505, Otis)

Taito F3 outputs 29.99 khz so it's not S/PDIF standard, and you need to connect it to a device that can sync to external clock.
Title: Re: Arcade game S/PDIF mods
Post by: Stefan_L on August 30, 2010, 02:37:21 AM
Did try and modify a OPL4 (YMF278) arcade game... "Bang Bang Ball" and it worked perfect.. of course ;-)
Here is a recording of some gameplay: http://www.ym2149.com/spdif/bangbangball_gameplay_spdif.mp3 (http://www.ym2149.com/spdif/bangbangball_gameplay_spdif.mp3)
It output 44.1 khz and the setup is exactly like what i showed in the first post.

I don't have any Psikyo games that use OPL4 to try this on but i know they have a different oscillator so maybe the setup needs some changes to work properly with them?

Bang Bang Ball uses a NEC "D6376" DAC.
LRCLK = pin 14 (on DAC)
Bitclock = pin 16 (on DAC)
Data  = pin 15 (on DAC)
Masterclock = pin 19 (on YMF278)

BTW i tend to write "LRclk" wich actually is called "Sync" on DIT4096 and "Bitclock" wich is called "Sclk" on Dit4096... this is becuase the first S/PDIF mod i did was the one for SNES and thats where i got those names stuck in my head  ;D

It's possible to list games using YMF278 (and other soundchips)  on MAWS:

YMF278:
http://maws.mameworld.info/maws/srch.php?cpu2=282 (http://maws.mameworld.info/maws/srch.php?cpu2=282)

YMF271-F:
http://maws.mameworld.info/maws/srch.php?cpu2=281 (http://maws.mameworld.info/maws/srch.php?cpu2=281)

ES5505 (Taito F3):
http://maws.mameworld.info/maws/srch.php?cpu2=65 (http://maws.mameworld.info/maws/srch.php?cpu2=65)

I don't really know what to test now... possible G-Net (using "Zoom ZSG-2" soundchip for music) or maybe Battletoads wich uses "BSMT2000" soundchip.

So far it's only the Taito F3 that really benefits from the S/PDIF mod as they have such a noise output, the others are sounding fairly clean any way... well maybe they get slightly sharper sound after the mod, but only hi-fi nerds will hear it :)


Title: Re: Arcade game S/PDIF mods
Post by: l_oliveira on September 01, 2010, 01:19:09 PM
It's called "LRclk" because it's used to toggle the DAC internal panpot circuitry. It's what gives the stereo effect.
Bitclock should pulse once a bit is sent.  I2S is actually an special (audio data) application of the I2C bus.

SPDIF and TOSLINK is just methods for encoding all those signals in a single wire. :)

Good to see you have things under control :)
Title: Re: Arcade game S/PDIF mods
Post by: Stefan_L on December 09, 2010, 04:44:42 AM
Just have to correct the samplerate of Taito F3... it is "29.76" khz and not "29.99" as i wrote first :)

Anyway i have no way of doing recordings from F3 as no souncards seems to support that sample rate.
I can record at 32khz and then resample to 29.76, but i dont know how accurat that will be?

(http://www.ym2149.com/pics/f3_freq.jpg)
Title: Re: Arcade game S/PDIF mods
Post by: Stefan_L on December 12, 2010, 09:43:49 AM
ok here is a recording from Taito F3 (Top Ranking Stars)... i recorded it at 44.1khz and changed the sample rate of the recording to 29.762khz using Audacity.

Attract mode and some ingame:
http://www.ym2149.com/spdif/top_ranking_stars_spdif_ingame.flac (http://www.ym2149.com/spdif/top_ranking_stars_spdif_ingame.flac)
Title: Re: Arcade game S/PDIF mods
Post by: Stefan_L on December 27, 2010, 02:30:25 AM
Another Taito F3 thing is that left and right channels are reversed using this S/PDIF mod? Compared to how the PCB output the channels... i don't know if my mod is wrong or Taito did not follow the DAC left and right when designing the F3 PCB's?

Anyway here is a gameplay recording from one of the more popular F3 games... Rayforce:
http://www.ym2149.com/spdif/rayforce_spdif_29762khz_%28gameplay%29.flac (http://www.ym2149.com/spdif/rayforce_spdif_29762khz_%28gameplay%29.flac)
I recorded it at 44.1khz and then changed the samplerate to 29.762khz, and also switched the left and right channels.
The "Top Ranking Stars" recording i posted earlier have wrong left and right channles as i did not know how it should be (only listened to it from the mono jamma output earlier).
Title: Re: Arcade game S/PDIF mods
Post by: l_oliveira on December 29, 2010, 10:03:05 AM
Add an inverter to the LRCK pin if you need to invert the output pins which each channel goes to. ;)


In fact that's just an "detail" and I suppose the board actually outputs the channels inverted "by design". Obviously I don't know why but that might be the case.

There's a few things that could cause the channels to be swapped:

-The software is programming the synthesizer chip in that way.
-The original DAC is rigged in a way the channels are inverted but the new data transfer method you're using is not ready for that. (The analog outputs would be set in a way they would swap the channels)
-Something regarding the behavior/configuration of your SPDIF encoder chip...
Title: Re: Arcade game S/PDIF mods
Post by: Stefan_L on January 10, 2011, 06:22:37 AM
About F3... the data format that goes to the DAC is I2S but the actual data format from the sound chip 5505 and DSP 5510 is "24-bit Left Justified" and if you take the signal directly from the 5510 insted of from the DAC so do the left and right not get reversed and the DIT4096 must be configed to "24-bit left justified" then of course.
I will write more about it later maybe.

Anyway i did a post at mametesters wich has lots of F3 recordings from both 5505 and from 5510 wich could be interesting:
http://mametesters.org/view.php?id=4173 (http://mametesters.org/view.php?id=4173)
Title: Re: Arcade game S/PDIF mods
Post by: Stefan_L on March 28, 2011, 01:46:27 AM
Time for "Konami GX"... it was not easy to find where to get the data for the DIT4096, i could not use the direct output from the TMS57002 DSP as it was further mixing with the Konami soundchips (054539) but i managed after a while to get the signals from the Konami custum 056602 circuit, the 056602 contain an unknown DAC.

The same setup as i show in the first post in this thread can be used but with one change.. see pic:

(http://www.ym2149.com/spdif/konamigx_spdif_setup.jpg)

Here are the points you can get the signals from:

(http://www.ym2149.com/spdif/konamigx_spdif.jpg)

And showing the 056602:

(http://www.ym2149.com/spdif/kgx_spdif.jpg)

Those pics show the old version of the GX mobo, newer ones have different PCB layout but still use the 056602 so it is no problem.

And this is how it sounds like (Sexy Paroudius attract mode and gameplay) :D
http://www.ym2149.com/spdif/sexyparodius_attractmode_gameplay_spdif.mp3 (http://www.ym2149.com/spdif/sexyparodius_attractmode_gameplay_spdif.mp3)

Title: Re: Arcade game S/PDIF mods
Post by: RGB32E on May 06, 2012, 11:15:51 AM
Have any of you tried SPDIF modding any of the CPS PCBs?
Title: Re: Arcade game S/PDIF mods
Post by: Stefan_L on May 17, 2012, 05:29:28 AM
It is not possible for me to S/PDIF modify CPS as the curcuit i use needs a masterclock signal and CPS is missing that :(
Also CPS uses two soundchips... one of them only output analog sound.
Title: Re: Arcade game S/PDIF mods
Post by: RGB32E on May 19, 2012, 01:14:30 AM
Quote from: Stefan_L on May 17, 2012, 05:29:28 AM
It is not possible for me to S/PDIF modify CPS as the curcuit i use needs a masterclock signal and CPS is missing that :(
Also CPS uses two soundchips... one of them only output analog sound.

That's too bad.  So this is the same for CPS2 &3?  Have you used any other interface ICs other than the DIT4096?  I've used the CS8406 with several of my SNES systems and would be curious to know some scenarios where the DIT4096 would be preferred?  The main difference between the two ICs is that there is a master clock bit on the DIT to allow better compatibility for interfacing some devices? 
Title: Re: Arcade game S/PDIF mods
Post by: Hojo_Norem on May 19, 2012, 03:30:50 AM
Quote from: RGB32E on May 19, 2012, 01:14:30 AM
Quote from: Stefan_L on May 17, 2012, 05:29:28 AM
It is not possible for me to S/PDIF modify CPS as the curcuit i use needs a masterclock signal and CPS is missing that :(
Also CPS uses two soundchips... one of them only output analog sound.

That's too bad.  So this is the same for CPS2 &3?  Have you used any other interface ICs other than the DIT4096?  I've used the CS8406 with several of my SNES systems and would be curious to know some scenarios where the DIT4096 would be preferred?  The main difference between the two ICs is that there is a master clock bit on the DIT to allow better compatibility for interfacing some devices? 

The main advantage the DIT4096 has over the CS8406 is that it can handle more timing options without having to rely on a uIC to control it in software.  Essentially the CS8406 can do what the DIT4096 can and under microprocessor control both chips should have similar capabilities.  The main signal wiring on both is exactly the same, not counting differences in pin layouts.

In short the DIT4096 is slightly easier for DIY projects. (as long as you use a suitable mounting PCB where needed)

As for CPS2, (fingers crossed) I am actually getting a Super Street Fighter II soon and I'll take a look under the hood.  AFAIK the QSound system used on the CPS2 is pure digital sampled sound.  I would not be surprised if there is some form of I2S based DAC inside but then again I wouldn't be surprised if there wasn't either.
Title: Re: Arcade game S/PDIF mods
Post by: Stefan_L on May 19, 2012, 10:23:47 PM
Actaully i have already checked the QSound system... and it also lacks a masterclock... so it does not work with DIT4096 :-\
BTW the samplerate of QSound is 24khz... not so hifi really :D
Title: Re: Arcade game S/PDIF mods
Post by: RGB32E on May 20, 2012, 04:20:07 AM
Quote from: Hojo_Norem on May 19, 2012, 03:30:50 AM
The main advantage the DIT4096 has over the CS8406 is that it can handle more timing options without having to rely on a uIC to control it in software.  Essentially the CS8406 can do what the DIT4096 can and under microprocessor control both chips should have similar capabilities.  The main signal wiring on both is exactly the same, not counting differences in pin layouts.

In short the DIT4096 is slightly easier for DIY projects. (as long as you use a suitable mounting PCB where needed)

As for CPS2, (fingers crossed) I am actually getting a Super Street Fighter II soon and I'll take a look under the hood.  AFAIK the QSound system used on the CPS2 is pure digital sampled sound.  I would not be surprised if there is some form of I2S based DAC inside but then again I wouldn't be surprised if there wasn't either.

Interesting.  I compared the datasheets and both ICs have two pins/bits for master clock selection (both available in HW mode).  The CS8406 lacks 384*Fs:

(http://gamesx.com/wiki/lib/exe/fetch.php?media=cs8406_masterclkselection.png)

Have any of you encountered HW that requires 384*Fs?  Also, in the DIT datasheet, the wiring of TXP and TXN differs between the two ICs.  The CS8406 uses a resistor divider circuit for the signal, and GND is just ground for unbalanced, whereas the DIT4096 needs an isolation transformer and uses both TXP and TXN?  Is this correct in practice?
Title: Re: Arcade game S/PDIF mods
Post by: Hojo_Norem on May 21, 2012, 03:40:24 AM
Quote from: RGB32E on May 20, 2012, 04:20:07 AM
Quote from: Hojo_Norem on May 19, 2012, 03:30:50 AM
The main advantage the DIT4096 has over the CS8406 is that it can handle more timing options without having to rely on a uIC to control it in software.  Essentially the CS8406 can do what the DIT4096 can and under microprocessor control both chips should have similar capabilities.  The main signal wiring on both is exactly the same, not counting differences in pin layouts.

In short the DIT4096 is slightly easier for DIY projects. (as long as you use a suitable mounting PCB where needed)


Interesting.  I compared the datasheets and both ICs have two pins/bits for master clock selection (both available in HW mode).  The CS8406 lacks 384*Fs.


The CS8406 lacks the ability to select 384*Fs in hardware control mode.  If you use the IC in software control mode and control it over the SPI bus from a microcontroller then you can select 384*Fs with the correct commands.  Only Cirrus Logic themselves know why they decided to omit 384*Fs from hardware mode  ???

Quote
Have any of you encountered HW that requires 384*Fs?

The PSX does.  Its the reason I gave the DIT a go in the first place.

Quote
Also, in the DIT datasheet, the wiring of TXP and TXN differs between the two ICs.  The CS8406 uses a resistor divider circuit for the signal, and GND is just ground for unbalanced, whereas the DIT4096 needs an isolation transformer and uses both TXP and TXN?  Is this correct in practice?

Take a look at the S/PDIF output buffer circuits found in the S/PDIF conversion circuit building blocks section on this site (http://www.epanorama.net/documents/audio/spdif.html).  There are a few different methods of taking a TTL level SPDIF signal (whit I am assuming is what you get directly at the IC pin) and converting it to the 'consumer' level.  I use the same resistor divider circuit with the DIT on my PSX mod and it works fine however I wouldn't be the first one to say that using a isolating transformer based circuit would be the ideal way to do it.
Title: Re: Arcade game S/PDIF mods
Post by: RGB32E on May 31, 2013, 12:47:42 PM
Anyone tried modding a Capcom Sony ZN-2?  Is it blocked due to the use of the QSound circuitry?

http://www.system16.com/hardware.php?id=797 (http://www.system16.com/hardware.php?id=797)
Title: Re: Arcade game S/PDIF mods
Post by: Stefan_L on June 06, 2013, 07:15:45 PM
In my latest post so did it sound like i tested a CPS2 when checking the Qsound but it was in fact a ZN-1/2 system i ment.... so no.. ZN-2 does not have a master clock signal that is needed :)
Title: Re: Arcade game S/PDIF mods
Post by: RGB32E on February 07, 2015, 08:58:23 AM
https://oshpark.com/shared_projects/Qdy2pZzr (https://oshpark.com/shared_projects/Qdy2pZzr)
http://www.head-fi.org/t/740288/super-n (http://www.head-fi.org/t/740288/super-n) ... t_11227890

So, someone made a SPDIF transmitter circuit intended for the SNES that has a sample rate converter and uses it's own master clock.  Hence, it appears CPS2 SPDIF might actually be possible?  :D

Here's a picture of the board:
(http://i16.photobucket.com/albums/b40/estation/Forums/snesspdif_zps73ef203d.jpg)

http://shmups.system11.org/viewtopic.php?p=1084691#p1084691 (http://shmups.system11.org/viewtopic.php?p=1084691#p1084691)